Open owencraston opened 1 week ago
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.
New dependencies detected. Learn more about Socket for GitHub ↗︎
Package | New capabilities | Transitives | Size | Publisher |
---|---|---|---|---|
npm/@metamask/bitcoin-wallet-snap@0.8.2 | network | 0 |
1.61 MB | gudahtt |
npm/base58-js@1.0.5 | None | 0 |
9.65 kB | pur3miish |
npm/bitcoin-address-validation@2.2.3 | None | 0 |
35.5 kB | ruigomes |
npm/sha256-uint8array@0.10.7 | None | 0 |
33.2 kB | kawanet |
🚨 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 | Source | CI |
---|---|---|---|---|
New author | npm/@metamask/bitcoin-wallet-snap@0.8.2 |
| 🚫 | |
Unstable ownership | npm/@metamask/bitcoin-wallet-snap@0.8.2 |
| 🚫 | |
Network access | npm/@metamask/bitcoin-wallet-snap@0.8.2 |
| 🚫 |
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.
A new collaborator has begun publishing package versions. Package stability and security risk may be elevated.
Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.
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 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.
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.
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.8.2
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
69.1% Coverage on New Code
0.0% Duplication on New Code
❌❌❌ pr_smoke_e2e_pipeline
failed on Bitrise! ❌❌❌
Commit hash: 389d496c85c48f129cbed51c88886c0f76c829ce Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c0392760-05eb-42f2-915b-376cab548fdb
[!NOTE]
- You can kick off another
pr_smoke_e2e_pipeline
on Bitrise by removing and re-applying theRun Smoke E2E
label on the pull request[!TIP]
- Check the documentation if you have any doubts on how to understand the failure on bitrise
Description
This PR does enables the creation of Bitcoin (Mainnet and Testnet) accounts on MetaMask mobile. This is done via the snap-bitcoin-wallet which is included as a preinstalled snap. The added UI buttons to the account actions communicate with the snap, then the snap is routed through our SnapKeyring handlers to enable custom account names.
This is just the first step and does not include all of the necessary logic/UI to launch this feature. This PR simply enables Bitcoin account creation and renders the proper BTC address and network in the wallet view.
How
BitcoinWalletSnapSender
which allows us to communicate with the bitcoin snapselectSelectedInternalAccountChecksummedAddress
toselectSelectedInternalAccountFormattedAddress
since bitcoin addresses are not checksummed.toFormattedAddress
inapp/util/address/index.ts
andgetFormattedAddressFromInternalAccount
inapp/core/MultiChain/utils.ts
hasCreatedBtcMainnetAccount
andhasCreatedBtcTestnetAccount
Related issues
Fixes: https://github.com/MetaMask/accounts-planning/issues/698
Manual testing steps
Adding a Bitcoin Testnet account
.js.env
and ensure that METAMASK_BUILD_TYPE is set toflask
Add account or hardware wallet
Add a new Bitcoin Account (Testnet)
Bitcoin Testnet Account
Add account
tb1qcv...4av3
Adding a Bitcoin Mainnet account
.js.env
and ensure that METAMASK_BUILD_TYPE is set toflask
Add account or hardware wallet
Add a new Bitcoin Account (Beta)
Bitcoin Account
Add account
bc1qrw...atay
Verify ETH account address formats
Screenshots/Recordings
Before
N/A
After
https://github.com/user-attachments/assets/96836574-7b12-4566-b70f-ea85efa3b663
Pre-merge author checklist
Pre-merge reviewer checklist