-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello, guys).
Just discovered that Stream extends EventEmitter, and EventEmitter has once() method, which really helpful in some cases.
Can you add, please, once(event: "report", listener: (report: Report) => void): this; to IStream?)
Current workaround is:
return new Promise<IPullPriceFeedResponse>(async (resolve, reject) => {
(this.stream as unknown as EventEmitter).once('report', (report) => {
try {
const decoded = decodeReport(report.fullReport, report.feedID) as DecodedV3Report;
resolve(decoded);
} catch (error) {
reject(error);
}
})
})
Best regards.
alex-beraborrow
Metadata
Metadata
Assignees
Labels
No labels