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

perf(v4-sdk): refactor fromRoute(s) for clarity and efficiency #184

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

shuhuiluo
Copy link
Contributor

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 fromRoute and fromRoutes methods by reducing redundant code. Utilize a more concise approach to calculating input and output amounts, enhancing both clarity and efficiency.

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 `fromRoute` and `fromRoutes` methods by reducing redundant code. Utilize a more concise approach to calculating input and output amounts, enhancing both clarity and efficiency.
@shuhuiluo shuhuiluo requested review from jsy1218 and a team as code owners October 24, 2024 21:22
@jsy1218
Copy link
Member

jsy1218 commented Oct 25, 2024

i hit approve and run button to see if it can pass Code Quality Checks / Lint, Build, and Test (pull_request). If so, can help take a look then.

@ewilz ewilz mentioned this pull request Nov 27, 2024
@graphite-app graphite-app bot requested a review from a team November 28, 2024 01:56
Copy link

graphite-app bot commented Nov 28, 2024

Graphite Automations

"Request reviewers once CI passes on sdks monorepo" took an action on this PR • (11/28/24)

2 reviewers were added and 1 assignee was added to this PR based on 's automation.

@ewilz ewilz merged commit 0fbf607 into Uniswap:main Dec 2, 2024
11 of 13 checks passed
@shuhuiluo shuhuiluo deleted the trade-route branch December 2, 2024 18:33
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