aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-12 20:33:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-12 20:33:12 +0800
commitc61fe3ce64e58e7ae427642430621b857c3a716d (patch)
tree66ce1570266bbbd4705a2a520f05be91aff530f2 /packages
parentf94dc1fe4489aae7aa7dab9d80b1b7d0745ba2d7 (diff)
downloaddexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar.gz
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar.bz2
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar.lz
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar.xz
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.tar.zst
dexon-sol-tools-c61fe3ce64e58e7ae427642430621b857c3a716d.zip
Don't unsubscribe on error. It's done automatically
Diffstat (limited to 'packages')
-rw-r--r--packages/website/package.json2
-rw-r--r--packages/website/ts/blockchain.ts9
2 files changed, 4 insertions, 7 deletions
diff --git a/packages/website/package.json b/packages/website/package.json
index 95e060552..13ee2b082 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -18,7 +18,7 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
- "0x.js": "0xproject/0x.js/packages/0x.js#0x.js@0.27.1",
+ "0x.js": "^0.27.2",
"@0xproject/subproviders": "^0.1.0",
"accounting": "^0.4.1",
"basscss": "^8.0.3",
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<TransactionReceiptWithDecodedLogs> {
@@ -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<TokenByAddress> {