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: Remove Account Snap Warning (Flask) #11451

Merged
merged 20 commits into from
Oct 23, 2024

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Sep 26, 2024

Description

  1. What is the reason for the change?
  • This change adds an extra warning to users when trying to remove an account snap (https://metamask.github.io/snap-simple-keyring/latest/ for example) AND the user has snap accounts in their wallet
  • Snap accounts are not managed/owned by metamask and therefore cannot be recovered in metamask. User's must manage and backup these accounts in the snaps UI.
  1. What is the improvement/solution?
  • Adds an extra layer of friction when trying to remove an account snap and the user has snap accounts in their wallet
  • This is a FLASK ONLY feature

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/155

Manual testing steps

  1. check this branch
  2. open .js.env
  3. ensure that export METAMASK_BUILD_TYPE=flask is set to flask (not main)
  4. build the app on this branch
  5. create/import a wallet
  6. inside the mobile browser, open this URL: https://metamask.github.io/snap-simple-keyring/latest/
  7. connect this snap
  8. click create account, you can do this as many times as you want.
  9. navigate back to the main wallet view
  10. NOTICE there should be new accounts in your wallet with the name "Snap Account x"
  11. Go to settings
  12. navigate to snaps
  13. locate the Snap simple keyring settings
  14. scroll to the bottom of the page and click the red "Remove" button
  15. Notice: new warning should pop up indicating that the user should backup these accounts before removing the snap
  16. click continue
  17. you should be prompted to type the name of the snap in the text input.
  18. YOU SHOULD NOT BE ABLE TO REMOVE THE SNAP WITHOUT TYPING The CORRECT SNAP NAME
  19. Once you type the correct snap name, you should be able to remove the snap
  20. After clicking remove the snap should be removed.

Testing a non account snap

  1. check this branch
  2. open .js.env
  3. ensure that export METAMASK_BUILD_TYPE=flask is set to flask (not main)
  4. build the app on this branch
  5. create/import a wallet
  6. navigate to settings/snaps
  7. click on the pre installed Message signing snap
  8. click on the remove button at the bottom
  9. THERE SHOULD NOT BE A WARNING

Testing removing a snap account without snap accounts in the wallet

  1. check this branch
  2. open .js.env
  3. ensure that export METAMASK_BUILD_TYPE=flask is set to flask (not main)
  4. build the app on this branch
  5. create/import a wallet
  6. inside the mobile browser, open this URL: https://metamask.github.io/snap-simple-keyring/latest/
  7. connect this snap. Do not create any accounts this time.
  8. Go to settings
  9. navigate to snaps
  10. locate the Snap simple keyring settings
  11. scroll to the bottom of the page and click the red "Remove" button
  12. There should be no warning pop up and the snap should be removed

Screenshots/Recordings

Extension Version

Screenshot 2024-10-01 at 5 38 58 PM Screenshot 2024-10-01 at 5 39 14 PM Screenshot 2024-10-01 at 5 39 20 PM

After

with snap accounts:

Screen.Recording.2024-10-01.at.5.49.52.PM.mov
Screenshot 2024-10-10 at 3 26 46 PM

Without snap accounts:

Untitled.mov

Pre-merge author checklist

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.

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.

@owencraston owencraston force-pushed the feat/remove-snap-keyring-warning branch from d0114ca to 758d148 Compare September 26, 2024 19:22
@owencraston owencraston changed the title feat: Remove account snap warning feat: Remove Account Snap Warning Sep 27, 2024
@owencraston owencraston force-pushed the feat/remove-snap-keyring-warning branch 5 times, most recently from 9e64780 to e30df15 Compare October 2, 2024 01:01
@owencraston owencraston changed the title feat: Remove Account Snap Warning feat: Remove Account Snap Warning (Flask) Oct 2, 2024
@owencraston owencraston marked this pull request as ready for review October 2, 2024 01:01
@owencraston owencraston requested review from a team as code owners October 2, 2024 01:02
@owencraston owencraston added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 2, 2024
Copy link
Contributor

github-actions bot commented Oct 2, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: f6a015c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1f5a0751-dc84-4204-abec-13abee142dcb

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@owencraston owencraston force-pushed the feat/remove-snap-keyring-warning branch from f6a015c to 1964984 Compare October 2, 2024 19:20
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 2, 2024
Copy link
Contributor

github-actions bot commented Oct 2, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 1964984
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5d5be5a2-598a-43ef-803c-4dd0cfdbd0d6

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@k-g-j
Copy link
Contributor

k-g-j commented Oct 3, 2024

Passing initial manually testing! Good job 😄

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-03.at.10.49.17.mp4

@owencraston owencraston force-pushed the feat/remove-snap-keyring-warning branch 3 times, most recently from b9f36da to f3443dd Compare October 8, 2024 01:10
@owencraston owencraston force-pushed the feat/remove-snap-keyring-warning branch from 588f19f to f853a41 Compare October 22, 2024 22:52
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 22, 2024
Copy link
Contributor

github-actions bot commented Oct 22, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: f853a41
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fe19e8a5-c15d-4c5e-adc7-d65bbb0866a4

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarcloud bot commented Oct 22, 2024

Copy link
Contributor

@Jonathansoufer Jonathansoufer left a comment

Choose a reason for hiding this comment

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

Left some minor comments, but excellent work overall!

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Lgtm!

@owencraston owencraston added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit 67b73a5 Oct 23, 2024
43 checks passed
@owencraston owencraston deleted the feat/remove-snap-keyring-warning branch October 23, 2024 22:31
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 23, 2024
@metamaskbot metamaskbot added the release-7.35.0 Issue or pull request that will be included in release 7.35.0 label Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.35.0 Issue or pull request that will be included in release 7.35.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants