chore: migrate StackNavigationProp types to native-stack equivalents#32119
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. |
…aMask/metamask-mobile into wsun/clean-up-react-navigation-stack
montelaidev
left a comment
There was a problem hiding this comment.
Accounts changes looks ok
⚡ Performance Test Results
❌ 4 tests failed · 20 tests · 1 device 📱 Devices tested (1)Android: Google Pixel 8 Pro (v14.0) ❌ Failed Tests (4)
@metamask-onboarding-team
@metamask-mobile-platform
✅ Passed Tests (16)
Branch: |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Nature of changes:
Affected feature areas and corresponding tags:
Risk assessment: Medium risk. The migration from JS-stack to native-stack changes the underlying navigation implementation. While most changes are type-only, the actual navigator behavior (animations, gesture handling, back navigation) differs between the two implementations. The Performance Test Selection: |
|
|
No release label on PR. Adding release label release-8.1.0 on PR, as PR was added to branch 8.1.0 when release was cut. |



Description
Replaces remaining @react-navigation/stack type usage with native-stack-aligned types now that the app runs on createNativeStackNavigator. This PR is type-only for production code — no navigator or screen transition behavior changes.
Changelog
CHANGELOG entry:null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-586
Manual testing steps
N/A - the changes are limited to tests and type changes, no functional changes
Screenshots/Recordings
n/a
Before
After
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
Mostly compile-time and test harness changes; the only runtime tweak is deferring Ramp order-history navigation until a sheet closes, which is low risk.
Overview
Finishes the native-stack migration for typing and test infrastructure now that the app uses
createNativeStackNavigator:@react-navigation/stackis removed from dependencies and call sites.Production screens and hooks swap loose
StackNavigationProp/ParamListBaseusage forAppNavigationProp,AppStackNavigationProp, orNavigationPropfromNavigationService/types.AppStackNavigationPropis added for stack-only APIs (replace,push,pop) with the same safegetState()typing asAppNavigationProp. Legacy JS stack navigator option presets inclearStackNavigatorOptions.tsare dropped in favor ofclearNativeStackNavigatorOptions.Tests, Storybook, and shared
renderWithProvider/ component-view renderers usecreateNativeStackNavigatorand mockreact-native-screensin Jest so native-stack mounts cleanly. Ramp Settings defers “View order history” navigation until the bottom sheetonCloseBottomSheetcallback runs. Earn withdraw tests press Done before asserting the TRON Unstake button.Reviewed by Cursor Bugbot for commit eac64c1. Bugbot is set up for automated code reviews on this repo. Configure here.