fix: qr scanner appearing before the confirmations screen cp-7.77.0#30088
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
ccharly
left a comment
There was a problem hiding this comment.
Code LGTM (not tested). Left 1 nit comment, but that's ok IMO!
| import PPOMUtil from '../../../../lib/ppom/ppom-util'; | ||
| import Routes from '../../../../constants/navigation/Routes'; | ||
| import { MetaMetricsEvents } from '../../../../core/Analytics'; | ||
|
|
There was a problem hiding this comment.
Nit: Not sure why this got added? Linter might complain about this 🤔
There was a problem hiding this comment.
Mobile linter never gonna complain 😄
| const toAddress = recipientAddress || to; | ||
| if (isEvmSendType) { | ||
| submitEvmTransaction({ | ||
| await submitEvmTransaction({ |
There was a problem hiding this comment.
We shouldn't await here, it will prevent mounting of skeleton loader for confirmation
| import PPOMUtil from '../../../../lib/ppom/ppom-util'; | ||
| import Routes from '../../../../constants/navigation/Routes'; | ||
| import { MetaMetricsEvents } from '../../../../core/Analytics'; | ||
|
|
There was a problem hiding this comment.
Mobile linter never gonna complain 😄
|
@montelaidev Unfortunately I am noticing a few issues still with the send flow. screen-20260513-134732-1778694348906.mp4
|
owencraston
left a comment
There was a problem hiding this comment.
Blocking until we can confirm that the issues with the send flow are fixed.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 43f727f. Configure here.
| } = useAlerts(); | ||
| const { onConfirm, onReject } = useConfirmActions(); | ||
| const { isSigningQRObject, needsCameraPermission } = useQRHardwareContext(); | ||
| const isQrAccount = useIsConfirmationFromQrAccount(); |
There was a problem hiding this comment.
Can we remove this as it will cost an unnecessary execution?
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Selection Rationale:
No other tags are needed as the changes are scoped to QR hardware wallet confirmation UX - they don't affect browser, swaps, staking, network management, snaps, or other areas. Performance Test Selection: |
|
gantunesr
left a comment
There was a problem hiding this comment.
Looks good and I see from Monte's test that the bug reported yesterday is fixed




Description
This PR fixes the issue where the qr scanning appears before the confirmation screen.
Changelog
CHANGELOG entry: fixes the the qr scanner appearing before confirmations page
Related issues
Fixes: #29949
Manual testing steps
Screenshots/Recordings
Before
After
Screen_Recording_20260513_172613_MetaMask.mp4
Screen_Recording_20260514_195337_MetaMask.mp4
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes confirmation submit flow for QR hardware wallets by adding new state and altering when scanning UI is shown; mistakes could block or prematurely trigger signing for QR accounts. Scope is contained to confirmations/QR hardware paths with updated tests.
Overview
Prevents the QR scanner/
QRInfoview from appearing before the confirmations screen by introducingsigningConfirmedinQRHardwareContextand only renderingQRInfowhen QR signing is active and the user has confirmed.Updates
useConfirmActionsso tapping Confirm during an in-progress QR signing session setssigningConfirmedand explicitly shows the scanner, while still delegating touseQrConfirmfor QR-hardware accounts; also ensuressigningConfirmedis set before executing the default approval/transaction paths.Adjusts QR confirm UX so
useQrConfirmre-shows the awaiting-confirmation bottom sheet when QR signing is already in progress (instead of opening theQRInfoscanner), and updates footer behavior/tests so the button label remainsConfirmduring QR signing.Reviewed by Cursor Bugbot for commit 864f724. Bugbot is set up for automated code reviews on this repo. Configure here.