fix(predict): fix Add Funds and Withdraw navigation when rendered inside Discovery Tabs#30271
fix(predict): fix Add Funds and Withdraw navigation when rendered inside Discovery Tabs#30271vinnyhoward wants to merge 5 commits into
Conversation
…dered in HomepageDiscoveryTabs
|
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 cebaecf. Configure here.
…ask/metamask-mobile into fix-753-predict-funds-broken-route
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These are navigation correctness fixes that affect:
No other areas are affected - changes are isolated to Predict component navigation and hooks. No performance impact expected from navigation routing fixes. Performance Test Selection: |
|




Description
When
PredictFeedis rendered insideHomepageDiscoveryTabs(thecoreMCU589AbtestHubPageDiscoveryTabsA/B test), the "Add funds" and "Withdraw" buttons were broken.Root cause:
usePredictDepositandusePredictWithdrawcallednavigateToConfirmationwithout a stack, so React Navigation tried to resolveRedesignedConfirmationsfrom the Wallet navigator scope where it isn't registered, instead of the Predict stack.Fix: hardcoded stack:
Routes.PREDICT.ROOTdirectly in both hooks, matching the same pattern Perps hooks already use. Also fixedPredictWorldCupMainFeedBannerwhich had the same issue navigating toRoutes.PREDICT.WORLD_CUPwithout a stack. All existing behavior is preserved since React Navigation handles navigating to an already-active stack gracefully.Changelog
CHANGELOG entry:null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-753
Manual testing steps
Screenshots/Recordings
Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2026-05-15.at.13.03.08.mov
Before
Tapping "Add funds" / "Withdraw" does nothing
Screen.Recording.2026-05-15.at.10.12.07.mov
After
Both buttons navigate correctly to the confirmation screen.
Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2026-05-15.at.13.03.08.mov
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
Updates navigation targets for deposit/withdraw confirmation flows and the World Cup banner to explicitly route via the
Predictstack; risk is moderate because it touches user-facing navigation for financial actions but is a small, scoped change.Overview
Fixes Predict navigation when rendered outside the Predict navigator (e.g., inside Discovery tabs) by explicitly targeting the Predict stack.
usePredictDepositandusePredictWithdrawnow passstack: Routes.PREDICT.ROOTtonavigateToConfirmation, andPredictWorldCupMainFeedBannernow navigates vianavigation.navigate(Routes.PREDICT.ROOT, { screen: Routes.PREDICT.WORLD_CUP }). Related tests were updated to assert the new navigation arguments.Reviewed by Cursor Bugbot for commit a8fa2da. Bugbot is set up for automated code reviews on this repo. Configure here.