diff options
author | luigi1111 <luigi1111w@gmail.com> | 2023-09-30 14:43:40 -0400 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2023-09-30 14:43:40 -0400 |
commit | 6d37eb0a014f1c0e07e02c5050f3890a5cd3badf (patch) | |
tree | e8ac840dc7ab7f6903863ae66c4524e2aa25aa82 | |
parent | Merge pull request #8976 (diff) | |
parent | wallet: store watch-only wallet correctly when `change_password()` is called (diff) | |
download | monero-6d37eb0a014f1c0e07e02c5050f3890a5cd3badf.tar.xz |
Merge pull request #8998
9f981ac wallet: store watch-only wallet correctly when change_password() is called (jeff)
-rw-r--r-- | src/wallet/wallet2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index fa9bbfde8..2c85e2b9c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4402,7 +4402,7 @@ boost::optional<wallet2::keys_file_data> wallet2::get_keys_file_data(const epee: value2.SetInt(m_key_device_type); json.AddMember("key_on_device", value2, json.GetAllocator()); - value2.SetInt(watch_only ? 1 :0); // WTF ? JSON has different true and false types, and not boolean ?? + value2.SetInt((watch_only || m_watch_only) ? 1 :0); // WTF ? JSON has different true and false types, and not boolean ?? json.AddMember("watch_only", value2, json.GetAllocator()); value2.SetInt(m_multisig ? 1 :0); @@ -6314,7 +6314,7 @@ void wallet2::store_to(const std::string &path, const epee::wipeable_string &pas if (!same_file || force_rewrite_keys) { - bool r = store_keys(m_keys_file, password, false); + bool r = store_keys(m_keys_file, password, m_watch_only); THROW_WALLET_EXCEPTION_IF(!r, error::file_save_error, m_keys_file); } |