@drift-labs/jit-proxy 0.5.0 → 0.6.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.
@@ -20,7 +20,7 @@ class JitProxyClient {
20
20
  return await this.driftClient.sendTransaction(tx);
21
21
  }
22
22
  async getJitIx({ takerKey, takerStatsKey, taker, takerOrderId, maxPosition, minPosition, bid, ask, postOnly = null, priceType = PriceType.LIMIT, referrerInfo, subAccountId }) {
23
- subAccountId = subAccountId || this.driftClient.activeSubAccountId;
23
+ subAccountId = subAccountId !== undefined ? subAccountId : this.driftClient.activeSubAccountId;
24
24
  const order = taker.orders.find((order) => order.orderId === takerOrderId);
25
25
  const remainingAccounts = this.driftClient.getRemainingAccounts({
26
26
  userAccounts: [taker, this.driftClient.getUserAccount(subAccountId)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/jit-proxy",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "dependencies": {
5
5
  "@coral-xyz/anchor": "^0.26.0",
6
6
  "@solana/web3.js": "1.73.2",
@@ -71,7 +71,7 @@ export class JitProxyClient {
71
71
  referrerInfo,
72
72
  subAccountId
73
73
  }: JitIxParams): Promise<TransactionInstruction> {
74
- subAccountId = subAccountId || this.driftClient.activeSubAccountId;
74
+ subAccountId = subAccountId !== undefined ? subAccountId : this.driftClient.activeSubAccountId;
75
75
  const order = taker.orders.find((order) => order.orderId === takerOrderId);
76
76
  const remainingAccounts = this.driftClient.getRemainingAccounts({
77
77
  userAccounts: [taker, this.driftClient.getUserAccount(subAccountId)],