diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-07 01:55:09 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-07 01:55:09 +0800 |
commit | f1b267cc9fe7f6e5566dc2535b064b92aef92df1 (patch) | |
tree | c07a9dd32c5b959d33587ce2d38098dfe397badb /packages/website/ts/blockchain.ts | |
parent | 598f1dd2d8a89b0e3ab04b2917138997031bafc6 (diff) | |
download | dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar.gz dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar.bz2 dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar.lz dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar.xz dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.tar.zst dexon-sol-tools-f1b267cc9fe7f6e5566dc2535b064b92aef92df1.zip |
Refactor web3Wrapper to a separate package
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 31d725a41..9136dc916 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -16,9 +16,9 @@ import { ZeroEx, ZeroExError, } from '0x.js'; +import {promisify} from '@0xproject/utils'; import BigNumber from 'bignumber.js'; import compareVersions = require('compare-versions'); -import promisify = require('es6-promisify'); import ethUtil = require('ethereumjs-util'); import findVersions = require('find-versions'); import * as _ from 'lodash'; @@ -65,7 +65,7 @@ export class Blockchain { public nodeVersion: string; private zeroEx: ZeroEx; private dispatcher: Dispatcher; - private web3Wrapper: Web3Wrapper; + private web3Wrapper?: Web3Wrapper; private exchangeAddress: string; private tokenTransferProxy: ContractInstance; private tokenRegistry: ContractInstance; @@ -624,7 +624,7 @@ export class Blockchain { let networkId: number; if (!_.isUndefined(injectedWeb3)) { try { - networkId = _.parseInt(await promisify(injectedWeb3.version.getNetwork)()); + networkId = _.parseInt(await promisify<string>(injectedWeb3.version.getNetwork)()); } catch (err) { // Ignore error and proceed with networkId undefined } |