This commit is contained in:
Adrian Brzeziński 2023-01-14 02:05:02 +01:00
parent d22392be6c
commit e5988cb631
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ function RepayForm({ onSuccess, token }: RepayFormProps) {
const actions = mangoStore.getState().actions
if (!mangoAccount || !group || !bank || !wallet) return
//we don't want to left negative dust in account if someone wants to repay full amount
const actualAmount =
sizePercentage === '100'
? mangoAccount.getTokenBorrowsUi(bank) < parseFloat(amount)