From f9b22a7b01994f444185f38fe1f645593590c943 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Fri, 24 Aug 2018 00:50:31 +0200 Subject: hw_device: support for multiple devices added [for review] - device name is a new wallet property - full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for. - new --hw-device parameter added to the wallet, can name the hardware device - device reconnect added --- src/cryptonote_basic/account.cpp | 8 ++++++-- src/cryptonote_basic/account.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/cryptonote_basic') diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp index 4cbfa8142..e891a748d 100644 --- a/src/cryptonote_basic/account.cpp +++ b/src/cryptonote_basic/account.cpp @@ -197,10 +197,14 @@ DISABLE_VS_WARNINGS(4244 4345) //----------------------------------------------------------------- void account_base::create_from_device(const std::string &device_name) { - hw::device &hwdev = hw::get_device(device_name); - m_keys.set_device(hwdev); hwdev.set_name(device_name); + create_from_device(hwdev); + } + + void account_base::create_from_device(hw::device &hwdev) + { + m_keys.set_device(hwdev); MCDEBUG("ledger", "device type: "< &multisig_keys); -- cgit v1.2.3