Skip to content

Commit

Permalink
refactor: added extra comments a some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Jan 1, 2025
1 parent 96df93a commit 5598d8e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const FinanceDepositFromSmartAccount: FC<FinanceDepositFromSmartAccountProps> =

const handleConfirmDeposit = useCallback(async () => {
// fail fast
// TODO validation formatUint(amount) > balance
if (amount == 0 || amount >= (balance ?? 0))
return errorDueInvalidAmount();

Expand All @@ -60,7 +61,7 @@ const FinanceDepositFromSmartAccount: FC<FinanceDepositFromSmartAccountProps> =
setLoading(false);
}

}, [sessionData?.address, amount]);
}, [sessionData?.address, amount, balance]);


return (
Expand Down

0 comments on commit 5598d8e

Please sign in to comment.