@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.
- package/dist/{compass-service-D0Xf69NR.d.ts → compass-service-BzYob9QR.d.ts} +1 -2
- package/dist/{compass-service-B0UscWqQ.d.mts → compass-service-Dz4PTtzj.d.mts} +1 -2
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -1
- package/dist/index.mjs.map +1 -1
- package/dist/server/core/index.d.mts +1 -1
- package/dist/server/core/index.d.ts +1 -1
- package/dist/server/core/index.js +7 -8
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/core/index.mjs +7 -8
- package/dist/server/core/index.mjs.map +1 -1
- package/dist/server/index.js +7 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +7 -8
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/nestjs/index.d.mts +1 -1
- package/dist/server/nestjs/index.d.ts +1 -1
- package/dist/server/nestjs/index.js +7 -8
- package/dist/server/nestjs/index.js.map +1 -1
- package/dist/server/nestjs/index.mjs +7 -8
- package/dist/server/nestjs/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -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
|
|
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
|
|
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) {
|