From e0ca028fc1cbc6899462a3d8e4b6f7f3c90b609e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 19 Aug 2020 11:01:59 +0200 Subject: [PATCH] price: do nothing when not properly connected --- src/components/atoms/Price/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/atoms/Price/index.tsx b/src/components/atoms/Price/index.tsx index 5448613d6..def1ce106 100644 --- a/src/components/atoms/Price/index.tsx +++ b/src/components/atoms/Price/index.tsx @@ -24,8 +24,9 @@ export default function Price({ const [price, setPrice] = useState() useEffect(() => { + if (!ocean || !accountId || !chainId) return + async function init() { - console.log(ocean) const price = await getBestPrice(ddo.dataToken) setPrice(price) setPriceOutside && price !== '' && setPriceOutside(price)