mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
refactor: changed params names, removed redundant event
This commit is contained in:
parent
93d3e9de86
commit
7acbd2925b
|
@ -113,16 +113,6 @@ interface ILendingPool {
|
||||||
uint16 referralCode
|
uint16 referralCode
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* @dev Emitted when the pause is triggered.
|
|
||||||
*/
|
|
||||||
event Paused();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dev Emitted when the pause is lifted.
|
|
||||||
*/
|
|
||||||
event Unpaused();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via
|
* @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via
|
||||||
* LendingPoolCollateral manager using a DELEGATECALL
|
* LendingPoolCollateral manager using a DELEGATECALL
|
||||||
|
|
|
@ -685,13 +685,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
||||||
}
|
}
|
||||||
|
|
||||||
///@inheritdoc ILendingPool
|
///@inheritdoc ILendingPool
|
||||||
function setPause(bool val) external override onlyLendingPoolConfigurator {
|
function setPause(bool paused) external override onlyLendingPoolConfigurator {
|
||||||
_paused = val;
|
_paused = paused;
|
||||||
if (_paused) {
|
|
||||||
emit Paused();
|
|
||||||
} else {
|
|
||||||
emit Unpaused();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///@inheritdoc ILendingPool
|
///@inheritdoc ILendingPool
|
||||||
|
|
|
@ -407,14 +407,14 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @inheritdoc ILendingPoolConfigurator
|
/// @inheritdoc ILendingPoolConfigurator
|
||||||
function setReservePause(address asset, bool val) public override onlyEmergencyOrPoolAdmin {
|
function setReservePause(address asset, bool paused) public override onlyEmergencyOrPoolAdmin {
|
||||||
DataTypes.ReserveConfigurationMap memory currentConfig = _pool.getConfiguration(asset);
|
DataTypes.ReserveConfigurationMap memory currentConfig = _pool.getConfiguration(asset);
|
||||||
|
|
||||||
currentConfig.setPaused(val);
|
currentConfig.setPaused(paused);
|
||||||
|
|
||||||
_pool.setConfiguration(asset, currentConfig.data);
|
_pool.setConfiguration(asset, currentConfig.data);
|
||||||
|
|
||||||
if (val) {
|
if (paused) {
|
||||||
emit ReservePaused(asset);
|
emit ReservePaused(asset);
|
||||||
} else {
|
} else {
|
||||||
emit ReserveUnpaused(asset);
|
emit ReserveUnpaused(asset);
|
||||||
|
@ -484,11 +484,11 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @inheritdoc ILendingPoolConfigurator
|
/// @inheritdoc ILendingPoolConfigurator
|
||||||
function setPoolPause(bool val) external override onlyEmergencyAdmin {
|
function setPoolPause(bool paused) external override onlyEmergencyAdmin {
|
||||||
address[] memory reserves = _pool.getReservesList();
|
address[] memory reserves = _pool.getReservesList();
|
||||||
|
|
||||||
for (uint256 i = 0; i < reserves.length; i++) {
|
for (uint256 i = 0; i < reserves.length; i++) {
|
||||||
setReservePause(reserves[i], val);
|
setReservePause(reserves[i], paused);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,6 @@ makeSuite('Mint to treasury', (testEnv: TestEnv) => {
|
||||||
|
|
||||||
const { accruedToTreasury } = await pool.getReserveData(dai.address);
|
const { accruedToTreasury } = await pool.getReserveData(dai.address);
|
||||||
|
|
||||||
console.log("Accrued to treasury ", accruedToTreasury.toString());
|
|
||||||
|
|
||||||
expect(accruedToTreasury.toString()).to.be.bignumber.almostEqual(
|
expect(accruedToTreasury.toString()).to.be.bignumber.almostEqual(
|
||||||
expectedAccruedToTreasury,
|
expectedAccruedToTreasury,
|
||||||
'Invalid amount accrued to the treasury'
|
'Invalid amount accrued to the treasury'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user