fix: fix market insights and security page buttons cp-7.80.0#30871
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key observations:
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: |
Description
Pass the resolved ambient price color state (
isPricePositiveanduseAmbientColor) 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
Screenshots/Recordings
Before
After
Screen.Recording.2026-06-01.at.17.07.49.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
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 intoRoutes.SECURITY_TRUST. MarketInsightsView and SecurityTrustScreen read the params and pass them toTokenDetailsStickyFooter, 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.