diff --git a/src/components/Publish/Pricing/Dynamic.module.css b/src/components/Publish/Pricing/Dynamic.module.css index d8f6e6180..f2a1b3973 100644 --- a/src/components/Publish/Pricing/Dynamic.module.css +++ b/src/components/Publish/Pricing/Dynamic.module.css @@ -18,8 +18,13 @@ } } -.summary { - margin-top: var(--spacer); +.subtitle { + display: inline-block; + color: var(--color-secondary); + margin-left: calc(var(--spacer) / 4); + font-family: var(--font-family-base); + font-weight: var(--font-weight-base); + font-size: var(--font-size-small); } .alertArea { diff --git a/src/components/Publish/Pricing/Dynamic.tsx b/src/components/Publish/Pricing/Dynamic.tsx index 7779f161a..4dbb2b491 100644 --- a/src/components/Publish/Pricing/Dynamic.tsx +++ b/src/components/Publish/Pricing/Dynamic.tsx @@ -8,13 +8,11 @@ import Fees from './Fees' import { FormikContextType, useFormikContext } from 'formik' import Price from './Price' import Decimal from 'decimal.js' -import { useOcean } from '@context/Ocean' import { useWeb3 } from '@context/Web3' import { FormPublishData } from '../_types' export default function Dynamic({ content }: { content: any }): ReactElement { - const { networkId, balance } = useWeb3() - const { account } = useOcean() + const { networkId, accountId, balance } = useWeb3() const [firstPrice, setFirstPrice] = useState() // Connect with form @@ -51,14 +49,14 @@ export default function Dynamic({ content }: { content: any }): ReactElement { // Check: account, network & insufficient balance useEffect(() => { - if (!account) { + if (!accountId) { setError(`No account connected. Please connect your Web3 wallet.`) - } else if (Number(balance.ocean) < Number(price)) { - setError(`Insufficient balance. You need at least ${price} OCEAN`) + } else if (Number(balance.ocean) < Number(amountOcean)) { + setError(`Insufficient balance. You need at least ${amountOcean} OCEAN.`) } else { setError(undefined) } - }, [price, networkId, account, balance]) + }, [amountOcean, networkId, accountId, balance]) return ( <> @@ -71,7 +69,8 @@ export default function Dynamic({ content }: { content: any }): ReactElement {

- Datatoken Liquidity Pool + Datatoken Liquidity Pool {' '} + 100% share of pool

@@ -93,11 +92,6 @@ export default function Dynamic({ content }: { content: any }): ReactElement { -
- You will get:
- 100% share of pool -
- {error && (