Skip to content
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

Merged
merged 4 commits into from
Oct 30, 2024
Merged

fix test #913

merged 4 commits into from
Oct 30, 2024

Conversation

dianakocsis
Copy link
Contributor

Related Issue

Which issue does this pull request resolve?

Description of changes

@dianakocsis dianakocsis requested a review from a team as a code owner October 28, 2024 17:39
@@ -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;
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swapProtocolFee? finalProtocolFee? expectedProtocolFee?

hensha256
hensha256 previously approved these changes Oct 29, 2024

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);
Copy link
Contributor

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);

Copy link
Contributor

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);

Copy link
Contributor

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

@hensha256 hensha256 merged commit 362c9ca into main Oct 30, 2024
5 checks passed
@hensha256 hensha256 deleted the fix-github-ci branch October 30, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants