Developer Guidance
Handling Multiple Injected Extensions
If a user has both Metamask and Coinbase Wallet extensions installed, connecting to the injected provider can lead to a situation where both extensions raise a pop-up window to connect wallet.
If you are using window.ethereum
to support Metamask on your app, you can prevent this scenario with the following code snippet, which specifies that your injected provider option only works with Metamask:
Use this pattern to access your provider throughout the app.