From fc68567f23b2f754f3e54e73c00a6ca41558f923 Mon Sep 17 00:00:00 2001 From: selsta Date: Fri, 1 Mar 2019 08:20:05 +0100 Subject: wizard: improve restore from device ui/ux --- wizard/WizardController.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wizard/WizardController.qml') diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml index c57ff042..4224e904 100644 --- a/wizard/WizardController.qml +++ b/wizard/WizardController.qml @@ -60,6 +60,7 @@ Rectangle { wizardController.walletOptionsIsRecovering = false; wizardController.walletOptionsIsRecoveringFromDevice = false; wizardController.walletOptionsDeviceName = ''; + wizardController.walletOptionsDeviceIsRestore = false; wizardController.tmpWalletFilename = ''; wizardController.walletRestoreMode = 'seed' wizardController.walletOptionsSubaddressLookahead = ''; @@ -89,6 +90,7 @@ Rectangle { property bool walletOptionsIsRecoveringFromDevice: false property string walletOptionsSubaddressLookahead: '' property string walletOptionsDeviceName: '' + property bool walletOptionsDeviceIsRestore: false property string tmpWalletFilename: '' property var remoteNodes: '' @@ -388,7 +390,10 @@ Rectangle { wizardController.m_wallet = wallet; wizardController.walletOptionsIsRecoveringFromDevice = true; wizardController.tmpWalletFilename = tmp_wallet_filename; - wizardController.walletOptionsRestoreHeight = wizardController.m_wallet.walletCreationHeight; + if (!wizardController.walletOptionsDeviceIsRestore) { + // User creates a hardware wallet for the first time. Use a recent block height from API. + wizardController.walletOptionsRestoreHeight = wizardController.m_wallet.walletCreationHeight; + } } else { console.log(wallet.errorString) appWindow.showStatusMessage(qsTr(wallet.errorString), 5); -- cgit v1.2.3