1
0

qml: check passphrase not empty when checked

This commit is contained in:
Sander van Grieken
2023-08-01 14:33:04 +02:00
parent a6caa3ffe9
commit a6aff1ec07
4 changed files with 5 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ import "../controls"
WizardComponent {
securePage: true
valid: seedtext.text != ''
valid: seedtext.text != '' && extendcb.checked ? customwordstext.text != '' : true
function apply() {
wizard_data['seed'] = seedtext.text

View File

@@ -68,6 +68,9 @@ WizardComponent {
valid = false
validationtext.text = ''
if (extendcb.checked && customwordstext.text == '')
return
var validSeed = bitcoin.verifySeed(seedtext.text, seed_variant_cb.currentValue, wizard_data['wallet_type'])
if (!cosigner || !validSeed) {
valid = validSeed

View File

@@ -58,7 +58,7 @@ class QENewWalletWizard(NewWalletWizard, QEAbstractWizard):
'create_seed': { 'gui': 'WCCreateSeed' },
'confirm_seed': { 'gui': 'WCConfirmSeed' },
'have_seed': { 'gui': 'WCHaveSeed' },
'script_and_derivation': { 'gui': 'WCBIP39Refine' },
'script_and_derivation': { 'gui': 'WCScriptAndDerivation' },
'have_master_key': { 'gui': 'WCHaveMasterKey' },
'multisig': { 'gui': 'WCMultisig' },
'multisig_cosigner_keystore': { 'gui': 'WCCosignerKeystore' },