@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.
@@ -163,7 +163,7 @@ var CompassCoreService = class {
163
163
  };
164
164
  }
165
165
  async managePrepare(body, action) {
166
- const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent, recipient } = body;
166
+ const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent } = body;
167
167
  let venue;
168
168
  if (venueType === "VAULT" && vaultAddress) {
169
169
  venue = {
@@ -191,8 +191,7 @@ var CompassCoreService = class {
191
191
  venue,
192
192
  action,
193
193
  amount,
194
- gasSponsorship: true,
195
- ...recipient && { recipient }
194
+ gasSponsorship: true
196
195
  });
197
196
  const eip712 = response.eip712;
198
197
  if (!eip712) {
@@ -307,7 +306,7 @@ var CompassCoreService = class {
307
306
  }
308
307
  }
309
308
  async transferPrepare(body) {
310
- const { owner, chain = "base", token, amount, action, product } = body;
309
+ const { owner, chain = "base", token, amount, action, product, recipient } = body;
311
310
  const { gasSponsorPrivateKey } = this.config;
312
311
  if (!owner || !token || !amount || !action) {
313
312
  throw new CompassServiceError("Missing required parameters", 400);
@@ -336,7 +335,8 @@ var CompassCoreService = class {
336
335
  amount,
337
336
  action,
338
337
  gasSponsorship: true,
339
- ...spender && { spender }
338
+ ...spender && { spender },
339
+ ...recipient && action === "WITHDRAW" && { recipient }
340
340
  });
341
341
  }
342
342
  const eip712 = response.eip712;
@@ -638,7 +638,7 @@ var CompassCoreService = class {
638
638
  }
639
639
  // --- Bundle ---
640
640
  async bundlePrepare(body) {
641
- const { owner, chain = "base", actions, recipient } = body;
641
+ const { owner, chain = "base", actions } = body;
642
642
  if (!owner || !actions || actions.length === 0) {
643
643
  throw new CompassServiceError("Missing owner or actions", 400);
644
644
  }
@@ -646,8 +646,7 @@ var CompassCoreService = class {
646
646
  owner,
647
647
  chain,
648
648
  gasSponsorship: true,
649
- actions,
650
- ...recipient && { recipient }
649
+ actions
651
650
  });
652
651
  const eip712 = response.eip712;
653
652
  if (!eip712) {