Skip to content

Commit fd63529

Browse files
committed
error
1 parent 2deedb6 commit fd63529

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/worker/tasks/sendTransactionWorker.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ const _sendUserOp = async (
246246
// we don't want this behavior in the engine context
247247
waitForDeployment: false,
248248
})) as UserOperation; // TODO support entrypoint v0.7 accounts
249-
} catch (e) {
249+
} catch (error) {
250250
return {
251251
...queuedTransaction,
252252
status: "errored",
253-
errorMessage: wrapError(e, "Bundler").message,
253+
errorMessage: wrapError(error, "Bundler").message,
254254
} satisfies ErroredTransaction;
255255
}
256256

@@ -364,10 +364,10 @@ const _sendTransaction = async (
364364
const sendTransactionResult =
365365
await account.sendTransaction(populatedTransaction);
366366
transactionHash = sendTransactionResult.transactionHash;
367-
} catch (e: unknown) {
367+
} catch (error: unknown) {
368368
// If the nonce is already seen onchain (nonce too low) or in mempool (replacement underpriced),
369369
// correct the DB nonce.
370-
if (isNonceAlreadyUsedError(e) || isReplacementGasFeeTooLow(e)) {
370+
if (isNonceAlreadyUsedError(error) || isReplacementGasFeeTooLow(error)) {
371371
const result = await syncLatestNonceFromOnchainIfHigher(chainId, from);
372372
job.log(`Re-synced nonce: ${result}`);
373373
} else {
@@ -377,11 +377,11 @@ const _sendTransaction = async (
377377
}
378378

379379
// Do not retry errors that are expected to be rejected by RPC again.
380-
if (isInsufficientFundsError(e)) {
380+
if (isInsufficientFundsError(error)) {
381381
const gasPrice =
382382
populatedTransaction.gasPrice ?? populatedTransaction.maxFeePerGas;
383383

384-
let errorMessage = prettifyError(e);
384+
let errorMessage = prettifyError(error);
385385
if (gasPrice) {
386386
const { gas, value = 0n } = populatedTransaction;
387387
const { name, nativeCurrency } = await getChainMetadata(chain);
@@ -395,7 +395,7 @@ const _sendTransaction = async (
395395
} satisfies ErroredTransaction;
396396
}
397397

398-
throw wrapError(e, "RPC");
398+
throw wrapError(error, "RPC");
399399
}
400400

401401
await addSentNonce(chainId, from, nonce);

0 commit comments

Comments
 (0)