aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.h
diff options
context:
space:
mode:
authorm2049r <m2049r@monerujo.io>2018-08-16 10:31:48 +0200
committerm2049r <m2049r@monerujo.io>2018-09-19 18:25:38 +0200
commitbce474be7d9cfa80d9f0970047bfd508db60424f (patch)
tree438aa4f3d4e2e5a2f8d56ef8747b522b44013e76 /src/wallet/wallet2.h
parentMerge pull request #4391 (diff)
downloadmonero-bce474be7d9cfa80d9f0970047bfd508db60424f.tar.xz
query backing device
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index c30ca1d85..9eb9b04f2 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -189,6 +189,7 @@ namespace tools
static std::unique_ptr<wallet2> make_dummy(const boost::program_options::variables_map& vm, bool unattended, const std::function<boost::optional<password_container>(const char *, bool)> &password_prompter);
static bool verify_password(const std::string& keys_file_name, const epee::wipeable_string& password, bool no_spend_key, hw::device &hwdev, uint64_t kdf_rounds);
+ static bool query_device(hw::device::device_type& device_type, const std::string& keys_file_name, const epee::wipeable_string& password, uint64_t kdf_rounds = 1);
wallet2(cryptonote::network_type nettype = cryptonote::MAINNET, uint64_t kdf_rounds = 1, bool unattended = false);
~wallet2();
@@ -709,7 +710,8 @@ namespace tools
bool has_multisig_partial_key_images() const;
bool has_unknown_key_images() const;
bool get_multisig_seed(epee::wipeable_string& seed, const epee::wipeable_string &passphrase = std::string(), bool raw = true) const;
- bool key_on_device() const { return m_key_on_device; }
+ bool key_on_device() const { return get_device_type() != hw::device::device_type::SOFTWARE; }
+ hw::device::device_type get_device_type() const { return m_key_device_type; }
bool reconnect_device();
// locked & unlocked balance of given or current subaddress account
@@ -1284,7 +1286,7 @@ namespace tools
bool m_trusted_daemon;
i_wallet2_callback* m_callback;
- bool m_key_on_device;
+ hw::device::device_type m_key_device_type;
cryptonote::network_type m_nettype;
uint64_t m_kdf_rounds;
std::string seed_language; /*!< Language of the mnemonics (seed). */