Skip to content

Commit

Permalink
fix: network switching bool
Browse files Browse the repository at this point in the history
  • Loading branch information
simodrws committed Aug 29, 2023
1 parent d887eaf commit b433e08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/refactor/wallet-client/network/use-network.ts
Expand Up @@ -42,6 +42,8 @@ export const useNetwork = () => {
if (!chainId) return;
switchNetworkWagmi?.(chainId);
} catch (error: unknown) {
setSwitchingToChain(null);
console.log('ERROR IN HOOK 2', error);
throw error as Error;
}
},
Expand All @@ -60,6 +62,8 @@ export const useNetwork = () => {
switchNetworkWagmi?.(networkToSwitchTo.chainId);
}
} catch (error: unknown) {
setSwitchingToChain(null);
console.log('ERROR IN HOOK 1', error);
throw error as Error;
}
},
Expand Down

0 comments on commit b433e08

Please sign in to comment.