aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2026-04-06 19:33:03 +0200
committerselsta <selsta@sent.at>2026-04-06 19:35:38 +0200
commite7b121ac17d6e0c3bb6f17911ae9ab18132b3c67 (patch)
tree52d7835f0d330a45d6ce3ce3fa686c97cfcb2c67 /src
parent23b420a992417abb6131b3d152d7e32adf224351 (diff)
downloadmonzero-core-e7b121ac17d6e0c3bb6f17911ae9ab18132b3c67.tar.gz
monzero-core-e7b121ac17d6e0c3bb6f17911ae9ab18132b3c67.tar.xz
monzero-core-e7b121ac17d6e0c3bb6f17911ae9ab18132b3c67.zip
wallet2: fix background wallet detection in verify_password()
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}
}