diff --git a/CHANGELOG.md b/CHANGELOG.md index fcc099a97..b47749ae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixes -- sdk: use tx params passed into deposit function +- sdk: use tx params passed into deposit and withdraw functions ### Breaking diff --git a/sdk/src/driftClient.ts b/sdk/src/driftClient.ts index 984792ed2..615df2009 100644 --- a/sdk/src/driftClient.ts +++ b/sdk/src/driftClient.ts @@ -2049,7 +2049,8 @@ export class DriftClient { marketIndex: number, associatedTokenAddress: PublicKey, reduceOnly = false, - subAccountId?: number + subAccountId?: number, + txParams?: TxParams ): Promise { const withdrawIxs = []; @@ -2112,6 +2113,7 @@ export class DriftClient { } const tx = await this.buildTransaction(withdrawIxs, { + ...(txParams ?? this.txParams), computeUnits: 1_400_000, }); const { txSig, slot } = await this.sendTransaction(