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
68b7384146
commit
46d14e9124
|
@ -483,7 +483,6 @@ library ValidationLogic {
|
||||||
* @param reserve The reserve object
|
* @param reserve The reserve object
|
||||||
**/
|
**/
|
||||||
function validateDropReserve(DataTypes.ReserveData storage reserve) external view {
|
function validateDropReserve(DataTypes.ReserveData storage reserve) external view {
|
||||||
require(IERC20(reserve.aTokenAddress).totalSupply() == 0, Errors.RL_ATOKEN_SUPPLY_NOT_ZERO);
|
|
||||||
require(
|
require(
|
||||||
IERC20(reserve.stableDebtTokenAddress).totalSupply() == 0,
|
IERC20(reserve.stableDebtTokenAddress).totalSupply() == 0,
|
||||||
Errors.RL_STABLE_DEBT_NOT_ZERO
|
Errors.RL_STABLE_DEBT_NOT_ZERO
|
||||||
|
@ -492,5 +491,6 @@ library ValidationLogic {
|
||||||
IERC20(reserve.variableDebtTokenAddress).totalSupply() == 0,
|
IERC20(reserve.variableDebtTokenAddress).totalSupply() == 0,
|
||||||
Errors.RL_VARIABLE_DEBT_SUPPLY_NOT_ZERO
|
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