aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/0x.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-08 17:51:46 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-08 17:51:46 +0800
commitb362e2c28e9cafa7335bced17ec61fba93b018e6 (patch)
tree6a6c65f2a3a17ff93b566fa0c0e7d92032d1a7a0 /packages/0x.js/src/0x.ts
parent5401c69163f8fd384038a3ef8c760ec95c661035 (diff)
downloaddexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar.gz
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar.bz2
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar.lz
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar.xz
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.tar.zst
dexon-sol-tools-b362e2c28e9cafa7335bced17ec61fba93b018e6.zip
Refactor networkId out of web3Wrapper
Diffstat (limited to 'packages/0x.js/src/0x.ts')
-rw-r--r--packages/0x.js/src/0x.ts13
1 files changed, 10 insertions, 3 deletions
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,
);