1
0

show capacity of channel backups in GUI

This commit is contained in:
ThomasV
2021-03-12 17:38:42 +01:00
parent 3ff203ea51
commit 65d263801a
4 changed files with 9 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ class ChannelDetailsDialog(QtWidgets.QDialog):
form_layout.addRow(_('State:'), SelectableLabel(chan.get_state_for_GUI()))
self.initiator = 'Local' if chan.constraints.is_initiator else 'Remote'
form_layout.addRow(_('Initiator:'), SelectableLabel(self.initiator))
self.capacity = self.window.format_amount_and_units(chan.constraints.capacity)
self.capacity = self.window.format_amount_and_units(chan.get_capacity())
form_layout.addRow(_('Capacity:'), SelectableLabel(self.capacity))
self.can_send_label = SelectableLabel()
self.can_receive_label = SelectableLabel()

View File

@@ -85,10 +85,7 @@ class ChannelsList(MyTreeView):
status = chan.get_state_for_GUI()
closed = chan.is_closed()
node_alias = self.lnworker.get_node_alias(chan.node_id) or chan.node_id.hex()
if isinstance(chan, Channel):
capacity_str = self.parent.format_amount(chan.constraints.capacity, whitespaces=True)
else:
capacity_str = ''
capacity_str = self.parent.format_amount(chan.get_capacity(), whitespaces=True)
return {
self.Columns.SHORT_CHANID: chan.short_id_for_GUI(),
self.Columns.NODE_ALIAS: node_alias,