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); + )); } /**