1
0

qml: show channel close tx(id) in ChannelDetails

This commit is contained in:
Sander van Grieken
2023-11-20 12:58:07 +01:00
parent 6a8fb26881
commit b098be988e
2 changed files with 55 additions and 0 deletions

View File

@@ -121,6 +121,17 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener):
'index': outpoint.output_index
}
@pyqtProperty(str, notify=channelChanged)
def closingTxid(self):
if not self._channel.is_closed():
return ''
item = self._channel.get_closing_height()
if item:
closing_txid, closing_height, timestamp = item
return closing_txid
else:
return ''
@pyqtProperty(QEAmount, notify=channelChanged)
def capacity(self):
self._capacity.copyFrom(QEAmount(amount_sat=self._channel.get_capacity()))