aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-04-21 03:37:41 +0800
committerGitHub <noreply@github.com>2018-04-21 03:37:41 +0800
commit0046a0762cdfc0e733f460545ad62f5e4727eeb3 (patch)
tree5b016f29b0c130fbb59091a49eb5676352525bd6 /packages/website/ts/utils
parent62a55c013516c82eb4aa26c90db7533cd72f8d1b (diff)
parentc453012a8e28b32b71c90717c3976ace5f89e9b0 (diff)
downloaddexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar.gz
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar.bz2
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar.lz
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar.xz
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.tar.zst
dexon-sol-tools-0046a0762cdfc0e733f460545ad62f5e4727eeb3.zip
Merge pull request #543 from 0xProject/feature/website/integrate-relayer-info
Integrate relayer index with website backend
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/backend_client.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts
index 366519856..fdbb3e03a 100644
--- a/packages/website/ts/utils/backend_client.ts
+++ b/packages/website/ts/utils/backend_client.ts
@@ -2,12 +2,19 @@ import { BigNumber, logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';
-import { ArticlesBySection, ItemByAddress, WebsiteBackendGasInfo, WebsiteBackendPriceInfo } from 'ts/types';
+import {
+ ArticlesBySection,
+ ItemByAddress,
+ WebsiteBackendGasInfo,
+ WebsiteBackendPriceInfo,
+ WebsiteBackendRelayerInfo,
+} from 'ts/types';
import { configs } from 'ts/utils/configs';
import { errorReporter } from 'ts/utils/error_reporter';
const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station';
const PRICES_ENDPOINT = '/prices';
+const RELAYERS_ENDPOINT = '/relayers';
const WIKI_ENDPOINT = '/wiki';
export const backendClient = {
@@ -26,6 +33,10 @@ export const backendClient = {
const result = await requestAsync(PRICES_ENDPOINT, queryParams);
return result;
},
+ async getRelayerInfosAsync(): Promise<WebsiteBackendRelayerInfo[]> {
+ const result = await requestAsync(RELAYERS_ENDPOINT);
+ return result;
+ },
async getWikiArticlesBySectionAsync(): Promise<ArticlesBySection> {
const result = await requestAsync(WIKI_ENDPOINT);
return result;