diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-29 22:15:52 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-29 22:20:27 +0200 |
commit | e9512585430b84e2ee47d4069a3e5903c6e47961 (patch) | |
tree | 6be005c778b1649339cb68565e59b55ed5c9aca2 /src/wallet | |
parent | Merge pull request #4449 (diff) | |
download | monero-e9512585430b84e2ee47d4069a3e5903c6e47961.tar.xz |
Merge pull request #4456
06d05c21 device: set device name correctly if key_on_device is set (Dusan Klinec)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 33699cb79..95474ce34 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3282,9 +3282,16 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_ encrypted_secret_keys = field_encrypted_secret_keys; GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, device_name, std::string, String, false, std::string()); - if (m_device_name.empty() && field_device_name_found) + if (m_device_name.empty()) { - m_device_name = field_device_name; + if (field_device_name_found) + { + m_device_name = field_device_name; + } + else + { + m_device_name = m_key_device_type == hw::device::device_type::LEDGER ? "Ledger" : "default"; + } } } else |