From fd86262a85d467f84d779744796c7119a8e354b8 Mon Sep 17 00:00:00 2001 From: Samy Date: Sat, 22 Aug 2026 18:58:19 +0200 Subject: [PATCH] simplewallet: suggest hw_reconnect on refresh --- src/simplewallet/simplewallet.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 4853a6619..b3ba03391 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -5621,6 +5621,7 @@ bool simple_wallet::refresh_main(uint64_t start_height, enum ResetType reset, bo uint64_t fetched_blocks = 0; bool received_money = false; bool ok = false; + bool suggest_hw_reconnect = false; std::ostringstream ss; try { @@ -5682,6 +5683,7 @@ bool simple_wallet::refresh_main(uint64_t start_height, enum ResetType reset, bo { LOG_ERROR("unexpected error: " << e.what()); ss << tr("unexpected error: ") << e.what(); + suggest_hw_reconnect = true; } catch (...) { @@ -5691,7 +5693,10 @@ bool simple_wallet::refresh_main(uint64_t start_height, enum ResetType reset, bo if (!ok) { - fail_msg_writer() << tr("refresh failed: ") << ss.str() << ". " << tr("Blocks received: ") << fetched_blocks; + auto writer = fail_msg_writer(); + writer << tr("refresh failed: ") << ss.str() << ". " << tr("Blocks received: ") << fetched_blocks; + if (suggest_hw_reconnect && m_wallet->key_on_device()) + writer << "\n" << tr("Check that the HW wallet is connected and unlocked, then run 'hw_reconnect' before refreshing again."); } // prevent it from triggering the idle screen due to waiting for a foreground refresh