Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion staking/app/StakeConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,23 @@ export class StakeConnection {
);
}

private async sendAndConfirmAsLegacyTransaction(
instructions: TransactionInstruction[]
) {
const transactions = TransactionBuilder.batchIntoLegacyTransactions(
instructions,
this.priorityFeeConfig
);

return sendTransactions(
transactions.map((transaction) => {
return { tx: transaction, signers: [] };
}),
this.provider.connection,
this.provider.wallet as NodeWallet
);
}

private async sendAndConfirmAsVersionedTransaction(
instructions: TransactionInstruction[]
) {
Expand Down Expand Up @@ -979,7 +996,7 @@ export class StakeConnection {
.instruction()
);

await this.sendAndConfirmAsVersionedTransaction(instructions);
await this.sendAndConfirmAsLegacyTransaction(instructions);
}

public async getSplitRequest(
Expand Down