diff --git a/contracts/libraries/GenericLogic.sol b/contracts/libraries/GenericLogic.sol index db18ddda..a25d7805 100644 --- a/contracts/libraries/GenericLogic.sol +++ b/contracts/libraries/GenericLogic.sol @@ -128,7 +128,6 @@ library GenericLogic { uint256 avgLtv; uint256 avgLiquidationThreshold; uint256 reservesLength; - UserConfiguration.Map userConfig; bool healthFactorBelowThreshold; address currentReserveAddress; bool usageAsCollateralEnabled; @@ -141,7 +140,10 @@ library GenericLogic { * the average Loan To Value, the average Liquidation Ratio, and the Health factor. * @param _user the address of the user * @param _reservesData data of all the reserves - * @return the total liquidity, total collateral, total borrow balances of the user in ETH. + * @param _userConfig the configuration of the user + * @param _reserves the list of the available reserves + * @param _oracle the price oracle address + * @return the total collateral and total borrow balance of the user in ETH, the avg ltv and liquidation threshold and the HF * also the average Ltv, liquidation threshold, and the health factor **/ function calculateUserAccountData( diff --git a/contracts/libraries/ValidationLogic.sol b/contracts/libraries/ValidationLogic.sol index 5710fb77..acc109e6 100644 --- a/contracts/libraries/ValidationLogic.sol +++ b/contracts/libraries/ValidationLogic.sol @@ -301,12 +301,15 @@ library ValidationLogic { * @param _reserve the state of the reserve that the user is enabling or disabling as collateral * @param _reserveAddress the address of the reserve * @param _reservesData the data of all the reserves + * @param _userConfig the state of the user for the specific reserve + * @param _reserves the addresses of all the active reserves + * @param _oracle the price oracle */ function validateSetUseReserveAsCollateral( ReserveLogic.ReserveData storage _reserve, address _reserveAddress, mapping(address => ReserveLogic.ReserveData) storage _reservesData, - UserConfiguration.Map storage userConfig, + UserConfiguration.Map storage _userConfig, address[] calldata _reserves, address _oracle ) external view { @@ -320,7 +323,7 @@ library ValidationLogic { msg.sender, underlyingBalance, _reservesData, - userConfig, + _userConfig, _reserves, _oracle ),