Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add MetaMetrics delete on Wallet delete #9768

Merged
merged 6 commits into from
May 30, 2024

Conversation

frankvonhoven
Copy link
Contributor

@frankvonhoven frankvonhoven commented May 28, 2024

Description

This creates a MetaMetrics deletion task when a user deletes their wallet.

Related issues

Fixes: 1271

Manual testing steps

  1. Open Flipper Network inspector
  2. Go to Settings > Security
  3. Delete Wallet
  4. Should see Successful call to MM proxy

Screenshots/Recordings

Before

After

roblox-cookies-clear.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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.

@frankvonhoven frankvonhoven requested a review from a team as a code owner May 28, 2024 16:04
Copy link
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.

@frankvonhoven frankvonhoven added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform labels May 28, 2024
NicolasMassart
NicolasMassart previously approved these changes May 28, 2024
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple, strait to the point. I like that.
Just one note, you could also have used the useMetrics hook (app/components/hooks/useMetrics/useMetrics.ts). So make sure you are ok wit not using it. It ends being exactly the same, just a matter of code style preference.

@tommasini
Copy link
Contributor

tommasini commented May 28, 2024

Can we try to fix this issue on this PR ? Let me know if it makes sense

@frankvonhoven
Copy link
Contributor Author

Simple, strait to the point. I like that. Just one note, you could also have used the useMetrics hook (app/components/hooks/useMetrics/useMetrics.ts). So make sure you are ok wit not using it. It ends being exactly the same, just a matter of code style preference.

I initially thought to use the hook, but this function deleteUser is a regular javascript function and not in a React component, so I wasn't able to use the hook in this case.

@frankvonhoven
Copy link
Contributor Author

Added in clearing browser history and cache on wallet delete

@legobeat legobeat requested a review from a team May 29, 2024 23:54
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 47.24%. Comparing base (b013c71) to head (42086f9).
Report is 3 commits behind head on main.

Files Patch % Lines
app/components/UI/DeleteWalletModal/index.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9768      +/-   ##
==========================================
- Coverage   47.24%   47.24%   -0.01%     
==========================================
  Files        1370     1370              
  Lines       33304    33309       +5     
  Branches     3586     3586              
==========================================
+ Hits        15736    15738       +2     
- Misses      16607    16610       +3     
  Partials      961      961              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tommasini
Copy link
Contributor

It seems we have a small lint issue and we are good to go

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Awesome work!

Copy link

@frankvonhoven frankvonhoven merged commit f88f38a into main May 30, 2024
31 checks passed
@frankvonhoven frankvonhoven deleted the fix/1271-delete-metametrics-on-delete-wallet branch May 30, 2024 17:22
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 30, 2024
@metamaskbot metamaskbot added the release-7.25.0 Issue or pull request that will be included in release 7.25.0 label May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.25.0 Issue or pull request that will be included in release 7.25.0 team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants