mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
disable price interval
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
4f01a3d85a
commit
3d338e1592
@ -103,21 +103,21 @@ function useMetadata(asset?: DID | string | DDO): UseMetadata {
|
|||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
|
|
||||||
const interval = setInterval(async () => {
|
// const interval = setInterval(async () => {
|
||||||
if (
|
// if (
|
||||||
!internalDdo ||
|
// !internalDdo ||
|
||||||
status !== 1 ||
|
// status !== 1 ||
|
||||||
networkId !== (config as ConfigHelperConfig).networkId
|
// networkId !== (config as ConfigHelperConfig).networkId
|
||||||
)
|
// )
|
||||||
return
|
// return
|
||||||
|
|
||||||
const priceLive = await getPrice(internalDdo.dataToken)
|
// const priceLive = await getPrice(internalDdo.dataToken)
|
||||||
priceLive && setPrice(priceLive)
|
// priceLive && setPrice(priceLive)
|
||||||
}, 10000)
|
// }, 10000)
|
||||||
|
|
||||||
return () => {
|
// return () => {
|
||||||
clearInterval(interval)
|
// clearInterval(interval)
|
||||||
}
|
// }
|
||||||
}, [status, networkId, config, internalDdo, getMetadata, getPrice])
|
}, [status, networkId, config, internalDdo, getMetadata, getPrice])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user