qml: add lightning node id to walletdetails
This commit is contained in:
@@ -174,6 +174,41 @@ Pane {
|
||||
visible: Daemon.currentWallet
|
||||
columns: 2
|
||||
|
||||
Label {
|
||||
Layout.columnSpan: 2
|
||||
visible: Daemon.currentWallet.isLightning
|
||||
text: qsTr('Lightning Node ID')
|
||||
color: Material.accentColor
|
||||
}
|
||||
|
||||
TextHighlightPane {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
visible: Daemon.currentWallet.isLightning
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: Daemon.currentWallet.lightningNodePubkey
|
||||
wrapMode: Text.Wrap
|
||||
font.family: FixedFont
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
}
|
||||
ToolButton {
|
||||
icon.source: '../../icons/share.png'
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = app.genericShareDialog.createObject(rootItem, {
|
||||
title: qsTr('Lightning Node ID'),
|
||||
text: Daemon.currentWallet.lightningNodePubkey
|
||||
})
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
visible: _is2fa
|
||||
text: qsTr('2FA')
|
||||
@@ -278,6 +313,7 @@ Pane {
|
||||
Layout.fillWidth: true
|
||||
text: modelData.derivation_prefix
|
||||
visible: modelData.derivation_prefix
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
|
||||
@@ -349,6 +349,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
||||
})
|
||||
return result
|
||||
|
||||
@pyqtProperty(str, notify=dataChanged)
|
||||
def lightningNodePubkey(self):
|
||||
return self.wallet.lnworker.node_keypair.pubkey.hex() if self.wallet.lnworker else ''
|
||||
|
||||
@pyqtProperty(str, notify=dataChanged)
|
||||
def derivationPrefix(self):
|
||||
keystores = self.wallet.get_keystores()
|
||||
|
||||
Reference in New Issue
Block a user