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:
@@ -24,15 +24,6 @@ Pane {
|
|||||||
dialog.open()
|
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() {
|
function changePassword() {
|
||||||
// trigger dialog via wallet (auth then signal)
|
// trigger dialog via wallet (auth then signal)
|
||||||
Daemon.startChangePassword()
|
Daemon.startChangePassword()
|
||||||
@@ -418,7 +409,7 @@ Pane {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
text: qsTr('Delete Wallet')
|
text: qsTr('Delete Wallet')
|
||||||
onClicked: rootItem.deleteWallet()
|
onClicked: Daemon.checkThenDeleteWallet(Daemon.currentWallet)
|
||||||
icon.source: '../../icons/delete.png'
|
icon.source: '../../icons/delete.png'
|
||||||
}
|
}
|
||||||
FlatButton {
|
FlatButton {
|
||||||
|
|||||||
@@ -261,6 +261,7 @@ class QEDaemon(AuthMixin, QObject):
|
|||||||
self.walletDeleteError.emit('balance', _('There are still coins present in this wallet. Really delete?'))
|
self.walletDeleteError.emit('balance', _('There are still coins present in this wallet. Really delete?'))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.auth_message = _('Really delete this wallet?')
|
||||||
self.delete_wallet(wallet)
|
self.delete_wallet(wallet)
|
||||||
|
|
||||||
@auth_protect
|
@auth_protect
|
||||||
|
|||||||
Reference in New Issue
Block a user