Skip to content

Commit 344eb0d

Browse files
SOV-5228: d-2-bridge-delayed-network-switch (#1126)
1 parent 5f32676 commit 344eb0d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/frontend/src/app/3_organisms/ERC20BridgeDialog/ERC20BridgeDialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ export const ERC20BridgeDialog: React.FC<ERC20BridgeDialogProps> = ({
4545
const { account } = useAccount();
4646
const { isMobile } = useIsMobile();
4747
const { currentChainId, setCurrentChainId } = useChainStore();
48-
const isWrongChain = RSK_CHAIN_ID !== currentChainId;
48+
const isWrongChain = useMemo(
49+
() => RSK_CHAIN_ID !== currentChainId,
50+
[currentChainId],
51+
);
4952

5053
const handleClose = useCallback(() => {
5154
if (isWrongChain) {

0 commit comments

Comments
 (0)