Skip to content

Commit

Permalink
Fix EventNotification
Browse files Browse the repository at this point in the history
* add logs
* fix events assignment
  • Loading branch information
inwonkim committed Aug 29, 2023
1 parent 88c2979 commit 99d0982
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/data/Formatter/EventNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ export default class EventNotification {
readonly height: BigNumber;
readonly index: BigNumber;
readonly events: BigNumber[];
readonly logs: object[];

constructor(data) {
this.hash = data.hash;
this.height = Converter.toBigNumber(data.height);
this.index = Converter.toBigNumber(data.index);
this.events = [];
this.logs = [];
if (data.events) {
this.events = [];
for (let i = 0; i < data.events; i++)
for (let i = 0; i < data.events.length; i++)
this.events[i] = Converter.toBigNumber(data.events[i]);
}
if (data.logs) {
for (let i = 0; i < data.logs.length; i++) this.logs[i] = data.logs[i];
}
}
}

0 comments on commit 99d0982

Please sign in to comment.