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:
parent
ff06d0c137
commit
e0ca028fc1
@ -24,8 +24,9 @@ export default function Price({
|
|||||||
const [price, setPrice] = useState<string>()
|
const [price, setPrice] = useState<string>()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!ocean || !accountId || !chainId) return
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
console.log(ocean)
|
|
||||||
const price = await getBestPrice(ddo.dataToken)
|
const price = await getBestPrice(ddo.dataToken)
|
||||||
setPrice(price)
|
setPrice(price)
|
||||||
setPriceOutside && price !== '' && setPriceOutside(price)
|
setPriceOutside && price !== '' && setPriceOutside(price)
|
||||||
|
Loading…
Reference in New Issue
Block a user