@drift-labs/sdk 2.31.0-beta.7 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1389,14 +1389,13 @@ class DriftClient {
1389
1389
  orderId,
1390
1390
  marketIndex,
1391
1391
  }, makerInfo, referrerInfo);
1392
- const lookupTableAccount = await this.fetchMarketLookupTableAccount();
1393
1392
  const walletSupportsVersionedTxns =
1394
1393
  //@ts-ignore
1395
1394
  (_b = (_a = this.wallet.supportedTransactionVersions) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0 > 1;
1396
1395
  // use versioned transactions if there is a lookup table account and wallet is compatible
1397
- if (walletSupportsVersionedTxns && lookupTableAccount && useVersionedTx) {
1398
- const versionedMarketOrderTx = await this.txSender.getVersionedTransaction([placePerpOrderIx].concat(bracketOrderIxs), [lookupTableAccount], [], this.opts);
1399
- const versionedFillTx = await this.txSender.getVersionedTransaction([fillPerpOrderIx], [lookupTableAccount], [], this.opts);
1396
+ if (walletSupportsVersionedTxns && useVersionedTx) {
1397
+ const versionedMarketOrderTx = await this.buildTransaction([placePerpOrderIx].concat(bracketOrderIxs), txParams, 0);
1398
+ const versionedFillTx = await this.buildTransaction([fillPerpOrderIx], txParams, 0);
1400
1399
  const [signedVersionedMarketOrderTx, signedVersionedFillTx] = await this.provider.wallet.signAllTransactions([
1401
1400
  //@ts-ignore
1402
1401
  versionedMarketOrderTx,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.31.0-beta.7",
2
+ "version": "2.31.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.31.0-beta.7",
3
+ "version": "2.31.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -2369,26 +2369,21 @@ export class DriftClient {
2369
2369
  referrerInfo
2370
2370
  );
2371
2371
 
2372
- const lookupTableAccount = await this.fetchMarketLookupTableAccount();
2373
-
2374
2372
  const walletSupportsVersionedTxns =
2375
2373
  //@ts-ignore
2376
2374
  this.wallet.supportedTransactionVersions?.size ?? 0 > 1;
2377
2375
 
2378
2376
  // use versioned transactions if there is a lookup table account and wallet is compatible
2379
- if (walletSupportsVersionedTxns && lookupTableAccount && useVersionedTx) {
2380
- const versionedMarketOrderTx =
2381
- await this.txSender.getVersionedTransaction(
2382
- [placePerpOrderIx].concat(bracketOrderIxs),
2383
- [lookupTableAccount],
2384
- [],
2385
- this.opts
2386
- );
2387
- const versionedFillTx = await this.txSender.getVersionedTransaction(
2377
+ if (walletSupportsVersionedTxns && useVersionedTx) {
2378
+ const versionedMarketOrderTx = await this.buildTransaction(
2379
+ [placePerpOrderIx].concat(bracketOrderIxs),
2380
+ txParams,
2381
+ 0
2382
+ );
2383
+ const versionedFillTx = await this.buildTransaction(
2388
2384
  [fillPerpOrderIx],
2389
- [lookupTableAccount],
2390
- [],
2391
- this.opts
2385
+ txParams,
2386
+ 0
2392
2387
  );
2393
2388
  const [signedVersionedMarketOrderTx, signedVersionedFillTx] =
2394
2389
  await this.provider.wallet.signAllTransactions([
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.31.0-beta.7",
2
+ "version": "2.31.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {