diff options
author | Leonid <logvinov.leon@gmail.com> | 2018-02-05 19:03:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 19:03:36 +0800 |
commit | c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8 (patch) | |
tree | 4829624adc8a36ff6d80db185e6021cac846a55a /packages/0x.js/src | |
parent | 44cd185c66b08a5a9b081c972e7cb6764c066506 (diff) | |
parent | 85b4a82a4bc1059b3321763e20b8e2c4d8ff0e73 (diff) | |
download | dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar.gz dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar.bz2 dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar.lz dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar.xz dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.tar.zst dexon-sol-tools-c7ad6ebad6ab65a4b1e4a2084e744c6ca2bc09b8.zip |
Merge pull request #358 from 0xProject/feature/build_watch
Add build:watch command to all TS packages
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/contract_wrapper.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts index 873489dc9..2d5818618 100644 --- a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts @@ -34,8 +34,8 @@ export class ContractWrapper { protected _web3Wrapper: Web3Wrapper; private _networkId: number; private _abiDecoder?: AbiDecoder; - private _blockAndLogStreamerIfExists: BlockAndLogStreamer | undefined; - private _blockAndLogStreamInterval: NodeJS.Timer; + private _blockAndLogStreamerIfExists?: BlockAndLogStreamer; + private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer; private _filters: { [filterToken: string]: Web3.FilterObject }; private _filterCallbacks: { [filterToken: string]: EventCallback<ContractEventArgs>; @@ -162,7 +162,7 @@ export class ContractWrapper { ); const catchAllLogFilter = {}; this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter); - this._blockAndLogStreamInterval = intervalUtils.setAsyncExcludingInterval( + this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval( this._reconcileBlockAsync.bind(this), constants.DEFAULT_BLOCK_POLLING_INTERVAL, this._onReconcileBlockError.bind(this), @@ -191,7 +191,7 @@ export class ContractWrapper { } this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string); this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string); - intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamInterval); + intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamIntervalIfExists as NodeJS.Timer); delete this._blockAndLogStreamerIfExists; } private async _reconcileBlockAsync(): Promise<void> { |