Skip to content

Commit

Permalink
chore(sol): drop redundant fee amount check
Browse files Browse the repository at this point in the history
This check is redundant since feeBasisPoints
is always smaller than 10000 hence the resulting
feeAmount is always going to be smaller than
requestedAmount.
  • Loading branch information
0xmichalis committed Jun 11, 2024
1 parent 96b6396 commit 0481f1e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/FlatFeeCalculator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ contract FlatFeeCalculator is IFeeCalculator, Ownable {
require(requestedAmount != 0, "requested amount must be > 0");

uint256 feeAmount = requestedAmount * feeBasisPoints / 10000;

require(feeAmount <= requestedAmount, "Fee must be lower or equal to requested amount");
require(feeAmount != 0, "Fee must be greater than 0");

return calculateFeeShares(feeAmount);
Expand Down

0 comments on commit 0481f1e

Please sign in to comment.