return total sent/received in channel information

This commit is contained in:
Carsten Otto
2021-11-27 19:09:05 +01:00
parent 05892ab376
commit d6e16fb8f0
31 changed files with 299 additions and 139 deletions

View File

@@ -16,6 +16,8 @@ public record ChannelDetailsDto(
OpenInitiator openInitiator,
String remoteAlias,
String capacity,
String totalSent,
String totalReceived,
ChannelStatusDto status,
BalanceInformationDto balance,
OnChainCostsDto onChainCosts,
@@ -38,6 +40,8 @@ public record ChannelDetailsDto(
channelDto.openInitiator(),
remoteAlias,
channelDto.capacity(),
channelDto.totalSent(),
channelDto.totalReceived(),
channelDto.status(),
BalanceInformationDto.createFrom(balanceInformation),
onChainCosts,

View File

@@ -13,6 +13,8 @@ public record ChannelDto(
int openHeight,
Pubkey remotePubkey,
String capacity,
String totalSent,
String totalReceived,
ChannelStatusDto status,
OpenInitiator openInitiator
) {
@@ -25,6 +27,8 @@ public record ChannelDto(
localChannel.getId().getBlockHeight(),
localChannel.getRemotePubkey(),
String.valueOf(localChannel.getCapacity().satoshis()),
String.valueOf(localChannel.getTotalSent().satoshis()),
String.valueOf(localChannel.getTotalReceived().satoshis()),
ChannelStatusDto.createFrom(localChannel.getStatus()),
localChannel.getOpenInitiator()
);