@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.
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule, ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
2
  import { C as CompassHandlerConfig } from '../../types-BOSq6TbU.mjs';
3
- import { C as CompassCoreService } from '../../compass-service-B0UscWqQ.mjs';
3
+ import { C as CompassCoreService } from '../../compass-service-Dz4PTtzj.mjs';
4
4
  import * as _compass_labs_api_sdk_models_components from '@compass-labs/api-sdk/models/components';
5
5
  import 'viem';
6
6
  import '@compass-labs/api-sdk';
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule, ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
2
  import { C as CompassHandlerConfig } from '../../types-BOSq6TbU.js';
3
- import { C as CompassCoreService } from '../../compass-service-D0Xf69NR.js';
3
+ import { C as CompassCoreService } from '../../compass-service-BzYob9QR.js';
4
4
  import * as _compass_labs_api_sdk_models_components from '@compass-labs/api-sdk/models/components';
5
5
  import 'viem';
6
6
  import '@compass-labs/api-sdk';
@@ -174,7 +174,7 @@ var CompassCoreService = class {
174
174
  };
175
175
  }
176
176
  async managePrepare(body, action) {
177
- const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent, recipient } = body;
177
+ const { amount, token, owner, chain, venueType, vaultAddress, marketAddress, maxSlippagePercent } = body;
178
178
  let venue;
179
179
  if (venueType === "VAULT" && vaultAddress) {
180
180
  venue = {
@@ -202,8 +202,7 @@ var CompassCoreService = class {
202
202
  venue,
203
203
  action,
204
204
  amount,
205
- gasSponsorship: true,
206
- ...recipient && { recipient }
205
+ gasSponsorship: true
207
206
  });
208
207
  const eip712 = response.eip712;
209
208
  if (!eip712) {
@@ -318,7 +317,7 @@ var CompassCoreService = class {
318
317
  }
319
318
  }
320
319
  async transferPrepare(body) {
321
- const { owner, chain = "base", token, amount, action, product } = body;
320
+ const { owner, chain = "base", token, amount, action, product, recipient } = body;
322
321
  const { gasSponsorPrivateKey } = this.config;
323
322
  if (!owner || !token || !amount || !action) {
324
323
  throw new CompassServiceError("Missing required parameters", 400);
@@ -347,7 +346,8 @@ var CompassCoreService = class {
347
346
  amount,
348
347
  action,
349
348
  gasSponsorship: true,
350
- ...spender && { spender }
349
+ ...spender && { spender },
350
+ ...recipient && action === "WITHDRAW" && { recipient }
351
351
  });
352
352
  }
353
353
  const eip712 = response.eip712;
@@ -649,7 +649,7 @@ var CompassCoreService = class {
649
649
  }
650
650
  // --- Bundle ---
651
651
  async bundlePrepare(body) {
652
- const { owner, chain = "base", actions, recipient } = body;
652
+ const { owner, chain = "base", actions } = body;
653
653
  if (!owner || !actions || actions.length === 0) {
654
654
  throw new CompassServiceError("Missing owner or actions", 400);
655
655
  }
@@ -657,8 +657,7 @@ var CompassCoreService = class {
657
657
  owner,
658
658
  chain,
659
659
  gasSponsorship: true,
660
- actions,
661
- ...recipient && { recipient }
660
+ actions
662
661
  });
663
662
  const eip712 = response.eip712;
664
663
  if (!eip712) {