You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
It seems in the latest version of ethereum-provider now it won't allow you to set optionalChains as an empty array, which wagmi does when setting only one chain in the connector's config.
I wonder if the connector should be refactored? As we've also seen some wallets will "break" if the optionalChains is an empty array as well.
Expected Behavior
no errors
Steps To Reproduce
This error comes from ethereum-provider version 2.8.6. I've tested using only this package and also with wagmi, both will throw an error when trying to open the modal.
the code for testing in ethereum-provider:
constclient=awaitEthereumProvider.init({projectId: process.env.NEXT_PUBLIC_PROJECT_ID,showQrModal: true,chains: [1],optionalChains:[],// <-- adding an empty array will throw an error});
Error on console:
Unsupported chains. connect() optionalNamespaces, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
Is there an existing issue for this?
Current Behavior
It seems in the latest version of ethereum-provider now it won't allow you to set optionalChains as an empty array, which wagmi does when setting only one chain in the connector's config.
I wonder if the connector should be refactored? As we've also seen some wallets will "break" if the optionalChains is an empty array as well.
Expected Behavior
no errors
Steps To Reproduce
This error comes from ethereum-provider version
2.8.6
. I've tested using only this package and also with wagmi, both will throw an error when trying to open the modal.the code for testing in ethereum-provider:
Error on console:
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
https://github.com/glitch-txs/wagmi-test
Anything else?
pinging @0xasimetriq for more insight
The text was updated successfully, but these errors were encountered: