1
0
mirror of https://github.com/oceanprotocol/react.git synced 2025-01-24 17:21:58 +01:00

disable price interval

Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2020-10-26 13:17:19 +02:00
parent 4f01a3d85a
commit 3d338e1592
No known key found for this signature in database
GPG Key ID: 4FB0C2329B4C6E29

View File

@ -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 {