Skip to content

Commit d51ac1d

Browse files
committed
temp fix for UIPoolDataProvider on polygon
1 parent 7849be1 commit d51ac1d

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

contracts/interfaces/IAaveIncentivesController.sol

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ interface IAaveIncentivesController {
3030
uint256
3131
);
3232

33+
/*
34+
* LEGACY **************************
35+
* @dev Returns the configuration of the distribution for a certain asset
36+
* @param asset The address of the reference asset of the distribution
37+
* @return The asset index, the emission per second and the last updated timestamp
38+
**/
39+
function assets(address asset)
40+
external
41+
view
42+
returns (
43+
uint128,
44+
uint128,
45+
uint256
46+
);
47+
3348
/**
3449
* @dev Whitelists an address to claim the rewards on behalf of another address
3550
* @param user The address of the user

contracts/misc/UiPoolDataProvider.sol

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,22 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
141141
reserveData.aTokenIncentivesIndex,
142142
reserveData.aEmissionPerSecond,
143143
reserveData.aIncentivesLastUpdateTimestamp
144-
) = incentivesController.getAssetData(reserveData.aTokenAddress);
144+
// ) = incentivesController.getAssetData(reserveData.aTokenAddress); TODO: temp fix
145+
) = incentivesController.assets(reserveData.aTokenAddress);
145146

146147
(
147148
reserveData.sTokenIncentivesIndex,
148149
reserveData.sEmissionPerSecond,
149150
reserveData.sIncentivesLastUpdateTimestamp
150-
) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress);
151+
// ) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); TODO: temp fix
152+
) = incentivesController.assets(reserveData.stableDebtTokenAddress);
151153

152154
(
153155
reserveData.vTokenIncentivesIndex,
154156
reserveData.vEmissionPerSecond,
155157
reserveData.vIncentivesLastUpdateTimestamp
156-
) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress);
158+
// ) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); TODO: temp fix
159+
) = incentivesController.assets(reserveData.variableDebtTokenAddress);
157160
}
158161
}
159162

@@ -315,19 +318,22 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
315318
reserveData.aTokenIncentivesIndex,
316319
reserveData.aEmissionPerSecond,
317320
reserveData.aIncentivesLastUpdateTimestamp
318-
) = incentivesController.getAssetData(reserveData.aTokenAddress);
321+
// ) = incentivesController.getAssetData(reserveData.aTokenAddress); TODO: temp fix
322+
) = incentivesController.assets(reserveData.aTokenAddress);
319323

320324
(
321325
reserveData.sTokenIncentivesIndex,
322326
reserveData.sEmissionPerSecond,
323327
reserveData.sIncentivesLastUpdateTimestamp
324-
) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress);
328+
// ) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); TODO: temp fix
329+
) = incentivesController.assets(reserveData.stableDebtTokenAddress);
325330

326331
(
327332
reserveData.vTokenIncentivesIndex,
328333
reserveData.vEmissionPerSecond,
329334
reserveData.vIncentivesLastUpdateTimestamp
330-
) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress);
335+
// ) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); TODO: temp fix
336+
) = incentivesController.assets(reserveData.variableDebtTokenAddress);
331337
}
332338

333339
if (user != address(0)) {

0 commit comments

Comments
 (0)