aboutsummaryrefslogtreecommitdiffstats
path: root/src/web3_wrapper.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-15 23:27:58 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-15 23:27:58 +0800
commit04698313a385003f5c1d545fff9c1a619faea4ff (patch)
tree246ade7dd6b6ec2f863c1e486ea84bb4d20a6819 /src/web3_wrapper.ts
parent209ca3046058e51ffc301737564029de5511967e (diff)
downloaddexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar.gz
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar.bz2
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar.lz
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar.xz
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.tar.zst
dexon-sol-tools-04698313a385003f5c1d545fff9c1a619faea4ff.zip
Switch back to using Web3.Provider, not Web3Provider in internal classes
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r--src/web3_wrapper.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts
index 5bff25233..6bdca499f 100644
--- a/src/web3_wrapper.ts
+++ b/src/web3_wrapper.ts
@@ -2,15 +2,14 @@ import * as _ from 'lodash';
import * as Web3 from 'web3';
import * as BigNumber from 'bignumber.js';
import promisify = require('es6-promisify');
-import {Web3Provider} from './types';
export class Web3Wrapper {
private web3: Web3;
- constructor(provider: Web3Provider) {
+ constructor(provider: Web3.Provider) {
this.web3 = new Web3();
this.web3.setProvider(provider);
}
- public setProvider(provider: Web3Provider) {
+ public setProvider(provider: Web3.Provider) {
this.web3.setProvider(provider);
}
public isAddress(address: string): boolean {
@@ -24,7 +23,7 @@ export class Web3Wrapper {
const nodeVersion = await promisify(this.web3.version.getNode)();
return nodeVersion;
}
- public getCurrentProvider(): Web3Provider {
+ public getCurrentProvider(): Web3.Provider {
return this.web3.currentProvider;
}
public async getNetworkIdIfExistsAsync(): Promise<number|undefined> {