We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ac1144 + b3e8d7b commit fdbefcdCopy full SHA for fdbefcd
web/src/components/EnsureChain.tsx
@@ -1,6 +1,6 @@
1
import React from "react";
2
3
-import { useChainId } from "wagmi";
+import { useAccount } from "wagmi";
4
5
import { DEFAULT_CHAIN } from "consts/chains";
6
@@ -12,7 +12,7 @@ interface IEnsureChain {
12
}
13
14
export const EnsureChain: React.FC<IEnsureChain> = ({ children, className }) => {
15
- const chainId = useChainId();
+ const { chainId } = useAccount();
16
17
return chainId === DEFAULT_CHAIN ? children : <ConnectWallet {...{ className }} />;
18
};
0 commit comments