aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-12-09 00:10:05 +0800
committerGitHub <noreply@github.com>2017-12-09 00:10:05 +0800
commitf109d132e400583f0985a01854a4bc9c12ead883 (patch)
treeb0db651ef7aba234ba6b07ff05695a366db734f8 /packages/website/ts/blockchain.ts
parent72ced622d7fddac4d17b7814f45aeea01db23959 (diff)
parente0d79bd332a3f8a9cad5147f33b2bfaf49e6a5c7 (diff)
downloaddexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar.gz
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar.bz2
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar.lz
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar.xz
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.tar.zst
dexon-sol-tools-f109d132e400583f0985a01854a4bc9c12ead883.zip
Merge pull request #253 from 0xProject/feature/web3-wrapper
Refactor web3Wrapper to a separate package
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index aea4f863c..24205802d 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 networkIdIfExists: number;
if (!_.isUndefined(injectedWeb3)) {
try {
- networkIdIfExists = _.parseInt(await promisify(injectedWeb3.version.getNetwork)());
+ networkIdIfExists = _.parseInt(await promisify<string>(injectedWeb3.version.getNetwork)());
} catch (err) {
// Ignore error and proceed with networkId undefined
}