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

DRAFT: SIP-26 Integration #29887

Draft
wants to merge 8 commits into
base: jl/caip-multichain-migrate-core
Choose a base branch
from
Draft

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Jan 23, 2025

Open in GitHub Codespaces

Steps to get manual testing environment setup:

  • Clone the @metamask/snaps repo (if you haven't already)
  • build this branch: https://github.com/MetaMask/snaps/pull/2875/files
  • Copy dist/ from /snaps-controllers
  • Use it to replace the /dist in ./node_modules/@metamask/snaps-controllers in this repo/branch
  • start a flask build of this branch
  • go to settings -> experimental
  • toggle on Enable "Add a new Bitcoin account (Beta)"
  • go to the accounts drop down at the top of the wallet, and click add an account
  • you should see an option to add a bitcoin account now. Add a bitcoin account
  • Go to https://metamask.github.io/test-dapp-multichain/latest/ (or any website)
  • Execute the following code in the dev console
const extensionPort = chrome.runtime.connect(YOUR_EXTENSION_ID)

extensionPort.postMessage({
    type: 'caip-x',
    data: {
        "jsonrpc": "2.0",
        method: 'wallet_createSession',
        params: {
            requiredScopes: {},
            optionalScopes: {
                'bip122:000000000019d6689c085ae165831e93': {
                    methods: ['sendBitcoin'],
                    notifications: [],
                    accounts: []
                }
            },
        },
    }
})

Related issues

Ticket: https://github.com/orgs/MetaMask/projects/146/views/6?pane=issue&itemId=94617458&issue=MetaMask%7CMetaMask-planning%7C3989
Upstream Extension: #27782
Core: MetaMask/core#5191

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

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.

Copy link

socket-security bot commented Jan 23, 2025

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

Package New capabilities Transitives Size Publisher
npm/@metamask-previews/[email protected] None 0 553 kB metamaskbot

🚮 Removed packages: npm/@metamask/[email protected]

View full report↗︎

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template team-wallet-api-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants