metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

chore: Add new code fence for keyring-snaps

Open owencraston opened this issue 1 year ago • 2 comments
trafficstars

Description

  1. What is the reason for the change?
  • To enable the development of keyring-snaps (accounts that are created from external snaps) without interfering with the main build.
  • we have been using code fences to develop other features like preinstalled-snaps and beta for a while now.
  • We are using an entirely new flag for this feature because some features will be keyring-snaps specific that will not need to be included in the preinstalled-snaps or external-snaps build
  • keyring-snaps will only be available on flask for now
  • One could argue that we do not need a new flag, instead we could use the external-snaps flag, however by creating a new flag, this allows us to ship feature related to external-saps while not worrying about accidentally releasing keyring-snaps
  1. What is the improvement/solution?
  • created the keyring-snaps flag in the metro.transform file
  • added keyring-snaps as a feature to be included in the flask build
  • added keyring-snaps to all fences containing external-snaps. This is because all keyring-snaps features rely on the external-snaps feature but not all external-snaps features will rely on keyring-snaps.
  • this matches the same flag and pattern we are using in extension: https://github.com/MetaMask/metamask-extension/blob/46bf4e8ff857be5b7b3bd393a0f54ef494889964/builds.yml#L20

Related issues

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

Manual testing steps

This change is not user facing so there is no need for qa. instead if the linter, tests and e2e pass we can confidently say this is working.

  1. Build the application
  2. Import/create a wallet
  3. navigate to settings
  4. there should be no snaps settings

Code check

  • [ ] each code fence containing external-snaps (///: BEGIN:ONLY_INCLUDE_IF(external-snaps.... ) should also contain keyring-snaps (///: BEGIN:ONLY_INCLUDE_IF(external-snaps,keyring-snaps))

Screenshots/Recordings

Before

N/A

After

Screenshot 2024-08-28 at 2 27 56 PM Screenshot 2024-08-28 at 2 28 14 PM

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.

owencraston avatar Aug 28 '24 21:08 owencraston

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.

github-actions[bot] avatar Aug 28 '24 21:08 github-actions[bot]

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 97d625831298eb685c0fbbaacdc8c48cf776116d Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0ab533f5-fa87-4d50-9e87-f13bf3f6c851

[!NOTE]

  • This comment will auto-update when build completes
  • 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

github-actions[bot] avatar Aug 29 '24 21:08 github-actions[bot]

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 21b1cc2e679d16b3db25221c6482db63bd236a9c Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/edd0a4e7-dbeb-4152-ae17-a70285387b19

[!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

github-actions[bot] avatar Aug 29 '24 22:08 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 52.74%. Comparing base (8dcdd3c) to head (21b1cc2). Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10874      +/-   ##
==========================================
- Coverage   52.75%   52.74%   -0.01%     
==========================================
  Files        1534     1539       +5     
  Lines       36777    36835      +58     
  Branches     4335     4349      +14     
==========================================
+ Hits        19403    19430      +27     
- Misses      16058    16081      +23     
- Partials     1316     1324       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 29 '24 22:08 codecov-commenter

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0c5c348177f17d0402538cdaf069c901efd6c124 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a090a0af-aab3-498c-9d2e-e88cb015e6a3

[!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

github-actions[bot] avatar Aug 30 '24 19:08 github-actions[bot]