aboutsummaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-06-16 14:53:44 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-06-16 14:53:44 -0500
commitb970cad48b9e8b7abe465e738a488f6f4b48a794 (patch)
tree32361f19068ac355fc2ba207a46df3f7a887e61d /wizard
parent752f1faa93a53cb3d1bed9522a004c03433cbe54 (diff)
parentdfe8146f5c48b8ea67c417b9e2b406c1ef80a3a7 (diff)
downloadmonzero-gui-b970cad48b9e8b7abe465e738a488f6f4b48a794.tar.gz
monzero-gui-b970cad48b9e8b7abe465e738a488f6f4b48a794.tar.xz
monzero-gui-b970cad48b9e8b7abe465e738a488f6f4b48a794.zip
Merge pull request #3564
dfe8146 SettingsInfo, WizardRestoreWallet1, WizardCreateDevice1: Correct restore height date when typed in wrong format (rating89us)
Diffstat (limited to 'wizard')
-rw-r--r--wizard/WizardCreateDevice1.qml9
-rw-r--r--wizard/WizardRestoreWallet1.qml10
2 files changed, 2 insertions, 17 deletions
diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml
index 97623283..1dc877e4 100644
--- a/wizard/WizardCreateDevice1.qml
+++ b/wizard/WizardCreateDevice1.qml
@@ -183,15 +183,8 @@ Rectangle {
wizardController.walletOptionsDeviceName = wizardCreateDevice1.deviceName;
if(lookahead.text)
wizardController.walletOptionsSubaddressLookahead = lookahead.text;
- var _restoreHeight = 0;
if(restoreHeight.text){
- // Parse date string or restore height as integer
- if(restoreHeight.text.indexOf('-') === 4 && restoreHeight.text.length === 10){
- _restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeight.text, Utils.netTypeToString());
- } else {
- _restoreHeight = parseInt(restoreHeight.text)
- }
- wizardController.walletOptionsRestoreHeight = _restoreHeight;
+ wizardController.walletOptionsRestoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(restoreHeight.text);
}
wizardController.walletCreatedFromDevice.connect(onCreateWalletFromDeviceCompleted);
diff --git a/wizard/WizardRestoreWallet1.qml b/wizard/WizardRestoreWallet1.qml
index 0bf76ca9..4eccc662 100644
--- a/wizard/WizardRestoreWallet1.qml
+++ b/wizard/WizardRestoreWallet1.qml
@@ -314,16 +314,8 @@ Rectangle {
break;
}
- var _restoreHeight = 0;
if(restoreHeight.text){
- // Parse date string or restore height as integer
- if(restoreHeight.text.indexOf('-') === 4 && restoreHeight.text.length === 10){
- _restoreHeight = Wizard.getApproximateBlockchainHeight(restoreHeight.text, Utils.netTypeToString());
- } else {
- _restoreHeight = parseInt(restoreHeight.text)
- }
-
- wizardController.walletOptionsRestoreHeight = _restoreHeight;
+ wizardController.walletOptionsRestoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(restoreHeight.text);
}
wizardStateView.state = "wizardRestoreWallet2";