hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 42 forks source link

Metamask Login button should only open metamask (and not coinbase or phantom wallet) #5968

Closed jnaviask closed 9 months ago

jnaviask commented 9 months ago

Describe the bug

Currently when you click "metamask" it may give you the option to open coinbase wallet or phantom wallet instead of metamask. We want to ensure the metamask button only opens metamask.

To Reproduce

  1. Ensure you have metamask AND phantom or coinbase wallet installed in your browser.
  2. Click "metamask" and observe the selection screen.

Expected behavior

Metamask immediately opens.

Additional context

Supersedes #5629

ianrowan commented 9 months ago

Adding coinbase extension even breaks metamask SDK(sdk doesnt think metamask is installed b/c coinbase totally wipes the window.ethereum format) smh:

image

It appears coinbase isnt implementing: EIP-6963(https://docs.metamask.io/wallet/how-to/discover-multiple-wallets/) and metamask best solution to this is to disable non EIP-6963 wallets for metamask to work. https://support.metamask.io/hc/en-us/articles/11907107168923-I-can-t-connect-MetaMask-Extension-to-a-dapp-#:~:text=If%20nothing%20happens%2C%20the%20most,for%20MetaMask%20to%20work%20properly.&text=Once%20you%20have%20disabled%20other%20wallets%2C%20reload%20the%20page.

This isnt a blocker as there looks to be some non-sdk solutions, but it will require more research than expected now

CC: @jnaviask @ForestMars @egetekiner