You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the segment metric event "Market Insights Closed" to the Market Insights view, for the back button.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Feature: my feature nameScenario: user [verb for user action]Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
I've completed the PR template to the best of my ability
I've included tests if applicable
I've documented my code using JSDoc format if applicable
I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
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 analytics-only change; main risk is accidental over/under-counting if handleBackPress is triggered from additional paths.
Overview
Adds a new MetaMetrics event, MARKET_INSIGHTS_CLOSED (Market Insights Closed), to the central analytics event registry.
Updates MarketInsightsView so pressing the back button tracks this close event with the same asset identifier properties (caip19/perps_market, optional digest_id, and asset_symbol) before navigating away.
Written by Cursor Bugbot for commit 8c77a02. This will update automatically on new commits. Configure here.
Selected Performance tags: None (no tests recommended)
Risk Level: low
AI Confidence: 85%
click to see 🤖 AI reasoning details
E2E Test Selection:
The PR makes two small, additive changes:
MetaMetrics.events.ts: Adds a new MARKET_INSIGHTS_CLOSED analytics event enum value and its corresponding event generator. This is purely additive — no existing events are modified.
MarketInsightsView.tsx: Wires up the new MARKET_INSIGHTS_CLOSED event to fire when the user presses the back button on the Market Insights view. The handleBackPress callback now tracks the event with asset ID and symbol properties before calling navigation.goBack(). The navigation behavior itself is unchanged.
Risk Assessment:
Changes are purely additive (new event + new tracking call)
No existing functionality is modified or removed
No shared components, controllers, or navigation infrastructure is affected
MarketInsights is feature-flag gated
The MarketInsights feature is accessible from the Token Details/Asset Overview screen, which is part of the core wallet token browsing experience covered by SmokeWalletPlatform
Tag Selection:
SmokeWalletPlatform: Selected because MarketInsights is part of the token/asset details flow within the wallet platform. The change touches the back navigation handler of the MarketInsights view, which should be validated to ensure the analytics event fires correctly and navigation still works as expected.
No other tags are needed as the changes don't touch confirmations, accounts, networks, trading, or any other feature areas.
Performance Test Selection:
No performance impact expected. The changes only add a single analytics event call (createEventBuilder + trackEvent) to the back press handler in MarketInsightsView. This is a negligible operation that does not affect rendering performance, data loading, list rendering, or any critical user flow performance metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the segment metric event "Market Insights Closed" to the Market Insights view, for the back button.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk analytics-only change; main risk is accidental over/under-counting if
handleBackPressis triggered from additional paths.Overview
Adds a new MetaMetrics event,
MARKET_INSIGHTS_CLOSED(Market Insights Closed), to the central analytics event registry.Updates
MarketInsightsViewso pressing the back button tracks this close event with the same asset identifier properties (caip19/perps_market, optionaldigest_id, andasset_symbol) before navigating away.Written by Cursor Bugbot for commit 8c77a02. This will update automatically on new commits. Configure here.