-
Notifications
You must be signed in to change notification settings - Fork 16
BE-691 | Implement handleCandidateRoutesInGivenOut API #617
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
base: v28.x
Are you sure you want to change the base?
Conversation
Implements `handleCandidateRoutesInGivenOut` API for computing exact amount out quotes. This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact amount out quotes.
WalkthroughThe pull request modifies the routing use case implementation by renaming an existing candidate route handling method to explicitly denote that it is for the "out given in" scenario, and by introducing a new method for handling candidate routes in the "in given out" context. Method signatures, calls, and accompanying comments have been updated accordingly, while the underlying caching and persistence logic remains unchanged. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant RouterUseCase
Client->>RouterUseCase: Request candidate routes (with tokenIn)
RouterUseCase->>RouterUseCase: Execute handleCandidateRoutesOutGivenIn
RouterUseCase-->>Client: Return candidate routes (out given in)
Client->>RouterUseCase: Request candidate routes (with tokenOut)
RouterUseCase->>RouterUseCase: Execute handleCandidateRoutesInGivenOut
RouterUseCase-->>Client: Return candidate routes (in given out)
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
router/usecase/router_usecase.go (1)
717-765
: Removenolint:unused
once the method is used.The new method implementation looks good and mirrors the structure of the "out given in" method while appropriately handling "in given out" scenarios. However, the
nolint:unused
directive suggests this method is not yet used. Please remove this directive once the method is integrated into the codebase.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
router/usecase/export_test.go
is excluded by!**/*_test.go
router/usecase/router_usecase_test.go
is excluded by!**/*_test.go
📒 Files selected for processing (1)
router/usecase/router_usecase.go
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Run linter
- GitHub Check: build
- GitHub Check: Summary
🔇 Additional comments (2)
router/usecase/router_usecase.go (2)
368-368
: LGTM! Method name is now more descriptive.The rename from
handleCandidateRoutes
tohandleCandidateRoutesOutGivenIn
makes the method's purpose clearer by explicitly indicating it handles the "out given in" scenario.
667-674
: LGTM! Method name and documentation updated.The method's name and documentation have been updated to clearly indicate its purpose in handling "out given in" scenarios.
|
Implements
handleCandidateRoutesInGivenOut
API for computing exact amount out quotes.This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact amount out quotes.
Summary by CodeRabbit
New Features
Refactor