diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index 1c8d2b5bc..6613ad848 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -9209,13 +9209,15 @@ export class DriftClient { public async updateUserProtectedMakerOrders( subAccountId: number, protectedOrders: boolean, + authority?: PublicKey, txParams?: TxParams ): Promise { const { txSig } = await this.sendTransaction( await this.buildTransaction( await this.getUpdateUserProtectedMakerOrdersIx( subAccountId, - protectedOrders + protectedOrders, + authority ), txParams ), @@ -9227,7 +9229,8 @@ export class DriftClient { public async getUpdateUserProtectedMakerOrdersIx( subAccountId: number, - protectedOrders: boolean + protectedOrders: boolean, + authority?: PublicKey ): Promise { const ix = await this.program.instruction.updateUserProtectedMakerOrders( subAccountId, @@ -9237,7 +9240,7 @@ export class DriftClient { state: await this.getStatePublicKey(), user: getUserAccountPublicKeySync( this.program.programId, - this.wallet.publicKey, + authority ?? this.authority, subAccountId ), authority: this.wallet.publicKey,