Skip to content

Commit

Permalink
Add extra CU to some ixs (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipzeta authored Nov 13, 2024
1 parent fff5d6c commit 477ad11
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
Version changes are pinned to SDK releases.

## [1.53.0]

- Add extra CU to liquidate and withdraw ixs. ([#427](https://github.com/zetamarkets/sdk/pull/427))

## [1.52.0]

- New asset DRIFT. ([#426](https://github.com/zetamarkets/sdk/pull/426))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zetamarkets/sdk",
"repository": "https://github.com/zetamarkets/sdk/",
"version": "1.52.0",
"version": "1.53.0",
"description": "Zeta SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
12 changes: 10 additions & 2 deletions src/cross-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,11 @@ export class CrossClient {
public async withdraw(amount: number): Promise<TransactionSignature> {
this.delegatedCheck();

let tx = new Transaction();
let tx = new Transaction().add(
ComputeBudgetProgram.setComputeUnitLimit({
units: 300_000,
})
);
try {
await this.usdcAccountCheck();
} catch (e) {
Expand Down Expand Up @@ -2942,7 +2946,11 @@ export class CrossClient {
liquidatedMarginAccount: PublicKey,
size: number
): Promise<TransactionSignature> {
let tx = new Transaction();
let tx = new Transaction().add(
ComputeBudgetProgram.setComputeUnitLimit({
units: 300_000,
})
);
let ix = instructions.liquidateV2Ix(
asset,
this._provider.wallet.publicKey,
Expand Down

0 comments on commit 477ad11

Please sign in to comment.