Closed detectivekim closed 1 year ago
The former condition repayAmount > newRepayAmount is a subset of the latter condition newRepayAmount < minDebtAmount + repayAmount, and is therefore redundant.
repayAmount > newRepayAmount
newRepayAmount < minDebtAmount + repayAmount
- } else if (repayAmount > newRepayAmount || newRepayAmount < minDebtAmount + repayAmount) { + } else if (newRepayAmount < minDebtAmount + repayAmount) {
Details
The former condition
repayAmount > newRepayAmount
is a subset of the latter conditionnewRepayAmount < minDebtAmount + repayAmount
, and is therefore redundant.Mitigation