diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol index 75f0fc6a..7c9bfe1d 100644 --- a/contracts/interfaces/ILendingPool.sol +++ b/contracts/interfaces/ILendingPool.sol @@ -387,6 +387,4 @@ interface ILendingPool { function pause() external; function unpause() external; - - function paused() external view returns (bool); } diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index d623c0d3..e1b9110e 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -888,6 +888,9 @@ contract LendingPool is VersionedInitializable, PausablePool, ILendingPool { address user, uint256 amount ) external override view returns (bool) { + if (PausablePool.paused()) { + return false; + } return GenericLogic.balanceDecreaseAllowed( asset, @@ -927,11 +930,4 @@ contract LendingPool is VersionedInitializable, PausablePool, ILendingPool { function unpause() external override onlyLendingPoolConfigurator { PausablePool._unpause(); } - - /** - * @dev retrieve pause status - */ - function paused() public override(PausablePool, ILendingPool) view returns (bool) { - return PausablePool.paused(); - } } diff --git a/contracts/misc/PausablePool.sol b/contracts/misc/PausablePool.sol index 87978f19..af354c86 100644 --- a/contracts/misc/PausablePool.sol +++ b/contracts/misc/PausablePool.sol @@ -1,4 +1,6 @@ -pragma solidity ^0.6.0; +pragma solidity ^0.6.8; + +// import {Errors} from '../libraries/helpers/Errors.sol'; /** * @dev Contract module which allows children to implement an emergency stop @@ -44,6 +46,7 @@ contract PausablePool { * - The contract must not be paused. */ modifier whenNotPaused() { + // require(!_paused, Errors.IS_PAUSED); require(!_paused, '54'); _; } @@ -56,6 +59,7 @@ contract PausablePool { * - The contract must be paused. */ modifier whenPaused() { + // require(_paused, Errors.NOT_PAUSED); require(_paused, '55'); _; } diff --git a/contracts/tokenization/AToken.sol b/contracts/tokenization/AToken.sol index c97e5666..4ff77739 100644 --- a/contracts/tokenization/AToken.sol +++ b/contracts/tokenization/AToken.sol @@ -160,7 +160,7 @@ contract AToken is VersionedInitializable, ERC20, IAToken { * @return true if the user can transfer amount, false otherwise **/ function isTransferAllowed(address user, uint256 amount) public override view returns (bool) { - return !POOL.paused() && POOL.balanceDecreaseAllowed(UNDERLYING_ASSET_ADDRESS, user, amount); + return POOL.balanceDecreaseAllowed(UNDERLYING_ASSET_ADDRESS, user, amount); } /**