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

refactor: position/liquidity_amounts #160

Merged
merged 3 commits into from
Feb 16, 2024
Merged

refactor: position/liquidity_amounts #160

merged 3 commits into from
Feb 16, 2024

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Feb 14, 2024

Description

  1. Elimination of Duplicate Code: Implemented a logic to automatically swap the values of sqrtRatioA and sqrtRatioB using the swapIfGreater function without duplication.

  2. Function Name Change: Functions that are only used in the liquidity_amounts.gno file have been renamed to computeXXX, while functions called from other places have been prefixed with GetXXX."

@notJoon notJoon changed the title refactor: liquidity_amounts refactor: position/liquidity_amounts Feb 14, 2024
r3v4s
r3v4s previously approved these changes Feb 14, 2024
Copy link
Member

@r3v4s r3v4s left a comment

Choose a reason for hiding this comment

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

1 comment for variable name convension

mconcat
mconcat previously approved these changes Feb 14, 2024
Copy link
Contributor

@mconcat mconcat left a comment

Choose a reason for hiding this comment

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

Great! The Get/compute convention here is a great way to demonstrate golang coding style and easier to read. Left a minor comment on X96 suffixes, could be handled in a future PR.

position/liquidity_amounts.gno Outdated Show resolved Hide resolved
@notJoon notJoon merged commit da92987 into gnoswap-labs:main Feb 16, 2024
@notJoon notJoon deleted the refactor-position-liquidity branch February 16, 2024 10:47
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