-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: cp-7.59.0 remove dex prefix for hip3 asset display #22461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cp-7.59.0 remove dex prefix for hip3 asset display #22461
Conversation
…n PerpsMarketListView - Introduced a flag to ignore programmatic scroll events in the `handleScroll` function to avoid unintended feedback loops. - Updated the scroll handling logic to set the flag before programmatic scrolling and clear it after the animation completes, ensuring smoother tab transitions.
- Removed lazy loading logic for tab content, ensuring all tabs render their content consistently. - Updated comments for clarity regarding the swipeable tab content structure. - Enhanced readability and maintainability of the component by streamlining the rendering process.
Added support for proper display of hip3 and other DEX assets by stripping prefixes from asset symbols throughout the Perps UI. - Added `getPerpsDisplaySymbol()` in `marketUtils.ts` - Strips DEX prefixes (e.g., `hip3:`, `xyz:`) from asset symbols - Returns clean symbol for display (e.g., `hip3:BTC` → `BTC`) **Utils:** - `transactionTransforms.ts` - Strip prefixes in transaction subtitles (fills, orders, funding) **Hooks:** - `usePerpsToasts.tsx` - Clean asset names in toast notifications **Components:** - `PerpsAmountDisplay.tsx` - Display token symbols without prefixes - `PerpsOrderHeader.tsx` - Show clean asset names in order titles - `PerpsOpenOrderCard.tsx` - Format symbols in order cards - `PerpsRecentActivityList.tsx` - Display clean symbols in activity list - Hip3 assets now display as `BTC` instead of `hip3:BTC` - Stock/commodity assets show as `TSLA` instead of `xyz:TSLA` - Consistent, clean asset naming across entire Perps UI - Regular assets (BTC, ETH, SOL) remain unchanged
|
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. |
…00-instead-of-xyz-100-3
dylanbutler1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see getPerpsDisplaySymbol or any changes to marketUtils in this PR - forgot to add a file?
@dylanbutler1 the util method is already there, I did not add it, but there were no tests for it. |
…00-instead-of-xyz-100-3
| style={styles.activityAmount} | ||
| > | ||
| {item.subtitle} | ||
| {getPerpsDisplaySymbol(item.subtitle)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Redundant Subtitle Transformation
getPerpsDisplaySymbol is called on item.subtitle, but the subtitle is already processed by getPerpsDisplaySymbol in the transform functions (transformFillsToTransactions, transformOrdersToTransactions, transformFundingToTransactions). This double-processing is redundant and could cause issues if the subtitle format changes or contains colons for other reasons. The subtitle should be displayed directly without additional transformation.
|


Description
Added support for proper display of hip3 and other DEX assets by stripping prefixes from asset symbols throughout the Perps UI.
getPerpsDisplaySymbol()inmarketUtils.tship3:,xyz:) from asset symbolship3:BTC→BTC)Utils:
transactionTransforms.ts- Strip prefixes in transaction subtitles (fills, orders, funding)Hooks:
usePerpsToasts.tsx- Clean asset names in toast notificationsComponents:
PerpsAmountDisplay.tsx- Display token symbols without prefixesPerpsOrderHeader.tsx- Show clean asset names in order titlesPerpsOpenOrderCard.tsx- Format symbols in order cardsPerpsRecentActivityList.tsx- Display clean symbols in activity listHip3 assets now display as
BTCinstead ofhip3:BTCStock/commodity assets show as
TSLAinstead ofxyz:TSLAConsistent, clean asset naming across entire Perps UI
Regular assets (BTC, ETH, SOL) remain unchanged
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2043
Fixes: #22439
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-11-10.at.17.29.14.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Standardizes Perps asset symbols by stripping DEX prefixes (e.g., hip3:, xyz:) via getPerpsDisplaySymbol across UI, toasts, and transaction transforms, with comprehensive tests.
getPerpsDisplaySymbolinmarketUtilsto strip DEX prefixes from symbols for display.transactionTransformsto cleansubtitlefor fills, orders, and funding items.usePerpsToaststo use cleaned symbols in all toast subtitles and errors.PerpsOrderHeader,PerpsAmountDisplay,PerpsOpenOrderCard,PerpsRecentActivityList,PerpsClosePositionView,PerpsOrderView: replace raw symbols withgetPerpsDisplaySymbolin titles, labels, and amounts.Written by Cursor Bugbot for commit f7c4f2d. This will update automatically on new commits. Configure here.