Closed TaeyoonKwon closed 1 year ago
@TaeyoonKwon useSwitchChain
does not change the activeChain
- It only changes the network in connected wallet.
If you want the useContractWrite
to use a different network - you need to pass the desired activeChain
to <ThirdwebProvider/>
When I change the chain using this hook, it does not change the activeChain
const switchChain = useSwitchChain();
Which results rpc error.
For instance, if default active chain was Polygon, then if I switchChain to Binance,
useContractWrite hook still uses Polygon rpc network.