Skip to content

Commit

Permalink
add log typechecking to tx receipt constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoacosta74 authored and rileystephens28 committed Oct 28, 2024
1 parent 3754361 commit 6864a01
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/providers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1234,11 +1234,7 @@ export class TransactionReceipt implements TransactionReceiptParams, Iterable<Lo
* @ignore
*/
constructor(tx: TransactionReceiptParams, provider: Provider) {
this.#logs = Object.freeze(
tx.logs.map((log) => {
return new Log(log, provider);
}),
);
this.#logs = Object.freeze(Array.isArray(tx.logs) ? tx.logs.map((log) => new Log(log, provider)) : []);

let gasPrice = BN_0;
if (tx.effectiveGasPrice != null) {
Expand Down

0 comments on commit 6864a01

Please sign in to comment.