Skip to content

Commit fc035fc

Browse files
authored
chore: to is target when userOp through queueTx (#653)
1 parent 28df397 commit fc035fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/worker/tasks/sendTransactionWorker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,18 @@ export const getPopulatedOrErroredTransaction = async (
403403
? queuedTransaction.accountAddress
404404
: queuedTransaction.from;
405405

406+
const to = queuedTransaction.to ?? queuedTransaction.target;
407+
406408
if (!from) throw new Error("Invalid transaction parameters: from");
409+
if (!to) throw new Error("Invalid transaction parameters: to");
407410

408411
const populatedTransaction = await toSerializableTransaction({
409412
from: getChecksumAddress(from),
410413
transaction: {
411414
client: thirdwebClient,
412415
chain: await getChain(queuedTransaction.chainId),
413416
...queuedTransaction,
417+
to: getChecksumAddress(to),
414418
// if transaction is EOA, we stub the nonce to reduce RPC calls
415419
nonce: queuedTransaction.isUserOp ? undefined : 1,
416420
},

0 commit comments

Comments
 (0)