Fix for undefined LN group channels

This commit is contained in:
softsimon 2024-05-30 16:15:51 +07:00
parent a9ad892495
commit cfedb5fd24
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -80,6 +80,12 @@ export class GroupComponent implements OnInit {
};
}
}
nodes.map((node) => {
node.channels = node.opened_channel_count;
return node;
});
const sumLiquidity = nodes.reduce((partialSum, a) => partialSum + parseInt(a.capacity, 10), 0);
const sumChannels = nodes.reduce((partialSum, a) => partialSum + a.opened_channel_count, 0);