diff --git a/packages/web3-eth/CHANGELOG.md b/packages/web3-eth/CHANGELOG.md index 3e3454e63ef..7d1470f593d 100644 --- a/packages/web3-eth/CHANGELOG.md +++ b/packages/web3-eth/CHANGELOG.md @@ -267,7 +267,7 @@ Documentation: ### Fixed - Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151) - w +- Change method `getTransactionReceipt` to not be casted as `TransactionReceipt` to give proper return type (#7159) ## [Unreleased] diff --git a/packages/web3-eth/src/rpc_method_wrappers.ts b/packages/web3-eth/src/rpc_method_wrappers.ts index 9931c56364f..2fcbf2471e5 100644 --- a/packages/web3-eth/src/rpc_method_wrappers.ts +++ b/packages/web3-eth/src/rpc_method_wrappers.ts @@ -296,7 +296,7 @@ export async function getBlock( const result = { ...res, transactions: res.transactions ?? [], - }; + } return result; } @@ -530,11 +530,11 @@ export async function getTransactionReceipt( } return isNullish(response) ? response - : format( + : (format( transactionReceiptSchema, response as unknown as TransactionReceipt, returnFormat ?? web3Context.defaultReturnFormat, - ); + )); } /** @@ -579,7 +579,7 @@ export function sendTransaction< | TransactionWithFromAndToLocalWalletIndex, returnFormat: ReturnFormat, options: SendTransactionOptions = { checkRevertBeforeSending: true }, - transactionMiddleware?: TransactionMiddleware, + transactionMiddleware?: TransactionMiddleware ): Web3PromiEvent> { const promiEvent = new Web3PromiEvent>( (resolve, reject) => { @@ -592,9 +592,9 @@ export function sendTransaction< returnFormat, }); - let transaction = { ...transactionObj }; + let transaction = {...transactionObj}; - if (!isNullish(transactionMiddleware)) { + if(!isNullish(transactionMiddleware)){ transaction = await transactionMiddleware.processTransaction(transaction); } diff --git a/packages/web3-eth/src/utils/decode_signed_transaction.ts b/packages/web3-eth/src/utils/decode_signed_transaction.ts index 73e38d79871..2522b25b8e8 100644 --- a/packages/web3-eth/src/utils/decode_signed_transaction.ts +++ b/packages/web3-eth/src/utils/decode_signed_transaction.ts @@ -38,7 +38,6 @@ export function decodeSignedTransaction( returnFormat: ReturnFormat, options: { fillInputAndData?: boolean; transactionSchema?: ValidationSchemaInput } = { fillInputAndData: false, - transactionSchema: undefined, }, ): SignedTransactionInfoAPI { return {