check min borrow amount even when not using margin

This commit is contained in:
tjs 2023-01-29 23:02:16 -05:00
parent 52e871e566
commit 17b6861d88
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ export const getTokenInMax = (
inputBankVaultBalance, inputBankVaultBalance,
maxUiAmountWithBorrow maxUiAmountWithBorrow
) )
: Decimal.min(maxAmountWithoutMargin, inputBankVaultBalance) : Decimal.min(
maxAmountWithoutMargin,
inputBankVaultBalance,
maxUiAmountWithBorrow
)
const maxAmountWithBorrow = Decimal.min( const maxAmountWithBorrow = Decimal.min(
maxUiAmountWithBorrow, maxUiAmountWithBorrow,