From 5279eb325524c17910bddf7eb5a6b29ffcb6ab92 Mon Sep 17 00:00:00 2001 From: sendra Date: Thu, 23 Sep 2021 16:22:43 +0200 Subject: [PATCH] added precision --- contracts/misc/UiIncentiveDataProvider.sol | 9 ++++++--- contracts/misc/interfaces/IUiIncentiveDataProvider.sol | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contracts/misc/UiIncentiveDataProvider.sol b/contracts/misc/UiIncentiveDataProvider.sol index 4b8372b2..15972cde 100644 --- a/contracts/misc/UiIncentiveDataProvider.sol +++ b/contracts/misc/UiIncentiveDataProvider.sol @@ -71,7 +71,8 @@ contract UiIncentiveDataProvider is IUiIncentiveDataProvider { baseData.aTokenAddress, aRewardToken, address(aTokenIncentiveController), - IERC20Detailed(aRewardToken).decimals() + IERC20Detailed(aRewardToken).decimals(), + aTokenIncentiveController.PRECISION() ); } @@ -95,7 +96,8 @@ contract UiIncentiveDataProvider is IUiIncentiveDataProvider { baseData.stableDebtTokenAddress, sRewardToken, address(sTokenIncentiveController), - IERC20Detailed(sRewardToken).decimals() + IERC20Detailed(sRewardToken).decimals(), + sTokenIncentiveController.PRECISION() ); } @@ -119,7 +121,8 @@ contract UiIncentiveDataProvider is IUiIncentiveDataProvider { baseData.variableDebtTokenAddress, vRewardToken, address(vTokenIncentiveController), - IERC20Detailed(vRewardToken).decimals() + IERC20Detailed(vRewardToken).decimals(), + vTokenIncentiveController.PRECISION() ); } } diff --git a/contracts/misc/interfaces/IUiIncentiveDataProvider.sol b/contracts/misc/interfaces/IUiIncentiveDataProvider.sol index c9d7f5d0..799e7e00 100644 --- a/contracts/misc/interfaces/IUiIncentiveDataProvider.sol +++ b/contracts/misc/interfaces/IUiIncentiveDataProvider.sol @@ -21,6 +21,7 @@ interface IUiIncentiveDataProvider { address rewardTokenAddress; address incentiveControllerAddress; uint8 rewardTokenDecimals; + uint8 precision; } struct UserReserveIncentiveData {