tdo not show channel balances if channel is closed - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit b12c913d47054639486eb58e295ea6ea7f5116e4 DIR parent 4e73318fadc864c8c4771303b40d94f6a427bbf1 HTML Author: ThomasV <thomasv@electrum.org> Date: Sat, 22 Feb 2020 12:10:41 +0100 do not show channel balances if channel is closed Diffstat: M electrum/gui/kivy/uix/dialogs/ligh… | 5 +++-- M electrum/gui/qt/channels_list.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) --- DIR diff --git a/electrum/gui/kivy/uix/dialogs/lightning_channels.py b/electrum/gui/kivy/uix/dialogs/lightning_channels.py t@@ -235,9 +235,10 @@ class LightningChannelsDialog(Factory.Popup): if bal_other != bal_minus_htlcs_other: label += ' (+' + self.app.format_amount(bal_other - bal_minus_htlcs_other) + ')' labels[subject] = label + closed = chan.is_closed() return [ - labels[LOCAL], - labels[REMOTE], + 'n/a' if closed else labels[LOCAL], + 'n/a' if closed else labels[REMOTE], ] def update_item(self, item): DIR diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py t@@ -64,11 +64,12 @@ class ChannelsList(MyTreeView): label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other) + ')' labels[subject] = label status = self.lnworker.get_channel_status(chan) + closed = chan.is_closed() return [ format_short_channel_id(chan.short_channel_id), bh2u(chan.node_id), - labels[LOCAL], - labels[REMOTE], + '' if closed else labels[LOCAL], + '' if closed else labels[REMOTE], status ]