Make BlockchainLifecycle accept only web3Wrapper

This commit is contained in:
Leonid Logvinov
2018-03-12 12:51:37 +01:00
parent 49ff4299c6
commit 32e3cab116
11 changed files with 28 additions and 32 deletions

View File

@@ -4,10 +4,8 @@ import * as Web3 from 'web3';
export class BlockchainLifecycle {
private _web3Wrapper: Web3Wrapper;
private _snapshotIdsStack: number[];
constructor(web3Orweb3Wrapper: Web3Wrapper | Web3) {
this._web3Wrapper = (web3Orweb3Wrapper as Web3Wrapper).isZeroExWeb3Wrapper
? (web3Orweb3Wrapper as Web3Wrapper)
: new Web3Wrapper((web3Orweb3Wrapper as Web3).currentProvider);
constructor(web3Wrapper: Web3Wrapper) {
this._web3Wrapper = web3Wrapper;
this._snapshotIdsStack = [];
}
// TODO: In order to run these tests on an actual node, we should check if we are running against