diff options
author | kenshi84 <kenshi84@protonmail.ch> | 2017-01-27 21:26:52 +0900 |
---|---|---|
committer | kenshi84 <kenshi84@protonmail.ch> | 2017-02-03 09:38:12 +0900 |
commit | f97526e641a96ce7525673704ade98b3b3ee19d3 (patch) | |
tree | 1227175dd50323b1df4bb023c4fce079a078062a /src/wallet/wallet2.cpp | |
parent | Merge pull request #1622 (diff) | |
download | monero-f97526e641a96ce7525673704ade98b3b3ee19d3.tar.xz |
simplewallet: option to always ask password for any crytical operations
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4348b8a62..e73691d6e 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1859,6 +1859,9 @@ bool wallet2::store_keys(const std::string& keys_file_name, const std::string& p value2.SetInt(m_confirm_missing_payment_id ? 1 :0); json.AddMember("confirm_missing_payment_id", value2, json.GetAllocator()); + value2.SetInt(m_ask_password ? 1 :0); + json.AddMember("ask_password", value2, json.GetAllocator()); + // Serialize the JSON object rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); @@ -1926,6 +1929,7 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa m_auto_refresh = true; m_refresh_type = RefreshType::RefreshDefault; m_confirm_missing_payment_id = true; + m_ask_password = true; } else { @@ -1986,6 +1990,8 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa m_refresh_from_block_height = field_refresh_height; GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, confirm_missing_payment_id, int, Int, false, true); m_confirm_missing_payment_id = field_confirm_missing_payment_id; + GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, ask_password, int, Int, false, true); + m_ask_password = field_ask_password; } const cryptonote::account_keys& keys = m_account.get_keys(); |