solana.js: fix lease fund logic
This commit is contained in:
parent
1695adf6f8
commit
395a6b8656
|
@ -506,8 +506,8 @@ export class QueueAccount extends Account<types.OracleQueueAccountData> {
|
|||
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<types.OracleQueueAccountData> {
|
|||
params
|
||||
);
|
||||
|
||||
const signatures = await this.program.signAndSendAll(txns);
|
||||
const signatures = await this.program.signAndSendAll(txns, {
|
||||
skipPreflight: true,
|
||||
});
|
||||
|
||||
return [aggregatorAccount, signatures];
|
||||
}
|
||||
|
|
|
@ -243,10 +243,15 @@ export class TransactionObject implements ITransactionObject {
|
|||
): Transaction {
|
||||
const txn = this.toTxn(blockhash);
|
||||
const allSigners = [...this.signers];
|
||||
|
||||
if (signers) {
|
||||
allSigners.push(...signers);
|
||||
}
|
||||
|
||||
if (allSigners.length) {
|
||||
txn.sign(...allSigners);
|
||||
}
|
||||
|
||||
return txn;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue