refactor(earn): migrate Earn routes to native stack and HeaderStandard#30478
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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30478 +/- ##
=======================================
Coverage 82.12% 82.13%
=======================================
Files 5477 5477
Lines 147205 147208 +3
Branches 33847 33847
=======================================
+ Hits 120897 120906 +9
+ Misses 18031 18025 -6
Partials 8277 8277 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No other tags are warranted — changes are scoped to the Earn lending confirmation views and their navigation stack, with no impact on accounts, identity, browser, swaps, network management, or other areas. Performance Test Selection: |
|



Description
Migrates Earn navigation stacks from @react-navigation/stack to @react-navigation/native-stack, and replaces imperative getStakingNavbar headers on stablecoin lending deposit/withdrawal confirmation screens with declarative HeaderStandard from the design system.
Why
Align Earn with other recently converted stacks (native stack for performance and consistency).
Remove legacy navigation.setOptions(getStakingNavbar(...)) in favor of in-view HeaderStandard, matching patterns from refactor/unstake (refactor(unstake): use HeaderStandard instead of getStakingNavbar #30281) and refactor/headerstandard-titles-bridge (accessibility-label–based header interactions in tests).
What changed
app/components/UI/Earn/routes/index.tsx
EarnLendingDepositConfirmationView
EarnLendingWithdrawalConfirmationView
Tests
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Android EarnLendingDepositConfirmationView and EarnLendingWithdrawalConfirmationView screens after nav header changes
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
Touches user-facing Earn confirmation navigation and header/back behavior; withdrawal back analytics are explicitly preserved, but stack presentation changes warrant manual regression on deposit/withdraw flows.
Overview
Earn navigation moves from the legacy JS stack to native stack, with shared
transparentModalScreenOptions/clearNativeStackNavigatorOptionsandheaderShown: falseon stablecoin lending deposit and withdrawal confirmation routes so headers live in the screen.Deposit and withdrawal confirmation drop
getStakingNavbar/navigation.setOptionsand render in-viewHeaderStandardwith titles built from the routed token (ticker → symbol → name). Back usesonBackand thenavigation.backaccessibility label; tests query the back control via that label.On withdrawal,
EARN_LENDING_WITHDRAW_CONFIRMATION_BACK_CLICKEDanalytics move from the old navbarbackButtonEventintohandleHeaderBackPressbeforegoBack(). Deposit back only navigates back (no new back analytics in this change).Reviewed by Cursor Bugbot for commit c8a60d9. Bugbot is set up for automated code reviews on this repo. Configure here.