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: Snaps new architecture mobile integration #8700

Merged
merged 40 commits into from
Feb 27, 2024

Conversation

Jonathansoufer
Copy link
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]

Jonathansoufer 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
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.

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

socket-security bot commented Feb 23, 2024

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↗︎

Copy link

socket-security bot commented Feb 23, 2024

👍 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
Copy link

codecov-commenter commented Feb 23, 2024

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.

app/core/Engine.ts Outdated Show resolved Hide resolved
Copy link
Contributor Author

@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.

All comments addressed.

app/core/Engine.ts Outdated Show resolved Hide resolved
patches/@metamask+base-controller+4.1.1.patch Outdated Show resolved Hide resolved
app/core/Engine.ts Show resolved Hide resolved
Copy link

sonarcloud bot commented Feb 27, 2024

@Jonathansoufer Jonathansoufer merged commit 442d9ee into main Feb 27, 2024
28 checks passed
@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
Copy link
Contributor Author

@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.

All comments addressed on the following PR

app/core/Engine.ts Show resolved Hide resolved
app/core/Engine.ts Show resolved Hide resolved
app/lib/snaps/SnapsExecutionWebView.tsx Show resolved Hide resolved
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants