wizard: only validate custom wallet locations
What changed, and why it matters
This commit changes the Monero GUI wallet creation wizard so that users always see and can edit the wallet save location, regardless of which wallet mode they chose. Previously, the location field was hidden in simpler modes and the wallet was saved to a default folder. The change also stops validating whether the default folder is writable, only checking custom locations. This is a user-experience and correctness fix rather than a clear security patch, though it removes a minor validation inconsistency.
Treat as a routine UI/UX fix. If reviewing for security, verify that appWindow.accountsDir is always set to a trusted, user-writable path and that the wizard still validates custom paths before wallet creation. No urgent action required.
Security signals we found
UI validation logic changed to skip writability check for default directory
Wallet save path now always user-visible and user-editable
Removal of mode-dependent fallback to default accounts directory
Evidence from the diff
In WizardCreateWallet1.qml, the wallet location is now always taken from walletInput.walletLocation.text instead of falling back to appWindow.accountsDir when walletMode < 2. In WizardWalletInput.qml, the wallet location selector is made always visible (removed visible: appWindow.walletMode >= 2 guard), keyboard navigation always points to it, and the writable-directory check is skipped when the selected path equals the default appWindow.accountsDir. The default text is also changed from accountsDir + ‘/’ to accountsDir.
Changed components
wizard/WizardCreateWallet1.qmlwizard/WizardWalletInput.qmlMonero GUI wallet creation wizardInspect captured patch +5 / −7
diff --git a/wizard/WizardCreateWallet1.qml b/wizard/WizardCreateWallet1.qml
index cff802d..46b1810 100644
--- a/wizard/WizardCreateWallet1.qml
+++ b/wizard/WizardCreateWallet1.qml
@@ -103,7 +103,7 @@ Rectangle {
btnNextKeyNavigationTab: createWalletHeader
onNextClicked: {
wizardController.walletOptionsName = walletInput.walletName.text;
- wizardController.walletOptionsLocation = appWindow.walletMode >= 2 ? walletInput.walletLocation.text : appWindow.accountsDir;
+ wizardController.walletOptionsLocation = walletInput.walletLocation.text;
wizardStateView.state = "wizardCreateWallet2";
wizardStateView.wizardCreateWallet2View.pageRoot.forceActiveFocus();
}
diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml
index 2054fe5..8afc290 100644
--- a/wizard/WizardWalletInput.qml
+++ b/wizard/WizardWalletInput.qml
@@ -108,8 +108,8 @@ GridLayout {
Accessible.name: labelText + text
KeyNavigation.up: walletNameKeyNavigationBackTab
KeyNavigation.backtab: walletNameKeyNavigationBackTab
- KeyNavigation.down: errorMessageWalletName.text != "" ? errorMessageWalletName : appWindow.walletMode >= 2 ? walletLocation : wizardNav.btnPrev
- KeyNavigation.tab: errorMessageWalletName.text != "" ? errorMessageWalletName : appWindow.walletMode >= 2 ? walletLocation : wizardNav.btnPrev
+ KeyNavigation.down: errorMessageWalletName.text != "" ? errorMessageWalletName : walletLocation
+ KeyNavigation.tab: errorMessageWalletName.text != "" ? errorMessageWalletName : walletLocation
}
RowLayout {
@@ -143,8 +143,6 @@ GridLayout {
}
ColumnLayout {
- visible: appWindow.walletMode >= 2
-
MoneroComponents.LineEdit {
id: walletLocation
Layout.fillWidth: true
@@ -154,7 +152,7 @@ GridLayout {
errorMessageWalletLocation.text = qsTr("Wallet location is empty") + translationManager.emptyString;
return false;
}
- if (!oshelper.isWritableDirectory(walletLocation.text)) {
+ if (walletLocation.text !== appWindow.accountsDir && !oshelper.isWritableDirectory(walletLocation.text)) {
errorMessageWalletLocation.text = qsTr("Wallet location does not exist or is not writable") + translationManager.emptyString;
return false;
}
@@ -168,7 +166,7 @@ GridLayout {
placeholderText: ""
placeholderFontSize: 16
errorWhenEmpty: true
- text: appWindow.accountsDir + "/"
+ text: appWindow.accountsDir
onTextChanged: {
walletLocation.error = !walletLocation.verify();
walletName.error = !walletName.verify();
Why this scored 24/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.