qml: add local/remote SCID alias to ChannelDetails
This commit is contained in:
@@ -212,6 +212,30 @@ Pane {
|
|||||||
text: channeldetails.shortCid
|
text: channeldetails.shortCid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr('Local SCID alias')
|
||||||
|
color: Material.accentColor
|
||||||
|
visible: channeldetails.localScidAlias
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: channeldetails.localScidAlias
|
||||||
|
visible: channeldetails.localScidAlias
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr('Remote SCID alias')
|
||||||
|
color: Material.accentColor
|
||||||
|
visible: channeldetails.remoteScidAlias
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: channeldetails.remoteScidAlias
|
||||||
|
visible: channeldetails.remoteScidAlias
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: !channeldetails.isBackup
|
visible: !channeldetails.isBackup
|
||||||
text: qsTr('Initiator')
|
text: qsTr('Initiator')
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from electrum.gui import messages
|
|||||||
from electrum.logging import get_logger
|
from electrum.logging import get_logger
|
||||||
from electrum.lnutil import LOCAL, REMOTE
|
from electrum.lnutil import LOCAL, REMOTE
|
||||||
from electrum.lnchannel import ChanCloseOption, ChannelState
|
from electrum.lnchannel import ChanCloseOption, ChannelState
|
||||||
|
from electrum.util import format_short_id
|
||||||
|
|
||||||
from .auth import AuthMixin, auth_protect
|
from .auth import AuthMixin, auth_protect
|
||||||
from .qewallet import QEWallet
|
from .qewallet import QEWallet
|
||||||
@@ -99,6 +100,16 @@ class QEChannelDetails(AuthMixin, QObject, QtEventListener):
|
|||||||
def shortCid(self):
|
def shortCid(self):
|
||||||
return self._channel.short_id_for_GUI()
|
return self._channel.short_id_for_GUI()
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=channelChanged)
|
||||||
|
def localScidAlias(self):
|
||||||
|
lsa = self._channel.get_local_scid_alias()
|
||||||
|
return format_short_id(lsa) if lsa else ''
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=channelChanged)
|
||||||
|
def remoteScidAlias(self):
|
||||||
|
rsa = self._channel.get_remote_scid_alias()
|
||||||
|
return format_short_id(rsa) if rsa else ''
|
||||||
|
|
||||||
@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