From 505ccf0cd4b653606874273dcfee3f57d7c7ed1f Mon Sep 17 00:00:00 2001 From: Mubaris NK Date: Wed, 9 Dec 2020 17:01:11 +0530 Subject: [PATCH] Add collateral enabled flag --- contracts/protocols/aave.sol | 3 +++ contracts/protocols/aave_v2.sol | 2 ++ 2 files changed, 5 insertions(+) diff --git a/contracts/protocols/aave.sol b/contracts/protocols/aave.sol index 8d79a1d..c6e530e 100644 --- a/contracts/protocols/aave.sol +++ b/contracts/protocols/aave.sol @@ -125,6 +125,7 @@ contract AaveHelpers is DSMath { uint supplyRate; uint borrowRate; uint borrowModal; + bool isCollateral; AaveTokenData aaveTokenData; } @@ -200,6 +201,7 @@ contract AaveHelpers is DSMath { , uint fee, ,, + bool isCollateral ) = aave.getUserReserveData(token, user); uint supplyRate = aaveCore.getReserveCurrentLiquidityRate(token); @@ -215,6 +217,7 @@ contract AaveHelpers is DSMath { supplyRate, borrowRate, borrowModal, + isCollateral, aaveTokenData ); } diff --git a/contracts/protocols/aave_v2.sol b/contracts/protocols/aave_v2.sol index 42f9388..57f3fa8 100644 --- a/contracts/protocols/aave_v2.sol +++ b/contracts/protocols/aave_v2.sol @@ -153,6 +153,7 @@ contract AaveHelpers is DSMath { uint supplyRate; uint stableBorrowRate; uint variableBorrowRate; + bool isCollateral; AaveTokenData aaveTokenData; } @@ -225,6 +226,7 @@ contract AaveHelpers is DSMath { tokenData.stableBorrowBalance, tokenData.variableBorrowBalance, ,,,,, + tokenData.isCollateral ) = aaveData.getUserReserveData(token, user); (