From 9dd3f4fecb7268c4dab85291c2b4e35cef95b92e Mon Sep 17 00:00:00 2001 From: rating89us <45968869+rating89us@users.noreply.github.com> Date: Wed, 13 May 2020 13:08:16 +0200 Subject: [PATCH] add isTrezor() function --- src/libwalletqt/Wallet.cpp | 5 +++++ src/libwalletqt/Wallet.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 2d7f6722..dc4481ba 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -239,6 +239,11 @@ bool Wallet::isLedger() const return m_walletImpl->getDeviceType() == Monero::Wallet::Device_Ledger; } +bool Wallet::isTrezor() const +{ + return m_walletImpl->getDeviceType() == Monero::Wallet::Device_Trezor; +} + //! create a view only wallet bool Wallet::createViewOnly(const QString &path, const QString &password) const { diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index f333f935..31b051ad 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -187,6 +187,7 @@ public: //! hw-device backed wallets Q_INVOKABLE bool isHwBacked() const; Q_INVOKABLE bool isLedger() const; + Q_INVOKABLE bool isTrezor() const; //! returns if view only wallet Q_INVOKABLE bool viewOnly() const;