Skip to content

fix: mixpanel event missing property cp-7.69.0#27187

Merged
joaosantos15 merged 1 commit into
mainfrom
TSA-243-CP-mixpanel-fixes
Mar 9, 2026
Merged

fix: mixpanel event missing property cp-7.69.0#27187
joaosantos15 merged 1 commit into
mainfrom
TSA-243-CP-mixpanel-fixes

Conversation

@joaosantos15

@joaosantos15 joaosantos15 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Description

Bug fix

Fixed market_insights_displayed always reporting false in the TOKEN_DETAILS_OPENED event by initializing isLoading to true in useMarketInsights when a fetch will occur, preventing a race condition where the tracking callback fired before loading started and deduplication blocked the correct value

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TSA-243

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

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
Low risk state-initialization change in a React hook; main risk is a minor behavior shift where isLoading may start true when enabled and an asset id is present.

Overview
Fixes a race where market insights tracking could run before loading begins by initializing useMarketInsights’s isLoading state to true whenever the hook is enabled and a caip19Id is provided, ensuring first-render consumers don’t see a transient “not loading” state before the initial fetch.

Written by Cursor Bugbot for commit 2033d2c. This will update automatically on new commits. Configure here.

@github-actions

github-actions Bot commented Mar 9, 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.

@metamaskbot metamaskbot added the team-social-ai Social & AI team label Mar 9, 2026
@joaosantos15 joaosantos15 added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 9, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The change modifies the initial isLoading state in the useMarketInsights hook to depend on isEnabled && caip19Id instead of always starting as false. This affects the loading behavior of the Market Insights UI, which is used in Token Details (AssetOverviewContent) and MarketInsightsView components.

Market Insights is part of the token details experience and tied to the Tokens/Trending sections within the wallet. According to the tag definitions, changes to Tokens views embedded in Trending fall under SmokeWalletPlatform. Therefore, running SmokeWalletPlatform ensures validation of token details screens, Trending integration, and related wallet UI flows.

There are no changes to controllers, Engine, network logic, confirmations, swaps, perps, predictions, snaps, or identity/sync features. The modification is UI-state-only and localized to a hook, so no other E2E tags are required.

Performance Test Selection:
The change only adjusts the initial React state for a loading flag and does not introduce new data fetching logic, rendering complexity, or changes to critical flows (launch, login, swaps, asset loading). It is unlikely to have any measurable performance impact, so no performance tests are required.

View GitHub Actions results

@joaosantos15 joaosantos15 changed the title fix: mixpanel event missing property fix: mixpanel event missing property cp-7.69.0 Mar 9, 2026
@joaosantos15 joaosantos15 marked this pull request as ready for review March 9, 2026 09:03
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
9 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

sonarqubecloud Bot commented Mar 9, 2026

Copy link
Copy Markdown

@joaosantos15 joaosantos15 added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit fd5adac Mar 9, 2026
141 checks passed
@joaosantos15 joaosantos15 deleted the TSA-243-CP-mixpanel-fixes branch March 9, 2026 10:40
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 9, 2026
@metamaskbot metamaskbot added the release-7.70.0 Issue or pull request that will be included in release 7.70.0 label Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.70.0 Issue or pull request that will be included in release 7.70.0 size-XS team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants