feat: Adding a new controller for Metametrics Data Deletion#24503
Merged
NiranjanaBinoy merged 51 commits intodevelopfrom Sep 16, 2024
Merged
feat: Adding a new controller for Metametrics Data Deletion#24503NiranjanaBinoy merged 51 commits intodevelopfrom
NiranjanaBinoy merged 51 commits intodevelopfrom
Conversation
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. |
Collaborator
Builds ready [614ccfd]
Page Load Metrics (880 ± 596 ms)
Bundle size diffs
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #24503 +/- ##
===========================================
+ Coverage 69.96% 70.00% +0.04%
===========================================
Files 1441 1443 +2
Lines 50102 50194 +92
Branches 14012 14040 +28
===========================================
+ Hits 35049 35134 +85
- Misses 15053 15060 +7 ☔ View full report in Codecov by Sentry. |
Collaborator
Builds ready [d1cdd73]
Page Load Metrics (786 ± 599 ms)
Bundle size diffs
|
danjm
reviewed
May 16, 2024
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/services/services.ts
Outdated
Show resolved
Hide resolved
danjm
reviewed
May 16, 2024
app/scripts/controllers/metametrics-data-deletion/services/services.ts
Outdated
Show resolved
Hide resolved
danjm
suggested changes
May 16, 2024
Contributor
danjm
left a comment
There was a problem hiding this comment.
First review complete. I have left some comments
Gudahtt
reviewed
May 21, 2024
Gudahtt
reviewed
May 21, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
Gudahtt
reviewed
May 21, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
Gudahtt
reviewed
May 21, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
Gudahtt
reviewed
May 21, 2024
app/scripts/controllers/metametrics-data-deletion/metametrics-data-deletion.ts
Outdated
Show resolved
Hide resolved
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The `DataDeletionController` has been decoupled from the `MetaMetricsController` by updating the constructor parameters to expect just a function for getting the MetaMetrics ID, rather than the entire `MetaMetricsController` state. This vastly simplifies the API surface, making it easier to audit and test. It also prevents the `DataDeletionController` from having the capability to make changes to the `MetaMetricsController` state. [](https://codespaces.new/MetaMask/metamask-extension/pull/24870?quickstart=1) ## **Related issues** This is an improvement for #24503 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). 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.
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> A single test has been added, along with a helper setup function that is designed to be used for further unit tests as well. [](https://codespaces.new/MetaMask/metamask-extension/pull/24879?quickstart=1) This is an improvement for the PR #24503 N/A N/A - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] 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.
Add unit tests for the `createDataDeletionRegulationTask` method of `DataDeletionService`. One of the two service methods is now fully tested. The remaining method will be tested in a later PR. [](https://codespaces.new/MetaMask/metamask-extension/pull/24816?quickstart=1) This is an improvement for the PR #24503 N/A N/A - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] 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. --------- Co-authored-by: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com>
… while creating delete regulation
|
Collaborator
Builds ready [886abe4]
Page Load Metrics (1971 ± 113 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
danjm
approved these changes
Sep 16, 2024
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
We are adding a new controller,
MetaMetricsDataDeletionController,and a service class for MetaMetrics data deletion. The service class will have the API interaction for the data deletion, which will create the data deletion regulation and check the status of an existing relation. The controller handles the state update and service class interactions.The PR also initiates the controller by updating the metamask-controller and updating actions.ts with the new functions.
Related issues
Fixes:
fixes #24405
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist