fix withdraw action

This commit is contained in:
Jackson Jessup 2022-12-13 18:40:17 -05:00
parent 13a70f716b
commit 73dc24ada2
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ export class LeaseAccount extends Account<types.LeaseAccountData> {
const requestedWithdrawAmount = this.program.mint.toTokenAmountBN(
params.amount
);
return requestedWithdrawAmount.gte(maxWithdrawAmount)
return requestedWithdrawAmount.lte(maxWithdrawAmount)
? requestedWithdrawAmount
: maxWithdrawAmount;
})();