diff --git a/contracts/protocol/libraries/helpers/Errors.sol b/contracts/protocol/libraries/helpers/Errors.sol index 2d7979a96..c6ceaf02d 100644 --- a/contracts/protocol/libraries/helpers/Errors.sol +++ b/contracts/protocol/libraries/helpers/Errors.sol @@ -49,7 +49,7 @@ library Errors { string public constant NO_DEBT_OF_SELECTED_TYPE = '40'; // 'For repayment of a specific type of debt, the user needs to have debt that type' string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '41'; // 'To repay on behalf of a user an explicit amount to repay is needed' string public constant NO_STABLE_RATE_LOAN_IN_RESERVE = '42'; // 'User does not have a stable rate loan in progress on this reserve' - string public constant NO_VARIABLE_RATE_LOAN_IN_RESERVE = '43'; // 'User does not have a variable rate loan in progress on this reserve' + string public constant NO_VARIABLE_RATE_DEBT = '43'; // 'User does not have variable rate debt in progress on this reserve' string public constant UNDERLYING_BALANCE_ZERO = '44'; // 'The underlying balance needs to be greater than 0' string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '45'; // 'Interest rate rebalance conditions were not met' string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '46'; // 'Health factor is not below the threshold' diff --git a/contracts/protocol/libraries/logic/ValidationLogic.sol b/contracts/protocol/libraries/logic/ValidationLogic.sol index 02f28e00f..297d3f26b 100644 --- a/contracts/protocol/libraries/logic/ValidationLogic.sol +++ b/contracts/protocol/libraries/logic/ValidationLogic.sol @@ -354,7 +354,7 @@ library ValidationLogic { if (currentRateMode == DataTypes.InterestRateMode.STABLE) { require(stableDebt > 0, Errors.NO_STABLE_RATE_LOAN_IN_RESERVE); } else if (currentRateMode == DataTypes.InterestRateMode.VARIABLE) { - require(variableDebt > 0, Errors.NO_VARIABLE_RATE_LOAN_IN_RESERVE); + require(variableDebt > 0, Errors.NO_VARIABLE_RATE_DEBT); /** * user wants to swap to stable, before swapping we need to ensure that * 1. stable borrow rate is enabled on the reserve diff --git a/helpers/types.ts b/helpers/types.ts index b8b349c51..756e96632 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -113,7 +113,7 @@ export enum ProtocolErrors { NO_DEBT_OF_SELECTED_TYPE = '40', // 'For repayment of a specific type of debt, the user needs to have debt that type' NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = '41', // 'To repay on behalf of a user an explicit amount to repay is needed' NO_STABLE_RATE_LOAN_IN_RESERVE = '42', // 'User does not have a stable rate loan in progress on this reserve' - NO_VARIABLE_RATE_LOAN_IN_RESERVE = '43', // 'User does not have a variable rate loan in progress on this reserve' + NO_VARIABLE_RATE_DEBT = '43', // 'User does not have a variable rate loan in progress on this reserve' UNDERLYING_BALANCE_ZERO = '44', // 'The underlying balance needs to be greater than 0' INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = '45', // 'Interest rate rebalance conditions were not met' HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '46', // 'Health factor is not below the threshold'