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 /wizard | |
| 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 'wizard')
| -rw-r--r-- | wizard/WizardController.qml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml index a1628b4f..b38d079f 100644 --- a/wizard/WizardController.qml +++ b/wizard/WizardController.qml @@ -490,19 +490,24 @@ Rectangle { walletCreatedFromDevice(success); } - function onWalletPassphraseNeeded(){ + function onWalletPassphraseNeeded(on_device){ splash.close() console.log(">>> wallet passphrase needed: "); - passwordDialog.onAcceptedPassphraseCallback = function() { - walletManager.onPassphraseEntered(passwordDialog.password); + devicePassphraseDialog.onAcceptedCallback = function(passphrase) { + walletManager.onPassphraseEntered(passphrase, false, false); creatingWalletDeviceSplash(); } - passwordDialog.onRejectedPassphraseCallback = function() { - walletManager.onPassphraseEntered("", true); + devicePassphraseDialog.onWalletEntryCallback = function() { + walletManager.onPassphraseEntered("", true, false); creatingWalletDeviceSplash(); } - passwordDialog.openPassphraseDialog() + devicePassphraseDialog.onRejectedCallback = function() { + walletManager.onPassphraseEntered("", false, true); + creatingWalletDeviceSplash(); + } + + devicePassphraseDialog.open(on_device) } function onDeviceButtonRequest(code){ |
