aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/constants.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-11-12 05:11:10 +0800
committerFabio Berger <me@fabioberger.com>2018-11-12 05:11:10 +0800
commit0391f93490cffdc69f6cb32f11762d174ed04e37 (patch)
tree3a8b30a04de1193aa21e5b84bd572db24979a8bf /packages/instant/src/constants.ts
parent399a7d5fec9af4f3491a77f0c2d46738f3d8ffa7 (diff)
parent397b4e289015f9bb0831c1a0ce6fee601670b487 (diff)
downloaddexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.gz
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.bz2
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.lz
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.xz
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.tar.zst
dexon-sol-tools-0391f93490cffdc69f6cb32f11762d174ed04e37.zip
merge development
Diffstat (limited to 'packages/instant/src/constants.ts')
-rw-r--r--packages/instant/src/constants.ts32
1 files changed, 31 insertions, 1 deletions
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
index 48d0d4aa2..110a8248a 100644
--- a/packages/instant/src/constants.ts
+++ b/packages/instant/src/constants.ts
@@ -1,5 +1,35 @@
import { BigNumber } from '@0x/utils';
+
+import { AccountNotReady, AccountState, Network } from './types';
+
export const BIG_NUMBER_ZERO = new BigNumber(0);
-export const ethDecimals = 18;
+export const ETH_DECIMALS = 18;
export const DEFAULT_ZERO_EX_CONTAINER_SELECTOR = '#zeroExInstantContainer';
+export const INJECTED_DIV_CLASS = 'zeroExInstantResetRoot';
+export const INJECTED_DIV_ID = 'zeroExInstant';
export const WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX = 'Transaction failed';
+export const GWEI_IN_WEI = new BigNumber(1000000000);
+export const ONE_SECOND_MS = 1000;
+export const ONE_MINUTE_MS = ONE_SECOND_MS * 60;
+export const ACCOUNT_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 5;
+export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15;
+export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6);
+export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2;
+export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info';
+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 ETHEREUM_NODE_URL_BY_NETWORK = {
+ [Network.Mainnet]: 'https://mainnet.infura.io/',
+ [Network.Kovan]: 'https://kovan.infura.io/',
+};
+export const BLOCK_POLLING_INTERVAL_MS = 10000; // 10s
+export const NO_ACCOUNT: AccountNotReady = {
+ state: AccountState.None,
+};
+export const LOADING_ACCOUNT: AccountNotReady = {
+ state: AccountState.Loading,
+};
+export const LOCKED_ACCOUNT: AccountNotReady = {
+ state: AccountState.Locked,
+};