fix: forward route params on intra-navigator screen transitions in send flow#29668
Conversation
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The change is a targeted bug fix/improvement to ensure route params (like asset details) are properly propagated during send screen navigation. This directly impacts the send transaction flow which is covered by SmokeConfirmations (which tests "transaction sending for native tokens (ETH), ERC-20 tokens, and Solana SPL tokens"). No controllers, Engine, or core infrastructure is touched. No navigation structure changes. No shared components that could break other test suites. The risk is low and isolated to the send flow. Performance Test Selection: |
|



Description
When navigating to the send flow from QR scanner with a
predefinedRecipient, the param was being lost when the user transitioned between screens within the nested Send stack navigator (e.g., Asset → Amount).Root cause:
handleSendPageNavigationpassespredefinedRecipientvianavigate("Send", { screen, params: { predefinedRecipient } }). React Navigation v5 delivers these params to whichever nested screen is the initial target. When no asset is pre-selected (QR scanner flow), the initial screen isAsset. When the user picks an asset and navigates toAmount, theuseSendScreenNavigationhook callednavigate("Send", { screen })without forwarding params - sopredefinedRecipientwas lost.Fix: Update
useSendScreenNavigationto forward the current screen'sroute.paramswhen navigating between screens within the nested Send navigator. This ensures all navigation params (includingpredefinedRecipient) survive intra-navigator transitions.Changelog
CHANGELOG entry: Fixed QR code scanned recipient address not being forwarded through the send flow
Related issues
Fixes: CONF-1307
Manual testing steps
Screenshots/Recordings
Before
After
telegram-cloud-document-2-5458909115457771995.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches send-flow navigation by forwarding
route.paramson intra-stack transitions; a small change but could affect how nested Send screens receive/override params.Overview
Fixes intra-Send navigation to preserve incoming route params (e.g., QR-scanned
predefinedRecipient) by updatinguseSendScreenNavigationto forward the currentroute.paramswhenever it callsnavigatewithin the nested Send navigator.Updates the hook’s unit test to mock
useRoute()and assert thatnavigate('Send', { screen, params })includes the forwarded params for both default and explicit target screens.Reviewed by Cursor Bugbot for commit 1a8c5da. Bugbot is set up for automated code reviews on this repo. Configure here.