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: Metamask SDK integration #1908

Merged
merged 24 commits into from
Oct 23, 2023

Conversation

abretonc7s
Copy link
Contributor

@abretonc7s abretonc7s commented Sep 12, 2023

Description

Add MetaMask SDK integration to allow MetaMask mobile wallet users to connect.
demo_web3onboard

PLEASE NOTE- Checklist must be complete prior to review.

Checklist

  • Increment the version field in package.json of the package you have made changes in following semantic versioning and using alpha release tagging
  • Check the box that allows repo maintainers to update this PR
  • Test locally to make sure this feature/fix works
  • Run yarn check-all to confirm there are not any associated errors
  • Confirm this PR passes Circle CI checks
  • Add or update relevant information in the documentation

Docs Checklist

  • Include a screenshot of any changes (see docs README on running locally)
  • Add/update the appropriate package README (if applicable)
  • Add/update the related module in the docs demo (if applicable)
  • Add/update the related package in the docs/package.json file (if applicable)

If this PR includes changes to add an injected wallet or SDK wallet module:

Please complete the following using the internal demo package.
To run this demo use the command yarn && yarn dev to get the project running at http://localhost:8080/

Tests with demo app (injected)

  • send transaction
  • switch chains
  • sign message
  • sign typed message
  • disconnect

Tests with demo app (SDK)

  • send transaction
  • switch chains
  • sign message
  • sign typed message
  • disconnect

docs/package.json Outdated Show resolved Hide resolved
@socket-security
Copy link

socket-security bot commented Sep 12, 2023

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

Packages Version New capabilities Transitives Size Publisher
@metamask/sdk 0.10.0 environment +84 102 MB metamaskbot
ts-node 10.9.1 None +3 959 kB cspotcode

@Adamj1232
Copy link
Member

@abretonc7s I have added the MetaMask docs to our official docs site which is part of the Web3-Onboard repo.
Thanks for updating the MM verison! Can you update this PR to Ready for Review when you are ready?
One issue I am seeing when testing is that when/if a user rejects the connection when connecting mobile to desktop that the MM module doesn't throw an error to be handled by Web3-Onboard. If this occurs the SDK should throw the error where ProviderRpcError comes from web3-onboard/common.

  throw new ProviderRpcError({
    code: 4001,
    message: 'User rejected the request.'
  })

# @web3-onboard/metamask

## Wallet module for connecting MetaMask Wallet SDK to web3-onboard
See [MetaMask SDK Developer Docs](https://github.com/MetaMask/metamask-sdk)
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to explain a little more here about what can be done with the SDK, connect mobile MM to desktop dapps, etc
I will get any additional verbiage added to our docs pages as well!

@abretonc7s abretonc7s marked this pull request as ready for review October 21, 2023 08:32
Copy link
Member

@Adamj1232 Adamj1232 left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for the collaboration!

@Adamj1232 Adamj1232 merged commit 0c83bdf into blocknative:develop Oct 23, 2023
@Adamj1232 Adamj1232 changed the title feat: metamask sdk integration Feat: Metamask SDK integration Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants