Skip to content

Commit e6ee833

Browse files
committed
fix: borrowed amount , filler increase debt
1 parent cbe0d21 commit e6ee833

File tree

1 file changed

+4
-2
lines changed
  • models/credit_manager/cm_v3

1 file changed

+4
-2
lines changed

models/credit_manager/cm_v3/v3.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ func (mdl *CMv3) checkLogV3(txLog types.Log) {
9797
debts := poolv3.GetDebt(txLog.TxHash, mdl.Address, txLog.Index)
9898
// log.Info(debts)
9999
for _, debt := range debts {
100-
sessionId, borrower := mdl.GetSessionIdAndBorrower(debt.Account)
101-
mdl.PoolBorrow(&txLog, sessionId, borrower, debt.Amount)
100+
if debt.Type == pool_v3.INCREASE_DEBT {
101+
sessionId, borrower := mdl.GetSessionIdAndBorrower(debt.Account)
102+
mdl.PoolBorrow(&txLog, sessionId, borrower, debt.Amount)
103+
}
102104
// mdl.onIncreaseBorrowedAmountV3(&txLog, debt.Account,
103105
// debt.Amount, "IncreaseDebt")
104106
}

0 commit comments

Comments
 (0)