diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-23 06:19:06 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-24 05:13:37 +0800 |
commit | 010e6f8d7f7403cb91c020fc501fdb4f59861c58 (patch) | |
tree | 7f854bbf95efed9688f144943df7a8c326c3c65e /packages/0x.js/src/0x.ts | |
parent | 3d5b6ec110e32f670920a88939a250479651bb5a (diff) | |
download | dexon-0x-contracts-010e6f8d7f7403cb91c020fc501fdb4f59861c58.tar.gz dexon-0x-contracts-010e6f8d7f7403cb91c020fc501fdb4f59861c58.tar.zst dexon-0x-contracts-010e6f8d7f7403cb91c020fc501fdb4f59861c58.zip |
Fix the imports order
Diffstat (limited to 'packages/0x.js/src/0x.ts')
-rw-r--r-- | packages/0x.js/src/0x.ts | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index a853aca1c..3dc98d5da 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -1,34 +1,35 @@ -import * as _ from 'lodash'; +import {schemas, SchemaValidator} from '@0xproject/json-schemas'; import BigNumber from 'bignumber.js'; -import {SchemaValidator, schemas} from '@0xproject/json-schemas'; -import {bigNumberConfigs} from './bignumber_config'; import * as ethUtil from 'ethereumjs-util'; -import {Web3Wrapper} from './web3_wrapper'; -import {constants} from './utils/constants'; -import {utils} from './utils/utils'; -import {signatureUtils} from './utils/signature_utils'; -import {assert} from './utils/assert'; -import {AbiDecoder} from './utils/abi_decoder'; -import {intervalUtils} from './utils/interval_utils'; +import * as _ from 'lodash'; + import {artifacts} from './artifacts'; +import {bigNumberConfigs} from './bignumber_config'; +import {EtherTokenWrapper} from './contract_wrappers/ether_token_wrapper'; import {ExchangeWrapper} from './contract_wrappers/exchange_wrapper'; import {TokenRegistryWrapper} from './contract_wrappers/token_registry_wrapper'; -import {EtherTokenWrapper} from './contract_wrappers/ether_token_wrapper'; -import {TokenWrapper} from './contract_wrappers/token_wrapper'; import {TokenTransferProxyWrapper} from './contract_wrappers/token_transfer_proxy_wrapper'; +import {TokenWrapper} from './contract_wrappers/token_wrapper'; import {OrderStateWatcher} from './order_watcher/order_state_watcher'; -import {OrderStateUtils} from './utils/order_state_utils'; +import {zeroExConfigSchema} from './schemas/zero_ex_config_schema'; import { ECSignature, - ZeroExError, Order, + OrderStateWatcherConfig, SignedOrder, + TransactionReceiptWithDecodedLogs, Web3Provider, ZeroExConfig, - OrderStateWatcherConfig, - TransactionReceiptWithDecodedLogs, + ZeroExError, } from './types'; -import {zeroExConfigSchema} from './schemas/zero_ex_config_schema'; +import {AbiDecoder} from './utils/abi_decoder'; +import {assert} from './utils/assert'; +import {constants} from './utils/constants'; +import {intervalUtils} from './utils/interval_utils'; +import {OrderStateUtils} from './utils/order_state_utils'; +import {signatureUtils} from './utils/signature_utils'; +import {utils} from './utils/utils'; +import {Web3Wrapper} from './web3_wrapper'; // Customize our BigNumber instances bigNumberConfigs.configure(); @@ -179,10 +180,14 @@ export class ZeroEx { gasPrice: config.gasPrice, }; this._web3Wrapper = new Web3Wrapper(provider, config.networkId, defaults); + this.proxy = new TokenTransferProxyWrapper( + this._web3Wrapper, + config.tokenTransferProxyContractAddress, + ); this.token = new TokenWrapper( this._web3Wrapper, this._abiDecoder, - this._getTokenTransferProxyAddressAsync.bind(this), + this.proxy, ); this.exchange = new ExchangeWrapper( this._web3Wrapper, @@ -190,10 +195,6 @@ export class ZeroEx { this.token, config.exchangeContractAddress, ); - this.proxy = new TokenTransferProxyWrapper( - this._web3Wrapper, - this._getTokenTransferProxyAddressAsync.bind(this), - ); this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, config.tokenRegistryContractAddress); this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, config.etherTokenContractAddress); this.orderStateWatcher = new OrderStateWatcher( |