From 5f6deebd2b27a6120e3102f4f03fb82b8c1b4674 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 22 Jul 2024 09:45:47 -0400 Subject: [PATCH] Fix transaction receipt return type (#7159) * add default array to block.transactions * update * update * update * update changelog --------- Co-authored-by: CI --- packages/web3-eth/CHANGELOG.md | 3 ++- packages/web3-eth/src/rpc_method_wrappers.ts | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web3-eth/CHANGELOG.md b/packages/web3-eth/CHANGELOG.md index 417db4d0837..b3b98530d82 100644 --- a/packages/web3-eth/CHANGELOG.md +++ b/packages/web3-eth/CHANGELOG.md @@ -266,4 +266,5 @@ Documentation: ### Fixed -- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151) \ No newline at end of file +- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151) +- Change method `getTransactionReceipt` to not be casted as `TransactionReceipt` to give proper return type (#7159) \ No newline at end of file diff --git a/packages/web3-eth/src/rpc_method_wrappers.ts b/packages/web3-eth/src/rpc_method_wrappers.ts index 8195eb58caa..02fb9fbb173 100644 --- a/packages/web3-eth/src/rpc_method_wrappers.ts +++ b/packages/web3-eth/src/rpc_method_wrappers.ts @@ -521,14 +521,13 @@ export async function getTransactionReceipt( } } - return isNullish(response) ? response : (format( transactionReceiptSchema, response as unknown as TransactionReceipt, returnFormat ?? web3Context.defaultReturnFormat, - ) as TransactionReceipt); + )); } /**