mdtanrikulu / use-metamask

a custom React Hook to manage Metamask in Ethereum ĐApp projects
https://mdtanrikulu.github.io/use-metamask
MIT License
165 stars 35 forks source link

Metamask + Coinbase Wallet Extension not working #35

Open jonomnom opened 1 year ago

jonomnom commented 1 year ago

I am unable to get this package to work when I have both metamask and coinbase wallet as an extension.

jonomnom commented 1 year ago
if (
  window.ethereum.providerMap &&
  window.ethereum.providerMap.get("MetaMask")
) {
  window.ethereum = window.ethereum.providerMap.get("MetaMask");
}

Quick fix

mdtanrikulu commented 1 year ago
if (
  window.ethereum.providerMap &&
  window.ethereum.providerMap.get("MetaMask")
) {
  window.ethereum = window.ethereum.providerMap.get("MetaMask");
}

Quick fix

@jonomnom Thank you for the fix! I will make a PR with that, if you want to contribute yourself, your PR is welcome too.

@Walletsuppport I am not sure what exactly do you support, but may I ask you to edit your message with a clear intention and non-affiliation with me. Otherwise I have to remove your comment, due to possible phishing, scam intention.