From 23d86a96bc6d367f25ca6a5ca65cba0f4cb677b3 Mon Sep 17 00:00:00 2001 From: jpk68 Date: Mon, 3 Aug 2026 20:21:25 -0400 Subject: [PATCH] simplewallet: show error for timed-out hardware wallets --- src/simplewallet/simplewallet.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a78c233f8..ef604d9f3 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -6276,6 +6276,17 @@ void simple_wallet::check_for_inactivity_lock(bool user) break; } } + catch (const std::exception &e) + { + // Report why unlocking failed, rather than just looping back to the password prompt + auto writer = fail_msg_writer(); + if (show_wallet_name) + writer << tr("Failed to unlock wallet: ") << e.what(); + else + writer << tr("Failed to unlock wallet."); + if (m_wallet->key_on_device()) + writer << "\n" << tr("Please ensure the HW wallet is connected and unlocked."); + } catch (...) { /* do nothing, just let the loop loop */ } } m_last_activity_time = time(NULL);