Skip to content

Commit fdbefcd

Browse files
authored
Merge pull request #1626 from kleros/fix(web)/show-connect-button-when-user-is-not-connected
fix(web): show connect button when user is not connected
2 parents 5ac1144 + b3e8d7b commit fdbefcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/src/components/EnsureChain.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
import { useChainId } from "wagmi";
3+
import { useAccount } from "wagmi";
44

55
import { DEFAULT_CHAIN } from "consts/chains";
66

@@ -12,7 +12,7 @@ interface IEnsureChain {
1212
}
1313

1414
export const EnsureChain: React.FC<IEnsureChain> = ({ children, className }) => {
15-
const chainId = useChainId();
15+
const { chainId } = useAccount();
1616

1717
return chainId === DEFAULT_CHAIN ? children : <ConnectWallet {...{ className }} />;
1818
};

0 commit comments

Comments
 (0)