mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
fix: Fix PermissionedWethGateway to work for all market users
This commit is contained in:
parent
e43e046d62
commit
1551a986c9
|
@ -38,7 +38,7 @@ contract PermissionedWETHGateway is WETHGateway {
|
||||||
ILendingPool pool = ILendingPool(lendingPool);
|
ILendingPool pool = ILendingPool(lendingPool);
|
||||||
|
|
||||||
require(
|
require(
|
||||||
_isInRoleAndValidPermissionAdmin(msg.sender, DataTypes.Roles.DEPOSITOR, pool),
|
_isInRoleAndValidPermissionAdmin(onBehalfOf, DataTypes.Roles.DEPOSITOR, pool),
|
||||||
Errors.PLP_USER_UNAUTHORIZED
|
Errors.PLP_USER_UNAUTHORIZED
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ contract PermissionedWETHGateway is WETHGateway {
|
||||||
) public payable override {
|
) public payable override {
|
||||||
ILendingPool pool = ILendingPool(lendingPool);
|
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);
|
super.repayETH(lendingPool, amount, rateMode, onBehalfOf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user