mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
refactor: changed the order of requirements in validateDropReserve for easier testing
This commit is contained in:
parent
d309005502
commit
4c91c205bf
|
@ -476,7 +476,6 @@ library ValidationLogic {
|
|||
* @param reserve The reserve object
|
||||
**/
|
||||
function validateDropReserve(DataTypes.ReserveData storage reserve) external view {
|
||||
require(IERC20(reserve.aTokenAddress).totalSupply() == 0, Errors.RL_ATOKEN_SUPPLY_NOT_ZERO);
|
||||
require(
|
||||
IERC20(reserve.stableDebtTokenAddress).totalSupply() == 0,
|
||||
Errors.RL_STABLE_DEBT_NOT_ZERO
|
||||
|
@ -485,5 +484,6 @@ library ValidationLogic {
|
|||
IERC20(reserve.variableDebtTokenAddress).totalSupply() == 0,
|
||||
Errors.RL_VARIABLE_DEBT_SUPPLY_NOT_ZERO
|
||||
);
|
||||
require(IERC20(reserve.aTokenAddress).totalSupply() == 0, Errors.RL_ATOKEN_SUPPLY_NOT_ZERO);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user