From 54ba2a616778256a09d901b0e3f8d7a1a0be31d1 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Thu, 23 Apr 2020 23:17:55 -0400 Subject: [PATCH] Fixed inconsistent log format in WebSocketProvider (#795). --- src.ts/websocket-provider.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src.ts/websocket-provider.ts b/src.ts/websocket-provider.ts index 88ac396e35..256b035784 100644 --- a/src.ts/websocket-provider.ts +++ b/src.ts/websocket-provider.ts @@ -190,12 +190,12 @@ export class WebSocketProvider extends JsonRpcProvider { }); break; - case "filter": { + case "filter": this._subscribe(event.tag, [ "logs", this._getFilter(event.filter) ], (result: any) => { - this.emit(event.filter, result); + if (result.removed == null) { result.removed = false; } + this.emit(event.filter, this.formatter.filterLog(result)); }); break; - } case "tx": { const emitReceipt = (event: Event) => {