From 6c5844e90f6ccd7d27b87e2d80c744179c3c0416 Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Mon, 26 Aug 2024 17:04:59 +0400 Subject: [PATCH] Fix linting issues causing build error --- tools/bridge-frontend/src/components/modules/bridge/index.tsx | 2 ++ .../src/components/modules/bridge/transfer-to-section.tsx | 2 +- .../src/components/modules/transactions/index.tsx | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/bridge-frontend/src/components/modules/bridge/index.tsx b/tools/bridge-frontend/src/components/modules/bridge/index.tsx index 3144d8ed4d..ec203342e0 100644 --- a/tools/bridge-frontend/src/components/modules/bridge/index.tsx +++ b/tools/bridge-frontend/src/components/modules/bridge/index.tsx @@ -191,6 +191,8 @@ export default function Dashboard() { clearInterval(intervalId.current); } }; + + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ fromChain, token, diff --git a/tools/bridge-frontend/src/components/modules/bridge/transfer-to-section.tsx b/tools/bridge-frontend/src/components/modules/bridge/transfer-to-section.tsx index 6d94d4d008..eb4e0cee21 100644 --- a/tools/bridge-frontend/src/components/modules/bridge/transfer-to-section.tsx +++ b/tools/bridge-frontend/src/components/modules/bridge/transfer-to-section.tsx @@ -11,6 +11,7 @@ import { useContractService } from "@/src/services/useContractService"; import { ethers } from "ethers"; import useContractStore from "@/src/stores/contract-store"; import { cn } from "@/src/lib/utils"; +import { estimateGas } from "@/src/lib/utils/contractUtils"; export const TransferToSection = ({ form, @@ -27,7 +28,6 @@ export const TransferToSection = ({ address: string; setOpen: (open: boolean) => void; }) => { - const { estimateGas } = useContractService(); const { bridgeContract } = useContractStore(); const [gas, setGas] = useState(null); const [isEstimating, setIsEstimating] = useState(false); diff --git a/tools/bridge-frontend/src/components/modules/transactions/index.tsx b/tools/bridge-frontend/src/components/modules/transactions/index.tsx index cce0e202f8..c700569795 100644 --- a/tools/bridge-frontend/src/components/modules/transactions/index.tsx +++ b/tools/bridge-frontend/src/components/modules/transactions/index.tsx @@ -40,6 +40,8 @@ export default function TransactionsComponent() { return () => { clearInterval(interval.current); }; + + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const firstBatchHeight = getItem(transactions, "blockNumber");