@drift-labs/sdk 2.49.0-beta.6 → 2.49.0-beta.7

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 CHANGED
@@ -1 +1 @@
1
- 2.49.0-beta.6
1
+ 2.49.0-beta.7
@@ -983,7 +983,7 @@ class DriftClient {
983
983
  return txSig;
984
984
  }
985
985
  async getDepositInstruction(amount, marketIndex, userTokenAccount, subAccountId, reduceOnly = false, userInitialized = true) {
986
- const userAccountPublicKey = await (0, pda_1.getUserAccountPublicKey)(this.program.programId, this.authority, subAccountId);
986
+ const userAccountPublicKey = await (0, pda_1.getUserAccountPublicKey)(this.program.programId, this.authority, subAccountId !== null && subAccountId !== void 0 ? subAccountId : this.activeSubAccountId);
987
987
  let remainingAccounts = [];
988
988
  if (userInitialized) {
989
989
  remainingAccounts = this.getRemainingAccounts({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.49.0-beta.6",
3
+ "version": "2.49.0-beta.7",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -1686,7 +1686,7 @@ export class DriftClient {
1686
1686
  const userAccountPublicKey = await getUserAccountPublicKey(
1687
1687
  this.program.programId,
1688
1688
  this.authority,
1689
- subAccountId
1689
+ subAccountId ?? this.activeSubAccountId
1690
1690
  );
1691
1691
 
1692
1692
  let remainingAccounts = [];