mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Renamed error
This commit is contained in:
parent
f513ebee37
commit
54bae079c9
|
@ -903,7 +903,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
|||
|
||||
_borrowAllowance[debtToken][vars.onBehalfOf][msg.sender] = _borrowAllowance[debtToken][vars
|
||||
.onBehalfOf][msg.sender]
|
||||
.sub(vars.amount, Errors.LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH);
|
||||
.sub(vars.amount, Errors.LP_BORROW_ALLOWANCE_NOT_ENOUGH);
|
||||
}
|
||||
|
||||
reserve.updateState();
|
||||
|
|
|
@ -79,7 +79,7 @@ library Errors {
|
|||
string public constant AT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint
|
||||
string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '57';
|
||||
string public constant AT_INVALID_BURN_AMOUNT = '58'; //invalid amount to burn
|
||||
string public constant LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH = '59'; // User borrows on behalf, but allowance are too small
|
||||
string public constant LP_BORROW_ALLOWANCE_NOT_ENOUGH = '59'; // User borrows on behalf, but allowance are too small
|
||||
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';
|
||||
|
|
|
@ -135,7 +135,7 @@ export enum ProtocolErrors {
|
|||
AT_INVALID_MINT_AMOUNT = '56', //invalid amount to mint
|
||||
LP_FAILED_REPAY_WITH_COLLATERAL = '57',
|
||||
AT_INVALID_BURN_AMOUNT = '58', //invalid amount to burn
|
||||
LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH = '59', // User borrows on behalf, but allowance are too small
|
||||
LP_BORROW_ALLOWANCE_NOT_ENOUGH = '59', // User borrows on behalf, but allowance are too small
|
||||
LP_FAILED_COLLATERAL_SWAP = '60',
|
||||
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61',
|
||||
LP_REENTRANCY_NOT_ALLOWED = '62',
|
||||
|
|
|
@ -24,7 +24,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
|
|||
LP_INVALID_FLASHLOAN_MODE,
|
||||
SAFEERC20_LOWLEVEL_CALL,
|
||||
LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN,
|
||||
LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH,
|
||||
LP_BORROW_ALLOWANCE_NOT_ENOUGH,
|
||||
} = ProtocolErrors;
|
||||
|
||||
before(async () => {
|
||||
|
@ -443,7 +443,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
|
|||
'0x10',
|
||||
'0'
|
||||
)
|
||||
).to.be.revertedWith(LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH);
|
||||
).to.be.revertedWith(LP_BORROW_ALLOWANCE_NOT_ENOUGH);
|
||||
});
|
||||
|
||||
it('Caller takes a WETH flashloan with mode = 1 onBehalfOf user with allowance. A loan for onBehalfOf is creatd.', async () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user