From 362c9cab7c03ca1122795aed2e8e118de9ed186e Mon Sep 17 00:00:00 2001 From: diana Date: Wed, 30 Oct 2024 18:37:38 -0400 Subject: [PATCH] fix test (#913) * fix test * change name * use correct var in test --------- Co-authored-by: Alice <34962750+hensha256@users.noreply.github.com> --- test/libraries/Pool.t.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/libraries/Pool.t.sol b/test/libraries/Pool.t.sol index e5832a44e..e93e9f1df 100644 --- a/test/libraries/Pool.t.sol +++ b/test/libraries/Pool.t.sol @@ -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);