diff options
author | Fabio Berger <me@fabioberger.com> | 2017-05-26 23:47:00 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-05-26 23:47:00 +0800 |
commit | a6da9cd07389b317624ad00a3cb73b75820687e1 (patch) | |
tree | a7e488b85e308b9cfa6e4dcd144bfaf2e9843062 /src/ts/web3_wrapper.ts | |
parent | 1d4a52fe15988fb8534c441c539f55dd5d18db1a (diff) | |
download | dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar.gz dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar.bz2 dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar.lz dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar.xz dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.tar.zst dexon-sol-tools-a6da9cd07389b317624ad00a3cb73b75820687e1.zip |
Add missing return types
Diffstat (limited to 'src/ts/web3_wrapper.ts')
-rw-r--r-- | src/ts/web3_wrapper.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ts/web3_wrapper.ts b/src/ts/web3_wrapper.ts index ec3be994f..969c2c040 100644 --- a/src/ts/web3_wrapper.ts +++ b/src/ts/web3_wrapper.ts @@ -34,7 +34,7 @@ export class Web3Wrapper { public getCurrentProvider(): Web3.Provider { return this.web3.currentProvider; } - public async getNetworkIdIfExistsAsync() { + public async getNetworkIdIfExistsAsync(): Promise<number|undefined> { try { const networkId = await this.getNetworkAsync(); return Number(networkId); @@ -64,7 +64,7 @@ export class Web3Wrapper { const {timestamp} = await promisify(this.web3.eth.getBlock)(blockHash); return timestamp; } - private async getNetworkAsync() { + private async getNetworkAsync(): Promise<number> { const networkId = await promisify(this.web3.version.getNetwork)(); return networkId; } |