wevm / wagmi

React Hooks for Ethereum
https://wagmi.sh
MIT License
5.79k stars 968 forks source link

MetaMask connector breaks Coinbase connector in iOS Safari #4058

Closed lochie closed 1 week ago

lochie commented 3 weeks ago

Check existing issues

Describe the bug

It looks like metaMask connector causes coinbaseWallet connector to not be able to open it's popup on first tap in iOS Safari.

Video reproduction (using simulator):

https://github.com/wevm/wagmi/assets/1930210/c1ce1e24-bbf1-4e34-be1c-da6c7c17539d

Minimal Reproducible Example:

View the following on iOS Safari. Also reproducible in Simulator.

With MetaMask:

Without MetaMask

Link to Minimal Reproducible Example

No response

Steps To Reproduce

  1. Set up a blank project with the metaMask and coinbaseWallet connectors.
  2. Attempt to connect with Coinbase on iOS Safari.
  3. Error Pop up window failed to open (error message from coinbase sdk, see ref)
  4. Attempting to connect again after this error will behave as expected.

What Wagmi package(s) are you using?

@wagmi/connectors

Wagmi Version

2.10.2

Viem Version

2.13.0

TypeScript Version

5.0.4

Anything else?

No response

imaksp commented 1 week ago

This must be the reason it didn't work for us on Mobile Safari even after Coinbase team has fixed it , we targeted v3 SDK to solve it at that time, also we are not even using metaMask connector but it gets imported due to some tree shaking issue with esbuild builder of Angular, I was going to create issue & PR about adding separate export for each connector so it can be imported like this:

import walletConnect from '@wagmi/connectors/walletConnect';
lochie commented 1 week ago

thank you @tmm šŸ«”