[monero-project/monero] hw_device: support for multiple devices added [for review] (#4299)

ph4r05 commented on this pull request.

> @@ -3177,7 +3209,8 @@ bool wallet2::load_keys(const std::string& keys_file_name, const epee::wipeable_
r = epee::serialization::load_t_from_binary(m_account, account_data);
if (r && m_key_on_device) {
LOG_PRINT_L0(«Account on device. Initing device…»);
— hw::device &hwdev = hw::get_device(«Ledger»);
+ hw::device &hwdev = hw::get_device(m_device_name);

The idea is that restoring the wallet from device reads the `—hw-device` command line argument and if is empty it takes default `Ledger` as was before (not to break the compatibility).

The device name is then stored to the key file. After opening existing wallet restored from the device it should contain «Ledger» or different device name supplied by the user when creating the wallet.