1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

price: do nothing when not properly connected

This commit is contained in:
Matthias Kretschmann 2020-08-19 11:01:59 +02:00
parent ff06d0c137
commit e0ca028fc1
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -24,8 +24,9 @@ export default function Price({
const [price, setPrice] = useState<string>()
useEffect(() => {
if (!ocean || !accountId || !chainId) return
async function init() {
console.log(ocean)
const price = await getBestPrice(ddo.dataToken)
setPrice(price)
setPriceOutside && price !== '' && setPriceOutside(price)