Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
p0mvn committed Mar 8, 2024
1 parent c7bb49d commit 85c6e8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tokens/usecase/tokens_usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func (t *tokensUseCase) GetPrices(ctx context.Context, baseDenoms []string, quot
go func(baseDenom string) {
defer wg.Done()

prices, err := t.getPricesForBaseDenom(ctx, pricingStrategy, baseDenom, quoteDenoms)
resultsChan <- priceResults{baseDenom: baseDenom, prices: prices, err: err}
prices := t.getPricesForBaseDenom(ctx, pricingStrategy, baseDenom, quoteDenoms)
resultsChan <- priceResults{baseDenom: baseDenom, prices: prices, err: nil}
}(baseDenom)
}

Expand All @@ -212,7 +212,7 @@ func (t *tokensUseCase) GetPrices(ctx context.Context, baseDenoms []string, quot
// Returns a map with keys as quotes and values as prices or error, if any.
// Returns error if base denom is not found in the token metadata.
// Sets the price to zero in case of failing to compute the price between base and quote but these being valid tokens.
func (t *tokensUseCase) getPricesForBaseDenom(ctx context.Context, pricingStrategy domain.PricingStrategy, baseDenom string, quoteDenoms []string) (map[string]any, error) {
func (t *tokensUseCase) getPricesForBaseDenom(ctx context.Context, pricingStrategy domain.PricingStrategy, baseDenom string, quoteDenoms []string) map[string]any {
byQuoteDenomForGivenBaseResult := make(map[string]any, len(quoteDenoms))
// Validate base denom is a valid denom
// Return zeroes for all quotes if base denom is not found
Expand All @@ -221,7 +221,7 @@ func (t *tokensUseCase) getPricesForBaseDenom(ctx context.Context, pricingStrate
for _, quoteDenom := range quoteDenoms {
byQuoteDenomForGivenBaseResult[quoteDenom] = osmomath.ZeroBigDec()
}
return byQuoteDenomForGivenBaseResult, nil
return byQuoteDenomForGivenBaseResult
}

// Create a channel to communicate the results
Expand Down Expand Up @@ -261,7 +261,7 @@ func (t *tokensUseCase) getPricesForBaseDenom(ctx context.Context, pricingStrate
byQuoteDenomForGivenBaseResult[result.quoteDenom] = result.price
}

return byQuoteDenomForGivenBaseResult, nil
return byQuoteDenomForGivenBaseResult
}

func (t *tokensUseCase) getChainScalingFactorMut(precision int) (osmomath.Dec, bool) {
Expand Down

0 comments on commit 85c6e8e

Please sign in to comment.