-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix test #913
fix test #913
Conversation
test/libraries/Pool.t.sol
Outdated
@@ -119,9 +119,12 @@ contract PoolTest is Test { | |||
assertEq(slot0.protocolFee(), 0); | |||
slot0 = slot0.setProtocolFee(protocolFee); | |||
assertEq(slot0.protocolFee(), protocolFee); | |||
state.slot0 = slot0; | |||
|
|||
uint16 pFee = params.zeroForOne ? protocolFee0 : protocolFee1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont like pFee
😆 can we rename it something more descriptive? Or rename protocolFee
and call this one protocolFee
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swapProtocolFee? finalProtocolFee? expectedProtocolFee?
test/libraries/Pool.t.sol
Outdated
|
||
uint24 _lpFee = params.lpFeeOverride.isOverride() ? params.lpFeeOverride.removeOverrideFlag() : lpFee; | ||
uint24 swapFee = protocolFee == 0 ? _lpFee : pFee.calculateSwapFee(_lpFee); | ||
uint24 swapFee = protocolFee == 0 ? _lpFee : expectedProtocolFee.calculateSwapFee(_lpFee); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be
uint24 swapFee = expectedProtocolFee == 0 ? _lpFee : expectedProtocolFee.calculateSwapFee(_lpFee);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on
swapFee = protocolFee == 0 ? lpFee : uint16(protocolFee).calculateSwapFee(lpFee);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmmm yes i believe so, good catch
Related Issue
Which issue does this pull request resolve?
Description of changes