qml: add recoverable channels warning to OpenChannelDialog
This commit is contained in:
@@ -39,6 +39,34 @@ ElDialog {
|
|||||||
|
|
||||||
columns: 4
|
columns: 4
|
||||||
|
|
||||||
|
InfoTextArea {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.columnSpan: 4
|
||||||
|
visible: !Daemon.currentWallet.lightningHasDeterministicNodeId
|
||||||
|
iconStyle: InfoTextArea.IconStyle.Warn
|
||||||
|
text: Daemon.currentWallet.seedType == 'segwit'
|
||||||
|
? [ qsTr('Your channels cannot be recovered from seed, because they were created with an old version of Electrum.'),
|
||||||
|
qsTr('This means that you must save a backup of your wallet everytime you create a new channel.'),
|
||||||
|
'\n\n',
|
||||||
|
qsTr('If you want this wallet to have recoverable channels, you must close your existing channels and restore this wallet from seed.')
|
||||||
|
].join(' ')
|
||||||
|
: [ qsTr('Your channels cannot be recovered from seed.'),
|
||||||
|
qsTr('This means that you must save a backup of your wallet everytime you create a new channel.'),
|
||||||
|
'\n\n',
|
||||||
|
qsTr('If you want to have recoverable channels, you must create a new wallet with an Electrum seed')
|
||||||
|
].join(' ')
|
||||||
|
}
|
||||||
|
|
||||||
|
InfoTextArea {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.columnSpan: 4
|
||||||
|
visible: Daemon.currentWallet.lightningHasDeterministicNodeId && !Config.useRecoverableChannels
|
||||||
|
iconStyle: InfoTextArea.IconStyle.Warn
|
||||||
|
text: [ qsTr('You currently have recoverable channels setting disabled.'),
|
||||||
|
qsTr('This means your channels cannot be recovered from seed.')
|
||||||
|
].join(' ')
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('Node')
|
text: qsTr('Node')
|
||||||
color: Material.accentColor
|
color: Material.accentColor
|
||||||
|
|||||||
@@ -360,6 +360,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
return self.wallet.txin_type
|
return self.wallet.txin_type
|
||||||
return self.wallet.get_txin_type(self.wallet.dummy_address())
|
return self.wallet.get_txin_type(self.wallet.dummy_address())
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=dataChanged)
|
||||||
|
def seedType(self):
|
||||||
|
return self.wallet.db.get('seed_type')
|
||||||
|
|
||||||
@pyqtProperty(bool, notify=dataChanged)
|
@pyqtProperty(bool, notify=dataChanged)
|
||||||
def isWatchOnly(self):
|
def isWatchOnly(self):
|
||||||
return self.wallet.is_watching_only()
|
return self.wallet.is_watching_only()
|
||||||
@@ -394,6 +398,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
def lightningNodePubkey(self):
|
def lightningNodePubkey(self):
|
||||||
return self.wallet.lnworker.node_keypair.pubkey.hex() if self.wallet.lnworker else ''
|
return self.wallet.lnworker.node_keypair.pubkey.hex() if self.wallet.lnworker else ''
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify=dataChanged)
|
||||||
|
def lightningHasDeterministicNodeId(self):
|
||||||
|
return self.wallet.lnworker.has_deterministic_node_id() if self.wallet.lnworker else False
|
||||||
|
|
||||||
@pyqtProperty(str, notify=dataChanged)
|
@pyqtProperty(str, notify=dataChanged)
|
||||||
def derivationPrefix(self):
|
def derivationPrefix(self):
|
||||||
keystores = self.wallet.get_keystores()
|
keystores = self.wallet.get_keystores()
|
||||||
|
|||||||
Reference in New Issue
Block a user