aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/constants.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-11-09 09:35:54 +0800
committerGitHub <noreply@github.com>2018-11-09 09:35:54 +0800
commit12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39 (patch)
treef45b60fa2792667d7891ea6ae93e8a74f27567bc /packages/instant/src/constants.ts
parentca6f99da6158102f007c1c9b24fcba72c12beb3c (diff)
parentb147cd888505443981781d200a68b949812cb3e9 (diff)
downloaddexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.gz
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.bz2
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.lz
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.xz
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.tar.zst
dexon-sol-tools-12bc6f5d5816a3c1c5ed03b23ce67a1be4e72f39.zip
Merge pull request #1232 from 0xProject/feature/instant/account-state-change
[instant] Request account address and balance at mount
Diffstat (limited to 'packages/instant/src/constants.ts')
-rw-r--r--packages/instant/src/constants.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
index 34548f26f..b5c4f96e4 100644
--- a/packages/instant/src/constants.ts
+++ b/packages/instant/src/constants.ts
@@ -1,6 +1,6 @@
import { BigNumber } from '@0x/utils';
-import { Network } from './types';
+import { AccountNotReady, AccountState, Network } from './types';
export const BIG_NUMBER_ZERO = new BigNumber(0);
export const ETH_DECIMALS = 18;
@@ -22,3 +22,15 @@ export const ETHEREUM_NODE_URL_BY_NETWORK = {
[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,
+};
+export const ERROR_ACCOUNT: AccountNotReady = {
+ state: AccountState.Error,
+};