Skip to content

Commit

Permalink
fix(GaugeReward): always emit RewardsClaimed event
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickGT committed Aug 10, 2022
1 parent 8641489 commit c15be96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/GaugeReward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ contract GaugeReward is IGaugeReward, IPrizePoolLiquidatorListener, Multicall {

if (_rewards > 0) {
userRewardTokenBalances[_user][_rewardToken.token] += _rewards;
emit RewardsClaimed(_gauge, _rewardToken.token, _user, _rewards, _exchangeRate);
}

emit RewardsClaimed(_gauge, _rewardToken.token, _user, _rewards, _exchangeRate);
return _rewards;
}

Expand Down
4 changes: 2 additions & 2 deletions test/GaugeReward.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ describe('GaugeReward', () => {
.returns(userStakeBalance);

expect(await gaugeReward.claimAll(gaugeAddress, owner.address))
.to.not.emit(gaugeReward, 'RewardsClaimed')
.to.emit(gaugeReward, 'RewardsClaimed')
.withArgs(
gaugeAddress,
poolToken.address,
Expand All @@ -756,7 +756,7 @@ describe('GaugeReward', () => {
.returns(userStakeBalance);

expect(await gaugeReward.claimAll(gaugeAddress, owner.address))
.to.not.emit(gaugeReward, 'RewardsClaimed')
.to.emit(gaugeReward, 'RewardsClaimed')
.withArgs(
gaugeAddress,
poolToken.address,
Expand Down

0 comments on commit c15be96

Please sign in to comment.