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
This commit is contained in:
Dusan Klinec
2019-03-27 09:28:42 +01:00
parent 19c2208dc4
commit 1a2675b246
10 changed files with 607 additions and 14 deletions

View File

@@ -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);
}
}