From 2a6639e1160f24292df913e4750e16adb4a4f774 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Fri, 13 Nov 2020 18:45:41 +0200 Subject: [PATCH] purgatory fix --- package-lock.json | 5 ----- src/providers/AssetProvider/AssetProvider.tsx | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1c770cc..16e9d5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/src/providers/AssetProvider/AssetProvider.tsx b/src/providers/AssetProvider/AssetProvider.tsx index 9b3d6a2..8467aa4 100644 --- a/src/providers/AssetProvider/AssetProvider.tsx +++ b/src/providers/AssetProvider/AssetProvider.tsx @@ -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 { const livePrice = await getPrice()