Skip to content

Commit

Permalink
Move TooManyRewards error
Browse files Browse the repository at this point in the history
  • Loading branch information
kexleyBeefy committed Sep 28, 2023
1 parent 7f48de9 commit b161b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/BIFI/infra/BeefyRewardPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ contract BeefyRewardPool is LPTokenWrapperInitializable, OwnableUpgradeable {
if (_reward == address(stakedToken)) revert StakedTokenIsNotAReward();
if (_duration < 1 days) revert ShortDuration();
if (_reward != rewardTokens[rewardTokenIndex[_reward]]) {
if (rewardTokens.length > rewardMax - 1) revert TooManyRewards();
rewardTokenIndex[_reward] = rewardTokens.length;
rewardTokens.push(_reward);
if (rewardTokens.length > rewardMax) revert TooManyRewards();
}

uint256 leftover;
Expand Down

0 comments on commit b161b90

Please sign in to comment.