File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ interface IAaveIncentivesController {
1313
1414 function PRECISION () external view returns (uint8 );
1515
16+ function DISTRIBUTION_END () external view returns (uint256 );
17+
1618 function assets (address underlying ) external view returns (AssetData memory assets );
1719
1820 function handleAction (
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
5959 AggregatedReserveData[] memory ,
6060 UserReserveData[] memory ,
6161 uint256 ,
62- uint256
62+ IncentivesControllerData memory
6363 )
6464 {
6565 ILendingPool lendingPool = ILendingPool (provider.getLendingPool ());
@@ -194,11 +194,20 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
194194 }
195195 }
196196
197+
198+ IncentivesControllerData memory incentivesControllerData;
199+ incentivesControllerData.userUnclaimedRewards = incentivesController.getUserUnclaimedRewards (user);
200+ // incentivesControllerData.rewardToken = incentivesController.REWARD_TOKEN();
201+ // incentivesControllerData.rewardTokenDecimals = IERC20Detailed(incentivesControllerData.rewardToken).decimals();
202+ // incentivesControllerData.rewardTokenSymbol = IERC20Detailed(incentivesControllerData.rewardToken).symbol();
203+ // incentivesControllerData.precision = incentivesController.PRECISION();
204+ incentivesControllerData.emissionEndTimestamp = incentivesController.DISTRIBUTION_END ();
205+
197206 return (
198207 reservesData,
199208 userReservesData,
200209 oracle.getAssetPrice (MOCK_USD_ADDRESS),
201- incentivesController. getUserUnclaimedRewards (user)
210+ incentivesControllerData
202211 );
203212 }
204213}
Original file line number Diff line number Diff line change @@ -68,13 +68,23 @@ interface IUiPoolDataProvider {
6868 uint256 sTokenincentivesUserIndex;
6969 }
7070
71+ struct IncentivesControllerData {
72+ uint256 userUnclaimedRewards;
73+ // address rewardToken;
74+ // uint256 rewardTokenDecimals;
75+ // string rewardTokenSymbol;
76+ // uint8 precision;
77+ uint256 emissionEndTimestamp;
78+ }
79+
80+
7181 function getReservesData (ILendingPoolAddressesProvider provider , address user )
7282 external
7383 view
7484 returns (
7585 AggregatedReserveData[] memory ,
7686 UserReserveData[] memory ,
7787 uint256 ,
78- uint256
88+ IncentivesControllerData memory
7989 );
8090}
You can’t perform that action at this time.
0 commit comments