mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-24 08:24:20 +01:00
add private status to channel details
This commit is contained in:
@@ -34,6 +34,7 @@ public class ChannelDetailsController {
|
||||
}
|
||||
Pubkey remotePubkey = localChannel.getRemotePubkey();
|
||||
String remoteAlias = nodeService.getAlias(remotePubkey);
|
||||
return new ChannelDetailsDto(localChannel.getId(), remotePubkey, remoteAlias);
|
||||
boolean privateChannel = localChannel.isPrivateChannel();
|
||||
return new ChannelDetailsDto(localChannel.getId(), remotePubkey, remoteAlias, privateChannel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package de.cotto.lndmanagej.controller;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import de.cotto.lndmanagej.model.ChannelId;
|
||||
@@ -8,6 +9,7 @@ import de.cotto.lndmanagej.model.Pubkey;
|
||||
public record ChannelDetailsDto(
|
||||
@JsonSerialize(using = ToStringSerializer.class) ChannelId channelId,
|
||||
@JsonSerialize(using = ToStringSerializer.class) Pubkey remotePubkey,
|
||||
String remoteAlias
|
||||
String remoteAlias,
|
||||
@JsonProperty("private") boolean privateChannel
|
||||
) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user