From c69c3e35fd74da6555e61484069e7e881dc6c1af Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Fri, 4 Apr 2025 21:06:39 -0500 Subject: [PATCH] carrot_impl: fix password fetching in wallet2::scan_key_image --- src/wallet/wallet2.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 6ce724b..e64199b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2377,9 +2377,11 @@ void wallet2::scan_key_image(const wallet::enote_view_incoming_scan_info_t &enot { boost::optional pwd; if (m_callback) - m_callback->on_get_password(pool ? "output found in pool" : "output received"); - THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming monero")); - THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming monero")); + pwd = m_callback->on_get_password(pool ? "output found in pool" : "output received"); + THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, + tr("No password provided. Password is needed to compute key image for incoming enotes")); + THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, + tr("Invalid password. Password is needed to compute key image for incoming enotes")); m_encrypt_keys_after_refresh.reset(new wallet_keys_unlocker(*this, &*pwd)); } }