diff --git a/contracts/rewards/RewardsDistributor.sol b/contracts/rewards/RewardsDistributor.sol index 53ccd4db..b64d2a65 100644 --- a/contracts/rewards/RewardsDistributor.sol +++ b/contracts/rewards/RewardsDistributor.sol @@ -282,9 +282,9 @@ abstract contract RewardsDistributor is IRewardsDistributor { //optimization: storing one after another saves one SSTORE rewardData.index = uint104(newIndex); - rewardData.lastUpdateTimestamp = uint32(block.timestamp); + rewardData.lastUpdateTimestamp = block.timestamp.toUint32(); } else { - rewardData.lastUpdateTimestamp = uint32(block.timestamp); + rewardData.lastUpdateTimestamp = block.timestamp.toUint32(); } return (newIndex, indexUpdated); diff --git a/test/rewards/misc.spec.ts b/test/rewards/misc.spec.ts index 128fdf45..16ea5d6d 100644 --- a/test/rewards/misc.spec.ts +++ b/test/rewards/misc.spec.ts @@ -84,7 +84,7 @@ makeSuite('AaveIncentivesController misc tests', (testEnv) => { await expect( aDaiMockV2.doubleHandleActionOnAic(users[1].address, '2000', '100') - ).to.be.revertedWith('Index overflow'); + ).to.be.revertedWith('INDEX_OVERFLOW'); }); it('Should claimRewards revert if to argument is ZERO_ADDRESS', async () => { diff --git a/test/rewards/set-emission-per-second.spec.ts b/test/rewards/set-emission-per-second.spec.ts index 802859d8..26854c4e 100644 --- a/test/rewards/set-emission-per-second.spec.ts +++ b/test/rewards/set-emission-per-second.spec.ts @@ -189,12 +189,12 @@ makeSuite('AaveIncentivesController V2 setEmissionPerSecond', async (testEnv: Te // Not existent Asset incentivization await expect( rewardsController.setEmissionPerSecond(ONE_ADDRESS, [ONE_ADDRESS], [2]) - ).to.be.revertedWith('DISTRIBUTION_NOT_EXISTS'); + ).to.be.revertedWith('DISTRIBUTION_DOES_NOT_EXIST'); // Not existent Reward distribution await expect( rewardsController.setEmissionPerSecond(aDaiMockV2.address, [ONE_ADDRESS], [2]) - ).to.be.revertedWith('DISTRIBUTION_NOT_EXISTS'); + ).to.be.revertedWith('DISTRIBUTION_DOES_NOT_EXIST'); }); it('EmissionManager updates the emission per second of distributions', async () => {