aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-10-22 22:16:39 +0200
committerRiccardo Spagni <ric@spagni.net>2016-10-22 22:16:39 +0200
commit09f62ed33ed8255267dfe09f7119316a5df1b83c (patch)
tree7948b9831d51f5db52cf48b5ab95c053f4b0f2fc /src/wallet/wallet2.cpp
parentMerge pull request #1224 (diff)
parentAlways confirm transfers defaults to ON/YES (diff)
downloadmonero-09f62ed33ed8255267dfe09f7119316a5df1b83c.tar.xz
Merge pull request #1225
04da979 Always confirm transfers defaults to ON/YES (NanoAkron)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index f2869aefb..b499f6b24 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1517,8 +1517,8 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
}
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, watch_only, int, Int, false, false);
m_watch_only = field_watch_only;
- GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, always_confirm_transfers, int, Int, false, false);
- m_always_confirm_transfers = field_always_confirm_transfers_found && field_always_confirm_transfers;
+ GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, always_confirm_transfers, int, Int, false, true);
+ m_always_confirm_transfers = field_always_confirm_transfers;
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, store_tx_keys, int, Int, false, true);
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, store_tx_info, int, Int, false, true);
m_store_tx_info = ((field_store_tx_keys != 0) || (field_store_tx_info != 0));
@@ -1549,10 +1549,9 @@ bool wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
LOG_PRINT_L0("Unknown refresh-type value (" << field_refresh_type << "), using default");
}
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, refresh_height, uint64_t, Uint64, false, 0);
- if (field_refresh_height_found)
- m_refresh_from_block_height = field_refresh_height;
- GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, confirm_missing_payment_id, int, Int, false, false);
- m_confirm_missing_payment_id = !field_confirm_missing_payment_id_found || field_confirm_missing_payment_id;
+ 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;
}
const cryptonote::account_keys& keys = m_account.get_keys();