diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index 849fb49d..4c70ca88 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -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(); diff --git a/contracts/libraries/helpers/Errors.sol b/contracts/libraries/helpers/Errors.sol index a0a65762..2b173fff 100644 --- a/contracts/libraries/helpers/Errors.sol +++ b/contracts/libraries/helpers/Errors.sol @@ -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'; diff --git a/helpers/types.ts b/helpers/types.ts index f10938d2..80f3846d 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -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', diff --git a/test/flashloan.spec.ts b/test/flashloan.spec.ts index 387a091a..887479a8 100644 --- a/test/flashloan.spec.ts +++ b/test/flashloan.spec.ts @@ -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 () => {