Skip to content

Commit

Permalink
Rename COINGECKO_API to CoinGeckoApi
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei committed Jul 2, 2021
1 parent e4bc0d1 commit 1aa1bfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/assets/TokenRatesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface TokenRatesState extends BaseState {
supportedChains: SupportedChainsCache;
}

const COINGECKO_API = {
const CoinGeckoApi = {
BASE_URL: 'https://api.coingecko.com/api/v3',
getTokenPriceURL(chainSlug: string, query: string) {
return `${this.BASE_URL}/simple/token_price/${chainSlug}?${query}`;
Expand Down Expand Up @@ -249,7 +249,7 @@ export class TokenRatesController extends BaseController<
async fetchSupportedChains(): Promise<CoinGeckoPlatform[] | null> {
try {
const platforms: CoinGeckoPlatform[] = await handleFetch(
COINGECKO_API.getPlatformsURL(),
CoinGeckoApi.getPlatformsURL(),
);
return platforms;
} catch {
Expand All @@ -268,7 +268,7 @@ export class TokenRatesController extends BaseController<
chainSlug: string,
query: string,
): Promise<CoinGeckoResponse> {
return handleFetch(COINGECKO_API.getTokenPriceURL(chainSlug, query));
return handleFetch(CoinGeckoApi.getTokenPriceURL(chainSlug, query));
}

/**
Expand Down

0 comments on commit 1aa1bfb

Please sign in to comment.