MetaMask / providers

An Ethereum Provider that connects over a stream, as injected into websites by MetaMask
MIT License
217 stars 123 forks source link

Issue connecting Dapps to my forked & customized version of metamask. #207

Open theiceeman opened 2 years ago

theiceeman commented 2 years ago

Hi, I forked the Metamask wallet repo, and have been adding some features I believe will make the application even more powerful. I'm trying to connect to my updated version of the wallet using live Dapps but they can't seem to distinguish between the two wallets, when installed on the same browser. I believe its a provider issue, and i've been working to find a way to distinguish the wallets as separate wallets to Dapps to no avail. This is the metamask/provider package which handles the connection by Dapps to Metamask in this file Baseprovider.ts.

I found the handleConnect function inside, but can't seem to make sense of how it handles the connection by Dapps, and how I can edit it to suit my needs. I'm hoping someone that better understands the project can point me to what I need to change to achieve this. I’ll really appreciate any help. Thanks.

mcmire commented 2 years ago

Is there a reason why you want your dapp (or any dapp) to support multiple versions of MetaMask which are installed at the same time? We don't support this workflow and would recommend that you keep one version of the extension enabled. Is that possible?

theiceeman commented 2 years ago

Hi @mcmire , Thanks for replying. So i have two wallet extensions: one is metamask, and another one is my forked version of metamask. I want to let users use both wallets on the same browser. My Dapp officially uses the forked Metamask wallet, but still users should be able to connect with metamask if they choose. So from the users side, when they want to connect with a web3 wallet, i need to identify which one is metamask and which one is my forked version. I believe this is possible. Thanks.

mcmire commented 1 year ago

Yeah, unfortunately, it just isn't possible to have two different versions of MetaMask installed right now, even if one is a forked version, and we don't have plans to support this any time soon. If there's some improvements you'd like to make to MetaMask, however, feel free to submit them to our extension repo. Or, if you're testing our your forked version, you can simply go to your Extensions page (chrome://extensions in Chrome, about://addons in Firefox) and disable the official version of MetaMask instead of having to outright uninstall it. Hope that helps.

aqeelVaival commented 3 weeks ago

Hi folks, Is there any further development on this? or still we have the same situation?