1
0

qml: add seed passphrase property to QEWallet, show in WalletDetails

This commit is contained in:
Sander van Grieken
2024-09-18 15:02:01 +02:00
parent ba3935c842
commit 0d7ff8635b
2 changed files with 29 additions and 0 deletions

View File

@@ -175,6 +175,28 @@ Pane {
}
}
Label {
id: seed_extension_label
Layout.columnSpan: 2
Layout.topMargin: constants.paddingSmall
visible: seedText.visible && Daemon.currentWallet.seedPassphrase
text: qsTr('Seed Extension')
color: Material.accentColor
}
TextHighlightPane {
Layout.columnSpan: 2
Layout.fillWidth: true
visible: seed_extension_label.visible
Label {
Layout.fillWidth: true
text: Daemon.currentWallet.seedPassphrase
wrapMode: Text.Wrap
font.family: FixedFont
font.pixelSize: constants.fontSizeMedium
}
}
Label {
Layout.columnSpan: 2
Layout.topMargin: constants.paddingSmall

View File

@@ -105,6 +105,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
self._lightningbalancefrozen = QEAmount()
self._seed = ''
self._seed_passphrase = ''
self.tx_notification_queue = queue.Queue()
self.tx_notification_last_time = 0
@@ -374,6 +375,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
def seed(self):
return self._seed
@pyqtProperty(str, notify=dataChanged)
def seedPassphrase(self):
return self._seed_passphrase
@pyqtProperty(str, notify=dataChanged)
def txinType(self):
if self.wallet.wallet_type == 'imported':
@@ -770,9 +775,11 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
def retrieve_seed(self):
try:
self._seed = self.wallet.get_seed(self.password)
self._seed_passphrase = self.wallet.keystore.get_passphrase(self.password)
self.seedRetrieved.emit()
except Exception:
self._seed = ''
self._seed_passphrase = ''
self.dataChanged.emit()