mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
added correct call to get total stable debt
This commit is contained in:
parent
7a8ed00909
commit
c74dbb0503
|
@ -72,9 +72,17 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
|
|||
reserveData.availableLiquidity = IERC20Detailed(reserveData.underlyingAsset).balanceOf(
|
||||
reserveData.baseData.aTokenAddress
|
||||
);
|
||||
reserveData.totalStableDebt = IERC20Detailed(reserveData.baseData.stableDebtTokenAddress)
|
||||
.totalSupply();
|
||||
reserveData.totalVariableDebt = IERC20Detailed(reserveData.baseData.variableDebtTokenAddress)
|
||||
(, reserveData.totalStableDebt, ) = IStableDebtToken(
|
||||
reserveData
|
||||
.baseData
|
||||
.stableDebtTokenAddress
|
||||
)
|
||||
.getSupplyData();
|
||||
reserveData.totalVariableDebt = IVariableDebtToken(
|
||||
reserveData
|
||||
.baseData
|
||||
.variableDebtTokenAddress
|
||||
)
|
||||
.totalSupply();
|
||||
uint256 totalBorrows = reserveData.totalStableDebt + reserveData.totalVariableDebt;
|
||||
reserveData.utilizationRate = totalBorrows == 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user