Add small optimization in _mintToTreasury

This commit is contained in:
The3D 2020-10-23 13:09:19 +02:00
parent eaad21d8b4
commit 86d25393e9

View File

@ -359,8 +359,10 @@ library ReserveLogic {
vars.amountToMint = vars.totalDebtAccrued.percentMul(vars.reserveFactor); vars.amountToMint = vars.totalDebtAccrued.percentMul(vars.reserveFactor);
if (vars.amountToMint != 0) {
IAToken(reserve.aTokenAddress).mintToTreasury(vars.amountToMint, newLiquidityIndex); IAToken(reserve.aTokenAddress).mintToTreasury(vars.amountToMint, newLiquidityIndex);
} }
}
/** /**
* @dev updates the reserve indexes and the timestamp of the update * @dev updates the reserve indexes and the timestamp of the update