Updated dist files.
This commit is contained in:
parent
72edcd054f
commit
94b0abc240
42
dist/ethers.js
vendored
42
dist/ethers.js
vendored
@ -10712,17 +10712,19 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
if (confirmations == null) {
|
||||
confirmations = 1;
|
||||
}
|
||||
return web_1.poll(function () {
|
||||
return _this.getTransactionReceipt(transactionHash).then(function (receipt) {
|
||||
if (confirmations === 0) {
|
||||
return receipt;
|
||||
if (confirmations === 0) {
|
||||
return this.getTransactionReceipt(transactionHash);
|
||||
}
|
||||
return new Promise(function (resolve) {
|
||||
var handler = function (receipt) {
|
||||
if (receipt.confirmations < confirmations) {
|
||||
return;
|
||||
}
|
||||
if (receipt == null || receipt.confirmations < confirmations) {
|
||||
return undefined;
|
||||
}
|
||||
return receipt;
|
||||
});
|
||||
}, { onceBlock: this });
|
||||
_this.removeListener(transactionHash, handler);
|
||||
resolve(receipt);
|
||||
};
|
||||
_this.on(transactionHash, handler);
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.getBlockNumber = function () {
|
||||
var _this = this;
|
||||
@ -11225,13 +11227,19 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.removeAllListeners = function (eventName) {
|
||||
var eventTag = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
return (event.tag !== eventTag);
|
||||
});
|
||||
if (eventName === 'pending') {
|
||||
if (eventName == null) {
|
||||
this._events = [];
|
||||
this._stopPending();
|
||||
}
|
||||
else {
|
||||
var eventTag_1 = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
return (event.tag !== eventTag_1);
|
||||
});
|
||||
if (eventName === 'pending') {
|
||||
this._stopPending();
|
||||
}
|
||||
}
|
||||
if (this._events.length === 0) {
|
||||
this.polling = false;
|
||||
}
|
||||
@ -11241,13 +11249,13 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
var found = false;
|
||||
var eventTag = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
if (event.tag !== eventTag) {
|
||||
if (event.tag !== eventTag || event.listener != listener) {
|
||||
return true;
|
||||
}
|
||||
if (found) {
|
||||
return true;
|
||||
}
|
||||
found = false;
|
||||
found = true;
|
||||
return false;
|
||||
});
|
||||
if (eventName === 'pending' && this.listenerCount('pending') === 0) {
|
||||
|
2
dist/ethers.min.js
vendored
2
dist/ethers.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.min.js.map
vendored
2
dist/ethers.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.types.txt
vendored
2
dist/ethers.types.txt
vendored
@ -784,7 +784,7 @@ declare module 'ethers/providers/base-provider' {
|
||||
emit(eventName: EventType, ...args: Array<any>): boolean;
|
||||
listenerCount(eventName?: EventType): number;
|
||||
listeners(eventName: EventType): Array<Listener>;
|
||||
removeAllListeners(eventName: EventType): Provider;
|
||||
removeAllListeners(eventName?: EventType): Provider;
|
||||
removeListener(eventName: EventType, listener: Listener): Provider;
|
||||
}
|
||||
}
|
||||
|
2
providers/base-provider.d.ts
vendored
2
providers/base-provider.d.ts
vendored
@ -69,6 +69,6 @@ export declare class BaseProvider extends Provider {
|
||||
emit(eventName: EventType, ...args: Array<any>): boolean;
|
||||
listenerCount(eventName?: EventType): number;
|
||||
listeners(eventName: EventType): Array<Listener>;
|
||||
removeAllListeners(eventName: EventType): Provider;
|
||||
removeAllListeners(eventName?: EventType): Provider;
|
||||
removeListener(eventName: EventType, listener: Listener): Provider;
|
||||
}
|
||||
|
@ -656,17 +656,19 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
if (confirmations == null) {
|
||||
confirmations = 1;
|
||||
}
|
||||
return web_1.poll(function () {
|
||||
return _this.getTransactionReceipt(transactionHash).then(function (receipt) {
|
||||
if (confirmations === 0) {
|
||||
return receipt;
|
||||
if (confirmations === 0) {
|
||||
return this.getTransactionReceipt(transactionHash);
|
||||
}
|
||||
return new Promise(function (resolve) {
|
||||
var handler = function (receipt) {
|
||||
if (receipt.confirmations < confirmations) {
|
||||
return;
|
||||
}
|
||||
if (receipt == null || receipt.confirmations < confirmations) {
|
||||
return undefined;
|
||||
}
|
||||
return receipt;
|
||||
});
|
||||
}, { onceBlock: this });
|
||||
_this.removeListener(transactionHash, handler);
|
||||
resolve(receipt);
|
||||
};
|
||||
_this.on(transactionHash, handler);
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.getBlockNumber = function () {
|
||||
var _this = this;
|
||||
@ -1169,13 +1171,19 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
});
|
||||
};
|
||||
BaseProvider.prototype.removeAllListeners = function (eventName) {
|
||||
var eventTag = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
return (event.tag !== eventTag);
|
||||
});
|
||||
if (eventName === 'pending') {
|
||||
if (eventName == null) {
|
||||
this._events = [];
|
||||
this._stopPending();
|
||||
}
|
||||
else {
|
||||
var eventTag_1 = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
return (event.tag !== eventTag_1);
|
||||
});
|
||||
if (eventName === 'pending') {
|
||||
this._stopPending();
|
||||
}
|
||||
}
|
||||
if (this._events.length === 0) {
|
||||
this.polling = false;
|
||||
}
|
||||
@ -1185,13 +1193,13 @@ var BaseProvider = /** @class */ (function (_super) {
|
||||
var found = false;
|
||||
var eventTag = getEventTag(eventName);
|
||||
this._events = this._events.filter(function (event) {
|
||||
if (event.tag !== eventTag) {
|
||||
if (event.tag !== eventTag || event.listener != listener) {
|
||||
return true;
|
||||
}
|
||||
if (found) {
|
||||
return true;
|
||||
}
|
||||
found = false;
|
||||
found = true;
|
||||
return false;
|
||||
});
|
||||
if (eventName === 'pending' && this.listenerCount('pending') === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user