Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/web3-eth/src/rpc_method_wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ export function sendTransaction<
transaction,
transactionFormatted,
});

await sendTxHelper.checkRevertBeforeSending(
transactionFormatted as TransactionCall,
);
Expand Down
3 changes: 2 additions & 1 deletion packages/web3-eth/src/utils/send_tx_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ export class SendTxHelper<
}

public async checkRevertBeforeSending(tx: TransactionCall) {
if (this.options.checkRevertBeforeSending !== false) {
// should not check revert reason if data is not provided
if (this.options.checkRevertBeforeSending !== false && !isNullish(tx.data)) {
const reason = await getRevertReason(this.web3Context, tx, this.options.contractAbi);
if (reason !== undefined) {
throw await getTransactionError<ReturnFormat>(
Expand Down