aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/blockchain.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 9be764917..b13c48a65 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -488,6 +488,7 @@ export class Blockchain {
const subscriptionId = await this.zeroEx.exchange.subscribeAsync(
ExchangeEvents.LogFill, indexFilterValues,
async (err: Error, decodedLogEvent: DecodedLogEvent<LogFillContractEventArgs>) => {
+ const decodedLog = decodedLogEvent.log;
if (err) {
// Note: it's not entirely clear from the documentation which
// errors will be thrown by `watch`. For now, let's log the error
@@ -496,12 +497,12 @@ export class Blockchain {
this.stopWatchingExchangeLogFillEventsAsync(); // fire and forget
return;
} else {
- if (!this.doesLogEventInvolveUser(decodedLogEvent)) {
+ if (!this.doesLogEventInvolveUser(decodedLog)) {
return; // We aren't interested in the fill event
}
- this.updateLatestFillsBlockIfNeeded(decodedLogEvent.blockNumber);
- const fill = await this.convertDecodedLogToFillAsync(decodedLogEvent);
- if (decodedLogEvent.removed) {
+ this.updateLatestFillsBlockIfNeeded(decodedLog.blockNumber);
+ const fill = await this.convertDecodedLogToFillAsync(decodedLog);
+ if (decodedLogEvent.isRemoved) {
tradeHistoryStorage.removeFillFromUser(this.userAddress, this.networkId, fill);
} else {
tradeHistoryStorage.addFillToUser(this.userAddress, this.networkId, fill);