1
0

add auth_message to delete_wallet

This changes the flow slightly: pin confirmation is asked after
we have checked that the wallet does not have open channels,
which is better
This commit is contained in:
ThomasV
2023-04-17 17:54:55 +02:00
parent 1421df57ad
commit 73dd6827e0
2 changed files with 2 additions and 10 deletions

View File

@@ -24,15 +24,6 @@ Pane {
dialog.open()
}
function deleteWallet() {
var dialog = app.messageDialog.createObject(rootItem,
{'text': qsTr('Really delete this wallet?'), 'yesno': true})
dialog.accepted.connect(function() {
Daemon.checkThenDeleteWallet(Daemon.currentWallet)
})
dialog.open()
}
function changePassword() {
// trigger dialog via wallet (auth then signal)
Daemon.startChangePassword()
@@ -418,7 +409,7 @@ Pane {
Layout.fillWidth: true
Layout.preferredWidth: 1
text: qsTr('Delete Wallet')
onClicked: rootItem.deleteWallet()
onClicked: Daemon.checkThenDeleteWallet(Daemon.currentWallet)
icon.source: '../../icons/delete.png'
}
FlatButton {

View File

@@ -261,6 +261,7 @@ class QEDaemon(AuthMixin, QObject):
self.walletDeleteError.emit('balance', _('There are still coins present in this wallet. Really delete?'))
return
self.auth_message = _('Really delete this wallet?')
self.delete_wallet(wallet)
@auth_protect