From 29ffb6bba8867586986345b4f0c560e5ea5fce85 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Thu, 23 Aug 2018 23:50:53 +0200 Subject: device/trezor: trezor support added --- src/cryptonote_basic/account.cpp | 24 +++++++++++++++++++----- src/cryptonote_basic/account.h | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'src/cryptonote_basic') diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp index 1dc1ad71d..edbc2c561 100644 --- a/src/cryptonote_basic/account.cpp +++ b/src/cryptonote_basic/account.cpp @@ -139,6 +139,15 @@ DISABLE_VS_WARNINGS(4244 4345) m_creation_timestamp = 0; } //----------------------------------------------------------------- + void account_base::deinit() + { + try{ + m_keys.get_device().disconnect(); + } catch (const std::exception &e){ + MERROR("Device disconnect exception: " << e.what()); + } + } + //----------------------------------------------------------------- void account_base::forget_spend_key() { m_keys.m_spend_secret_key = crypto::secret_key(); @@ -206,11 +215,16 @@ DISABLE_VS_WARNINGS(4244 4345) void account_base::create_from_device(hw::device &hwdev) { m_keys.set_device(hwdev); - MCDEBUG("ledger", "device type: "<