fix(ramps): Preserve user-entered amount during Transak navigation reset -> cp-7.71.0#27742
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. |
13a8ffe to
aacef99
Compare
aacef99 to
fc525b9
Compare
fc525b9 to
a8bdee0
Compare
|
@metamaskbot update-mobile-fixture |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes are entirely isolated to the Ramp/on-ramp feature. The risk is medium because navigation resets are involved and the amount state initialization logic changed (params moved before useState calls). SmokeRamps covers the fiat on-ramp and off-ramp flows that would exercise these code paths. No other feature areas are impacted - no shared components (TabBar, Browser, Confirmations, etc.) were modified. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Fixes the Buy flow amount reverting from the user-entered value back to the default $100 during the Transak native provider loading transition.
When a user enters a custom amount (e.g. $30) and taps Continue, the Transak routing callbacks use
navigation.reset()to rebuild the navigation stack with a freshBuildQuotescreen as the base route. This fresh instance initialized withDEFAULT_AMOUNT = 100, causing a visible flash of $100 during the transition to the checkout/KYC screen.The fix passes the current
quote.fiatAmountas a route param (amount) to theAMOUNT_INPUTbase route in everynavigation.reset()call.BuildQuotenow readsparams?.amountas the initial state, preserving the user-entered amount through stack resets.Changelog
CHANGELOG entry: Fixed Buy flow amount input reverting to $100 during Transak native provider checkout transition.
Related issues
Fixes: TRAM-3348
Manual testing steps
Screenshots/Recordings
Before
ScreenRecording_03-12-2026.10-21-58_1.MP4
After
Screen.Recording.2026-03-20.164415.mp4
Screen.Recording.2026-03-20.174939.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Updates Transak native-provider navigation/reset logic and initial screen state; mistakes could regress Buy/KYC routing or amount display during transitions, but changes are localized and covered by tests.
Overview
Fixes the Transak native Buy flow so the user-entered fiat amount is preserved when the app uses
navigation.reset()during KYC/checkout transitions.BuildQuotenow supports anamountroute param to initialize the amount state (and to prevent region defaults from overriding it), anduseTransakRoutingpropagates this amount through all reset-based navigation paths (KYC approved → checkout, KYC forms, additional verification, verify identity, and KYC webview). Tests are updated/added to assert the amount is passed through routing callbacks and used as the initial displayed value.Written by Cursor Bugbot for commit a8bdee0. This will update automatically on new commits. Configure here.