Skip to content

feat: Snaps new architecture mobile integration#8700

Merged
Jonathansoufer merged 40 commits into
mainfrom
feat/snaps-integration-refactor
Feb 27, 2024
Merged

feat: Snaps new architecture mobile integration#8700
Jonathansoufer merged 40 commits into
mainfrom
feat/snaps-integration-refactor

Conversation

@Jonathansoufer

Copy link
Copy Markdown
Contributor

Description

This PR adds a refactored Snaps Webview approach and embedded execution environment to allow mobile app consume the new mobile snaps architecture.

Related issues

Fixes: N/A

After Screenshot

Screen.Recording.2024-02-23.at.14.56.20.mov

Manual testing steps

  1. Open the mobile app
  2. Navigate to explore session and access snaps example page
  3. add any snap
  4. go to snaps item on settings
  5. check if the installed snap is listed.

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.

CI Related Section: DO NOT EDIT

Flag used by Bitrise to either run or skip E2E smoke tests

  • Bitrise Flag:[skip ci]

JSoufer and others added 30 commits February 15, 2024 12:49
…/metamask-mobile into feat/bump-mobile-snaps-packages
…/metamask-mobile into feat/bump-mobile-snaps-packages
@github-actions

Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 23, 2024
@socket-security

socket-security Bot commented Feb 23, 2024

Copy link
Copy Markdown

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

Package New capabilities Transitives Size Publisher
npm/@metamask/permission-controller@7.1.0 Transitive: environment, filesystem, network +72 14.2 MB metamaskbot

🚮 Removed packages: npm/@metamask/permission-controller@4.1.2, npm/@types/readable-stream@4.0.9

View full report↗︎

@socket-security

socket-security Bot commented Feb 23, 2024

Copy link
Copy Markdown

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@codecov-commenter

codecov-commenter commented Feb 23, 2024

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 41.60%. Comparing base (e9a1442) to head (0aa92f5).

Files Patch % Lines
app/lib/snaps/SnapsExecutionWebView.tsx 27.77% 13 Missing ⚠️
app/core/Engine.ts 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8700      +/-   ##
==========================================
+ Coverage   41.54%   41.60%   +0.06%     
==========================================
  Files        1268     1263       -5     
  Lines       30664    30625      -39     
  Branches     3011     3011              
==========================================
+ Hits        12738    12741       +3     
+ Misses      17172    17130      -42     
  Partials      754      754              

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

Comment thread app/core/Engine.ts Outdated
Comment thread app/core/Engine.ts
Comment thread patches/@metamask+base-controller+4.1.1.patch
Comment thread app/lib/snaps/SnapsExecutionWebView.tsx

@Jonathansoufer Jonathansoufer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All comments addressed.

Comment thread app/core/Engine.ts Outdated
Comment thread patches/@metamask+base-controller+4.1.1.patch
Comment thread app/core/Engine.ts
@sonarqubecloud

Copy link
Copy Markdown

@Jonathansoufer Jonathansoufer merged commit 442d9ee into main Feb 27, 2024
@Jonathansoufer Jonathansoufer deleted the feat/snaps-integration-refactor branch February 27, 2024 00:48
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 27, 2024
@metamaskbot metamaskbot added the release-7.18.0 Issue or pull request that will be included in release 7.18.0 label Feb 27, 2024
Comment thread app/core/Engine.ts
Comment thread app/core/Engine.ts
Comment thread app/lib/snaps/SnapsExecutionWebView.tsx

@Jonathansoufer Jonathansoufer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All comments addressed on the following PR

Comment thread app/core/Engine.ts
Comment thread app/core/Engine.ts
Comment thread app/lib/snaps/SnapsExecutionWebView.tsx
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template mobile-snaps release-7.18.0 Issue or pull request that will be included in release 7.18.0 team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants