Skip to content

Commit

Permalink
refactor: pr review
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux committed Sep 6, 2024
1 parent 00e231e commit 7361a79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/web3-eth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
12 changes: 6 additions & 6 deletions packages/web3-eth/src/rpc_method_wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export async function getBlock<ReturnFormat extends DataFormat>(
const result = {
...res,
transactions: res.transactions ?? [],
};
}
return result;
}

Expand Down Expand Up @@ -530,11 +530,11 @@ export async function getTransactionReceipt<ReturnFormat extends DataFormat>(
}
return isNullish(response)
? response
: format(
: (format(
transactionReceiptSchema,
response as unknown as TransactionReceipt,
returnFormat ?? web3Context.defaultReturnFormat,
);
));
}

/**
Expand Down Expand Up @@ -579,7 +579,7 @@ export function sendTransaction<
| TransactionWithFromAndToLocalWalletIndex,
returnFormat: ReturnFormat,
options: SendTransactionOptions<ResolveType> = { checkRevertBeforeSending: true },
transactionMiddleware?: TransactionMiddleware,
transactionMiddleware?: TransactionMiddleware
): Web3PromiEvent<ResolveType, SendTransactionEvents<ReturnFormat>> {
const promiEvent = new Web3PromiEvent<ResolveType, SendTransactionEvents<ReturnFormat>>(
(resolve, reject) => {
Expand All @@ -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);
}

Expand Down
1 change: 0 additions & 1 deletion packages/web3-eth/src/utils/decode_signed_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export function decodeSignedTransaction<ReturnFormat extends DataFormat>(
returnFormat: ReturnFormat,
options: { fillInputAndData?: boolean; transactionSchema?: ValidationSchemaInput } = {
fillInputAndData: false,
transactionSchema: undefined,
},
): SignedTransactionInfoAPI {
return {
Expand Down

0 comments on commit 7361a79

Please sign in to comment.