From 2ba78eb740d4eb04ecc1147f52dce236047f6816 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 15 May 2018 15:27:27 -0700 Subject: Fix circular dependency --- packages/website/ts/utils/backend_client.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/website/ts/utils/backend_client.ts') diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts index 63e06fda7..cc238325a 100644 --- a/packages/website/ts/utils/backend_client.ts +++ b/packages/website/ts/utils/backend_client.ts @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import { ArticlesBySection, WebsiteBackendGasInfo, WebsiteBackendPriceInfo, WebsiteBackendRelayerInfo } from 'ts/types'; -import { configs } from 'ts/utils/configs'; +import { utils } from 'ts/utils/utils'; import { fetchUtils } from 'ts/utils/fetch_utils'; const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station'; @@ -11,7 +11,7 @@ const WIKI_ENDPOINT = '/wiki'; export const backendClient = { async getGasInfoAsync(): Promise { - const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, ETH_GAS_STATION_ENDPOINT); + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), ETH_GAS_STATION_ENDPOINT); return result; }, async getPriceInfoAsync(tokenSymbols: string[]): Promise { @@ -22,15 +22,15 @@ export const backendClient = { const queryParams = { tokens: joinedTokenSymbols, }; - const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, PRICES_ENDPOINT, queryParams); + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), PRICES_ENDPOINT, queryParams); return result; }, async getRelayerInfosAsync(): Promise { - const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, RELAYERS_ENDPOINT); + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), RELAYERS_ENDPOINT); return result; }, async getWikiArticlesBySectionAsync(): Promise { - const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, WIKI_ENDPOINT); + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT); return result; }, }; -- cgit v1.2.3 From dc58d539c2ec0561974323aced0841d17117927d Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 15 May 2018 15:54:17 -0700 Subject: fix style errors --- packages/website/ts/utils/backend_client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/website/ts/utils/backend_client.ts') diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts index cc238325a..c440b1604 100644 --- a/packages/website/ts/utils/backend_client.ts +++ b/packages/website/ts/utils/backend_client.ts @@ -1,8 +1,8 @@ import * as _ from 'lodash'; import { ArticlesBySection, WebsiteBackendGasInfo, WebsiteBackendPriceInfo, WebsiteBackendRelayerInfo } from 'ts/types'; -import { utils } from 'ts/utils/utils'; import { fetchUtils } from 'ts/utils/fetch_utils'; +import { utils } from 'ts/utils/utils'; const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station'; const PRICES_ENDPOINT = '/prices'; -- cgit v1.2.3