Skip to content

fix: fix market insights and security page buttons cp-7.80.0#30871

Merged
sahar-fehri merged 2 commits into
mainfrom
fix/update-footer-buttons-color-market-insight
Jun 1, 2026
Merged

fix: fix market insights and security page buttons cp-7.80.0#30871
sahar-fehri merged 2 commits into
mainfrom
fix/update-footer-buttons-color-market-insight

Conversation

@sahar-fehri

@sahar-fehri sahar-fehri commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Pass the resolved ambient price color state (isPricePositive and useAmbientColor) from the Token Details page through to the Market Insights and Security Trust sub-screens so the Swap/Buy footer buttons consistently match the token details theme color (green when price is up, orange when price is down).
Previously, navigating to Market Insights or the Security Trust page would always render the footer buttons in the default green, ignoring the ambient color A/B test treatment active on the parent screen.

Changelog

CHANGELOG entry: Fixed Market Insights and Security Trust page footer buttons not reflecting the ambient price color from the Token Details page

Related issues

Fixes: ASSETS-3307

Manual testing steps

Feature: Ambient color consistency across Token Details sub-screens
  Scenario: Footer buttons match token details color on Market Insights
    Given the user is on the Token Details page for a token with a negative price change
    And the ambient price color A/B test is active
    And the footer buttons are orange
    When user taps the Market Insights entry card
    Then the Swap/Buy buttons on the Market Insights page should also be orange
  Scenario: Footer buttons match token details color on Security Trust
    Given the user is on the Token Details page for a token with a negative price change
    And the ambient price color A/B test is active
    And the footer buttons are orange
    When user taps the Security Trust entry card
    Then the Swap/Buy buttons on the Security Trust page should also be orange
  Scenario: Positive price direction shows green on sub-screens
    Given the user is on the Token Details page for a token with a positive price change
    And the ambient price color A/B test is active
    And the footer buttons are green
    When user navigates to Market Insights or Security Trust
    Then the Swap/Buy buttons should remain green
  Scenario: Control group unaffected
    Given the user is in the control group for the ambient price color A/B test
    When user navigates to Market Insights or Security Trust
    Then the Swap/Buy buttons should display the default green color

Screenshots/Recordings

Before

After

Screen.Recording.2026-06-01.at.17.07.49.mov

Pre-merge author checklist

Performance checks (if applicable)

  • 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
UI-only navigation prop plumbing for an existing A/B test; no auth, payments, or data-layer changes.

Overview
Token Details now forwards chart price direction (isPricePositive) and the ambient price-color A/B flag (useAmbientColor) into Market Insights and Security & Trust navigation params and sticky footers.

From AssetOverviewContent, opening Market Insights includes those fields on the route; the Security entry card passes them into Routes.SECURITY_TRUST. MarketInsightsView and SecurityTrustScreen read the params and pass them to TokenDetailsStickyFooter, so Swap/Buy styling stays aligned with Token Details (green vs orange) instead of defaulting to green on push.

Reviewed by Cursor Bugbot for commit 87ce159. Bugbot is set up for automated code reviews on this repo. Configure here.

@sahar-fehri sahar-fehri requested a review from a team as a code owner June 1, 2026 14:57
@github-actions

github-actions Bot commented Jun 1, 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.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 1, 2026
@github-actions github-actions Bot added size-S risk:medium AI analysis: medium risk labels Jun 1, 2026
@sahar-fehri sahar-fehri removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 1, 2026
@sahar-fehri sahar-fehri changed the title fix: fix market insights and security page buttons fix: fix market insights and security page buttons cp-7.80.0 Jun 1, 2026
@sahar-fehri sahar-fehri enabled auto-merge June 1, 2026 17:08
@github-actions github-actions Bot added risk:high AI analysis: high risk and removed risk:medium AI analysis: medium risk labels Jun 1, 2026
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
All 5 changed files are part of a narrow UI prop-threading change that propagates two optional parameters (isPricePositive and useAmbientColor) through the Token Details → Market Insights → Security Trust screen chain for an ambient color A/B test feature.

Key observations:

  1. Purely additive, optional props: All new props are typed as optional (?), so existing behavior is fully preserved when they are not provided.
  2. No core logic changes: No controllers, Engine, Redux state, navigation infrastructure, or shared components are modified.
  3. No E2E test coverage exists: Searching the tests/ directory found zero E2E test files referencing TokenDetails, MarketInsights, SecurityTrust, or AssetOverview — so no existing tests exercise these specific flows.
  4. Isolated component chain: The changes only affect the token details → market insights → security trust navigation path, which is a leaf-level feature not shared with other wallet flows.
  5. No risk to shared infrastructure: No BrowserTab, TabBar, modals, confirmations, or other shared components are touched, so no existing E2E tests are at risk of breaking.

Given the low risk, additive nature, and absence of existing E2E coverage for these components, running any E2E test suite would not provide meaningful validation of these specific changes and would only add unnecessary CI cost.

Performance Test Selection:
The changes are purely additive optional prop additions for an A/B test parameter. No rendering loops, list components, data fetching, state management, or initialization logic is modified. There is no performance impact from threading two boolean props through a component hierarchy.

View GitHub Actions results

@sahar-fehri sahar-fehri added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit da62c11 Jun 1, 2026
155 of 159 checks passed
@sahar-fehri sahar-fehri deleted the fix/update-footer-buttons-color-market-insight branch June 1, 2026 17:53
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 1, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.81.0 Issue or pull request that will be included in release 7.81.0 label Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.81.0 Issue or pull request that will be included in release 7.81.0 risk:high AI analysis: high risk size-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants