refactor: move analytics data deletion out of MetaMetrics (2/4 mobile-core-ux)#26023
Conversation
…25767) Use useAnalyticsDataDeletion hook for deletion methods and useAnalytics for tracking. Remove useMetrics dependency. Clean up unused MetaMetrics deletion mocks in section test.
|
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. |
|
wait for #26022 to merge |
…mobile-core-ux_split_2-4
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key observations:
This is a low-risk internal code organization change that doesn't require E2E test validation. Performance Test Selection: |
|



Description
Part 2/4 of #25767 — Code owner: mobile-core-ux
Switches
DeleteMetaMetricsDatacomponent fromuseMetricsto the newuseAnalyticsDataDeletionhook for deletion methods anduseAnalyticsfor tracking. This decouples the Settings UI from theMetaMetricssingleton for data deletion concerns.What changed:
DeleteMetaMetricsData.tsx— replaceduseMetrics()withuseAnalyticsDataDeletion()+useAnalytics(). No behavioural change.MetaMetricsAndDataCollectionSection.test.tsx— simplifiedMetaMetricsmock by removing unused deletion method stubs.Changelog
CHANGELOG entry: null
Related issues
participates to fix:
Manual testing steps
Screenshots/Recordings
N/A — no visual changes, only hook wiring.
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Primarily a wiring/refactor change around analytics deletion and test mocks, with no intended behavior change; risk is limited to potential miswiring of the deletion/status hook calls.
Overview
Updates
DeleteMetaMetricsDatato stop usinguseMetrics()and instead calluseAnalyticsDataDeletion()for deletion/status APIs anduseAnalytics()for event tracking (keeping the UI behavior the same, but removing direct coupling to the MetaMetrics singleton).Cleans up
MetaMetricsAndDataCollectionSection.test.tsxby simplifying theMetaMetricsmock and dropping unused data-deletion method stubs.Written by Cursor Bugbot for commit cd03611. This will update automatically on new commits. Configure here.