@drift-labs/sdk 2.32.1-beta.0 → 2.32.1-beta.1
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/driftClient.js +4 -1
- package/package.json +1 -1
- package/src/driftClient.ts +4 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.32.1-beta.
|
|
1
|
+
2.32.1-beta.1
|
package/lib/driftClient.js
CHANGED
|
@@ -2038,7 +2038,10 @@ class DriftClient {
|
|
|
2038
2038
|
*/
|
|
2039
2039
|
async getSwapIx({ outMarketIndex, inMarketIndex, amountIn, inTokenAccount, outTokenAccount, limitPrice, reduceOnly, userAccountPublicKey, }) {
|
|
2040
2040
|
const userAccountPublicKeyToUse = userAccountPublicKey || (await this.getUserAccountPublicKey());
|
|
2041
|
-
const userAccounts =
|
|
2041
|
+
const userAccounts = [];
|
|
2042
|
+
if (this.getUser().getUserAccountAndSlot()) {
|
|
2043
|
+
userAccounts.push(this.getUser().getUserAccountAndSlot().data);
|
|
2044
|
+
}
|
|
2042
2045
|
const remainingAccounts = this.getRemainingAccounts({
|
|
2043
2046
|
userAccounts,
|
|
2044
2047
|
writableSpotMarketIndexes: [outMarketIndex, inMarketIndex],
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -3573,7 +3573,10 @@ export class DriftClient {
|
|
|
3573
3573
|
const userAccountPublicKeyToUse =
|
|
3574
3574
|
userAccountPublicKey || (await this.getUserAccountPublicKey());
|
|
3575
3575
|
|
|
3576
|
-
const userAccounts =
|
|
3576
|
+
const userAccounts = [];
|
|
3577
|
+
if (this.getUser().getUserAccountAndSlot()) {
|
|
3578
|
+
userAccounts.push(this.getUser().getUserAccountAndSlot()!.data);
|
|
3579
|
+
}
|
|
3577
3580
|
const remainingAccounts = this.getRemainingAccounts({
|
|
3578
3581
|
userAccounts,
|
|
3579
3582
|
writableSpotMarketIndexes: [outMarketIndex, inMarketIndex],
|