aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-07-11 02:46:31 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-07-11 03:01:51 +0800
commit51d5b9d35d903413a83254e5a82fbd247b7ab789 (patch)
treedaf8fb13c849a4aefa94842535d10d8343e54dc6 /packages/website/ts/utils
parent2625cbbfed087dae55c62950a9260145cf5ca8e6 (diff)
downloaddexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar.gz
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar.bz2
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar.lz
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar.xz
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.tar.zst
dexon-sol-tools-51d5b9d35d903413a83254e5a82fbd247b7ab789.zip
Grab token registry information from our DB for mainnet
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/backend_client.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts
index 835a6ef4d..5164211df 100644
--- a/packages/website/ts/utils/backend_client.ts
+++ b/packages/website/ts/utils/backend_client.ts
@@ -6,6 +6,7 @@ import {
WebsiteBackendJobInfo,
WebsiteBackendPriceInfo,
WebsiteBackendRelayerInfo,
+ WebsiteBackendTokenInfo,
} from 'ts/types';
import { fetchUtils } from 'ts/utils/fetch_utils';
import { utils } from 'ts/utils/utils';
@@ -14,6 +15,7 @@ const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station';
const JOBS_ENDPOINT = '/jobs';
const PRICES_ENDPOINT = '/prices';
const RELAYERS_ENDPOINT = '/relayers';
+const TOKENS_ENDPOINT = '/tokens';
const WIKI_ENDPOINT = '/wiki';
const SUBSCRIBE_SUBSTACK_NEWSLETTER_ENDPOINT = '/newsletter_subscriber/substack';
@@ -41,6 +43,10 @@ export const backendClient = {
const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), RELAYERS_ENDPOINT);
return result;
},
+ async getTokenInfosAsync(): Promise<WebsiteBackendTokenInfo[]> {
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), TOKENS_ENDPOINT);
+ return result;
+ },
async getWikiArticlesBySectionAsync(): Promise<ArticlesBySection> {
const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT);
return result;