From 1a2675b24669e51ac79324d2889494b95eddef62 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Wed, 27 Mar 2019 09:28:42 +0100 Subject: async device open and create from device, passphrase - passphrase entry on host added, requires early listener setting monero pull #5355 - wallet open and create from device shows splash to indicate possible long process - create from device is async to support passphrase entry --- wizard/WizardCreateDevice1.qml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'wizard/WizardCreateDevice1.qml') diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml index 9ad2ca33..81130aa1 100644 --- a/wizard/WizardCreateDevice1.qml +++ b/wizard/WizardCreateDevice1.qml @@ -207,13 +207,9 @@ Rectangle { } wizardController.walletOptionsRestoreHeight = _restoreHeight; } - var written = wizardController.createWalletFromDevice(); - if(written){ - wizardController.walletOptionsIsRecoveringFromDevice = true; - wizardStateView.state = "wizardCreateWallet2"; - } else { - errorMsg.text = qsTr("Error writing wallet from hardware device. Check application logs.") + translationManager.emptyString; - } + + wizardController.walletCreatedFromDevice.connect(onCreateWalletFromDeviceCompleted); + wizardController.createWalletFromDevice(); } } } @@ -230,4 +226,13 @@ Rectangle { walletInput.reset(); } } + + function onCreateWalletFromDeviceCompleted(written){ + if(written){ + wizardStateView.state = "wizardCreateWallet2"; + } else { + errorMsg.text = qsTr("Error writing wallet from hardware device. Check application logs.") + translationManager.emptyString; + } + wizardController.walletCreatedFromDevice.disconnect(onCreateWalletFromDeviceCompleted); + } } -- cgit v1.2.3