@compass-labs/widgets 0.1.46 → 0.1.47

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.
@@ -172,7 +172,7 @@ var CompassCoreService = class {
172
172
  };
173
173
  }
174
174
  async managePrepare(body, action) {
175
- const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent, recipient } = body;
175
+ const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent } = body;
176
176
  let venue;
177
177
  if (venueType === "VAULT" && vaultAddress) {
178
178
  venue = {
@@ -200,8 +200,7 @@ var CompassCoreService = class {
200
200
  venue,
201
201
  action,
202
202
  amount,
203
- gasSponsorship: true,
204
- ...recipient && { recipient }
203
+ gasSponsorship: true
205
204
  });
206
205
  const eip712 = response.eip712;
207
206
  if (!eip712) {
@@ -316,7 +315,7 @@ var CompassCoreService = class {
316
315
  }
317
316
  }
318
317
  async transferPrepare(body) {
319
- const { owner, chain = "base", token, amount, action, product } = body;
318
+ const { owner, chain = "base", token, amount, action, product, recipient } = body;
320
319
  const { gasSponsorPrivateKey } = this.config;
321
320
  if (!owner || !token || !amount || !action) {
322
321
  throw new CompassServiceError("Missing required parameters", 400);
@@ -345,7 +344,8 @@ var CompassCoreService = class {
345
344
  amount,
346
345
  action,
347
346
  gasSponsorship: true,
348
- ...spender && { spender }
347
+ ...spender && { spender },
348
+ ...recipient && action === "WITHDRAW" && { recipient }
349
349
  });
350
350
  }
351
351
  const eip712 = response.eip712;
@@ -647,7 +647,7 @@ var CompassCoreService = class {
647
647
  }
648
648
  // --- Bundle ---
649
649
  async bundlePrepare(body) {
650
- const { owner, chain = "base", actions, recipient } = body;
650
+ const { owner, chain = "base", actions } = body;
651
651
  if (!owner || !actions || actions.length === 0) {
652
652
  throw new CompassServiceError("Missing owner or actions", 400);
653
653
  }
@@ -655,8 +655,7 @@ var CompassCoreService = class {
655
655
  owner,
656
656
  chain,
657
657
  gasSponsorship: true,
658
- actions,
659
- ...recipient && { recipient }
658
+ actions
660
659
  });
661
660
  const eip712 = response.eip712;
662
661
  if (!eip712) {