Skip to content

Commit

Permalink
Channel: fix display of SCID for CLN nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Jan 21, 2025
1 parent 2e7b250 commit 25e49d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions backends/CoreLightningRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const listPeers = async (data: any) => {
remote_pubkey: peer.peer_id,
channel_point: peer.funding_txid,
chan_id: peer.channel_id,
short_channel_id: peer.short_channel_id,
capacity: Number(peer.total_msat / 1000).toString(),
local_balance: Number(peer.to_us_msat / 1000).toString(),
remote_balance: Number(
Expand Down
5 changes: 4 additions & 1 deletion models/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default class Channel extends BaseModel {
// CLN v23.05 msat new
total: string;
to_us: string;
short_channel_id: string; // CLN

channel_id?: string;
alias?: string;
Expand Down Expand Up @@ -187,7 +188,9 @@ export default class Channel extends BaseModel {

@computed
public get shortChannelId(): string | undefined {
return this.channelId
return this.short_channel_id
? this.short_channel_id
: this.channelId
? chanFormat({ number: this.channelId }).channel
: undefined;
}
Expand Down

0 comments on commit 25e49d4

Please sign in to comment.