From 741150efac47077d99e1468257164311a79d1588 Mon Sep 17 00:00:00 2001 From: Prithvish Baidya Date: Wed, 2 Apr 2025 02:41:24 +0530 Subject: [PATCH] replace spread with individual assignment queuedTransaction has a "from" field which is the EOA address in the case of userops. The presence of a incorrect "from" address in a userop causes issues like estimation failures. To avoid this, we are selectively passing only the "data" and "value" fields, along with gas overrides. --- src/worker/tasks/send-transaction-worker.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/worker/tasks/send-transaction-worker.ts b/src/worker/tasks/send-transaction-worker.ts index 3acb0a1f..71cac0bc 100644 --- a/src/worker/tasks/send-transaction-worker.ts +++ b/src/worker/tasks/send-transaction-worker.ts @@ -216,8 +216,9 @@ const _sendUserOp = async ( { client: thirdwebClient, chain, - ...queuedTransaction, - ...overrides, + data: queuedTransaction.data, + value: queuedTransaction.value, + ...overrides, // gas-overrides to: getChecksumAddress(toAddress), }, ]; @@ -384,7 +385,9 @@ const _sendTransaction = async ( }); populatedTransaction.nonce = nonce; job.log( - `Populated transaction (isRecycledNonce=${isRecycledNonce}): ${stringify(populatedTransaction)}`, + `Populated transaction (isRecycledNonce=${isRecycledNonce}): ${stringify( + populatedTransaction, + )}`, ); // Send transaction to RPC.