From c61fe3ce64e58e7ae427642430621b857c3a716d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 12 Dec 2017 13:33:12 +0100 Subject: Don't unsubscribe on error. It's done automatically --- packages/website/ts/blockchain.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 76640a072..172ba6b52 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -468,8 +468,7 @@ export class Blockchain { public destroy() { clearInterval(this.zrxPollIntervalId); this.web3Wrapper.destroy(); - // tslint:disable-next-line:no-floating-promises - this.stopWatchingExchangeLogFillEventsAsync(); // fire and forget + this.stopWatchingExchangeLogFillEvents(); } private async showEtherScanLinkAndAwaitTransactionMinedAsync( txHash: string): Promise { @@ -485,7 +484,7 @@ export class Blockchain { } private async rehydrateStoreWithContractEvents() { // Ensure we are only ever listening to one set of events - await this.stopWatchingExchangeLogFillEventsAsync(); + this.stopWatchingExchangeLogFillEvents(); if (!this.doesUserAddressExist()) { return; // short-circuit @@ -517,8 +516,6 @@ export class Blockchain { // to rollbar and stop watching when one occurs // tslint:disable-next-line:no-floating-promises errorReporter.reportAsync(err); // fire and forget - // tslint:disable-next-line:no-floating-promises - this.stopWatchingExchangeLogFillEventsAsync(); // fire and forget return; } else { const decodedLog = decodedLogEvent.log; @@ -593,7 +590,7 @@ export class Blockchain { tradeHistoryStorage.setFillsLatestBlock(this.userAddress, this.networkId, blockNumberToSet); } } - private async stopWatchingExchangeLogFillEventsAsync() { + private stopWatchingExchangeLogFillEvents(): void { this.zeroEx.exchange.unsubscribeAll(); } private async getTokenRegistryTokensByAddressAsync(): Promise { -- cgit v1.2.3