qml QEChannelDetails: show currentFeerate
related https://github.com/spesmilo/electrum/issues/8863
This commit is contained in:
@@ -256,6 +256,18 @@ Pane {
|
|||||||
text: channeldetails.channelType
|
text: channeldetails.channelType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr('Current feerate')
|
||||||
|
color: Material.accentColor
|
||||||
|
visible: channeldetails.currentFeerate
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: channeldetails.currentFeerate
|
||||||
|
visible: channeldetails.currentFeerate
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: channeldetails.isBackup
|
visible: channeldetails.isBackup
|
||||||
text: qsTr('Backup type')
|
text: qsTr('Backup type')
|
||||||
|
|||||||
@@ -111,6 +111,13 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener):
|
|||||||
rsa = self._channel.get_remote_scid_alias()
|
rsa = self._channel.get_remote_scid_alias()
|
||||||
return format_short_id(rsa) if rsa else ''
|
return format_short_id(rsa) if rsa else ''
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=channelChanged)
|
||||||
|
def currentFeerate(self):
|
||||||
|
if self._channel.is_backup():
|
||||||
|
return ''
|
||||||
|
assert isinstance(self._channel, Channel)
|
||||||
|
return self._wallet.wallet.config.format_fee_rate(4 * self._channel.get_latest_feerate(LOCAL))
|
||||||
|
|
||||||
@pyqtProperty(str, notify=channelChanged)
|
@pyqtProperty(str, notify=channelChanged)
|
||||||
def state(self):
|
def state(self):
|
||||||
return self._channel.get_state_for_GUI()
|
return self._channel.get_state_for_GUI()
|
||||||
|
|||||||
Reference in New Issue
Block a user