feat(predict): add Ethereum accent color to crypto up/down markets cp-7.81.0#31029
Conversation
Map the ETH symbol to #5E6DB7 in both the series card and the details page so Ethereum markets get a distinct chart, sparkline, badge, and price accent instead of falling back to the default amber. Symbol resolution was already in place via getCryptoSymbol() (ethereum tag + eth- slug prefix), so only the color lookup tables needed extending.
|
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: SmokePredictions is selected as the directly affected tag — these components are core Predictions UI. SmokeWalletPlatform is required per the SmokePredictions tag description since Predictions is a section inside the Trending tab. SmokeConfirmations is included per the SmokePredictions dependency rule (opening/closing positions are on-chain transactions), even though the confirmation flow itself is unaffected by this color change. No other tags are warranted — no shared infrastructure, controllers, navigation, or cross-feature components are touched. Performance Test Selection: |
Description
Maps the
ETHsymbol to#5E6DB7in both the series card (PredictCryptoUpDownMarketCard) and the details screen (PredictCryptoUpDownDetails) so Ethereum up/down markets render with a distinct accent — chart line, sparkline, badge, and current-price text — instead of falling back to the default amber.Symbol resolution was already in place via
getCryptoSymbol()(ethereumtag +eth-slug prefix), so only the two color lookup tables (CRYPTO_SYMBOL_TO_ACCENT_COLORon the details screen,CRYPTO_ACCENT_BY_SYMBOLon the card) needed extending. BTC keeps its orange accent and any unmapped symbol continues to fall back to the default amber.Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-941
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
Not applicable; static color constant addition only.
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Static UI color constants and unit tests only; no auth, data, or trading logic changes.
Overview
Adds Ethereum (
rgb(94, 109, 183)/#5E6DB7) to the crypto up/down accent color maps on the feed card (CRYPTO_ACCENT_BY_SYMBOL) and details screen (CRYPTO_SYMBOL_TO_ACCENT_COLOR), so ETH markets use a distinct purple accent instead of the default amber. BTC orange and the default fallback are unchanged.Details tests now assert the chart receives the correct
colorfor BTC, ETH, and unmapped symbols (mock chart exposescolorinaccessibilityLabel; target-price parsing was adjusted for the extra label segment).Reviewed by Cursor Bugbot for commit 2290913. Bugbot is set up for automated code reviews on this repo. Configure here.