diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-04-20 04:25:55 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-04-20 04:28:35 +0800 |
commit | 12d8c0b6af7950e8aef12022007bd490fcf2ddaf (patch) | |
tree | b4fc1adc69a4c912816975743971e5b1786dc04b /packages/website/ts/utils | |
parent | 8634551f53bac9769e866b9a2f6f7d0dbd203704 (diff) | |
download | dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar.gz dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar.bz2 dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar.lz dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar.xz dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.tar.zst dexon-sol-tools-12d8c0b6af7950e8aef12022007bd490fcf2ddaf.zip |
Integrate relayer index with website backend
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r-- | packages/website/ts/utils/backend_client.ts | 13 |
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; |