Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out duplicate EIP-6963 providers does not filter out Metamask Mobile #4404

Closed
1 task done
tiagofilipenunes opened this issue Nov 13, 2024 · 2 comments · Fixed by #4406
Closed
1 task done
Labels
Good First Issue Misc: Good First Issue

Comments

@tiagofilipenunes
Copy link

Check existing issues

Describe the bug

This is a follow-up issue to the functionality introduced in PR #4343 (thank you @tmm!).

Metamask Mobile uses the io.metamask.mobile rdns. This means that using wagmi via the metamask browser on mobile with multiInjectedProviderDiscovery and the metamask connector initialized will still result in duplicated Metamask connectors.

Link to Minimal Reproducible Example

https://wagmi-tests-2.vercel.app/

Steps To Reproduce

  1. Open Metamask Mobile on iOS or Android
  2. Open https://wagmi-tests-2.vercel.app/
  3. Two metamask connectors show up instead of one, because the io.metamask.mobile rdns is not filtered.

What Wagmi package(s) are you using?

wagmi

Wagmi Package(s) Version(s)

2.12.31

Viem Version

2.21.45

TypeScript Version

5.3.3

Anything else?

Can find the code for the reproducible example here: https://stackblitz.com/edit/new-wagmi-pddqi8

@tmm tmm added the Good First Issue Misc: Good First Issue label Nov 13, 2024
@tmm
Copy link
Member

tmm commented Nov 13, 2024

Nice find! If someone wants to work on this, all they need to do is add readonly string[] to rdns and update a few places in createConfig.ts and hydrate.ts (follow the type errors).

@tiagofilipenunes
Copy link
Author

Thank you for the quick turnaround @starc007 and @tmm !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Misc: Good First Issue
Projects
None yet
2 participants