From dd904298c13b14ef518e24fa63c6d0962f4a2de0 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 12 Jan 2026 15:40:01 -0800 Subject: [PATCH] gui: Show an error message if the restored wallet name is empty The Restore Wallet dialog rejects wallet names that are empty, but was doing so silently. This is confusing, we should be presenting an error message to the user. --- src/qt/bitcoingui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index dc4a82713e5..41ef2996c72 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -452,7 +452,11 @@ void BitcoinGUI::createActions() //: Label of the input field where the name of the wallet is entered. QString label = tr("Wallet Name"); QString wallet_name = QInputDialog::getText(this, title, label, QLineEdit::Normal, "", &wallet_name_ok); - if (!wallet_name_ok || wallet_name.isEmpty()) return; + if (!wallet_name_ok) return; + if (wallet_name.isEmpty()) { + QMessageBox::critical(nullptr, tr("Invalid Wallet Name"), tr("Wallet name cannot be empty")); + return; + } auto activity = new RestoreWalletActivity(m_wallet_controller, this); connect(activity, &RestoreWalletActivity::restored, this, &BitcoinGUI::setCurrentWallet, Qt::QueuedConnection);