@drift-labs/sdk 2.112.0-beta.1 → 2.112.0-beta.3
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/VERSION +1 -1
- package/lib/browser/dlob/DLOB.js +8 -1
- package/lib/browser/driftClient.js +2 -2
- package/lib/node/dlob/DLOB.js +8 -1
- package/lib/node/driftClient.js +2 -2
- package/package.json +1 -1
- package/src/dlob/DLOB.ts +9 -1
- package/src/driftClient.ts +2 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.112.0-beta.
|
|
1
|
+
2.112.0-beta.3
|
package/lib/browser/dlob/DLOB.js
CHANGED
|
@@ -478,7 +478,14 @@ class DLOB {
|
|
|
478
478
|
}
|
|
479
479
|
for (const askGenerator of askGenerators) {
|
|
480
480
|
for (const ask of askGenerator) {
|
|
481
|
-
if (
|
|
481
|
+
if (ask.isSignedMsg &&
|
|
482
|
+
slot.gt(ask.order.slot.addn(ask.order.auctionDuration))) {
|
|
483
|
+
this.orderLists
|
|
484
|
+
.get(marketTypeStr)
|
|
485
|
+
.get(marketIndex)
|
|
486
|
+
.signedMsg.bid.remove(ask.order, ask.userAccount);
|
|
487
|
+
}
|
|
488
|
+
else if ((0, __1.isOrderExpired)(ask.order, ts, true, 25)) {
|
|
482
489
|
nodesToFill.push({
|
|
483
490
|
node: ask,
|
|
484
491
|
makerNodes: [],
|
|
@@ -420,8 +420,8 @@ class DriftClient {
|
|
|
420
420
|
this.userStatsAccountPublicKey = undefined;
|
|
421
421
|
this.includeDelegates = includeDelegates !== null && includeDelegates !== void 0 ? includeDelegates : false;
|
|
422
422
|
const walletSupportsVersionedTxns =
|
|
423
|
-
//@ts-
|
|
424
|
-
(_b = (_a = this.wallet.supportedTransactionVersions) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0 > 1;
|
|
423
|
+
//@ts-expect-error
|
|
424
|
+
((_b = (_a = this.wallet.supportedTransactionVersions) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0) > 1;
|
|
425
425
|
this.txVersion = walletSupportsVersionedTxns ? 0 : 'legacy';
|
|
426
426
|
if (includeDelegates && subAccountIds) {
|
|
427
427
|
throw new Error('Can only pass one of includeDelegates or subAccountIds. If you want to specify subaccount ids for multiple authorities, pass authoritySubaccountMap instead');
|
package/lib/node/dlob/DLOB.js
CHANGED
|
@@ -478,7 +478,14 @@ class DLOB {
|
|
|
478
478
|
}
|
|
479
479
|
for (const askGenerator of askGenerators) {
|
|
480
480
|
for (const ask of askGenerator) {
|
|
481
|
-
if (
|
|
481
|
+
if (ask.isSignedMsg &&
|
|
482
|
+
slot.gt(ask.order.slot.addn(ask.order.auctionDuration))) {
|
|
483
|
+
this.orderLists
|
|
484
|
+
.get(marketTypeStr)
|
|
485
|
+
.get(marketIndex)
|
|
486
|
+
.signedMsg.bid.remove(ask.order, ask.userAccount);
|
|
487
|
+
}
|
|
488
|
+
else if ((0, __1.isOrderExpired)(ask.order, ts, true, 25)) {
|
|
482
489
|
nodesToFill.push({
|
|
483
490
|
node: ask,
|
|
484
491
|
makerNodes: [],
|
package/lib/node/driftClient.js
CHANGED
|
@@ -420,8 +420,8 @@ class DriftClient {
|
|
|
420
420
|
this.userStatsAccountPublicKey = undefined;
|
|
421
421
|
this.includeDelegates = includeDelegates !== null && includeDelegates !== void 0 ? includeDelegates : false;
|
|
422
422
|
const walletSupportsVersionedTxns =
|
|
423
|
-
//@ts-
|
|
424
|
-
(_b = (_a = this.wallet.supportedTransactionVersions) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0 > 1;
|
|
423
|
+
//@ts-expect-error
|
|
424
|
+
((_b = (_a = this.wallet.supportedTransactionVersions) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : 0) > 1;
|
|
425
425
|
this.txVersion = walletSupportsVersionedTxns ? 0 : 'legacy';
|
|
426
426
|
if (includeDelegates && subAccountIds) {
|
|
427
427
|
throw new Error('Can only pass one of includeDelegates or subAccountIds. If you want to specify subaccount ids for multiple authorities, pass authoritySubaccountMap instead');
|
package/package.json
CHANGED
package/src/dlob/DLOB.ts
CHANGED
|
@@ -934,7 +934,15 @@ export class DLOB {
|
|
|
934
934
|
|
|
935
935
|
for (const askGenerator of askGenerators) {
|
|
936
936
|
for (const ask of askGenerator) {
|
|
937
|
-
if (
|
|
937
|
+
if (
|
|
938
|
+
ask.isSignedMsg &&
|
|
939
|
+
slot.gt(ask.order.slot.addn(ask.order.auctionDuration))
|
|
940
|
+
) {
|
|
941
|
+
this.orderLists
|
|
942
|
+
.get(marketTypeStr)
|
|
943
|
+
.get(marketIndex)
|
|
944
|
+
.signedMsg.bid.remove(ask.order, ask.userAccount);
|
|
945
|
+
} else if (isOrderExpired(ask.order, ts, true, 25)) {
|
|
938
946
|
nodesToFill.push({
|
|
939
947
|
node: ask,
|
|
940
948
|
makerNodes: [],
|
package/src/driftClient.ts
CHANGED
|
@@ -769,8 +769,8 @@ export class DriftClient {
|
|
|
769
769
|
this.userStatsAccountPublicKey = undefined;
|
|
770
770
|
this.includeDelegates = includeDelegates ?? false;
|
|
771
771
|
const walletSupportsVersionedTxns =
|
|
772
|
-
//@ts-
|
|
773
|
-
this.wallet.supportedTransactionVersions?.size ?? 0 > 1;
|
|
772
|
+
//@ts-expect-error
|
|
773
|
+
(this.wallet.supportedTransactionVersions?.size ?? 0) > 1;
|
|
774
774
|
this.txVersion = walletSupportsVersionedTxns ? 0 : 'legacy';
|
|
775
775
|
|
|
776
776
|
if (includeDelegates && subAccountIds) {
|