wallet2: fix background wallet detection in verify_password()

(cherry picked from commit e7b121ac17d6e0c3bb6f17911ae9ab18132b3c67)
This commit is contained in:
selsta
2026-05-05 18:20:52 -04:00
committed by jwinterm
parent b965f61b18
commit 33b967d231
+1 -1
View File
@@ -5518,7 +5518,7 @@ bool wallet2::verify_password(const std::string& keys_file_name, const epee::wip
{
get_custom_background_key(password, key, kdf_rounds);
crypto::chacha20(keys_file_data.account_data.data(), keys_file_data.account_data.size(), key, keys_file_data.iv, &account_data[0]);
const bool is_background_wallet = json.Parse(account_data.c_str()).HasParseError() && json.IsObject();
const bool is_background_wallet = !json.Parse(account_data.c_str()).HasParseError() && json.IsObject();
no_spend_key = no_spend_key || is_background_wallet;
}
}