improve error message [skip ci]
What changed, and why it matters
This commit simply changes the text of an error message shown when a user cancels QR code scanning. It does not alter security behavior, fix a vulnerability, or introduce any new risk.
No security action needed; this is a non-security user-experience string change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A single-line Dart change in wallet_restore_from_qr_code.dart rewords the exception thrown when presentQRScanner returns null (user cancelled scan) from ‘Unexpected scan QR code value: aborted’ to ‘QR scan is cancelled’. The control flow and error handling remain identical.
Changed components
lib/view_model/restore/wallet_restore_from_qr_code.dartInspect captured patch +1 / −1
diff --git a/lib/view_model/restore/wallet_restore_from_qr_code.dart b/lib/view_model/restore/wallet_restore_from_qr_code.dart
index 3b4709a2..7ffec55f 100644
--- a/lib/view_model/restore/wallet_restore_from_qr_code.dart
+++ b/lib/view_model/restore/wallet_restore_from_qr_code.dart
@@ -111,7 +111,7 @@ class WalletRestoreFromQRCode {
static Future<RestoredWallet> scanQRCodeForRestoring(BuildContext context) async {
String? code = await presentQRScanner(context);
- if (code == null) throw Exception("Unexpected scan QR code value: aborted");
+ if (code == null) throw Exception("QR scan is cancelled");
if (code.isEmpty) throw Exception('Unexpected scan QR code value: value is empty');
if (code.startsWith("[")) code = code.substring(code.indexOf("]") + 1);
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.