-
Notifications
You must be signed in to change notification settings - Fork 101
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: add metaMask SDK connector #5028
Conversation
@EdouardBougon is attempting to deploy a commit to the cow Team on Vercel. A member of the Team first needs to authorize it. |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
👍 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. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @EdouardBougon , thank you for your contribution! I've reviewed the PR and have some issues to report:
IMG_7190.MP4Could you please take a look at these issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there, thanks a lot for your contribution!
There are a few issues we have noticed, could you please take a look at them?
One question, I see the SDK is bringing a lot of dependencies.
What's the bundle size it's adding?
apps/cowswap-frontend/src/modules/wallet/containers/ConnectWalletOptions.tsx
Show resolved
Hide resolved
I have read the CLA Document and I hereby sign the CLA |
Hi @elena-zh and @alfetopito, Thank you for your feedback! I'm taking over Edouard's work. I took care of fixing all the identified issues. The 4th one never happened to me, so please let me know if you're still facing it with this version. |
e8f2a49
to
22ae7f3
Compare
I will not sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working great!
Can I just ask that the original author (@EdouardBougon) sign the CLA too?
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the app was already detecting Metmask as per https://eips.ethereum.org/EIPS/eip-6963
My concern with the PR is that its not working great when you use other injected wallet that is not Metamask.
Also Metamask icon shows first instead of the ones of the available wallets.
Look what we show in production:
I am a Rabby wallet user (sorry, I switched some time ago), and this version show the Metamask icon first. We should give more priority to the wallets the user has. If they have Metamask, it will show up.
There's a second issue, if I click in "Metamask" it doesn't do anything, it remains connecting forever (not realising I don't have it installed)
Another issue has been raised by Leandro above. He is concerned with the bundle size. I think you lazyload, but still would be good to have the dependencies in check, plus having more dependencies adds vulnerabilities (see what happened with Ledger library some months ago). If they are not necessary and we can use EIP standards instead, I would prefer to do so. Ultimately every wallet wants to push for their SDK into the Dapps, but this is not sustainable
Hey @baptiste-marchand , thank you for the fix! |
@anxolin I managed to reproduce it only by disabling the MetaMask extension after having clicked on |
About your questions related to the MetaMask SDK, a member from the team should reach out to you on telegram |
@elena-zh I'm not sure I can fix this one. This is related to how web3-react and MetaMask SDK are integrated together. From what I understood WC is throwing an error when the modal is closed, while MetaMask doesn't. |
Hi @anxolin! I wanted to give you a quick update: our team is actively working on reducing the MetaMask SDK bundle size and removing some dependencies. We will provide you with further updates next week. |
4218bdf
to
ca769a8
Compare
ca769a8
to
e7d2eda
Compare
…to metamask-sdk # Conflicts: # yarn.lock
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@babel/[email protected], npm/@babel/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected] |
Hey @EdouardBougon , @baptiste-marchand ,
Please feel free to open a new PR with the fixes. |
MetaMask SDK integration
This PR adds the connection to MetaMask using the MetaMask SDK.
The SDK must be used for both connecting via the extension and on mobile.