mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
fix: added check to avoid dropped reserves
This commit is contained in:
parent
054dd5973e
commit
0326259c03
|
@ -543,6 +543,12 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
||||||
function mintToTreasury() public {
|
function mintToTreasury() public {
|
||||||
for (uint256 i = 0; i < _reservesCount; i++) {
|
for (uint256 i = 0; i < _reservesCount; i++) {
|
||||||
address reserveAddress = _reservesList[i];
|
address reserveAddress = _reservesList[i];
|
||||||
|
|
||||||
|
// if a reserve has been dropped this might happen
|
||||||
|
if(reserveAddress == address(0)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
DataTypes.ReserveData storage reserve = _reserves[reserveAddress];
|
DataTypes.ReserveData storage reserve = _reserves[reserveAddress];
|
||||||
uint256 accruedToTreasury = reserve.accruedToTreasury;
|
uint256 accruedToTreasury = reserve.accruedToTreasury;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user