Switching default chain programmatically #5317
Unanswered
m-peko
asked this question in
Developer Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I am using web3modal in my NextJS application. I have a top level component
Web3ModalProvider
defined like:As you can see, the default chain is set to
mainnet
.However, I have a dropdown in my application which allows users to set the default chain to whatever they want before they even connect their wallet. This way, they don't need to switch from
mainnet
to their desired chain immediately after connect.This is the code I am using for my dropdown, to switch the default chain:
and then i have custom connect button like:
but this always connects me to
mainnet
first.What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions