Skip to content

Commit 5d7666b

Browse files
committed
qt: Revert 7fa91e8 partially
The AskPassphraseDialog modal dialog must be synchronous here as expected in the WalletModel::requestUnlock() function. Fixed an introduced regression.
1 parent 89c277a commit 5d7666b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/qt/walletview.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ void WalletView::unlockWallet()
242242
{
243243
// Unlock wallet when requested by wallet model
244244
if (walletModel->getEncryptionStatus() == WalletModel::Locked) {
245-
auto dlg = new AskPassphraseDialog(AskPassphraseDialog::Unlock, this);
246-
dlg->setModel(walletModel);
247-
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
245+
AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this);
246+
dlg.setModel(walletModel);
247+
// A modal dialog must be synchronous here as expected
248+
// in the WalletModel::requestUnlock() function.
249+
dlg.exec();
248250
}
249251
}
250252

0 commit comments

Comments
 (0)