mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
revert: Revert control access of transfer back to LendingPool contract
This commit is contained in:
parent
10c4cbac80
commit
992e026075
|
@ -718,6 +718,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
|||
uint256 balanceFromBefore,
|
||||
uint256 balanceToBefore
|
||||
) external override whenNotPaused {
|
||||
require(msg.sender == _reserves[asset].aTokenAddress, Errors.LP_CALLER_MUST_BE_AN_ATOKEN);
|
||||
|
||||
ValidationLogic.validateTransfer(_reserves[asset]);
|
||||
|
||||
uint256 reserveId = _reserves[asset].id;
|
||||
|
|
|
@ -86,7 +86,7 @@ library Errors {
|
|||
string public constant LP_FAILED_COLLATERAL_SWAP = '60';
|
||||
string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61';
|
||||
string public constant LP_REENTRANCY_NOT_ALLOWED = '62';
|
||||
string public constant VL_CALLER_MUST_BE_AN_ATOKEN = '63';
|
||||
string public constant LP_CALLER_MUST_BE_AN_ATOKEN = '63';
|
||||
string public constant LP_IS_PAUSED = '64'; // 'Pool is paused'
|
||||
string public constant LP_NO_MORE_RESERVES_ALLOWED = '65';
|
||||
string public constant LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '66';
|
||||
|
|
|
@ -475,7 +475,6 @@ library ValidationLogic {
|
|||
* @param reserve The reserve object
|
||||
*/
|
||||
function validateTransfer(DataTypes.ReserveData storage reserve) internal view {
|
||||
require(msg.sender == reserve.aTokenAddress, Errors.VL_CALLER_MUST_BE_AN_ATOKEN);
|
||||
require(!reserve.configuration.getPaused(), Errors.VL_RESERVE_PAUSED);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ export enum ProtocolErrors {
|
|||
LP_FAILED_COLLATERAL_SWAP = '60',
|
||||
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61',
|
||||
LP_REENTRANCY_NOT_ALLOWED = '62',
|
||||
VL_CALLER_MUST_BE_AN_ATOKEN = '63',
|
||||
LP_CALLER_MUST_BE_AN_ATOKEN = '63',
|
||||
LP_IS_PAUSED = '64', // 'Pool is paused'
|
||||
LP_NO_MORE_RESERVES_ALLOWED = '65',
|
||||
LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '66',
|
||||
|
|
Loading…
Reference in New Issue
Block a user