aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-16 04:51:43 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-16 04:51:43 +0800
commit184232ba4fe304bb00a3dbbee21972b1ff29736b (patch)
treec3d7840fc37eb0e56e80660e999269c3cde3980f /packages/website/ts
parent0bc338ba421613a0b4768f0c434cc63b8213543f (diff)
downloaddexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar.gz
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar.bz2
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar.lz
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar.xz
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.tar.zst
dexon-sol-tools-184232ba4fe304bb00a3dbbee21972b1ff29736b.zip
Add dogfood configs to website
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/index.tsx2
-rw-r--r--packages/website/ts/utils/configs.ts6
-rw-r--r--packages/website/ts/utils/utils.ts3
3 files changed, 9 insertions, 2 deletions
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index 49bcdeaac..f255f81e7 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -35,7 +35,7 @@ import 'less/all.less';
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
// so each lazy import needs it's own `System.import()` declaration.
const LazyPortal =
- utils.isDevelopment() || utils.isStaging()
+ utils.isDevelopment() || utils.isStaging() || utils.isDogfood()
? createLazyComponent('Portal', async () =>
System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
)
diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts
index a54fc56a8..bea9c4ee2 100644
--- a/packages/website/ts/utils/configs.ts
+++ b/packages/website/ts/utils/configs.ts
@@ -1,5 +1,6 @@
import * as _ from 'lodash';
import { Environments, OutdatedWrappedEtherByNetworkId, PublicNodeUrlsByNetworkId } from 'ts/types';
+import { utils } from 'ts/utils/utils';
const BASE_URL = window.location.origin;
const isDevelopment = _.includes(
@@ -10,13 +11,16 @@ const INFURA_API_KEY = 'T5WSC8cautR4KXyYgsRs';
export const configs = {
AMOUNT_DISPLAY_PRECSION: 5,
- BACKEND_BASE_URL: 'https://website-api.0xproject.com',
+ BACKEND_BASE_URL: utils.isDogfood()
+ ? 'http://ec2-52-91-181-85.compute-1.amazonaws.com'
+ : 'https://website-api.0xproject.com',
BASE_URL,
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
// WARNING: ZRX & WETH MUST always be default trackedTokens
DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'],
DOMAIN_STAGING: 'staging-0xproject.s3-website-us-east-1.amazonaws.com',
+ DOMAIN_DOGFOOD: 'dogfood-0xproject.s3-website-us-east-1.amazonaws.com',
DOMAIN_DEVELOPMENT: '0xproject.localhost:3572',
DOMAIN_PRODUCTION: '0xproject.com',
ENVIRONMENT: isDevelopment ? Environments.DEVELOPMENT : Environments.PRODUCTION,
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index bf30f4e04..c3e261ddb 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -308,4 +308,7 @@ export const utils = {
isStaging(): boolean {
return _.includes(window.location.href, configs.DOMAIN_STAGING);
},
+ isDogfood(): boolean {
+ return _.includes(window.location.href, configs.DOMAIN_DOGFOOD);
+ },
};