mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed sintax errors
This commit is contained in:
parent
714c2ff3fd
commit
07007fa933
|
@ -133,7 +133,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
||||||
if (vars.healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD) {
|
if (vars.healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD) {
|
||||||
return (
|
return (
|
||||||
uint256(LiquidationErrors.HEALTH_FACTOR_ABOVE_THRESHOLD),
|
uint256(LiquidationErrors.HEALTH_FACTOR_ABOVE_THRESHOLD),
|
||||||
Errors.HEALTH_FACTOR_NOT_BELLOW_THRESHOLD
|
Errors.HEALTH_FACTOR_NOT_BELOW_THRESHOLD
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ library Errors {
|
||||||
string public constant PROVIDER_NOT_REGISTERED = '37'; // 'Provider is not registered'
|
string public constant PROVIDER_NOT_REGISTERED = '37'; // 'Provider is not registered'
|
||||||
|
|
||||||
//return error messages - LendingPoolLiquidationManager
|
//return error messages - LendingPoolLiquidationManager
|
||||||
string public constant HEALTH_FACTOR_NOT_BELLOW_THRESHOLD = '38'; // 'Health factor is not below the threshold'
|
string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38'; // 'Health factor is not below the threshold'
|
||||||
string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '39'; // 'The collateral chosen cannot be liquidated'
|
string public constant COLLATERAL_CANNOT_BE_LIQUIDATED = '39'; // 'The collateral chosen cannot be liquidated'
|
||||||
string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40'; // 'User did not borrow the specified currency'
|
string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40'; // 'User did not borrow the specified currency'
|
||||||
string public constant NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41'; // "There isn't enough liquidity available to liquidate"
|
string public constant NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41'; // "There isn't enough liquidity available to liquidate"
|
||||||
|
|
|
@ -94,7 +94,7 @@ export enum ProtocolErrors {
|
||||||
PROVIDER_NOT_REGISTERED = '37', // 'Provider is not registered'
|
PROVIDER_NOT_REGISTERED = '37', // 'Provider is not registered'
|
||||||
|
|
||||||
//return error messages - LendingPoolLiquidationManager
|
//return error messages - LendingPoolLiquidationManager
|
||||||
HEALTH_FACTOR_NOT_BELLOW_THRESHOLD = '38', // 'Health factor is not below the threshold'
|
HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38', // 'Health factor is not below the threshold'
|
||||||
COLLATERAL_CANNOT_BE_LIQUIDATED = '39', // 'The collateral chosen cannot be liquidated'
|
COLLATERAL_CANNOT_BE_LIQUIDATED = '39', // 'The collateral chosen cannot be liquidated'
|
||||||
SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40', // 'User did not borrow the specified currency'
|
SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40', // 'User did not borrow the specified currency'
|
||||||
NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41', // "There isn't enough liquidity available to liquidate"
|
NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41', // "There isn't enough liquidity available to liquidate"
|
||||||
|
|
|
@ -13,7 +13,7 @@ const {expect} = chai;
|
||||||
|
|
||||||
makeSuite('LendingPool liquidation - liquidator receiving aToken', (testEnv) => {
|
makeSuite('LendingPool liquidation - liquidator receiving aToken', (testEnv) => {
|
||||||
const {
|
const {
|
||||||
HEALTH_FACTOR_NOT_BELLOW_THRESHOLD,
|
HEALTH_FACTOR_NOT_BELOW_THRESHOLD,
|
||||||
INVALID_HF,
|
INVALID_HF,
|
||||||
SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER,
|
SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER,
|
||||||
COLLATERAL_CANNOT_BE_LIQUIDATED,
|
COLLATERAL_CANNOT_BE_LIQUIDATED,
|
||||||
|
@ -71,7 +71,7 @@ makeSuite('LendingPool liquidation - liquidator receiving aToken', (testEnv) =>
|
||||||
//someone tries to liquidate user 2
|
//someone tries to liquidate user 2
|
||||||
await expect(
|
await expect(
|
||||||
pool.liquidationCall(weth.address, dai.address, borrower.address, 1, true)
|
pool.liquidationCall(weth.address, dai.address, borrower.address, 1, true)
|
||||||
).to.be.revertedWith(HEALTH_FACTOR_NOT_BELLOW_THRESHOLD);
|
).to.be.revertedWith(HEALTH_FACTOR_NOT_BELOW_THRESHOLD);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('LIQUIDATION - Drop the health factor below 1', async () => {
|
it('LIQUIDATION - Drop the health factor below 1', async () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user