Skip to content

Commit

Permalink
inputError on deposit
Browse files Browse the repository at this point in the history
  • Loading branch information
jarbacoa committed Apr 25, 2022
1 parent 224d155 commit 36b8af3
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,15 @@ export const DepositSafeCollateralModal: React.FC<
};

// Form validation
const inputError: string | undefined = useMemo(() => {
const _amount = !!depositAmount ? depositAmount : "0";
const _amountBN = parseUnits(_amount, collateralTokenData?.decimals ?? 18);
//
if (_amountBN.gt(maxAmount)) {
return "Can't deposit this much!";
}
}, [depositAmount, maxAmount]);
// const inputError: string | undefined = useMemo(() => {
// const _amount = !!depositAmount ? depositAmount : "0";
// const _amountBN = parseUnits(_amount, collateralTokenData?.decimals ?? 18);
// //
// if (_amountBN.gt(maxAmount)) {
// return "Can't deposit this much!";
// }
// }, [depositAmount, maxAmount]);
const inputError = undefined;

return (
<Modal
Expand Down

1 comment on commit 36b8af3

@vercel
Copy link

@vercel vercel bot commented on 36b8af3 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.