Skip to content

Commit

Permalink
gas optimization (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Jul 12, 2021
1 parent ab788d9 commit a096c87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/prize-pool/PrizePool.sol
Expand Up @@ -721,8 +721,9 @@ abstract contract PrizePool is PrizePoolInterface, OwnableUpgradeable, Reentranc
{
(uint256 exitFee, uint256 _burnedCredit) = _calculateEarlyExitFeeLessBurnedCredit(from, controlledToken, amount);
uint256 duration = _estimateCreditAccrualTime(controlledToken, amount, exitFee);
if (duration > maxTimelockDuration) {
duration = maxTimelockDuration;
uint256 _maxTimelockDuration = maxTimelockDuration;
if (duration > _maxTimelockDuration) {
duration = _maxTimelockDuration;
}
return (duration, _burnedCredit);
}
Expand Down

0 comments on commit a096c87

Please sign in to comment.