Skip to content

Commit

Permalink
Better WebSocket compatibilities with Parity (#)849.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 26, 2020
1 parent f8777d0 commit 180a1af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/providers/src.ts/websocket-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class WebSocketProvider extends JsonRpcProvider {
_startEvent(event: Event): void {
switch (event.type) {
case "block":
this._subscribe("block", [ "newHeads", { } ], (result: any) => {
this._subscribe("block", [ "newHeads" ], (result: any) => {
this.emit("block", BigNumber.from(result.number).toNumber());
});
break;
Expand Down Expand Up @@ -213,7 +213,7 @@ export class WebSocketProvider extends JsonRpcProvider {
// to keep an eye out for transactions we are watching for.
// Starting a subscription for an event (i.e. "tx") that is already
// running is (basically) a nop.
this._subscribe("tx", [ "newHeads", { } ], (result: any) => {
this._subscribe("tx", [ "newHeads" ], (result: any) => {
this._events.filter((e) => (e.type === "tx")).forEach(emitReceipt);
});
break;
Expand Down

0 comments on commit 180a1af

Please sign in to comment.