Skip to content

feat: bundle pre-installed Bitcoin Wallet Snap#25715

Merged
danroc merged 5 commits intodevelopfrom
dr/btc-snap
Jul 9, 2024
Merged

feat: bundle pre-installed Bitcoin Wallet Snap#25715
danroc merged 5 commits intodevelopfrom
dr/btc-snap

Conversation

@danroc
Copy link
Copy Markdown
Contributor

@danroc danroc commented Jul 9, 2024

Description

This PR adds the Bitcoin Wallet Snap as a pre-installed Snap.

Open in GitHub Codespaces

Related issues

Closes: https://github.com/MetaMask/accounts-planning/issues/482

Manual testing steps

  1. Clone the https://github.com/MetaMask/snap-bitcoin-wallet repo
  2. Move to packages/site
  3. Create a .env.development file and add the following line: SNAP_ORIGIN=npm:@metamask/bitcoin-wallet-snap
  4. Start the dapp yarn start
  5. Navigate to http://localhost:8000
  6. Click on Connect
  7. You should see a dialog with the following message: localhost wants to use Bitcoin Wallet, approve it
  8. Go to the list of Snaps ( ... > Snaps), and make sure that the Bitcoin Wallet Snap is not present

Screenshots/Recordings

Before

After

image image

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.

@danroc danroc added the team-accounts-framework Accounts team label Jul 9, 2024
@danroc danroc self-assigned this Jul 9, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 9, 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.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Jul 9, 2024

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

Package New capabilities Transitives Size Publisher
npm/@metamask/bitcoin-wallet-snap@0.2.2 network 0 1.08 MB metamaskbot

View full report↗︎

@socket-security
Copy link
Copy Markdown

socket-security bot commented Jul 9, 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 NoteSourceCI
Network access npm/@metamask/bitcoin-wallet-snap@0.2.2 🚫
Network access npm/@metamask/bitcoin-wallet-snap@0.2.2 🚫

View full report↗︎

Next steps

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

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/bitcoin-wallet-snap@0.2.2

@danroc danroc marked this pull request as ready for review July 9, 2024 12:41
@danroc danroc requested review from a team as code owners July 9, 2024 12:41
@danroc
Copy link
Copy Markdown
Contributor Author

danroc commented Jul 9, 2024

@legobeat, FYI: #25715 (comment)

Is it right to assume that it's ok to ignore this alert since it will run inside a Snap? This alert is probably caused by this.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jul 9, 2024

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0b24400]
Page Load Metrics (179 ± 203 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint761581132311
domContentLoaded116932178
load552023179423203
domInteractive116932178
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.79%. Comparing base (5ee57a6) to head (0b24400).
Report is 9 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25715      +/-   ##
===========================================
+ Coverage    69.77%   69.79%   +0.02%     
===========================================
  Files         1376     1377       +1     
  Lines        48403    48432      +29     
  Branches     13348    13351       +3     
===========================================
+ Hits         33773    33802      +29     
  Misses       14630    14630              

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

@danroc danroc merged commit a47ab62 into develop Jul 9, 2024
@danroc danroc deleted the dr/btc-snap branch July 9, 2024 15:07
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2024
@metamaskbot metamaskbot added the release-12.2.0 Issue or pull request that will be included in release 12.2.0 label Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-accounts-framework Accounts team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants