fix: fix navigation to token details from custom network cp-7.74.0#28972
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact Assessment:
Tag Selection:
Performance: No performance impact expected - the change adds a try-catch around an existing synchronous call, which has negligible overhead. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
Fixes a crash that occurred when viewing token details on custom or unsupported networks (e.g., Fantom, Linea Sepolia, custom EVM chains).
Issue
When users navigated to token details on networks not supported by the Swaps/Bridge
formatAddressToAssetId, the app would crash with:Reproduction Steps:
0xfa)Solution
Added a try-catch wrapper around the
formatAddressToAssetIdcall inPrice.advanced.tsx. When the function throws an error for unsupported chains:Changelog
CHANGELOG entry: Fix navigation error on token details page when coming from custom network flow
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
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
Low risk: a small defensive change that only affects advanced price chart initialization, with added tests covering unsupported-chain fallbacks.
Overview
Prevents crashes in
PriceAdvancedon unsupported/custom networks by wrappingformatAddressToAssetIdin atry/catchand using an emptyassetIdwhen formatting fails, allowing the UI to fall back toPriceLegacyinstead of throwing.Extends
Price.advanced.test.tsxwith coverage for custom/unsupported chainIds (including Linea Sepolia) and verifiesuseOHLCVChartis invoked withassetId: ''in the failure case, while supported networks still render the advanced chart.Reviewed by Cursor Bugbot for commit 706896b. Bugbot is set up for automated code reviews on this repo. Configure here.