aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/backend_client.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-15 06:50:46 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-15 06:50:46 +0800
commit2cc7289b7b3c3177230957ff2384c58bed4266f3 (patch)
tree21acfb995ece8753c25cb9e2cf0f05de86a1b16c /packages/website/ts/utils/backend_client.ts
parent81d6df925e430f2199ddef44b3ccd353e6c3c19b (diff)
parente7eb220c503118631a6b23071c71b4b55df5b5cf (diff)
downloaddexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.gz
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.bz2
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.lz
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.xz
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.tar.zst
dexon-sol-tools-2cc7289b7b3c3177230957ff2384c58bed4266f3.zip
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/portal-v2-analytics
Diffstat (limited to 'packages/website/ts/utils/backend_client.ts')
-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 6b16aea6b..835a6ef4d 100644
--- a/packages/website/ts/utils/backend_client.ts
+++ b/packages/website/ts/utils/backend_client.ts
@@ -1,10 +1,17 @@
import * as _ from 'lodash';
-import { ArticlesBySection, WebsiteBackendGasInfo, WebsiteBackendPriceInfo, WebsiteBackendRelayerInfo } from 'ts/types';
+import {
+ ArticlesBySection,
+ WebsiteBackendGasInfo,
+ WebsiteBackendJobInfo,
+ WebsiteBackendPriceInfo,
+ WebsiteBackendRelayerInfo,
+} from 'ts/types';
import { fetchUtils } from 'ts/utils/fetch_utils';
import { utils } from 'ts/utils/utils';
const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station';
+const JOBS_ENDPOINT = '/jobs';
const PRICES_ENDPOINT = '/prices';
const RELAYERS_ENDPOINT = '/relayers';
const WIKI_ENDPOINT = '/wiki';
@@ -15,6 +22,10 @@ export const backendClient = {
const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), ETH_GAS_STATION_ENDPOINT);
return result;
},
+ async getJobInfosAsync(): Promise<WebsiteBackendJobInfo[]> {
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), JOBS_ENDPOINT);
+ return result;
+ },
async getPriceInfoAsync(tokenSymbols: string[]): Promise<WebsiteBackendPriceInfo> {
if (_.isEmpty(tokenSymbols)) {
return {};