@drift-labs/sdk 2.32.1-beta.1 → 2.32.1-beta.2

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.32.1-beta.1
1
+ 2.32.1-beta.2
@@ -2039,7 +2039,7 @@ class DriftClient {
2039
2039
  async getSwapIx({ outMarketIndex, inMarketIndex, amountIn, inTokenAccount, outTokenAccount, limitPrice, reduceOnly, userAccountPublicKey, }) {
2040
2040
  const userAccountPublicKeyToUse = userAccountPublicKey || (await this.getUserAccountPublicKey());
2041
2041
  const userAccounts = [];
2042
- if (this.getUser().getUserAccountAndSlot()) {
2042
+ if (this.hasUser() && this.getUser().getUserAccountAndSlot()) {
2043
2043
  userAccounts.push(this.getUser().getUserAccountAndSlot().data);
2044
2044
  }
2045
2045
  const remainingAccounts = this.getRemainingAccounts({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.32.1-beta.1",
3
+ "version": "2.32.1-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -3574,7 +3574,7 @@ export class DriftClient {
3574
3574
  userAccountPublicKey || (await this.getUserAccountPublicKey());
3575
3575
 
3576
3576
  const userAccounts = [];
3577
- if (this.getUser().getUserAccountAndSlot()) {
3577
+ if (this.hasUser() && this.getUser().getUserAccountAndSlot()) {
3578
3578
  userAccounts.push(this.getUser().getUserAccountAndSlot()!.data);
3579
3579
  }
3580
3580
  const remainingAccounts = this.getRemainingAccounts({