aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 17:38:28 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 17:38:28 +0800
commita12df1c73a97b3ba18ab53c1b25be39b837f6240 (patch)
tree6d9ea6902ad1011b0395fc62fa89e89eca259dd9 /src/0x.ts
parent876032a8a71f9eedbf3394727dbc0ea513100836 (diff)
downloaddexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar.gz
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar.bz2
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar.lz
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar.xz
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.tar.zst
dexon-sol-tools-a12df1c73a97b3ba18ab53c1b25be39b837f6240.zip
Fix gasPrice regression
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 86976c4ab..fd7d9b5a5 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -170,13 +170,16 @@ export class ZeroEx {
// We re-assign the send method so that Web3@1.0 providers work with 0x.js
(provider as any).sendAsync = (provider as any).send;
}
- this._web3Wrapper = new Web3Wrapper(provider);
const gasPrice = _.isUndefined(config) ? undefined : config.gasPrice;
- this.token = new TokenWrapper(this._web3Wrapper, gasPrice);
- this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper, gasPrice);
- this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, gasPrice);
- this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, gasPrice);
- this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, gasPrice);
+ const defaults = {
+ gasPrice,
+ };
+ this._web3Wrapper = new Web3Wrapper(provider, defaults);
+ this.token = new TokenWrapper(this._web3Wrapper);
+ this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper);
+ this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token);
+ this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper);
+ this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token);
}
/**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all