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: preinstalled mobile snaps - [1 of 10] #8827

Merged
merged 62 commits into from
May 7, 2024

Conversation

Jonathansoufer
Copy link
Contributor

@Jonathansoufer Jonathansoufer commented Mar 4, 2024

Description

Within the scope of Notifications Project, and due restrictions on both Apple and Google store, the way Snaps will be delivered to mobile users will be in a pre installed approach. Notifications will rely on MM auth
as a snap.

Since preinstalled snaps isn't a feature available on mobile yet, this PR implements a way to enable MetaMask mobile to read from FS an embedded/preInstalled snap, so we can embed auth snap into Mobile App by default.

Related issues

Fixes: Jira Ticket

Manual testing steps

  1. Go to this Snaps page and check the existence of a installed snap in a fresh installation.

Screenshots/Recordings

After

Screenshot 2024-03-14 at 11 11 47

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@Jonathansoufer Jonathansoufer self-assigned this Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

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.

Copy link

socket-security bot commented Mar 8, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package Note
New author npm/@metamask/safe-event-emitter@3.1.1

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/@metamask/safe-event-emitter@3.1.1

@Jonathansoufer Jonathansoufer marked this pull request as ready for review March 12, 2024 11:55
@Jonathansoufer Jonathansoufer requested a review from a team as a code owner March 12, 2024 11:55
@github-actions github-actions bot added the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 12, 2024
Copy link
Contributor

github-actions bot commented Mar 12, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8c30f04
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8ce9facd-340e-4c69-a10e-7e9349670c8d

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2024

Codecov Report

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

Project coverage is 45.97%. Comparing base (5dc336c) to head (9797eac).
Report is 46 commits behind head on main.

Files Patch % Lines
app/lib/snaps/preinstalled/bip32/index.ts 0.00% 10 Missing ⚠️
app/lib/snaps/preinstalled-snaps.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8827      +/-   ##
==========================================
+ Coverage   45.80%   45.97%   +0.17%     
==========================================
  Files        1317     1329      +12     
  Lines       32329    32444     +115     
  Branches     3369     3400      +31     
==========================================
+ Hits        14807    14915     +108     
  Misses      16633    16633              
- Partials      889      896       +7     

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

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 14, 2024
Copy link
Contributor

github-actions bot commented Mar 14, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 9eff63a
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1cefbe87-5c83-40c8-ae96-a90d253307d7

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

socket-security bot commented Mar 14, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/message-signing-snap@0.3.3 Transitive: network +10 2.88 MB metamaskbot
npm/@metamask/safe-event-emitter@3.1.1 None 0 24.1 kB lgbot
npm/@noble/curves@1.4.0 None 0 1.39 MB paulmillr

View full report↗︎

@Jonathansoufer Jonathansoufer removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 14, 2024
FrederikBolding
FrederikBolding previously approved these changes May 6, 2024
Copy link

sonarcloud bot commented May 7, 2024

Copy link
Contributor

@owencraston owencraston left a comment

Choose a reason for hiding this comment

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

Looks good! Great work.

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c197911
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b8925180-3020-4836-b6dc-3508a3e0d2e9

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

@Jonathansoufer Jonathansoufer merged commit 719af97 into main May 7, 2024
34 of 35 checks passed
@Jonathansoufer Jonathansoufer deleted the feat/preinstalled-mobile-snaps branch May 7, 2024 21:30
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
@metamaskbot metamaskbot added the release-7.23.0 Issue or pull request that will be included in release 7.23.0 label May 7, 2024
@Jonathansoufer Jonathansoufer changed the title feat: preinstalled mobile snaps feat: preinstalled mobile snaps - [1 of 6] May 8, 2024
@Jonathansoufer Jonathansoufer changed the title feat: preinstalled mobile snaps - [1 of 6] feat: preinstalled mobile snaps - [1 of 8] May 8, 2024
@Jonathansoufer Jonathansoufer changed the title feat: preinstalled mobile snaps - [1 of 8] feat: preinstalled mobile snaps - [1 of 10] May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
mobile-snaps release-7.23.0 Issue or pull request that will be included in release 7.23.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-notifications Notifications team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants