diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 013c7630a9..37d2fa6cf6 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -94,7 +94,7 @@ export function useWeb3React() { return useMemo( () => ({ account: account.address, - chainId: account.chainId ?? ChainId.MAINNET, + chainId: account.chainId, provider: wrappedProvider, library: wrappedProvider, connector: account.connector, diff --git a/src/hooks/web3/useChangeNetwork.ts b/src/hooks/web3/useChangeNetwork.ts index 00e443416b..eddcaaa098 100644 --- a/src/hooks/web3/useChangeNetwork.ts +++ b/src/hooks/web3/useChangeNetwork.ts @@ -133,7 +133,7 @@ export function useChangeNetwork() { const wrappedSuccessCallback = () => successCallback(desiredChainId, waitUtilUpdatedChainId, customSuccessCallback) // if connected, nothing todo, success return - if (desiredChainId === chainId && !isWrongNetwork) { + if (desiredChainId === chainId && kyberChainId === chainId && !isWrongNetwork) { customSuccessCallback?.() return }