From ac8e88ee533be15f4d191064b385be2309672666 Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Tue, 5 Jun 2018 21:16:19 -0400 Subject: [PATCH] allow restoring from only spendkey --- wizard/WizardManageWalletUI.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wizard/WizardManageWalletUI.qml b/wizard/WizardManageWalletUI.qml index 51eb8204..a0c268cf 100644 --- a/wizard/WizardManageWalletUI.qml +++ b/wizard/WizardManageWalletUI.qml @@ -56,8 +56,8 @@ ColumnLayout { property int rowSpacing: 10 function checkFields(){ - var addressOK = walletManager.addressValid(addressLine.text, persistentSettings.nettype) - var viewKeyOK = walletManager.keyValid(viewKeyLine.text, addressLine.text, true, persistentSettings.nettype) + var addressOK = (viewKeyLine.text.length > 0 || spendKeyLine.text.length > 0)? walletManager.addressValid(addressLine.text, persistentSettings.nettype) : false + var viewKeyOK = (viewKeyLine.text.length > 0)? walletManager.keyValid(viewKeyLine.text, addressLine.text, true, persistentSettings.nettype) : true // Spendkey is optional var spendKeyOK = (spendKeyLine.text.length > 0)? walletManager.keyValid(spendKeyLine.text, addressLine.text, false, persistentSettings.nettype) : true