diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-08 17:26:10 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-12 23:00:45 +0200 |
commit | 5d7666b15164a16aaf3af49af8f73ff4bd392f6a (patch) | |
tree | 1fa1f8a052ccf76b5747cef9f404330edd5553ee /src/qt/walletview.cpp | |
parent | 89c277a6fca1149f10f8b55874c702c341679765 (diff) |
qt: Revert 7fa91e831227e556bd8a7ae3da64bd59d4f30d5f partially
The AskPassphraseDialog modal dialog must be synchronous here as
expected in the WalletModel::requestUnlock() function.
Fixed an introduced regression.
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r-- | src/qt/walletview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 7954a66995..be96e3baa1 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -242,9 +242,11 @@ void WalletView::unlockWallet() { // Unlock wallet when requested by wallet model if (walletModel->getEncryptionStatus() == WalletModel::Locked) { - auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Unlock, this); - dlg->setModel(walletModel); - GUIUtil::ShowModalDialogAndDeleteOnClose(dlg); + AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this); + dlg.setModel(walletModel); + // A modal dialog must be synchronous here as expected + // in the WalletModel::requestUnlock() function. + dlg.exec(); } } |