Skip to content

Commit

Permalink
fix test (#913)
Browse files Browse the repository at this point in the history
* fix test

* change name

* use correct var in test

---------

Co-authored-by: Alice <34962750+hensha256@users.noreply.github.com>
  • Loading branch information
dianakocsis and hensha256 authored Oct 30, 2024
1 parent 0a849b1 commit 362c9ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/libraries/Pool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ contract PoolTest is Test {
assertEq(slot0.protocolFee(), 0);
slot0 = slot0.setProtocolFee(protocolFee);
assertEq(slot0.protocolFee(), protocolFee);
state.slot0 = slot0;

uint16 expectedProtocolFee = params.zeroForOne ? protocolFee0 : protocolFee1;

uint24 _lpFee = params.lpFeeOverride.isOverride() ? params.lpFeeOverride.removeOverrideFlag() : lpFee;
uint24 swapFee = protocolFee == 0 ? _lpFee : uint16(protocolFee).calculateSwapFee(_lpFee);
uint24 swapFee = expectedProtocolFee == 0 ? _lpFee : expectedProtocolFee.calculateSwapFee(_lpFee);

if (params.amountSpecified >= 0 && swapFee == MAX_LP_FEE) {
vm.expectRevert(Pool.InvalidFeeForExactOut.selector);
Expand Down

0 comments on commit 362c9ca

Please sign in to comment.