qt channels list: align "can send", "can recv" cols based on amounts
This commit is contained in:
@@ -83,12 +83,12 @@ class ChannelsList(MyTreeView):
|
|||||||
for subject in (REMOTE, LOCAL):
|
for subject in (REMOTE, LOCAL):
|
||||||
if isinstance(chan, Channel):
|
if isinstance(chan, Channel):
|
||||||
can_send = chan.available_to_spend(subject) / 1000
|
can_send = chan.available_to_spend(subject) / 1000
|
||||||
label = self.parent.format_amount(can_send)
|
label = self.parent.format_amount(can_send, whitespaces=True)
|
||||||
other = subject.inverted()
|
other = subject.inverted()
|
||||||
bal_other = chan.balance(other)//1000
|
bal_other = chan.balance(other)//1000
|
||||||
bal_minus_htlcs_other = chan.balance_minus_outgoing_htlcs(other)//1000
|
bal_minus_htlcs_other = chan.balance_minus_outgoing_htlcs(other)//1000
|
||||||
if bal_other != bal_minus_htlcs_other:
|
if bal_other != bal_minus_htlcs_other:
|
||||||
label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other) + ')'
|
label += ' (+' + self.parent.format_amount(bal_other - bal_minus_htlcs_other, whitespaces=True) + ')'
|
||||||
else:
|
else:
|
||||||
assert isinstance(chan, ChannelBackup)
|
assert isinstance(chan, ChannelBackup)
|
||||||
label = ''
|
label = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user