1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-12-23 01:29:49 +01:00

purgatory fix

This commit is contained in:
mihaisc 2020-11-13 18:45:41 +02:00
parent 17574f238b
commit 2a6639e116
No known key found for this signature in database
GPG Key ID: 4FB0C2329B4C6E29
2 changed files with 3 additions and 8 deletions

5
package-lock.json generated
View File

@ -1537,11 +1537,6 @@
"web3-eth-contract": "^1.3.0"
}
},
"@oceanprotocol/list-purgatory": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@oceanprotocol/list-purgatory/-/list-purgatory-1.0.5.tgz",
"integrity": "sha512-mp/Ru7nB/ATawlyefSQ2AJHyEoLxntmtWjx3kvuXRaIxF3NDVcdjcVVB0VgBAOLawccEXZ6p4AsIPEVyjqx8zw=="
},
"@octokit/auth-token": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.3.tgz",

View File

@ -133,12 +133,12 @@ function AssetProvider({
// Set price again, but from chain
const priceLive = await getPrice()
setPrice(priceLive)
}, [internalDdo, getPrice])
}, [asset, getPrice])
useEffect(() => {
if (!internalDdo || !ocean || status !== ProviderStatus.CONNECTED) return
if (!asset) return
initMetadata()
}, [status, internalDdo, initMetadata])
}, [status, asset, initMetadata])
async function refreshPrice(): Promise<void> {
const livePrice = await getPrice()