From 3d338e1592c96fa7ba8f79649ca2075423526e1e Mon Sep 17 00:00:00 2001 From: mihaisc Date: Mon, 26 Oct 2020 13:17:19 +0200 Subject: [PATCH] disable price interval Signed-off-by: mihaisc --- src/hooks/useMetadata/useMetadata.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/hooks/useMetadata/useMetadata.ts b/src/hooks/useMetadata/useMetadata.ts index 06561ee..d5a198c 100644 --- a/src/hooks/useMetadata/useMetadata.ts +++ b/src/hooks/useMetadata/useMetadata.ts @@ -103,21 +103,21 @@ function useMetadata(asset?: DID | string | DDO): UseMetadata { } init() - const interval = setInterval(async () => { - if ( - !internalDdo || - status !== 1 || - networkId !== (config as ConfigHelperConfig).networkId - ) - return + // const interval = setInterval(async () => { + // if ( + // !internalDdo || + // status !== 1 || + // networkId !== (config as ConfigHelperConfig).networkId + // ) + // return - const priceLive = await getPrice(internalDdo.dataToken) - priceLive && setPrice(priceLive) - }, 10000) + // const priceLive = await getPrice(internalDdo.dataToken) + // priceLive && setPrice(priceLive) + // }, 10000) - return () => { - clearInterval(interval) - } + // return () => { + // clearInterval(interval) + // } }, [status, networkId, config, internalDdo, getMetadata, getPrice]) return {