From e7b121ac17d6e0c3bb6f17911ae9ab18132b3c67 Mon Sep 17 00:00:00 2001 From: selsta Date: Mon, 6 Apr 2026 19:33:03 +0200 Subject: wallet2: fix background wallet detection in verify_password() --- src/wallet/wallet2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index af1f03d2c..13226f7db 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5502,7 +5502,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; } } -- cgit v1.2.3