From f1b7756de9acceca4cfe742682e1a1c06d4bd785 Mon Sep 17 00:00:00 2001 From: Calvin Date: Tue, 27 Aug 2024 12:27:23 -0700 Subject: [PATCH] fix: no routes for this trade (#480) * fix: no routes for this trade * fix test cases --- router/usecase/candidate_routes.go | 2 +- tokens/usecase/pricing/worker/pricing_worker_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/router/usecase/candidate_routes.go b/router/usecase/candidate_routes.go index e5f53d17b..3fb923fb9 100644 --- a/router/usecase/candidate_routes.go +++ b/router/usecase/candidate_routes.go @@ -110,7 +110,7 @@ func (c candidateRouteFinder) FindCandidateRoutes(tokenIn sdk.Coin, tokenOutDeno rankedPools := denomData.SortedPools if len(rankedPools) == 0 { - return sqsdomain.CandidateRoutes{}, nil + c.logger.Debug("no pools found for denom in candidate route search", zap.String("denom", currenTokenInDenom)) } for i := 0; i < len(rankedPools) && len(routes) < options.MaxRoutes; i++ { diff --git a/tokens/usecase/pricing/worker/pricing_worker_test.go b/tokens/usecase/pricing/worker/pricing_worker_test.go index 080409779..812c5d604 100644 --- a/tokens/usecase/pricing/worker/pricing_worker_test.go +++ b/tokens/usecase/pricing/worker/pricing_worker_test.go @@ -220,7 +220,8 @@ func (s *PricingWorkerTestSuite) TestGetPrices_Chain_FindUnsupportedTokens() { // 1 more was found on June 10 when adding alloyed code id to config. // // On August 21, 2024: 23 unsupported tokens - likely added liquidity to some pools with the tokens. - s.Require().Equal(23, zeroPriceCounter) + // On August 27, 2024: 20 unsupported tokens - same reason as above. + s.Require().Equal(20, zeroPriceCounter) } func (s *PricingWorkerTestSuite) ValidatePrices(initialDenoms map[string]struct{}, expectedQuoteDenom string, prices map[string]map[string]osmomath.BigDec) {