Skip to content

Commit

Permalink
sdk: add-protected-orders-field (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbigz authored Dec 19, 2024
1 parent 5555ebd commit 556f068
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8850,11 +8850,15 @@ export class DriftClient {

public async updateUserProtectedMakerOrders(
subAccountId: number,
protectedOrders: boolean,
txParams?: TxParams
): Promise<TransactionSignature> {
const { txSig } = await this.sendTransaction(
await this.buildTransaction(
await this.getUpdateUserProtectedMakerOrdersIx(subAccountId),
await this.getUpdateUserProtectedMakerOrdersIx(
subAccountId,
protectedOrders
),
txParams
),
[],
Expand All @@ -8864,10 +8868,12 @@ export class DriftClient {
}

public async getUpdateUserProtectedMakerOrdersIx(
subAccountId: number
subAccountId: number,
protectedOrders: boolean
): Promise<TransactionInstruction> {
const ix = await this.program.instruction.updateUserProtectedMakerOrders(
subAccountId,
protectedOrders,
{
accounts: {
state: await this.getStatePublicKey(),
Expand Down

0 comments on commit 556f068

Please sign in to comment.