diff --git a/apps/rewards/app/store/reward.js b/apps/rewards/app/store/reward.js index 932283dea..31075bf7b 100644 --- a/apps/rewards/app/store/reward.js +++ b/apps/rewards/app/store/reward.js @@ -21,8 +21,11 @@ export async function onRewardAdded({ rewards = [], refTokens = [], balances = [ return { rewards, refTokens } } -export async function onRewardClaimed({ rewards = [], claims = {} }, { rewardId }) { - rewards[rewardId] = await getRewardById(rewardId) +export async function onRewardClaimed( + { rewards = [], claims = {} }, + { rewardId, claimant } +) { + rewards[rewardId] = await getRewardById(rewardId, claimant) let { claimsByToken = [], totalClaimsMade = 0 } = claims diff --git a/apps/rewards/contracts/Rewards.sol b/apps/rewards/contracts/Rewards.sol index eaeeea993..18a052c38 100644 --- a/apps/rewards/contracts/Rewards.sol +++ b/apps/rewards/contracts/Rewards.sol @@ -63,7 +63,7 @@ contract Rewards is AragonApp { /// Events event RewardAdded(uint256 rewardId); /// Emitted when a new reward is created - event RewardClaimed(uint256 rewardId); /// Emitted when a reward is claimed + event RewardClaimed(uint256 rewardId, address claimant); /** * @notice Initialize Rewards app for Vault at `_vault` @@ -97,7 +97,7 @@ contract Rewards is AragonApp { _transferReward(reward, rewardAmount); - emit RewardClaimed(_rewardID); + emit RewardClaimed(_rewardID, msg.sender); return rewardAmount; }