chore(send): type Send navigator with feature param list (Phase 3)#33303
chore(send): type Send navigator with feature param list (Phase 3)#33303weitingsun wants to merge 1 commit into
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These are TypeScript type-level refactoring changes with no runtime behavior changes. However, since the Send flow navigation types in the critical Performance Test Selection: |
|



Description
Phase 3 of the incremental React Navigation typing migration — Send feature.
The redesigned Send stack (
Routes.SEND.DEFAULT) was loosely typed asNestedNavigationParams | SendParams, so nestednavigate('Send', { screen, params })calls could not be checked against real screen param shapes. Call sites already navigate with{ screen, params }(Amount / Asset / Recipient / RedesignedConfirmations); this PR aligns the types with that runtime pattern.This is types-only — no intentional runtime navigation behavior change.
What changed
Feature param lists (
app/components/Views/confirmations/components/send/types/navigation.ts)SendStackParamList— Amount, Asset, Recipient, RedesignedConfirmationsSendScreenRouteParams— shared screen params (asset,location,predefinedRecipient, legacytxMeta)SendNavigationParamList— feature union + nestedSendentryRedesignedConfirmationstyped asConfirmationParams | undefinedNavigator (
app/components/Views/confirmations/components/send/send.tsx)createNativeStackNavigator<SendStackParamList>()Root stack (
app/core/NavigationService/types.ts)Send→NavigatorScreenParams<SendStackParamList>(replacesNestedNavigationParams | SendParams)Amount/Recipient/Assetroutes referenceSendStackParamList(Assetstill unions withAssetViewParamsfor the token-details route of the same name)Changelog
CHANGELOG entry:null
Related issues
Fixes:https://consensyssoftware.atlassian.net/browse/MCWP-674
Manual testing steps
N/A
Screenshots/Recordings
N/A
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
Low Risk
Types-only change with no runtime navigation logic; low risk aside from possible compile-time breakage at mismatched call sites.
Overview
Phase 3 of the React Navigation typing migration for the redesigned Send flow: navigation is now described with explicit param lists instead of loose
NestedNavigationParams/ legacy Send types.A new
types/navigation.tsdefinesSendStackParamList(Amount, Asset, Recipient, RedesignedConfirmations), sharedSendScreenRouteParams(asset, location, predefinedRecipient, legacytxMeta), andSendNavigationParamListfor nestedSendentry. The Send stack insend.tsxis wired ascreateNativeStackNavigator<SendStackParamList>().RootStackParamListinNavigationService/types.tsnow typesSendasNavigatorScreenParams<SendStackParamList>and aligns root-level Amount, Recipient, and Asset with those screen params (Assetstill unionsAssetViewParamsfor the token-details route). UnusedSendRecipientParams,SendAssetParams, andSendParamsimports are dropped.No intentional runtime navigation behavior change—compile-time safety only.
Reviewed by Cursor Bugbot for commit f1414b9. Bugbot is set up for automated code reviews on this repo. Configure here.