fix: fix on-ramp buy navigation on token details#25709
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. |
64c8c57
Pull Request is not mergeable
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: This is a focused change that:
The change is directly related to the Ramps feature (on-ramp/buy crypto flow), so SmokeRamps is the appropriate tag. The change is low-risk because:
While the change handles Solana tokens, it doesn't modify core Solana functionality - it just properly formats the asset ID for the on-ramp. SmokeNetworkExpansion tests Solana wallet standard compliance and transaction flows, which aren't directly affected by this navigation parameter change. Performance Test Selection: |
|



Description
PR to fix navigation to buy crypto with cash on the sticky buy button by passing the assetId
Changelog
CHANGELOG entry: Pass assetID to the on ramp buy screen.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Small navigation change limited to the token-details Buy fallback path; risk is mainly incorrect
assetIdformatting causing the on-ramp screen to open without preselecting the intended asset.Overview
Fixes the token-details sticky Buy flow so that when no eligible swap/bridge source token exists, the app navigates to on-ramp via
goToBuy({ assetId })instead of callinggoToBuy()with no context.assetIdis derived by using the token’s CAIP address directly for non-EVM assets, or generating an EVM CAIP asset id viaformatAddressToAssetId(address, chainId)(with a safe fallback toundefinedon errors). Tests are expanded to cover EVM vs non-EVM/trending tokens and error cases forassetIdgeneration.Written by Cursor Bugbot for commit ce98ac3. This will update automatically on new commits. Configure here.