diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-05-16 06:27:27 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-05-16 06:27:27 +0800 |
commit | 2ba78eb740d4eb04ecc1147f52dce236047f6816 (patch) | |
tree | 8c7f32c58ed1f414c9f57902a9c29eca05d52d88 /packages/website/ts/utils/backend_client.ts | |
parent | 184232ba4fe304bb00a3dbbee21972b1ff29736b (diff) | |
download | dexon-sol-tools-2ba78eb740d4eb04ecc1147f52dce236047f6816.tar.gz dexon-sol-tools-2ba78eb740d4eb04ecc1147f52dce236047f6816.tar.zst dexon-sol-tools-2ba78eb740d4eb04ecc1147f52dce236047f6816.zip |
Fix circular dependency
Diffstat (limited to 'packages/website/ts/utils/backend_client.ts')
-rw-r--r-- | packages/website/ts/utils/backend_client.ts | 10 |
1 files changed, 5 insertions, 5 deletions
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<WebsiteBackendGasInfo> { - 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<WebsiteBackendPriceInfo> { @@ -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<WebsiteBackendRelayerInfo[]> { - 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<ArticlesBySection> { - const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, WIKI_ENDPOINT); + const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT); return result; }, }; |