mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 19:33:28 +01:00
Merge pull request #4456
06d05c21 device: set device name correctly if key_on_device is set (Dusan Klinec)
This commit is contained in:
parent
2ec0d780c4
commit
e951258543
@ -3282,10 +3282,17 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
|
|||||||
encrypted_secret_keys = field_encrypted_secret_keys;
|
encrypted_secret_keys = field_encrypted_secret_keys;
|
||||||
|
|
||||||
GET_FIELD_FROM_JSON_RETURN_ON_ERROR(json, device_name, std::string, String, false, std::string());
|
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())
|
||||||
|
{
|
||||||
|
if (field_device_name_found)
|
||||||
{
|
{
|
||||||
m_device_name = field_device_name;
|
m_device_name = field_device_name;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_device_name = m_key_device_type == hw::device::device_type::LEDGER ? "Ledger" : "default";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user