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(v4-sdk): simplify midPrice in Route entity #180

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shuhuiluo
Copy link

PR Scope

Please title your PR according to the following types and scopes following conventional commits:

  • fix(SDK name): will trigger a patch version
  • chore(<type>): will not trigger any release and should be used for internal repo changes
  • <type>(public): will trigger a patch version for non-code changes (e.g. README changes)
  • feat(SDK name): will trigger a minor version
  • feat(breaking): will trigger a major version for a breaking change

Description

Simplify the midPrice calculation by removing complex logic and utilizing priceOf method directly. This change improves code readability and maintainability, reducing potential points of failure.

How Has This Been Tested?

Unit tests.

Are there any breaking changes?

No.

If there are breaking changes, please ensure you bump the major version Bump the major version (by using the title feat(breaking): ...), post a notice in #eng-sdks, and explicitly notify all Uniswap Labs consumers of the SDK.

(Optional) Feedback Focus

[Specific parts of this PR you'd like feedback on, or that reviewers should pay closer attention to]

(Optional) Follow Ups

[Things that weren't addressed in this PR, ways you plan to build on this work, or other ways this work could be extended]

Simplify the `midPrice` calculation by removing complex logic and utilizing `priceOf` method directly. This change improves code readability and maintainability, reducing potential points of failure.
@shuhuiluo shuhuiluo requested review from jsy1218 and a team as code owners October 24, 2024 04:30
Copy link
Member

@ewilz ewilz left a comment

Choose a reason for hiding this comment

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

Thanks, great usage of the pool interface.

@hensha256
Copy link
Contributor

I think its erroring in CI because this is a fork PR so doesnt have access to the action env variables. We should merge into a local branch to run CI before merging :)

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