From 57e690686208911b86fa911aa13b7ccb41543125 Mon Sep 17 00:00:00 2001 From: The3D Date: Mon, 28 Feb 2022 19:03:13 +0100 Subject: [PATCH] fix: fixed revert messages --- contracts/rewards/RewardsDistributor.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/rewards/RewardsDistributor.sol b/contracts/rewards/RewardsDistributor.sol index c635f6e2..53ccd4db 100644 --- a/contracts/rewards/RewardsDistributor.sol +++ b/contracts/rewards/RewardsDistributor.sol @@ -180,7 +180,7 @@ abstract contract RewardsDistributor is IRewardsDistributor { RewardsDataTypes.AssetData storage assetConfig = _assets[asset]; RewardsDataTypes.RewardData storage rewardConfig = _assets[asset].rewards[rewards[i]]; uint256 decimals = assetConfig.decimals; - require(decimals != 0 && rewardConfig.lastUpdateTimestamp != 0, 'DISTRIBUTION_NOT_EXISTS'); + require(decimals != 0 && rewardConfig.lastUpdateTimestamp != 0, 'DISTRIBUTION_DOES_NOT_EXIST'); (uint256 newIndex, ) = _updateRewardData( rewardConfig, @@ -277,7 +277,7 @@ abstract contract RewardsDistributor is IRewardsDistributor { (uint256 oldIndex, uint256 newIndex) = _getAssetIndex(rewardData, totalSupply, assetUnit); bool indexUpdated; if (newIndex != oldIndex) { - require(newIndex <= type(uint104).max, 'Index overflow'); + require(newIndex <= type(uint104).max, 'INDEX_OVERFLOW'); indexUpdated = true; //optimization: storing one after another saves one SSTORE