Skip to content

Commit

Permalink
chore: moved usd to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Dec 6, 2023
1 parent d3eed9e commit 5f4297b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/price_fetchers/coingecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c *CoingeckoPriceFetcher) GetPrices(denomInfos configTypes.DenomInfos) (ma

pricesRaw, err := c.Client.SimplePrice(
currenciesToFetch,
[]string{"usd"},
[]string{CoingeckoBaseCurrency},
)

if err != nil || pricesRaw == nil {
Expand All @@ -45,7 +45,7 @@ func (c *CoingeckoPriceFetcher) GetPrices(denomInfos configTypes.DenomInfos) (ma
continue
}

usdCoinPrice, ok := coinPrice["usd"]
usdCoinPrice, ok := coinPrice[CoingeckoBaseCurrency]
if !ok {
continue
}
Expand Down
1 change: 1 addition & 0 deletions pkg/price_fetchers/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ package price_fetchers

const (
CoingeckoPriceFetcherName string = "coingecko"

Check failure on line 4 in pkg/price_fetchers/constants.go

View workflow job for this annotation

GitHub Actions / lint

SA9004: only the first constant in this group has an explicit type (staticcheck)
CoingeckoBaseCurrency = "usd"
)

0 comments on commit 5f4297b

Please sign in to comment.