Skip to content

Commit

Permalink
Force Log properties to be non-optional (ethers-io#415).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Apr 4, 2020
1 parent 9307c9d commit 896d7ff
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src.ts/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export class Formatter {
};

formats.receiptLog = {
transactionLogIndex: Formatter.allowNull(number),
transactionIndex: number,
blockNumber: number,
transactionHash: hash,
Expand Down Expand Up @@ -381,18 +380,12 @@ export class Formatter {
}

receipt(value: any): TransactionReceipt {
//let status = transactionReceipt.status;
//let root = transactionReceipt.root;

const result: TransactionReceipt = Formatter.check(this.formats.receipt, value);
result.logs.forEach((entry, index) => {
if (entry.transactionLogIndex == null) {
entry.transactionLogIndex = index;
}
});

if (value.status != null) {
result.byzantium = true;
}

return result;
}

Expand Down

0 comments on commit 896d7ff

Please sign in to comment.