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

Single chain config doesn't work #342

Closed
uvizhe opened this issue Feb 5, 2024 · 4 comments · Fixed by #341
Closed

Single chain config doesn't work #342

uvizhe opened this issue Feb 5, 2024 · 4 comments · Fixed by #341

Comments

@uvizhe
Copy link

uvizhe commented Feb 5, 2024

When I configure wagmi with a single chain, e.g., goerli I get the following modal when I connect my wallet:

Screenshot from 2024-02-05 10-38-57

I believe this is due to an incorrect condition in this code:

Boolean(chain && !chains.some((x) => x.id !== chain?.id))

I guess it have to be this instead (and I tested it): Boolean(chain && !chains.some((x) => x.id === chain?.id))

@lochie
Copy link
Member

lochie commented Feb 5, 2024

Sorry about this one. We have an incoming patch on it's way. See PR: #341

@lochie
Copy link
Member

lochie commented Feb 5, 2024

@uvizhe if you need a temporary fix while you wait, you can disable this Switch Networks popup by setting enforceSupportedChains to false.
https://docs.family.co/connectkit/api-reference#enforceSupportedChains

Example:

<ConnectKitProvider options={{
  enforceSupportedChains: false
}}>

@lochie lochie linked a pull request Feb 5, 2024 that will close this issue
@uvizhe
Copy link
Author

uvizhe commented Feb 5, 2024

Oh, sorry for a duplicate, I didn't notice a prior issue.

@uvizhe uvizhe closed this as completed Feb 5, 2024
@lochie
Copy link
Member

lochie commented Feb 6, 2024

This fix is now available in ConnectKit 1.7.1. Thanks again for alerting us to this issue 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants