Better fix for this

mattlockyer-patch-1
Matt Lockyer 5 years ago committed by GitHub
parent 6d85dbf4ef
commit c5b154ed2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/harmony-network/src/subscriptions/LogSub.ts

@ -23,16 +23,13 @@ export class LogSub extends SubscriptionMethod {
if (getPastLogs.isError()) {
this.emitter.emit('error', getPastLogs.error.message);
}
const logs = getPastLogs.result;
if (logs !== undefined) {
} else {
const logs = getPastLogs.result;
logs.forEach((log: any) => {
const formattedLog = this.onNewSubscriptionItem(log);
this.emitter.emit('data', formattedLog);
});
}
delete this.options.fromBlock;
// const sub = this.start();
return this.start();

Loading…
Cancel
Save