diff --git a/src/components/organisms/AssetActions/Pool/Remove.module.css b/src/components/organisms/AssetActions/Pool/Remove.module.css index 0dc15650e..d47cc8475 100644 --- a/src/components/organisms/AssetActions/Pool/Remove.module.css +++ b/src/components/organisms/AssetActions/Pool/Remove.module.css @@ -1,4 +1,11 @@ .removeInput { - max-width: 12rem; - margin: 0 auto var(--spacer) auto; + composes: addInput from './Add.module.css'; +} + +.buttonMax { + composes: buttonMax from './Add.module.css'; +} + +.userBalance { + composes: userBalance from './Add.module.css'; } diff --git a/src/components/organisms/AssetActions/Pool/Remove.tsx b/src/components/organisms/AssetActions/Pool/Remove.tsx index 7097f3728..cb140310c 100644 --- a/src/components/organisms/AssetActions/Pool/Remove.tsx +++ b/src/components/organisms/AssetActions/Pool/Remove.tsx @@ -5,15 +5,21 @@ import Header from './Header' import { toast } from 'react-toastify' import InputElement from '../../../atoms/Input/InputElement' import Actions from './Actions' +import { Logger } from '@oceanprotocol/lib' +import Button from '../../../atoms/Button' +import PriceUnit from '../../../atoms/Price/PriceUnit' +import { Balance } from '.' export default function Remove({ setShowRemove, poolAddress, - totalPoolTokens + totalPoolTokens, + userBalance }: { setShowRemove: (show: boolean) => void poolAddress: string totalPoolTokens: string + userBalance: Balance }): ReactElement { const { ocean, accountId } = useOcean() const [amount, setAmount] = useState('') @@ -32,7 +38,7 @@ export default function Remove({ ) setTxId(result.transactionHash) } catch (error) { - console.error(error.message) + Logger.error(error.message) toast.error(error.message) } finally { setIsLoading(false) @@ -43,6 +49,10 @@ export default function Remove({ setAmount(e.target.value) } + function handleMax() { + setAmount(userBalance.ocean) + } + return (