fix: added check to skip dropped reserves in setPoolPause()

This commit is contained in:
The3D 2021-07-01 20:00:02 +02:00
parent 7acbd2925b
commit 2c19aeb87b

View File

@ -488,7 +488,9 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
address[] memory reserves = _pool.getReservesList();
for (uint256 i = 0; i < reserves.length; i++) {
setReservePause(reserves[i], paused);
if (reserves[i] != address(0)) { //might happen is a reserve was dropped
setReservePause(reserves[i], paused);
}
}
}