mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
add timer for price
This commit is contained in:
parent
a488ae51ca
commit
b6170ce6c1
@ -87,7 +87,14 @@ function useMetadata(did?: DID | string, ddo?: DDO): UseMetadata {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
|
|
||||||
|
const interval = setInterval(async () => {
|
||||||
|
const price = await getBestPrice()
|
||||||
|
setBestPrice(price)
|
||||||
|
}, 10000)
|
||||||
|
return () => clearInterval(interval)
|
||||||
}, [internalDdo])
|
}, [internalDdo])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ddo: internalDdo,
|
ddo: internalDdo,
|
||||||
did: internalDid,
|
did: internalDid,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user