refactor(analytics): migrate Batch 3-16: mobile-platform#26593
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. |
…3-16_mobile-platform
…3-16_mobile-platform
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Both changes are functionally equivalent - the new Since the bridge controller selector is affected and is used in bridge flows, SmokeTrade should be run to verify bridge functionality still works correctly. The legal notices change is a UI display concern that doesn't have a dedicated test tag but is low risk. This is a low-risk refactoring with no behavioral changes expected - just an API migration to a newer analytics helper pattern. Performance Test Selection: |
Description
Phase 3 analytics migration (Batch 3-16): migrate selectors (
legalNotices,bridgeController) fromMetaMetrics.getInstance()to the new analytics system.Reason: Deprecate MetaMetrics in favour of the shared analytics utility and AnalyticsController.
Changes:
legalNotices/index.tsandbridgeController/index.tsnow useanalytics.isEnabled()fromapp/util/analytics/analyticsinstead ofMetaMetrics.getInstance().isEnabled(); test mocks updated to mock the analytics utility instead of MetaMetrics.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-302 (Batch 3-16)
Manual testing steps
Screenshots/Recordings
N/A – analytics migration, no UI change.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk refactor that only swaps the opt-in check from
MetaMetrics.getInstance().isEnabled()toanalytics.isEnabled()in a couple of selectors and updates unit test mocks accordingly.Overview
Migrates selector logic in
bridgeControllerandlegalNoticesoff deprecatedMetaMetrics.getInstance()and onto the sharedanalyticshelper.participateInMetaMetrics(bridge app state) and the PNA25 notice gating check now callanalytics.isEnabled(), and thelegalNoticesselector tests were updated to mock the new analytics utility instead ofMetaMetrics.Written by Cursor Bugbot for commit 97d418a. This will update automatically on new commits. Configure here.