naming changed to IncentivesUserData

This commit is contained in:
sendra 2021-03-30 13:19:47 +02:00
parent 516cbc7349
commit 5ba17aa1c1
2 changed files with 10 additions and 10 deletions

View File

@ -59,7 +59,7 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
AggregatedReserveData[] memory, AggregatedReserveData[] memory,
UserReserveData[] memory, UserReserveData[] memory,
uint256, uint256,
IncentivesDataUser memory IncentivesUserData memory
) )
{ {
ILendingPool lendingPool = ILendingPool(provider.getLendingPool()); ILendingPool lendingPool = ILendingPool(provider.getLendingPool());
@ -194,21 +194,21 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
} }
} }
IncentivesDataUser memory incentivesDataUser; IncentivesUserData memory incentivesUserData;
if (user != address(0)) { if (user != address(0)) {
incentivesDataUser.userUnclaimedRewards = incentivesController.getUserUnclaimedRewards(user); incentivesUserData.userUnclaimedRewards = incentivesController.getUserUnclaimedRewards(user);
incentivesDataUser.rewardToken = incentivesController.REWARD_TOKEN(); incentivesUserData.rewardToken = incentivesController.REWARD_TOKEN();
incentivesDataUser.precision = incentivesController.PRECISION(); incentivesUserData.precision = incentivesController.PRECISION();
incentivesDataUser.rewardTokenDecimals = IERC20Detailed(incentivesDataUser.rewardToken) incentivesUserData.rewardTokenDecimals = IERC20Detailed(incentivesUserData.rewardToken)
.decimals(); .decimals();
incentivesDataUser.rewardTokenPriceEth = oracle.getAssetPrice(incentivesDataUser.rewardToken); incentivesUserData.rewardTokenPriceEth = oracle.getAssetPrice(incentivesUserData.rewardToken);
} }
return ( return (
reservesData, reservesData,
userReservesData, userReservesData,
oracle.getAssetPrice(MOCK_USD_ADDRESS), oracle.getAssetPrice(MOCK_USD_ADDRESS),
incentivesDataUser incentivesUserData
); );
} }
} }

View File

@ -54,7 +54,7 @@ interface IUiPoolDataProvider {
uint256 sTokenIncentivesIndex; uint256 sTokenIncentivesIndex;
} }
struct IncentivesDataUser { struct IncentivesUserData {
address rewardToken; address rewardToken;
uint256 userUnclaimedRewards; uint256 userUnclaimedRewards;
uint256 rewardTokenDecimals; uint256 rewardTokenDecimals;
@ -83,6 +83,6 @@ interface IUiPoolDataProvider {
AggregatedReserveData[] memory, AggregatedReserveData[] memory,
UserReserveData[] memory, UserReserveData[] memory,
uint256, uint256,
IncentivesDataUser memory IncentivesUserData memory
); );
} }