aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/backend_client.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-06-12 03:38:25 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-06-13 01:41:09 +0800
commit679d60cd5a5debcacff42c38967c1f8b7d972882 (patch)
tree47fc95928051b285c93bf828ec71f0c5bf9b0b70 /packages/website/ts/utils/backend_client.ts
parentbc36c0faed11d61164027efad5b2ad9d07f0573f (diff)
downloaddexon-0x-contracts-679d60cd5a5debcacff42c38967c1f8b7d972882.tar.gz
dexon-0x-contracts-679d60cd5a5debcacff42c38967c1f8b7d972882.tar.zst
dexon-0x-contracts-679d60cd5a5debcacff42c38967c1f8b7d972882.zip
Implement large screen open positions
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 {};