Merge pull request #1466 from Cyrix126/desktop_token_qr_button
What changed, and why it matters
This commit adds a missing QR code scan button to two desktop token send screens in the Stack Wallet app. It is a straightforward user-interface fix that restores a feature already present on mobile and other send views; there is no indication it fixes a security vulnerability.
No security action required; treat as a normal UI feature completion. If reviewing for quality, verify the scanQr() handler already validates scanned QR contents consistently with mobile send views.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The merge adds a TextFieldIconButton using the existing scanQr() method and QrCodeIcon widget to desktop_token_send.dart and desktop_sol_token_send.dart, displayed only when the recipient text field is empty. It imports the qrcode_icon.dart asset and wires the button identically to existing address-book and clipboard buttons. No logic changes to QR parsing, validation, or transaction signing are made.
Changed components
lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dartlib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_sol_token_send.dartInspect captured patch +16 / −0
### lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_sol_token_send.dart
@@ -46,6 +46,7 @@ import '../../../../widgets/desktop/qr_code_scanner_dialog.dart';
import '../../../../widgets/desktop/secondary_button.dart';
import '../../../../widgets/icon_widgets/addressbook_icon.dart';
import '../../../../widgets/icon_widgets/clipboard_icon.dart';
+import '../../../../widgets/icon_widgets/qrcode_icon.dart';
import '../../../../widgets/icon_widgets/x_icon.dart';
import '../../../../widgets/stack_text_field.dart';
import '../../../../widgets/textfield_icon_button.dart';
@@ -1044,6 +1045,13 @@ class _DesktopSolTokenSendState extends ConsumerState<DesktopSolTokenSend> {
},
child: const AddressBookIcon(),
),
+ if (sendToController.text.isEmpty)
+ TextFieldIconButton(
+ semanticsLabel: "Scan QR Button. Opens Camera For Scanning QR Code.",
+ key: const Key("sendViewScanQrButtonKey"),
+ onTap: scanQr,
+ child: const QrCodeIcon(),
+ ),
],
),
),
### lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_token_send.dart
@@ -51,6 +51,7 @@ import '../../../../widgets/desktop/secondary_button.dart';
import '../../../../widgets/eth_fee_form.dart';
import '../../../../widgets/icon_widgets/addressbook_icon.dart';
import '../../../../widgets/icon_widgets/clipboard_icon.dart';
+import '../../../../widgets/icon_widgets/qrcode_icon.dart';
import '../../../../widgets/icon_widgets/x_icon.dart';
import '../../../../widgets/stack_text_field.dart';
import '../../../../widgets/textfield_icon_button.dart';
@@ -1042,6 +1043,13 @@ class _DesktopTokenSendState extends ConsumerState<DesktopTokenSend> {
},
child: const AddressBookIcon(),
),
+ if (sendToController.text.isEmpty)
+ TextFieldIconButton(
+ semanticsLabel: "Scan QR Button. Opens Camera For Scanning QR Code.",
+ key: const Key("sendViewScanQrButtonKey"),
+ onTap: scanQr,
+ child: const QrCodeIcon(),
+ ),
],
),
),Why this scored 20/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.