aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 20:54:47 +0800
committerGitHub <noreply@github.com>2018-07-18 20:54:47 +0800
commitf3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0 (patch)
tree4aacfa2652ba2c5f976e36ac25449decb561d3f0 /packages/website/ts/blockchain.ts
parent904968cf4a899642d3f4e78abc53352125e17447 (diff)
parentbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (diff)
downloaddexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.gz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.bz2
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.lz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.xz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.zst
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.zip
Merge pull request #883 from 0xProject/feature/tslint-improvements
New tslint rules
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index e8168d975..88461f8a9 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -83,11 +83,11 @@ export class Blockchain {
public networkId: number;
public nodeVersion: string;
private _contractWrappers: ContractWrappers;
- private _dispatcher: Dispatcher;
+ private readonly _dispatcher: Dispatcher;
private _web3Wrapper?: Web3Wrapper;
private _blockchainWatcher?: BlockchainWatcher;
private _injectedProviderObservable?: InjectedProviderObservable;
- private _injectedProviderUpdateHandler: (update: InjectedProviderUpdate) => Promise<void>;
+ private readonly _injectedProviderUpdateHandler: (update: InjectedProviderUpdate) => Promise<void>;
private _userAddressIfExists: string;
private _ledgerSubprovider: LedgerSubprovider;
private _defaultGasPrice: BigNumber;
@@ -125,7 +125,11 @@ export class Blockchain {
let networkIdIfExists: number;
if (!_.isUndefined(injectedWeb3IfExists)) {
try {
- networkIdIfExists = _.parseInt(await promisify<string>(injectedWeb3IfExists.version.getNetwork)());
+ networkIdIfExists = _.parseInt(
+ await promisify<string>(
+ injectedWeb3IfExists.version.getNetwork.bind(injectedWeb3IfExists.version),
+ )(),
+ );
} catch (err) {
// Ignore error and proceed with networkId undefined
}