@drift-labs/sdk 2.65.0-beta.2 → 2.65.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 CHANGED
@@ -1 +1 @@
1
- 2.65.0-beta.2
1
+ 2.65.0-beta.3
@@ -54,8 +54,11 @@ class JupiterClient {
54
54
  onlyDirectRoutes: onlyDirectRoutes.toString(),
55
55
  maxAccounts: maxAccounts.toString(),
56
56
  ...(excludeDexes && { excludeDexes: excludeDexes.join(',') }),
57
- }).toString();
58
- const quote = await (await (0, node_fetch_1.default)(`${this.url}/v6/quote?${params}`)).json();
57
+ });
58
+ if (swapMode === 'ExactOut') {
59
+ params.delete('maxAccounts');
60
+ }
61
+ const quote = await (await (0, node_fetch_1.default)(`${this.url}/v6/quote?${params.toString()}`)).json();
59
62
  return quote;
60
63
  }
61
64
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.65.0-beta.2",
3
+ "version": "2.65.0-beta.3",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -305,9 +305,14 @@ export class JupiterClient {
305
305
  onlyDirectRoutes: onlyDirectRoutes.toString(),
306
306
  maxAccounts: maxAccounts.toString(),
307
307
  ...(excludeDexes && { excludeDexes: excludeDexes.join(',') }),
308
- }).toString();
309
- const quote = await (await fetch(`${this.url}/v6/quote?${params}`)).json();
310
- return quote;
308
+ });
309
+ if (swapMode === 'ExactOut') {
310
+ params.delete('maxAccounts');
311
+ }
312
+ const quote = await (
313
+ await fetch(`${this.url}/v6/quote?${params.toString()}`)
314
+ ).json();
315
+ return quote as QuoteResponse;
311
316
  }
312
317
 
313
318
  /**