From 942ead1b4cbd8faa8b1c94a993e901e727114485 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Feb 2022 15:23:18 +0000 Subject: [PATCH] disable exhaustive-deps warning in Pool context (#1094) --- src/@context/Pool/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/@context/Pool/index.tsx b/src/@context/Pool/index.tsx index db1c9adf0..33c08b744 100644 --- a/src/@context/Pool/index.tsx +++ b/src/@context/Pool/index.tsx @@ -77,8 +77,6 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement { }, [asset?.chainId, asset?.accessDetails?.addressOrId, owner, accountId]) // Helper: start interval fetching - // Having `accountId` as dependency is important for interval to - // change after user account switch. const initFetchInterval = useCallback(() => { if (fetchInterval) return @@ -89,6 +87,10 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement { ) }, refreshInterval) setFetchInterval(newInterval) + + // Having `accountId` as dependency is important for interval to + // change after user account switch. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [fetchInterval, fetchAllData, accountId]) useEffect(() => {