Merge pull request #14 from harmony-one/mattlockyer-patch-1

Fixes error when logs returns undefined
truffle_provider
Ganesha Upadhyaya 5 years ago committed by GitHub
commit 87c8df983a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/harmony-network/src/subscriptions/LogSub.ts

@ -29,15 +29,13 @@ export class LogSub extends SubscriptionMethod {
if (getPastLogs.isError()) {
this.emitter.emit('error', getPastLogs.error.message);
}
} 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