fix: Addded decimals in borrowCap require

This commit is contained in:
Hadrien Charlanes 2021-04-27 18:43:55 +02:00
parent 7e02877966
commit 05ca0c4ed1

View File

@ -166,6 +166,7 @@ library ValidationLogic {
vars.totalSupplyStableDebt
.add(vars.totalSupplyVariableDebt)
.add(amount)
.div(10 ** reserve.configuration.getDecimals())
< reserve.configuration.getBorrowCap(),
Errors.VL_BORROW_CAP_EXCEEDED);