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

BE-694 | Implement computeAndRankRoutesByDirectQuoteInGivenOut API #620

Open
wants to merge 1 commit into
base: BE-693
Choose a base branch
from

Conversation

deividaspetraitis
Copy link
Collaborator

@deividaspetraitis deividaspetraitis commented Feb 17, 2025

Implements computeAndRankRoutesByDirectQuoteInGivenOut API for computing exact amount out quotes.

This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact amount out quotes.

Implements `rankRoutesByDirectQuoteInGivenOut` API for computing exact
amount out quotes.

This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact
amount out quotes.
@@ -458,6 +458,81 @@ func (r *routerUseCaseImpl) computeAndRankRoutesByDirectQuoteOutGivenIn(ctx cont
return topSingleRouteQuote, rankedRoutes, nil
}

func (r *routerUseCaseImpl) computeAndRankRoutesByDirectQuoteInGivenOut(ctx context.Context, tokenOut sdk.Coin, tokenInDenom string, routingOptions domain.RouterOptions) (domain.Quote, []route.RouteImpl, error) { // nolint:unused
Copy link
Collaborator Author

@deividaspetraitis deividaspetraitis Feb 17, 2025

Choose a reason for hiding this comment

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

Note reviewer: there are no coverage of this method in this PR since it well get tested in more higher level when testing GetOptimalQuoteInGivenOut. Note that tests for #607 implementing those tests are already green ( except split routes ).

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 50%)
36.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@deividaspetraitis deividaspetraitis changed the title BE-694 | Implement rankRoutesByDirectQuoteInGivenOut API BE-694 | Implement computeAndRankRoutesByDirectQuoteInGivenOut API Feb 17, 2025
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.

1 participant