Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 5f6deeb

Browse files
Fix transaction receipt return type (#7159)
* add default array to block.transactions * update * update * update * update changelog --------- Co-authored-by: CI <ci@github.com>
1 parent cbcfc18 commit 5f6deeb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/web3-eth/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,5 @@ Documentation:
266266

267267
### Fixed
268268

269-
- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
269+
- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
270+
- Change method `getTransactionReceipt` to not be casted as `TransactionReceipt` to give proper return type (#7159)

packages/web3-eth/src/rpc_method_wrappers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,13 @@ export async function getTransactionReceipt<ReturnFormat extends DataFormat>(
521521
}
522522

523523
}
524-
525524
return isNullish(response)
526525
? response
527526
: (format(
528527
transactionReceiptSchema,
529528
response as unknown as TransactionReceipt,
530529
returnFormat ?? web3Context.defaultReturnFormat,
531-
) as TransactionReceipt);
530+
));
532531
}
533532

534533
/**

0 commit comments

Comments
 (0)