diff --git a/contracts/protocols/aave_v2.sol b/contracts/protocols/aave_v2.sol index 75fbcfa..c480c12 100644 --- a/contracts/protocols/aave_v2.sol +++ b/contracts/protocols/aave_v2.sol @@ -176,6 +176,9 @@ contract AaveHelpers is DSMath { bool stableBorrowEnabled; bool isActive; bool isFrozen; + uint availableLiquidity; + uint totalStableDebt; + uint totalVariableDebt; } struct TokenPrice { @@ -221,6 +224,8 @@ contract AaveHelpers is DSMath { uint tokenPriceInEth, uint tokenPriceInUsd ) internal view returns(AaveUserTokenData memory tokenData) { + AaveTokenData memory aaveTokenData = collateralData(aaveData, token); + ( tokenData.supplyBalance, tokenData.stableBorrowBalance, @@ -230,15 +235,15 @@ contract AaveHelpers is DSMath { ) = aaveData.getUserReserveData(token, user); ( - ,,, + aaveTokenData.availableLiquidity, + aaveTokenData.totalStableDebt, + aaveTokenData.totalVariableDebt, tokenData.supplyRate, tokenData.variableBorrowRate, tokenData.stableBorrowRate, ,,, ) = aaveData.getReserveData(token); - AaveTokenData memory aaveTokenData = collateralData(aaveData, token); - tokenData.tokenPriceInEth = tokenPriceInEth; tokenData.tokenPriceInUsd = tokenPriceInUsd; tokenData.aaveTokenData = aaveTokenData; @@ -295,5 +300,5 @@ contract Resolver is AaveHelpers { } contract InstaAaveV2Resolver is Resolver { - string public constant name = "AaveV2-Resolver-v1.2"; -} \ No newline at end of file + string public constant name = "AaveV2-Resolver-v1.3"; +}