mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
effect dependency fix (#578)
This commit is contained in:
parent
49cd032274
commit
6cc268bd3f
@ -77,6 +77,7 @@ export function useGraphSyncStatus(): UseGraphSyncStatus {
|
||||
// Get and set subgraph block
|
||||
useEffect(() => {
|
||||
if (!config || !config.subgraphUri) return
|
||||
|
||||
async function initBlockSubgraph() {
|
||||
setSubgraphLoading(true)
|
||||
const blockGraph = await getBlockSubgraph(config.subgraphUri)
|
||||
@ -98,7 +99,7 @@ export function useGraphSyncStatus(): UseGraphSyncStatus {
|
||||
return
|
||||
}
|
||||
setIsGraphSynced(true)
|
||||
}, [blockGraph, blockHead])
|
||||
}, [blockGraph, blockHead, web3Loading, subgraphLoading])
|
||||
|
||||
return { blockHead, blockGraph, isGraphSynced }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user