diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-11-08 10:02:24 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-11-08 15:41:25 +0800 |
commit | d0c009adff53d94414cf51028eff490e0452a3c9 (patch) | |
tree | 82a76e2499883d9a8a579b64b6503ef108d7706c /packages/instant/src/util | |
parent | f6abc007ffb249e4bbf85b8a7a77309d43e0a147 (diff) | |
download | dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.gz dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.tar.zst dexon-sol-tools-d0c009adff53d94414cf51028eff490e0452a3c9.zip |
feat(instant): fetch account address at startup and drive account state changes
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r-- | packages/instant/src/util/provider_state_factory.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/instant/src/util/provider_state_factory.ts b/packages/instant/src/util/provider_state_factory.ts index 18b188d89..3006c5e14 100644 --- a/packages/instant/src/util/provider_state_factory.ts +++ b/packages/instant/src/util/provider_state_factory.ts @@ -2,18 +2,12 @@ import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; +import { LOADING_ACCOUNT, NO_ACCOUNT } from '../constants'; import { AccountNotReady, AccountState, Maybe, Network, OrderSource, ProviderState } from '../types'; import { assetBuyerFactory } from './asset_buyer_factory'; import { providerFactory } from './provider_factory'; -const LOADING_ACCOUNT: AccountNotReady = { - state: AccountState.Loading, -}; -const NO_ACCOUNT: AccountNotReady = { - state: AccountState.None, -}; - export const providerStateFactory = { getInitialProviderState: (orderSource: OrderSource, network: Network, provider?: Provider): ProviderState => { if (!_.isUndefined(provider)) { |