feat: added v3 fields so interfaces are the same

This commit is contained in:
sendra 2021-11-10 12:49:05 +01:00
parent af835f5fd1
commit 4245bf57d6
2 changed files with 20 additions and 3 deletions

View File

@ -165,7 +165,7 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
external
view
override
returns (UserReserveData[] memory)
returns (UserReserveData[] memory, uint8)
{
ILendingPool lendingPool = ILendingPool(provider.getLendingPool());
address[] memory reserves = lendingPool.getReservesList();
@ -201,7 +201,8 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
}
}
return (userReservesData);
// Return 0 to be compatible with v3 userEmodeCategoryId return
return (userReservesData, 0);
}
function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) {

View File

@ -41,6 +41,22 @@ interface IUiPoolDataProvider {
uint256 variableRateSlope2;
uint256 stableRateSlope1;
uint256 stableRateSlope2;
// v3
uint128 accruedToTreasury;
uint128 unbacked;
uint128 isolationModeTotalDebt;
//
uint256 debtCeiling;
uint256 debtCeilingDecimals;
uint8 eModeCategoryId;
uint256 borrowCap;
uint256 supplyCap;
// eMode
uint16 eModeLtv;
uint16 eModeLiquidationThreshold;
uint16 eModeLiquidationBonus;
address eModePriceSource;
string eModeLabel;
}
struct UserReserveData {
@ -77,6 +93,6 @@ interface IUiPoolDataProvider {
external
view
returns (
UserReserveData[] memory
UserReserveData[] memory, uint8
);
}