Save some extra codesize.

This commit is contained in:
David Racero 2020-09-15 14:21:17 +02:00
parent 80d09848b3
commit 38bec0b8de
4 changed files with 3 additions and 5 deletions

View File

@ -993,9 +993,7 @@ contract LendingPool is VersionedInitializable, ILendingPool {
address user,
uint256 amount
) external override view returns (bool) {
if (_paused) {
return false;
}
whenNotPaused();
return
GenericLogic.balanceDecreaseAllowed(
asset,

View File

@ -585,6 +585,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
/**
* @dev pauses or unpauses LendingPool actions
* @param val the boolean value to set the current pause state of LendingPool
**/
function setPoolPause(bool val) external onlyLendingPoolManager {
pool.setPause(val);

View File

@ -3,7 +3,6 @@ pragma solidity ^0.6.8;
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {Pausable} from '@openzeppelin/contracts/utils/Pausable.sol';
import {
VersionedInitializable
} from '../libraries/openzeppelin-upgradeability/VersionedInitializable.sol';

View File

@ -44,7 +44,7 @@ makeSuite('Pausable Pool', (testEnv: TestEnv) => {
// User 0 tries the transfer to User 1
await expect(
aDai.connect(users[0].signer).transfer(users[1].address, amountDAItoDeposit)
).to.revertedWith(TRANSFER_NOT_ALLOWED);
).to.revertedWith(IS_PAUSED);
const pausedFromBalance = await aDai.balanceOf(users[0].address);
const pausedToBalance = await aDai.balanceOf(users[1].address);