Skip to content

Commit a375773

Browse files
authored
Merge pull request #76 from euler-xyz/no-protocol-fee-recipient
short-circuit if no protocolFeeRecipient: cheaper on gas in this case…
2 parents 6a621bc + b8ccd6a commit a375773

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/FundsLib.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ library FundsLib {
7575

7676
uint256 feeAmount = amount * p.fee / 1e18;
7777

78-
{
78+
if (p.protocolFeeRecipient != address(0)) {
7979
uint256 protocolFeeAmount = feeAmount * p.protocolFee / 1e18;
8080

8181
if (protocolFeeAmount != 0) {

0 commit comments

Comments
 (0)