Skip to content

Commit

Permalink
sdk: add txparams to withdraw (#799)
Browse files Browse the repository at this point in the history
* sdk: add txparams to withdraw

* update changelog
  • Loading branch information
lowkeynicc authored Dec 28, 2023
1 parent 21f7d0f commit bc4afed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,8 @@ export class DriftClient {
marketIndex: number,
associatedTokenAddress: PublicKey,
reduceOnly = false,
subAccountId?: number
subAccountId?: number,
txParams?: TxParams
): Promise<TransactionSignature> {
const withdrawIxs = [];

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit bc4afed

Please sign in to comment.