Merge pull request #5116 from mempool/simon/fix-undefined-group-channels

This commit is contained in:
wiz 2024-05-30 18:29:53 +09:00 committed by GitHub
commit f0437886ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);