wizard: simplify restore QR scanner layout
What changed, and why it matters
This commit is a straightforward user-interface cleanup in the Monero wallet restore wizard. It replaces a third radio-button option ('Restore from QR Code') with a dedicated QR scan button, simplifying the layout. There is no security-relevant change in behavior—QR scanning still works the same way, and no sensitive data handling or access-control logic was modified.
No security action required. Treat as a normal UI refactoring commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors WizardRestoreWallet1.qml: it removes the qrRadioButton radio button and associated walletRestoreMode = ‘qr’ state, replacing it with an InlineButton that directly triggers the camera UI. The QR decode handler is now disconnected before being reconnected to avoid duplicate signal connections. The change is purely presentational/UX; the underlying QR code parsing and wallet restoration flow remain unchanged.
Changed components
wizard/WizardRestoreWallet1.qmlInspect captured patch +14 / −15
diff --git a/wizard/WizardRestoreWallet1.qml b/wizard/WizardRestoreWallet1.qml
index 29f2c63..d754cd4 100644
--- a/wizard/WizardRestoreWallet1.qml
+++ b/wizard/WizardRestoreWallet1.qml
@@ -29,6 +29,7 @@
import QtQuick 2.9
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
+import FontAwesome 1.0
import "../js/Wizard.js" as Wizard
import "../js/Utils.js" as Utils
@@ -64,7 +65,6 @@ Rectangle {
// the key fields are only visible in 'keys' mode
seedRadioButton.checked = false;
keysRadioButton.checked = true;
- qrRadioButton.checked = false;
wizardController.walletRestoreMode = 'keys';
// extra_parameters is null when a bare address was scanned
@@ -132,7 +132,7 @@ Rectangle {
RowLayout {
Layout.topMargin: -10
- spacing: 200
+ spacing: 0
Layout.fillWidth: true
MoneroComponents.RadioButton {
@@ -140,10 +140,10 @@ Rectangle {
text: qsTr("Restore from seed") + translationManager.emptyString
fontSize: 16
checked: true
+ Layout.fillWidth: true
onClicked: {
checked = true;
keysRadioButton.checked = false;
- qrRadioButton.checked = false;
wizardController.walletRestoreMode = 'seed';
}
}
@@ -153,28 +153,28 @@ Rectangle {
text: qsTr("Restore from keys") + translationManager.emptyString
fontSize: 16
checked: false
+ Layout.fillWidth: true
onClicked: {
checked = true;
seedRadioButton.checked = false;
- qrRadioButton.checked = false;
wizardController.walletRestoreMode = 'keys';
}
}
- MoneroComponents.RadioButton {
- id: qrRadioButton
- text: qsTr("Restore from QR Code") + translationManager.emptyString
- fontSize: 16
+ MoneroComponents.InlineButton {
+ id: scanWalletQrButton
visible: appWindow.qrScannerEnabled
- checked: false
+ fontFamily: FontAwesome.fontFamilySolid
+ fontStyleName: "Solid"
+ text: FontAwesome.qrcode
+ tooltip: qsTr("Scan wallet QR code") + translationManager.emptyString
onClicked: {
- checked = true;
- seedRadioButton.checked = false;
- keysRadioButton.checked = false;
- wizardController.walletRestoreMode = 'qr';
- cameraUi.state = "Capture";
+ cameraUi.qrcode_decoded.disconnect(updateFromQrCode);
cameraUi.qrcode_decoded.connect(updateFromQrCode);
+ cameraUi.state = "Capture";
}
+ Accessible.role: Accessible.Button
+ Accessible.name: tooltip
}
}
@@ -352,7 +352,6 @@ Rectangle {
wizardWalletInput.reset();
seedRadioButton.checked = true;
keysRadioButton.checked = false;
- qrRadioButton.checked = false;
seedInput.text = "";
seedOffsetCheckbox.checked = false;
seedOffset.text = "";
Why this scored 15/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.