From f1b267cc9fe7f6e5566dc2535b064b92aef92df1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 6 Dec 2017 20:55:09 +0300 Subject: Refactor web3Wrapper to a separate package --- packages/0x.js/src/0x.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/src/0x.ts') diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 0616b3078..1cbfaed0c 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -1,4 +1,5 @@ import {schemas, SchemaValidator} from '@0xproject/json-schemas'; +import {Web3Wrapper} from '@0xproject/web3-wrapper'; import BigNumber from 'bignumber.js'; import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; @@ -29,7 +30,6 @@ 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(); -- cgit From b362e2c28e9cafa7335bced17ec61fba93b018e6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Dec 2017 12:51:46 +0300 Subject: Refactor networkId out of web3Wrapper --- packages/0x.js/src/0x.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'packages/0x.js/src/0x.ts') diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 1cbfaed0c..935e4ac1a 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -179,24 +179,31 @@ export class ZeroEx { const defaults = { gasPrice: config.gasPrice, }; - this._web3Wrapper = new Web3Wrapper(provider, config.networkId, defaults); + this._web3Wrapper = new Web3Wrapper(provider, defaults); this.proxy = new TokenTransferProxyWrapper( this._web3Wrapper, + config.networkId, config.tokenTransferProxyContractAddress, ); this.token = new TokenWrapper( this._web3Wrapper, + config.networkId, this._abiDecoder, this.proxy, ); this.exchange = new ExchangeWrapper( this._web3Wrapper, + config.networkId, this._abiDecoder, this.token, config.exchangeContractAddress, ); - this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, config.tokenRegistryContractAddress); - this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, config.etherTokenContractAddress); + this.tokenRegistry = new TokenRegistryWrapper( + this._web3Wrapper, config.networkId, config.tokenRegistryContractAddress, + ); + this.etherToken = new EtherTokenWrapper( + this._web3Wrapper, config.networkId, this.token, config.etherTokenContractAddress, + ); this.orderStateWatcher = new OrderStateWatcher( this._web3Wrapper, this._abiDecoder, this.token, this.exchange, config.orderWatcherConfig, ); -- cgit