-
Notifications
You must be signed in to change notification settings - Fork 151
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
Change parameters for the useChainSwitch hook #551
Comments
I'm not sure I follow, the wallet api call requires a single chainId argument and the library exposes that. |
maybe the config should throw an error if chainId is duplicated in the passed networks (might have to rename the issue), is there a way to get the networks supported by the connector? |
I agree the config should detect this! I'm open to change that. Unfortunately the connector doesn't have a method to return a list of supported networks since it's not in the wallet api (correct me if I'm wrong tho). |
The current use chainSwitch hook uses input parameter chainId to switch to a new network, the parameter should take network as input instead, the chains returned in the useNetwork hook are not all switchable to without this configuration as the id may not be unique
These are the 4 chains I have supported in my Starknet config, and for the devnet and testnet I happen to use the same chainId (default katana config)
The text was updated successfully, but these errors were encountered: