mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
disable exhaustive-deps warning in Pool context (#1094)
This commit is contained in:
parent
b6dc52c0ab
commit
942ead1b4c
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user