fix(bridge): fix: cp-7.47.3 prevent crash when viewing Solana asset details#16770
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. |
|
|
|
|



Description
Fixes a crash that occurs when viewing asset details for Solana tokens in the Bridge flow. The issue was caused by
getTokenDetailsassuming all non-EVM asset addresses are already in CAIP format, when the Bridge API sometimes returns raw Solana addresses.Related issues
Fixes #16734
Fixes SWAPS-2525
Manual testing steps
Screenshots/Recordings
Before:
ScreenRecording_06-25-2025.17-44-43_1.MOV
After:
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-06-27.at.14.16.00.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Solution Details
Root Cause
The
getTokenDetailsfunction was callingparseCaipAssetTypedirectly onasset.addressfor non-EVM assets, assuming it was already in CAIP format. However, the Bridge API sometimes returns raw Solana addresses instead of CAIP-formatted addresses, causingparseCaipAssetTypeto throw an error.Fix Applied
Implemented the same defensive approach used in
useTokenHistoricalPrices:Benefits
useTokenHistoricalPricesTesting