mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
disable whole effect
This commit is contained in:
parent
960d20d1ea
commit
a81d7b9d8b
@ -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<boolean>()
|
||||
// const { price } = useMetadata(ddo)
|
||||
// TODO: quick hack for
|
||||
// https://github.com/oceanprotocol/market/issues/145
|
||||
const [isBalanceSufficient, setIsBalanceSufficient] = useState<boolean>(true)
|
||||
const [dtBalance, setDtBalance] = useState<string>()
|
||||
|
||||
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 ? (
|
||||
<Compute
|
||||
|
Loading…
Reference in New Issue
Block a user