aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-01 04:42:40 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-01 04:42:40 +0800
commitab631060a05fc6344ef6e2de7b0e6a0f0096e8ed (patch)
treef958921057cad63211ee46c86d1f5ee6521b37b9 /packages/instant/src
parente59d47eac82d2db85b301b24aad4c1e41246daa8 (diff)
downloaddexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar.gz
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar.bz2
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar.lz
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar.xz
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.tar.zst
dexon-sol-tools-ab631060a05fc6344ef6e2de7b0e6a0f0096e8ed.zip
cdn -> dischargeTarget, and report to heap
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/components/zero_ex_instant_provider.tsx7
-rw-r--r--packages/instant/src/constants.ts6
-rw-r--r--packages/instant/src/util/analytics.ts1
3 files changed, 12 insertions, 2 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx
index 9814aabf8..dc57513d1 100644
--- a/packages/instant/src/components/zero_ex_instant_provider.tsx
+++ b/packages/instant/src/components/zero_ex_instant_provider.tsx
@@ -5,7 +5,11 @@ import * as _ from 'lodash';
import * as React from 'react';
import { Provider as ReduxProvider } from 'react-redux';
-import { ACCOUNT_UPDATE_INTERVAL_TIME_MS, BUY_QUOTE_UPDATE_INTERVAL_TIME_MS } from '../constants';
+import {
+ ACCOUNT_UPDATE_INTERVAL_TIME_MS,
+ BUY_QUOTE_UPDATE_INTERVAL_TIME_MS,
+ INSTANT_DISCHARGE_TARGET,
+} from '../constants';
import { SelectedAssetThemeProvider } from '../containers/selected_asset_theme_provider';
import { asyncData } from '../redux/async_data';
import { DEFAULT_STATE, DefaultState, State } from '../redux/reducer';
@@ -132,6 +136,7 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider
providerName: state.providerState.name,
gitSha: process.env.GIT_SHA,
npmVersion: process.env.NPM_PACKAGE_VERSION,
+ instantEnvironment: INSTANT_DISCHARGE_TARGET || `Local ${process.env.NODE_ENV}`,
});
analytics.trackInstantOpened();
}
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
index 3370af094..b37a3a844 100644
--- a/packages/instant/src/constants.ts
+++ b/packages/instant/src/constants.ts
@@ -20,7 +20,11 @@ export const HEAP_ANALYTICS_ID = process.env.HEAP_ANALYTICS_ID;
export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2';
export const PROGRESS_STALL_AT_WIDTH = '95%';
export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200;
-export const INSTANT_CDN = process.env.INSTANT_CDN as 'production' | 'dogfood' | 'staging' | undefined;
+export const INSTANT_DISCHARGE_TARGET = process.env.INSTANT_DISCHARGE_TARGET as
+ | 'production'
+ | 'dogfood'
+ | 'staging'
+ | undefined;
export const COINBASE_WALLET_IOS_APP_STORE_URL = 'https://itunes.apple.com/us/app/coinbase-wallet/id1278383455?mt=8';
export const COINBASE_WALLET_ANDROID_APP_STORE_URL = 'https://play.google.com/store/apps/details?id=org.toshi&hl=en';
export const COINBASE_WALLET_SITE_URL = 'https://wallet.coinbase.com/';
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
index e389e1530..45ce4dbd4 100644
--- a/packages/instant/src/util/analytics.ts
+++ b/packages/instant/src/util/analytics.ts
@@ -47,6 +47,7 @@ export interface AnalyticsEventOptions {
providerName?: string;
gitSha?: string;
npmVersion?: string;
+ instantEnvironment?: string;
}
export const analytics = {