@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.
- package/lib/driftClient.js +3 -4
- package/lib/idl/drift.json +1 -1
- package/package.json +1 -1
- package/src/driftClient.ts +9 -14
- package/src/idl/drift.json +1 -1
package/lib/driftClient.js
CHANGED
|
@@ -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 &&
|
|
1398
|
-
const versionedMarketOrderTx = await this.
|
|
1399
|
-
const versionedFillTx = await this.
|
|
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,
|
package/lib/idl/drift.json
CHANGED
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -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 &&
|
|
2380
|
-
const versionedMarketOrderTx =
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
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
|
-
|
|
2390
|
-
|
|
2391
|
-
this.opts
|
|
2385
|
+
txParams,
|
|
2386
|
+
0
|
|
2392
2387
|
);
|
|
2393
2388
|
const [signedVersionedMarketOrderTx, signedVersionedFillTx] =
|
|
2394
2389
|
await this.provider.wallet.signAllTransactions([
|
package/src/idl/drift.json
CHANGED