allow restoring from only spendkey

This commit is contained in:
cryptochangements34 2018-06-05 21:16:19 -04:00 committed by GitHub
parent 06fdf27be2
commit ac8e88ee53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,8 +56,8 @@ ColumnLayout {
property int rowSpacing: 10 property int rowSpacing: 10
function checkFields(){ function checkFields(){
var addressOK = walletManager.addressValid(addressLine.text, persistentSettings.nettype) var addressOK = (viewKeyLine.text.length > 0 || spendKeyLine.text.length > 0)? walletManager.addressValid(addressLine.text, persistentSettings.nettype) : false
var viewKeyOK = walletManager.keyValid(viewKeyLine.text, addressLine.text, true, persistentSettings.nettype) var viewKeyOK = (viewKeyLine.text.length > 0)? walletManager.keyValid(viewKeyLine.text, addressLine.text, true, persistentSettings.nettype) : true
// Spendkey is optional // Spendkey is optional
var spendKeyOK = (spendKeyLine.text.length > 0)? walletManager.keyValid(spendKeyLine.text, addressLine.text, false, persistentSettings.nettype) : true var spendKeyOK = (spendKeyLine.text.length > 0)? walletManager.keyValid(spendKeyLine.text, addressLine.text, false, persistentSettings.nettype) : true