diff --git a/javascript/solana.js/src/accounts/queueAccount.ts b/javascript/solana.js/src/accounts/queueAccount.ts index 6212ca0..c31e38c 100644 --- a/javascript/solana.js/src/accounts/queueAccount.ts +++ b/javascript/solana.js/src/accounts/queueAccount.ts @@ -506,8 +506,8 @@ export class QueueAccount extends Account { const leaseInit = ( await LeaseAccount.createInstructions(this.program, payer, { loadAmount: params.fundAmount, - funderTokenAccount: params.funderTokenAccount, - funderAuthority: params.funderAuthority, + funderTokenAccount: params.funderTokenAccount ?? userTokenAddress, + funderAuthority: params.funderAuthority ?? undefined, aggregatorAccount: aggregatorAccount, queueAccount: this, jobAuthorities: [], // create lease before adding jobs to skip this step @@ -646,7 +646,9 @@ export class QueueAccount extends Account { params ); - const signatures = await this.program.signAndSendAll(txns); + const signatures = await this.program.signAndSendAll(txns, { + skipPreflight: true, + }); return [aggregatorAccount, signatures]; } diff --git a/javascript/solana.js/src/transaction.ts b/javascript/solana.js/src/transaction.ts index 3cea3ea..739612d 100644 --- a/javascript/solana.js/src/transaction.ts +++ b/javascript/solana.js/src/transaction.ts @@ -243,10 +243,15 @@ export class TransactionObject implements ITransactionObject { ): Transaction { const txn = this.toTxn(blockhash); const allSigners = [...this.signers]; + if (signers) { allSigners.push(...signers); } - txn.sign(...allSigners); + + if (allSigners.length) { + txn.sign(...allSigners); + } + return txn; }