@compass-labs/widgets 0.1.46 → 0.1.48

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