diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-24 03:56:28 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-24 05:15:47 +0800 |
commit | 062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc (patch) | |
tree | 26223d066ed15aec3e50eca1ecb4da0fa649cef7 /packages/0x.js/src/web3_wrapper.ts | |
parent | b3c0d54acd1f4853f3b9dfbcf68bc90d17d586e0 (diff) | |
download | dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar.gz dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar.bz2 dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar.lz dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar.xz dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.tar.zst dexon-sol-tools-062f85e5069d0c2d56cd10bdb8a31a6d0a6c88dc.zip |
Pass networkId on provider update
Diffstat (limited to 'packages/0x.js/src/web3_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/web3_wrapper.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/0x.js/src/web3_wrapper.ts b/packages/0x.js/src/web3_wrapper.ts index 00f91106b..557cd28e5 100644 --- a/packages/0x.js/src/web3_wrapper.ts +++ b/packages/0x.js/src/web3_wrapper.ts @@ -21,7 +21,6 @@ export class Web3Wrapper { private web3: Web3; private networkId: number; private defaults: Partial<Web3.TxData>; - private networkIdIfExists?: number; private jsonRpcRequestId: number; constructor(provider: Web3.Provider, networkId: number, defaults?: Partial<Web3.TxData>) { if (_.isUndefined((provider as any).sendAsync)) { @@ -36,8 +35,8 @@ export class Web3Wrapper { this.defaults = defaults || {}; this.jsonRpcRequestId = 0; } - public setProvider(provider: Web3.Provider) { - delete this.networkIdIfExists; + public setProvider(provider: Web3.Provider, networkId: number) { + this.networkId = networkId; this.web3.setProvider(provider); } public isAddress(address: string): boolean { |