1
0

use apply() function on every wizard page, making sure wizard_data is always available

to wizard navigation evaluation
This commit is contained in:
Sander van Grieken
2022-10-24 13:04:46 +02:00
parent fac4003354
commit 2adf034771
10 changed files with 11 additions and 10 deletions

View File

@@ -10,10 +10,11 @@ import "../controls"
WizardComponent {
valid: false
onAccept: {
function apply() {
wizard_data['script_type'] = scripttypegroup.checkedButton.scripttype
wizard_data['derivation_path'] = derivationpathtext.text
}
function getScriptTypePurposeDict() {
return {
'p2pkh': 44,

View File

@@ -10,7 +10,7 @@ import "../controls"
WizardComponent {
valid: seedtext.text != ''
onAccept: {
function apply() {
wizard_data['seed'] = seedtext.text
wizard_data['seed_extend'] = extendcb.checked
wizard_data['seed_extra_words'] = extendcb.checked ? customwordstext.text : ''

View File

@@ -11,7 +11,7 @@ WizardComponent {
valid: false
onAccept: {
function apply() {
wizard_data['master_key'] = masterkey_ta.text
}

View File

@@ -11,7 +11,7 @@ WizardComponent {
valid: false
onAccept: {
function apply() {
if (bitcoin.isAddressList(import_ta.text)) {
wizard_data['address_list'] = import_ta.text
} else if (bitcoin.isPrivateKeyList(import_ta.text)) {

View File

@@ -4,7 +4,7 @@ import QtQuick.Controls 2.1
WizardComponent {
valid: keystoregroup.checkedButton !== null
onAccept: {
function apply() {
wizard_data['keystore_type'] = keystoregroup.checkedButton.keystoretype
}

View File

@@ -3,7 +3,7 @@ import "../controls"
WizardComponent {
valid: true
onAccept: {
function apply() {
wizard_data['proxy'] = pc.toProxyDict()
}

View File

@@ -4,7 +4,7 @@ WizardComponent {
valid: true
last: true
onAccept: {
function apply() {
wizard_data['oneserver'] = !sc.auto_server
wizard_data['server'] = sc.address
}

View File

@@ -7,7 +7,7 @@ import org.electrum 1.0
WizardComponent {
valid: wallet_name.text.length > 0
onAccept: {
function apply() {
wizard_data['wallet_name'] = wallet_name.text
}

View File

@@ -7,7 +7,7 @@ import "../controls"
WizardComponent {
valid: password1.text === password2.text && password1.text.length > 4
onAccept: {
function apply() {
wizard_data['password'] = password1.text
wizard_data['encrypt'] = password1.text != ''
}

View File

@@ -4,7 +4,7 @@ import QtQuick.Controls 2.1
WizardComponent {
valid: wallettypegroup.checkedButton !== null
onAccept: {
function apply() {
wizard_data['wallet_type'] = wallettypegroup.checkedButton.wallettype
if (wizard_data['wallet_type'] == 'standard')
wizard_data['seed_type'] = 'segwit'