fix: wizard: qml: call checkIfLast in WCHaveSeed
What changed, and why it matters
This is a small UI bug fix in Electrum's mobile-style (QML) wallet setup wizard. When restoring a wallet from a seed phrase while another wallet was already open, the wizard wrongly showed a 'Finish' button instead of 'Next'. Clicking it could trigger a crash (KeyError). The fix makes the wizard recalculate which button to show after the seed details are processed. It is not a security vulnerability in the cryptographic sense, just a user-experience regression that could confuse or crash the app.
Treat as a routine bug fix / UX regression. No urgent security action is required. Users on affected versions should update to the fixed version if they use the QML (mobile/Android) wallet restore flow. Developers should verify the wizard button state in the regression test suite for seed restore with an already-loaded wallet.
Security signals we found
UI state inconsistency leading to application crash (KeyError)
Regression from prior pull request #10016
No cryptographic, authentication, or network security changes
No privilege escalation, data leakage, or remote code execution path
Evidence from the diff
The commit fixes a regression in electrum/gui/qml/components/wizard/WCHaveSeed.qml. The wizard’s last property for the have_seed step depends on NewWalletWizard.is_single_password() and wants_ext(wizard_data). is_single_password() returns true when a wallet is already loaded, while wants_ext() is false until apply() sets seed_extend: True. Because last was evaluated before apply() ran, the view incorrectly rendered a Finish button. The patch calls checkIsLast() inside the validation timer’s onTriggered handler, after checkValid(), so the button state is recomputed once seed_extend is available. This prevents the KeyError from clicking Finish when the passphrase view still needs to be shown.
Changed components
electrum/gui/qml/components/wizard/WCHaveSeed.qmlInspect captured patch +5 / −1
diff --git a/electrum/gui/qml/components/wizard/WCHaveSeed.qml b/electrum/gui/qml/components/wizard/WCHaveSeed.qml
index 3be2a29..9974a60 100644
--- a/electrum/gui/qml/components/wizard/WCHaveSeed.qml
+++ b/electrum/gui/qml/components/wizard/WCHaveSeed.qml
@@ -224,7 +224,11 @@ WizardComponent {
id: validationTimer
interval: 500
repeat: false
- onTriggered: checkValid()
+ onTriggered: {
+ checkValid()
+ // checkIsLast depends on 'seed_extend'(_canPassphrase) getting set in apply()
+ checkIsLast()
+ }
}
Component.onCompleted: {
Why this scored 22/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.