mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 02:05:19 +00:00
do not show channel balances if channel is closed
This commit is contained in:
parent
4e73318fad
commit
b12c913d47
2 changed files with 6 additions and 4 deletions
|
@ -235,9 +235,10 @@ class LightningChannelsDialog(Factory.Popup):
|
||||||
if bal_other != bal_minus_htlcs_other:
|
if bal_other != bal_minus_htlcs_other:
|
||||||
label += ' (+' + self.app.format_amount(bal_other - bal_minus_htlcs_other) + ')'
|
label += ' (+' + self.app.format_amount(bal_other - bal_minus_htlcs_other) + ')'
|
||||||
labels[subject] = label
|
labels[subject] = label
|
||||||
|
closed = chan.is_closed()
|
||||||
return [
|
return [
|
||||||
labels[LOCAL],
|
'n/a' if closed else labels[LOCAL],
|
||||||
labels[REMOTE],
|
'n/a' if closed else labels[REMOTE],
|
||||||
]
|
]
|
||||||
|
|
||||||
def update_item(self, item):
|
def update_item(self, item):
|
||||||
|
|
|
@ -64,11 +64,12 @@ class ChannelsList(MyTreeView):
|
||||||
label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other) + ')'
|
label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other) + ')'
|
||||||
labels[subject] = label
|
labels[subject] = label
|
||||||
status = self.lnworker.get_channel_status(chan)
|
status = self.lnworker.get_channel_status(chan)
|
||||||
|
closed = chan.is_closed()
|
||||||
return [
|
return [
|
||||||
format_short_channel_id(chan.short_channel_id),
|
format_short_channel_id(chan.short_channel_id),
|
||||||
bh2u(chan.node_id),
|
bh2u(chan.node_id),
|
||||||
labels[LOCAL],
|
'' if closed else labels[LOCAL],
|
||||||
labels[REMOTE],
|
'' if closed else labels[REMOTE],
|
||||||
status
|
status
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue