diff options
| author | Dusan Klinec <dusan.klinec@gmail.com> | 2020-04-11 12:43:21 +0200 |
|---|---|---|
| committer | Dusan Klinec <dusan.klinec@gmail.com> | 2020-05-08 18:40:17 +0200 |
| commit | 86d21a34baacb7d317b8774b3409781bb3dde037 (patch) | |
| tree | 2bb83dcc37e8fe0a77e8311824db75afd973d037 /src/libwalletqt/Wallet.h | |
| parent | 38612c1285889f59a8c94bb412354bb7bed4108a (diff) | |
| download | monzero-gui-86d21a34baacb7d317b8774b3409781bb3dde037.tar.gz monzero-gui-86d21a34baacb7d317b8774b3409781bb3dde037.tar.xz monzero-gui-86d21a34baacb7d317b8774b3409781bb3dde037.zip | |
trezor: support new passphrase entry mechanism
- passphrase can be prompted also when wallet is running (thus added to the wallet listener)
- device/host decision is now made on the host
Diffstat (limited to 'src/libwalletqt/Wallet.h')
| -rw-r--r-- | src/libwalletqt/Wallet.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index 3450b1ce..f333f935 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -41,6 +41,8 @@ #include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here; #include "UnsignedTransaction.h" #include "NetworkType.h" +#include "PassphraseHelper.h" +#include "WalletListenerImpl.h" namespace Monero { struct Wallet; // forward declaration @@ -57,7 +59,7 @@ class SubaddressModel; class SubaddressAccount; class SubaddressAccountModel; -class Wallet : public QObject +class Wallet : public QObject, public PassprasePrompter { Q_OBJECT Q_PROPERTY(bool disconnected READ disconnected NOTIFY disconnectedChanged) @@ -348,6 +350,10 @@ public: Q_INVOKABLE void segregationHeight(quint64 height); Q_INVOKABLE void keyReuseMitigation2(bool mitigation); + // Passphrase entry for hardware wallets + Q_INVOKABLE void onPassphraseEntered(const QString &passphrase, bool enter_on_device, bool entry_abort=false); + virtual void onWalletPassphraseNeeded(bool on_device) override; + // TODO: setListenter() when it implemented in API signals: // emitted on every event happened with wallet @@ -367,6 +373,7 @@ signals: void walletCreationHeightChanged(); void deviceButtonRequest(quint64 buttonCode); void deviceButtonPressed(); + void walletPassphraseNeeded(bool onDevice); void transactionCommitted(bool status, PendingTransaction *t, const QStringList& txid); void heightRefreshed(quint64 walletHeight, quint64 daemonHeight, quint64 targetHeight) const; void deviceShowAddressShowed(); @@ -432,7 +439,7 @@ private: bool m_connectionStatusRunning; QString m_daemonUsername; QString m_daemonPassword; - Monero::WalletListener *m_walletListener; + WalletListenerImpl *m_walletListener; FutureScheduler m_scheduler; QMutex m_storeMutex; }; |
