diff --git a/electrum/gui/qml/components/WalletDetails.qml b/electrum/gui/qml/components/WalletDetails.qml index 290b25bf0..f33fdf640 100644 --- a/electrum/gui/qml/components/WalletDetails.qml +++ b/electrum/gui/qml/components/WalletDetails.qml @@ -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 { diff --git a/electrum/gui/qml/qedaemon.py b/electrum/gui/qml/qedaemon.py index 0dbfff7c8..25876a918 100644 --- a/electrum/gui/qml/qedaemon.py +++ b/electrum/gui/qml/qedaemon.py @@ -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