Skip to content

feat(predict): add Ethereum accent color to crypto up/down markets cp-7.81.0#31029

Merged
ghgoodreau merged 1 commit into
mainfrom
feat/predict-eth-accent-color
Jun 4, 2026
Merged

feat(predict): add Ethereum accent color to crypto up/down markets cp-7.81.0#31029
ghgoodreau merged 1 commit into
mainfrom
feat/predict-eth-accent-color

Conversation

@ghgoodreau

@ghgoodreau ghgoodreau commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

Maps the ETH symbol to #5E6DB7 in 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() (ethereum tag + eth- slug prefix), so only the two color lookup tables (CRYPTO_SYMBOL_TO_ACCENT_COLOR on the details screen, CRYPTO_ACCENT_BY_SYMBOL on 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

Feature: Predict Ethereum up/down accent color

  Scenario: user views an Ethereum up/down market card on the feed
    Given the predict up/down feature flag is enabled
    And an Ethereum up/down market is available in the feed

    When the user scrolls to the Ethereum market card
    Then the card's sparkline and accent elements render in the Ethereum accent (#5E6DB7)
    And BTC up/down cards continue to render in the BTC orange accent
    And any unmapped crypto up/down card falls back to the default amber accent

  Scenario: user opens the Ethereum up/down details screen
    Given the predict up/down feature flag is enabled
    And an Ethereum up/down market is available

    When the user taps the Ethereum market card and opens the details screen
    Then the chart line, "Current price" label, and current price value render in the Ethereum accent (#5E6DB7)
    And opening a BTC up/down market still renders in the BTC orange accent

Screenshots/Recordings

Before

After

Screenshot 2026-06-03 at 8 42 17 PM

Pre-merge author checklist

Performance checks (if applicable)

Not applicable; static color constant addition only.

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

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 color for BTC, ETH, and unmapped symbols (mock chart exposes color in accessibilityLabel; 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.

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.
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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.

@mm-token-exchange-service mm-token-exchange-service Bot added the team-predict Predict team label Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are minimal and purely cosmetic: adding an ETH accent color entry (rgb(94, 109, 183)) to static color lookup maps in two Predict components (PredictCryptoUpDownDetails and PredictCryptoUpDownMarketCard), plus corresponding unit test updates. No logic, state management, API, or navigation changes are involved. The impact is strictly limited to the visual appearance of ETH-related prediction market cards.

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:
The changes are purely cosmetic — adding a static color string to a lookup map. There is no new rendering complexity, no additional data fetching, no list changes, and no impact on component lifecycle or state management. Performance tests are not warranted.

View GitHub Actions results

@github-actions github-actions Bot added the size-S label Jun 3, 2026
@ghgoodreau ghgoodreau marked this pull request as ready for review June 4, 2026 14:13
@ghgoodreau ghgoodreau requested a review from a team as a code owner June 4, 2026 14:13
@github-actions github-actions Bot added the risk:high AI analysis: high risk label Jun 4, 2026
@ghgoodreau ghgoodreau enabled auto-merge June 4, 2026 15:02

@MarioAslau MarioAslau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghgoodreau ghgoodreau added this pull request to the merge queue Jun 4, 2026
@ghgoodreau ghgoodreau removed this pull request from the merge queue due to a manual request Jun 4, 2026
@ghgoodreau ghgoodreau changed the title feat(predict): add Ethereum accent color to crypto up/down markets feat(predict): add Ethereum accent color to crypto up/down markets cp-7.81.0 Jun 4, 2026
@ghgoodreau ghgoodreau enabled auto-merge June 4, 2026 20:38
@mm-token-exchange-service mm-token-exchange-service Bot added INVALID-PR-TEMPLATE PR's body doesn't match template and removed INVALID-PR-TEMPLATE PR's body doesn't match template labels Jun 4, 2026
@ghgoodreau ghgoodreau added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit 02bdd66 Jun 4, 2026
345 of 352 checks passed
@ghgoodreau ghgoodreau deleted the feat/predict-eth-accent-color branch June 4, 2026 21:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 4, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.82.0 Issue or pull request that will be included in release 7.82.0 label Jun 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.82.0 Issue or pull request that will be included in release 7.82.0 risk:high AI analysis: high risk size-S team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants