Skip to content

Commit

Permalink
fix: cant switch network to ethereum (#2544)
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv authored Oct 9, 2024
1 parent 55b68df commit 0a972c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/web3/useChangeNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0a972c8

Please sign in to comment.