diff --git a/src/components/organisms/AssetActions/Pool/Remove.tsx b/src/components/organisms/AssetActions/Pool/Remove.tsx index a1215b344..4bbc8ac15 100644 --- a/src/components/organisms/AssetActions/Pool/Remove.tsx +++ b/src/components/organisms/AssetActions/Pool/Remove.tsx @@ -35,6 +35,7 @@ export default function Remove({ }): ReactElement { const { ocean, accountId } = useOcean() const [amountPercent, setAmountPercent] = useState('0') + const [amountMaxPercent, setAmountMaxPercent] = useState('100') const [amountPoolShares, setAmountPoolShares] = useState('0') const [amountOcean, setAmountOcean] = useState() const [amountDatatoken, setAmountDatatoken] = useState() @@ -95,11 +96,15 @@ export default function Remove({ setAmountOcean(tokens?.oceanAmount) setAmountDatatoken(tokens?.dtAmount) } else { - // TODO: check max amount to be able to remove - const maxOcean = await ocean.pool.getOceanMaxRemoveLiquidity( + const amountMaxOcean = await ocean.pool.getOceanMaxRemoveLiquidity( poolAddress ) - console.log(maxOcean) + console.log(amountMaxOcean) + + // TODO: Calculate maximum percentage a user can remove based on maximum OCEAN + // to limit the range slider + // const maxPercent = ?? + // setAmountMaxPercent(maxPercent) const amountOcean = await ocean.pool.getOceanRemovedforPoolShares( poolAddress, @@ -124,7 +129,7 @@ export default function Remove({