-
Notifications
You must be signed in to change notification settings - Fork 96
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
base: develop
Are you sure you want to change the base?
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 ✍️ ✅ |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is protestware?This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function. Consider that consuming this package may come along with functionality unrelated to its primary purpose. What is a critical CVE?Contains a Critical Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. Take a deeper look at the dependencyTake 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 packageIf 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 riskTo ignore an alert, reply with a comment starting with
|
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
Report too large to display inline |
ca769a8
to
e7d2eda
Compare
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.