Skip to content

Commit

Permalink
Fixes resetEventsBlock function (see ethers-io#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neurone committed May 20, 2020
1 parent 427e168 commit 1166f4f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions dist/ethers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10642,6 +10642,7 @@ var BaseProvider = /** @class */ (function (_super) {
};
BaseProvider.prototype.resetEventsBlock = function (blockNumber) {
this._lastBlockNumber = blockNumber - 1;
this._emitted.block = this._lastBlockNumber;
if (this.polling) {
this._doPoll();
}
Expand Down
2 changes: 1 addition & 1 deletion dist/ethers.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ethers.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions providers/base-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ var BaseProvider = /** @class */ (function (_super) {
};
BaseProvider.prototype.resetEventsBlock = function (blockNumber) {
this._lastBlockNumber = blockNumber - 1;
this._emitted.block = this._lastBlockNumber;
if (this.polling) {
this._doPoll();
}
Expand Down
1 change: 1 addition & 0 deletions src.ts/providers/base-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ export class BaseProvider extends Provider {

resetEventsBlock(blockNumber: number): void {
this._lastBlockNumber = blockNumber - 1;
this._emitted.block = this._lastBlockNumber;
if (this.polling) { this._doPoll(); }
}

Expand Down

0 comments on commit 1166f4f

Please sign in to comment.