Skip to content

Fix scan not enabling continue button on recipient screens#540

Open
n13 wants to merge 5 commits into
mainfrom
fix/scan-enables-continue-button
Open

Fix scan not enabling continue button on recipient screens#540
n13 wants to merge 5 commits into
mainfrom
fix/scan-enables-continue-button

Conversation

@n13

@n13 n13 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

On the send recipient screen, scanning an address left the bottom button stuck on "Enter address" instead of becoming "Continue" — the scanned address was accepted but the button never enabled. The same bug existed on the multisig propose recipient screen.

Root cause

Paste and scan took different code paths:

  • Paste (worked): assigned _recipientController.text outside setState, so the controller's _onRecipientChanged listener fired naturally, ran validation, cleared _hasAddressError, and enabled the button.
  • Scan (broken): assigned _recipientController.text inside setState, which fires the listener synchronously during the outer setState and triggers a nested setState for validation — so the button state didn't update.

Fix

Unified scan, paste, and recent-tap through a single _setRecipient helper that assigns the controller text last and outside setState (the path paste already used), letting the listener drive validation and the continue button. This also removes the duplicated assignment that was repeated across the three input methods in each screen.

Applied identically to:

  • mobile-app/lib/v2/screens/send/select_recipient_screen.dart
  • mobile-app/lib/v2/screens/multisig/propose/propose_recipient_screen.dart

Test plan

  • Send screen: scan a valid address QR → button enables ("Continue")
  • Send screen: scan a payment-URL QR → recipient + amount prefilled, button enables
  • Send screen: paste and recent-tap still work as before
  • Multisig propose screen: repeat the above checks

n13 added 5 commits June 25, 2026 16:52
Scanning an address left the send and multisig-propose recipient buttons
stuck on "Enter address". Scan assigned the controller text inside
setState, firing the change listener's nested setState mid-update, so
validation never enabled the button.

Route scan, paste, and recent through a shared _setRecipient helper that
assigns the controller text outside setState (the same path paste already
used), letting the listener drive validation. Also removes the duplicated
assignment across the three input methods in both screens.
align with design, delete duplicated screens from msig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant