diff --git a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml index 2440291c9..438c686c3 100644 --- a/electrum/gui/qml/components/wizard/WCConfirmSeed.qml +++ b/electrum/gui/qml/components/wizard/WCConfirmSeed.qml @@ -52,8 +52,7 @@ WizardComponent { } } - onReadyChanged: { - if (ready) - customwordstext.visible = wizard_data['seed_extend'] + Component.onCompleted: { + customwordstext.visible = wizard_data['seed_extend'] } } diff --git a/electrum/gui/qml/components/wizard/WCCosignerKeystore.qml b/electrum/gui/qml/components/wizard/WCCosignerKeystore.qml index df686819b..0c6163943 100644 --- a/electrum/gui/qml/components/wizard/WCCosignerKeystore.qml +++ b/electrum/gui/qml/components/wizard/WCCosignerKeystore.qml @@ -40,10 +40,7 @@ WizardComponent { } } - onReadyChanged: { - if (!ready) - return - + Component.onCompleted: { participants = wizard_data['multisig_participants'] // cosigner index is determined here and put on the wizard_data dict in apply() diff --git a/electrum/gui/qml/components/wizard/WCCosignerSeed.qml b/electrum/gui/qml/components/wizard/WCCosignerSeed.qml index 9ecfb63e5..a3deb24b4 100644 --- a/electrum/gui/qml/components/wizard/WCCosignerSeed.qml +++ b/electrum/gui/qml/components/wizard/WCCosignerSeed.qml @@ -23,10 +23,7 @@ WCHaveSeed { wizard_data['cosigner_seed_extra_words'] = seed_extra_words } - onReadyChanged: { - if (!ready) - return - + Component.onCompleted: { participants = wizard_data['multisig_participants'] cosigner = wizard_data['multisig_current_cosigner'] } diff --git a/electrum/gui/qml/components/wizard/WCCreateSeed.qml b/electrum/gui/qml/components/wizard/WCCreateSeed.qml index ee8c3ba1e..65b7e1d77 100644 --- a/electrum/gui/qml/components/wizard/WCCreateSeed.qml +++ b/electrum/gui/qml/components/wizard/WCCreateSeed.qml @@ -76,9 +76,7 @@ WizardComponent { } } - onReadyChanged: { - if (!ready) - return + Component.onCompleted: { bitcoin.generate_seed(wizard_data['seed_type']) } diff --git a/electrum/gui/qml/components/wizard/WCHaveSeed.qml b/electrum/gui/qml/components/wizard/WCHaveSeed.qml index 582b5cc31..1a06f4edb 100644 --- a/electrum/gui/qml/components/wizard/WCHaveSeed.qml +++ b/electrum/gui/qml/components/wizard/WCHaveSeed.qml @@ -168,14 +168,9 @@ WizardComponent { } Component.onCompleted: { - setSeedTypeHelpText() - } - - onReadyChanged: { - if (!ready) - return - if (wizard_data['wallet_type'] == '2fa') root.is2fa = true + setSeedTypeHelpText() } + } diff --git a/electrum/gui/qml/components/wizard/WCShowMasterPubkey.qml b/electrum/gui/qml/components/wizard/WCShowMasterPubkey.qml index 2deed2e24..2477700f3 100644 --- a/electrum/gui/qml/components/wizard/WCShowMasterPubkey.qml +++ b/electrum/gui/qml/components/wizard/WCShowMasterPubkey.qml @@ -52,10 +52,7 @@ WizardComponent { id: bitcoin } - onReadyChanged: { - if (!ready) - return - + Component.onCompleted: { if (wizard_data['seed_variant'] == 'electrum') { masterPubkey = bitcoin.getMultisigMasterPubkey(wizard_data['seed_variant'], wizard_data['seed'], wizard_data['seed_extra_words']) } else { diff --git a/electrum/gui/qml/components/wizard/Wizard.qml b/electrum/gui/qml/components/wizard/Wizard.qml index 655087e0b..d6b9d40dd 100644 --- a/electrum/gui/qml/components/wizard/Wizard.qml +++ b/electrum/gui/qml/components/wizard/Wizard.qml @@ -38,7 +38,11 @@ Dialog { console.log(comp.errorString()) return null } - var page = comp.createObject(pages) + + // make a deepcopy of wdata and pass it to the component + var wdata_copy={} + Object.assign(wdata_copy, wdata) + var page = comp.createObject(pages, {wizard_data: wdata_copy}) page.validChanged.connect(function() { pages.pagevalid = page.valid } ) @@ -58,8 +62,7 @@ Dialog { var wdata = wiz.prev() console.log('prev view data: ' + JSON.stringify(wdata)) }) - Object.assign(page.wizard_data, wdata) // deep copy - page.ready = true // signal page it can access wizard_data + pages.pagevalid = page.valid pages.lastpage = page.last