Skip to content

Commit

Permalink
force approve allowance of reward token to RoyaltyModule
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster-will committed Dec 10, 2024
1 parent 1404375 commit c303af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/modules/grouping/EvenSplitGroupPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ contract EvenSplitGroupPool is IGroupRewardPool, ProtocolPausableUpgradeable, UU
uint256 rewardsPerIp = _getRewardPerIp(groupId, token);
uint256 totalRewards = rewardsPerIp * ipIds.length;
if (totalRewards == 0) return rewards;
IERC20(token).approve(address(ROYALTY_MODULE), totalRewards);
IERC20(token).forceApprove(address(ROYALTY_MODULE), totalRewards);
for (uint256 i = 0; i < ipIds.length; i++) {
if (!_isIpAdded(groupId, ipIds[i])) continue;
// calculate pending reward for each IP
Expand Down

0 comments on commit c303af4

Please sign in to comment.