diff --git a/apps/web/src/components/SuppliedAssets.tsx b/apps/web/src/components/SuppliedAssets.tsx index fbfdc84..0441acc 100644 --- a/apps/web/src/components/SuppliedAssets.tsx +++ b/apps/web/src/components/SuppliedAssets.tsx @@ -132,7 +132,7 @@ export const SuppliedAssets = ({ address }: Props) => { = ({ reserveAddress, - amount + maxAmount }) => { + const [amount, setAmount] = useState('0'); const { mutate, isLoading } = useWithdrawAsset({ reserve: reserveAddress, amount }); + const isDisabled = + !Number(amount) || + isLoading || + Number(amount) > Number(maxAmount) || + Number(amount) <= 0; + return ( - + + + + + + + + Amount + + + + setAmount(e.target.value)} + /> + + + + + + + + + + + ); };