mirror of
https://github.com/oceanprotocol/react.git
synced 2025-01-24 01:03:30 +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()
|
||||
|
||||
const interval = setInterval(async () => {
|
||||
const price = await getBestPrice()
|
||||
setBestPrice(price)
|
||||
}, 10000)
|
||||
return () => clearInterval(interval)
|
||||
}, [internalDdo])
|
||||
|
||||
return {
|
||||
ddo: internalDdo,
|
||||
did: internalDid,
|
||||
|
Loading…
Reference in New Issue
Block a user