aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-07-18 23:56:44 +0200
committerRiccardo Spagni <ric@spagni.net>2015-07-18 23:56:47 +0200
commit107eeaf6c53cc9a104190f1181060a6280d40751 (patch)
treecec813a84484b331178a5f95791faafe4e945e3c /src/wallet/wallet2.cpp
parentMerge pull request #345 (diff)
parentwallet: add boolean to always confirm transactions with the user (diff)
downloadmonero-107eeaf6c53cc9a104190f1181060a6280d40751.tar.xz
Merge pull request #346
8fe180a wallet: add boolean to always confirm transactions with the user (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 63205f429..ea8509019 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -502,6 +502,9 @@ bool wallet2::store_keys(const std::string& keys_file_name, const std::string& p
value2.SetInt(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_always_confirm_transfers ? 1 :0);
+ json.AddMember("always_confirm_transfers", value2, json.GetAllocator());
+
// Serialize the JSON object
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
@@ -562,6 +565,7 @@ void wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
{
is_old_file_format = true;
m_watch_only = false;
+ m_always_confirm_transfers = false;
}
else
{
@@ -580,6 +584,7 @@ void wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
{
m_watch_only = false;
}
+ m_always_confirm_transfers = json.HasMember("always_confirm_transfers") && (json["always_confirm_transfers"].GetInt() != 0);
}
const cryptonote::account_keys& keys = m_account.get_keys();