mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
- Added extra natspecs
This commit is contained in:
parent
9d757aaa37
commit
6d96be5f42
|
@ -157,9 +157,16 @@ interface ILendingPool {
|
|||
**/
|
||||
function withdraw(address reserve, uint256 amount) external;
|
||||
|
||||
/**
|
||||
* @dev Sets allowance to borrow on a certain type of debt asset for a certain user address
|
||||
* @param asset The underlying asset of the debt token
|
||||
* @param user The user to give allowance to
|
||||
* @param interestRateMode Type of debt: 1 for stable, 2 for variable
|
||||
* @param amount Allowance amount to borrow
|
||||
**/
|
||||
function delegateBorrowAllowance(
|
||||
address user,
|
||||
address asset,
|
||||
address user,
|
||||
uint256 interestRateMode,
|
||||
uint256 amount
|
||||
) external;
|
||||
|
|
|
@ -171,9 +171,16 @@ contract LendingPool is VersionedInitializable, ILendingPool {
|
|||
_borrowAllowance[_reserves[asset].getDebtTokenAddress(interestRateMode)][fromUser][toUser];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Sets allowance to borrow on a certain type of debt asset for a certain user address
|
||||
* @param asset The underlying asset of the debt token
|
||||
* @param user The user to give allowance to
|
||||
* @param interestRateMode Type of debt: 1 for stable, 2 for variable
|
||||
* @param amount Allowance amount to borrow
|
||||
**/
|
||||
function delegateBorrowAllowance(
|
||||
address user,
|
||||
address asset,
|
||||
address user,
|
||||
uint256 interestRateMode,
|
||||
uint256 amount
|
||||
) external override {
|
||||
|
|
|
@ -295,7 +295,7 @@ export const delegateBorrowAllowance = async (
|
|||
|
||||
const delegateAllowancePromise = pool
|
||||
.connect(user.signer)
|
||||
.delegateBorrowAllowance(receiver, reserve, interestRateMode, amountToDelegate.toString());
|
||||
.delegateBorrowAllowance(reserve, receiver, interestRateMode, amountToDelegate.toString());
|
||||
if (expectedResult === 'revert') {
|
||||
await expect(delegateAllowancePromise, revertMessage).to.be.reverted;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user