Skip to content

fix: forward route params on intra-navigator screen transitions in send flow#29668

Merged
OGPoyraz merged 2 commits into
mainfrom
ogp/CONF-1307
May 4, 2026
Merged

fix: forward route params on intra-navigator screen transitions in send flow#29668
OGPoyraz merged 2 commits into
mainfrom
ogp/CONF-1307

Conversation

@OGPoyraz

@OGPoyraz OGPoyraz commented May 4, 2026

Copy link
Copy Markdown
Member

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: handleSendPageNavigation passes predefinedRecipient via navigate("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 is Asset. When the user picks an asset and navigates to Amount, the useSendScreenNavigation hook called navigate("Send", { screen }) without forwarding params - so predefinedRecipient was lost.

Fix: Update useSendScreenNavigation to forward the current screen's route.params when navigating between screens within the nested Send navigator. This ensures all navigation params (including predefinedRecipient) 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

Feature: QR Scanner predefined recipient in send flow

  Scenario: user scans a QR code with a valid address and completes send
    Given the user is on the wallet home screen

    When user opens the QR scanner and scans a valid address QR code
    Then the send flow opens starting at the Asset selection screen
    And after selecting an asset, the Amount screen is shown
    And pressing Continue skips the Recipient screen and submits with the scanned address

Screenshots/Recordings

Before

After

telegram-cloud-document-2-5458909115457771995.mp4

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Touches send-flow navigation by forwarding route.params on 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 updating useSendScreenNavigation to forward the current route.params whenever it calls navigate within the nested Send navigator.

Updates the hook’s unit test to mock useRoute() and assert that navigate('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.

@metamaskbotv2 metamaskbotv2 Bot added the team-confirmations Push issues to confirmations team label May 4, 2026
@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-S labels May 4, 2026
@OGPoyraz OGPoyraz marked this pull request as ready for review May 4, 2026 15:09
@OGPoyraz OGPoyraz requested a review from a team as a code owner May 4, 2026 15:09
@OGPoyraz OGPoyraz removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 4, 2026
@OGPoyraz OGPoyraz enabled auto-merge May 4, 2026 15:20
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are confined to useSendScreenNavigation.ts and its test file. The modification adds useRoute() to read current route params and forwards them when navigating to the Send screen (e.g., asset info with chainId and address). This hook is used by nft-list, token-list, and amount-keyboard components in the send flow.

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:
The change is a minor navigation hook fix that forwards route params. It doesn't affect rendering performance, data loading, state management, or any performance-sensitive code paths. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented May 4, 2026

Copy link
Copy Markdown

@OGPoyraz OGPoyraz added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit 92e78c5 May 4, 2026
135 of 157 checks passed
@OGPoyraz OGPoyraz deleted the ogp/CONF-1307 branch May 4, 2026 16:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants