diff --git a/src/components/organisms/AssetActions/index.tsx b/src/components/organisms/AssetActions/index.tsx index f09ebe411..aa9e88bf3 100644 --- a/src/components/organisms/AssetActions/index.tsx +++ b/src/components/organisms/AssetActions/index.tsx @@ -10,8 +10,10 @@ import Pool from './Pool' export default function AssetActions({ ddo }: { ddo: DDO }): ReactElement { const { ocean, balance, accountId } = useOcean() - const { price } = useMetadata(ddo) - const [isBalanceSufficient, setIsBalanceSufficient] = useState() + // const { price } = useMetadata(ddo) + // TODO: quick hack for + // https://github.com/oceanprotocol/market/issues/145 + const [isBalanceSufficient, setIsBalanceSufficient] = useState(true) const [dtBalance, setDtBalance] = useState() const isCompute = Boolean(ddo.findServiceByType('compute')) @@ -35,22 +37,22 @@ export default function AssetActions({ ddo }: { ddo: DDO }): ReactElement { init() }, [ocean, accountId, ddo.dataToken]) + // TODO: quick hack for + // https://github.com/oceanprotocol/market/issues/145 + // Check user balance against price - useEffect(() => { - if (!price || !price.value || !balance || !balance.ocean || !dtBalance) - return + // useEffect(() => { + // if (!price || !price.value || !balance || !balance.ocean || !dtBalance) + // return - // TODO: quick hack for - // https://github.com/oceanprotocol/market/issues/145 - setIsBalanceSufficient(true) - // setIsBalanceSufficient( - // compareAsBN(balance.ocean, `${price.value}`) || Number(dtBalance) >= 1 - // ) + // setIsBalanceSufficient( + // compareAsBN(balance.ocean, `${price.value}`) || Number(dtBalance) >= 1 + // ) - // return () => { - // setIsBalanceSufficient(false) - // } - }, [balance, price, dtBalance]) + // return () => { + // setIsBalanceSufficient(false) + // } + // }, [balance, price, dtBalance]) const UseContent = isCompute ? (