From f1b267cc9fe7f6e5566dc2535b064b92aef92df1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 6 Dec 2017 20:55:09 +0300 Subject: Refactor web3Wrapper to a separate package --- packages/website/ts/blockchain.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/website/ts/blockchain.ts') 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(injectedWeb3.version.getNetwork)()); } catch (err) { // Ignore error and proceed with networkId undefined } -- cgit