From 17493d38c9f7cd80bf6130bd898d5ec7e63a186a Mon Sep 17 00:00:00 2001 From: lowkeynicc Date: Wed, 27 Dec 2023 12:16:17 -0500 Subject: [PATCH 1/2] add txparams param to deposit --- sdk/src/driftClient.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index ea98cbf40..bae0f33ed 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -1652,7 +1652,8 @@ export class DriftClient { marketIndex: number, associatedTokenAccount: PublicKey, subAccountId?: number, - reduceOnly = false + reduceOnly = false, + txParams?: TxParams ): Promise { const additionalSigners: Array = []; @@ -1701,7 +1702,7 @@ export class DriftClient { ); } - const txParams = { ...this.txParams, computeUnits: 600_000 }; + txParams = { ...(txParams ?? this.txParams), computeUnits: 600_000 }; const tx = await this.buildTransaction(instructions, txParams); From 83b6722bae2b2173a2cf1d3a6618f6990fe9e923 Mon Sep 17 00:00:00 2001 From: lowkeynicc Date: Wed, 27 Dec 2023 12:48:50 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cfc0fd33..fcc099a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes +- sdk: use tx params passed into deposit function + ### Breaking ## [2.52.0] - 2023-12-22