mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
Merge pull request #11170
fd86262 simplewallet: suggest hw_reconnect on refresh (Samy)
ACKs: jpk68, selsta
This commit is contained in:
@@ -5629,6 +5629,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
|
||||
{
|
||||
@@ -5690,6 +5691,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 (...)
|
||||
{
|
||||
@@ -5699,7 +5701,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
|
||||
|
||||
Reference in New Issue
Block a user