diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-30 00:40:49 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-30 00:40:49 +0800 |
commit | 3f99281309a1a63b52228dd3c787d82971e8ce45 (patch) | |
tree | 9c7a8cac39f693ec42f7a4491d30e1bd75f2b884 /src/0x.ts | |
parent | 28b4ff42ea4db226c96329506a32df46954cd065 (diff) | |
download | dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar.gz dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar.bz2 dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar.lz dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar.xz dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.tar.zst dexon-sol-tools-3f99281309a1a63b52228dd3c787d82971e8ce45.zip |
Support web3@1.0 providers
Diffstat (limited to 'src/0x.ts')
-rw-r--r-- | src/0x.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -163,6 +163,10 @@ export class ZeroEx { * @return An instance of the 0x.js ZeroEx class. */ constructor(provider: Web3Provider, config?: ZeroExConfig) { + if (_.isUndefined(provider.sendAsync)) { + // We assume, that this is a provider from beta web3 + provider.sendAsync = provider.send; + } this._web3Wrapper = new Web3Wrapper(provider); const gasPrice = _.isUndefined(config) ? undefined : config.gasPrice; this.token = new TokenWrapper(this._web3Wrapper, gasPrice); |