Skip to content

Commit 1e252e5

Browse files
authored
Make eclair-cli -s display short channel ids correctly (#2488)
in "short/compact mode" (-s), eclair-cli was not getting short channel ids from the right place and they were always set to null.
1 parent 37a3911 commit 1e252e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-core/eclair-cli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jq_filter='if type=="object" and .error != null then .error else .';
139139

140140
# apply special jq filter if we are in "short" ouput mode -- only for specific commands such as 'channels'
141141
if [ "$short" = true ]; then
142-
jq_channel_filter="{ nodeId, shortChannelId: .data.shortChannelId, channelId, state, balanceSat: (try (.data.commitments.localCommit.spec.toLocal / 1000 | floor) catch null), capacitySat: .data.commitments.commitInput.amountSatoshis, channelPoint: .data.commitments.commitInput.outPoint }";
142+
jq_channel_filter="{ nodeId, shortChannelId: .data.shortIds.real.realScid, channelId, state, balanceSat: (try (.data.commitments.localCommit.spec.toLocal / 1000 | floor) catch null), capacitySat: .data.commitments.commitInput.amountSatoshis, channelPoint: .data.commitments.commitInput.outPoint }";
143143
case $api_endpoint in
144144
"channels") jq_filter="$jq_filter | map( $jq_channel_filter )" ;;
145145
"channel") jq_filter="$jq_filter | $jq_channel_filter" ;;

0 commit comments

Comments
 (0)