mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge pull request #241 from aave/fix/permissioned-market-gateway-fix
Fix PermissionedWethGateway to work for all market users
This commit is contained in:
commit
40d008acc9
|
@ -38,7 +38,7 @@ contract PermissionedWETHGateway is WETHGateway {
|
|||
ILendingPool pool = ILendingPool(lendingPool);
|
||||
|
||||
require(
|
||||
_isInRoleAndValidPermissionAdmin(msg.sender, DataTypes.Roles.DEPOSITOR, pool),
|
||||
_isInRoleAndValidPermissionAdmin(onBehalfOf, DataTypes.Roles.DEPOSITOR, pool),
|
||||
Errors.PLP_USER_UNAUTHORIZED
|
||||
);
|
||||
|
||||
|
@ -60,7 +60,7 @@ contract PermissionedWETHGateway is WETHGateway {
|
|||
) public payable override {
|
||||
ILendingPool pool = ILendingPool(lendingPool);
|
||||
|
||||
require(_isInRole(msg.sender, DataTypes.Roles.BORROWER, pool), Errors.PLP_USER_UNAUTHORIZED);
|
||||
require(_isInRole(onBehalfOf, DataTypes.Roles.BORROWER, pool), Errors.PLP_USER_UNAUTHORIZED);
|
||||
super.repayETH(lendingPool, amount, rateMode, onBehalfOf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user