temp fix for UIPoolDataProvider on polygon

This commit is contained in:
andyk 2021-07-14 15:56:41 +02:00
parent 7849be11f5
commit d51ac1d6fe
2 changed files with 27 additions and 6 deletions

View File

@ -30,6 +30,21 @@ interface IAaveIncentivesController {
uint256 uint256
); );
/*
* LEGACY **************************
* @dev Returns the configuration of the distribution for a certain asset
* @param asset The address of the reference asset of the distribution
* @return The asset index, the emission per second and the last updated timestamp
**/
function assets(address asset)
external
view
returns (
uint128,
uint128,
uint256
);
/** /**
* @dev Whitelists an address to claim the rewards on behalf of another address * @dev Whitelists an address to claim the rewards on behalf of another address
* @param user The address of the user * @param user The address of the user

View File

@ -141,19 +141,22 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
reserveData.aTokenIncentivesIndex, reserveData.aTokenIncentivesIndex,
reserveData.aEmissionPerSecond, reserveData.aEmissionPerSecond,
reserveData.aIncentivesLastUpdateTimestamp reserveData.aIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.aTokenAddress); // ) = incentivesController.getAssetData(reserveData.aTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.aTokenAddress);
( (
reserveData.sTokenIncentivesIndex, reserveData.sTokenIncentivesIndex,
reserveData.sEmissionPerSecond, reserveData.sEmissionPerSecond,
reserveData.sIncentivesLastUpdateTimestamp reserveData.sIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); // ) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.stableDebtTokenAddress);
( (
reserveData.vTokenIncentivesIndex, reserveData.vTokenIncentivesIndex,
reserveData.vEmissionPerSecond, reserveData.vEmissionPerSecond,
reserveData.vIncentivesLastUpdateTimestamp reserveData.vIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); // ) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.variableDebtTokenAddress);
} }
} }
@ -315,19 +318,22 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
reserveData.aTokenIncentivesIndex, reserveData.aTokenIncentivesIndex,
reserveData.aEmissionPerSecond, reserveData.aEmissionPerSecond,
reserveData.aIncentivesLastUpdateTimestamp reserveData.aIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.aTokenAddress); // ) = incentivesController.getAssetData(reserveData.aTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.aTokenAddress);
( (
reserveData.sTokenIncentivesIndex, reserveData.sTokenIncentivesIndex,
reserveData.sEmissionPerSecond, reserveData.sEmissionPerSecond,
reserveData.sIncentivesLastUpdateTimestamp reserveData.sIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); // ) = incentivesController.getAssetData(reserveData.stableDebtTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.stableDebtTokenAddress);
( (
reserveData.vTokenIncentivesIndex, reserveData.vTokenIncentivesIndex,
reserveData.vEmissionPerSecond, reserveData.vEmissionPerSecond,
reserveData.vIncentivesLastUpdateTimestamp reserveData.vIncentivesLastUpdateTimestamp
) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); // ) = incentivesController.getAssetData(reserveData.variableDebtTokenAddress); TODO: temp fix
) = incentivesController.assets(reserveData.variableDebtTokenAddress);
} }
if (user != address(0)) { if (user != address(0)) {