added correct call to get total stable debt

This commit is contained in:
pol 2020-11-02 12:16:10 +01:00
parent 7a8ed00909
commit c74dbb0503

View File

@ -72,9 +72,17 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
reserveData.availableLiquidity = IERC20Detailed(reserveData.underlyingAsset).balanceOf( reserveData.availableLiquidity = IERC20Detailed(reserveData.underlyingAsset).balanceOf(
reserveData.baseData.aTokenAddress reserveData.baseData.aTokenAddress
); );
reserveData.totalStableDebt = IERC20Detailed(reserveData.baseData.stableDebtTokenAddress) (, reserveData.totalStableDebt, ) = IStableDebtToken(
.totalSupply(); reserveData
reserveData.totalVariableDebt = IERC20Detailed(reserveData.baseData.variableDebtTokenAddress) .baseData
.stableDebtTokenAddress
)
.getSupplyData();
reserveData.totalVariableDebt = IVariableDebtToken(
reserveData
.baseData
.variableDebtTokenAddress
)
.totalSupply(); .totalSupply();
uint256 totalBorrows = reserveData.totalStableDebt + reserveData.totalVariableDebt; uint256 totalBorrows = reserveData.totalStableDebt + reserveData.totalVariableDebt;
reserveData.utilizationRate = totalBorrows == 0 reserveData.utilizationRate = totalBorrows == 0