@compass-labs/widgets 0.1.37 → 0.1.38
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/index.d.mts +2 -9
- package/dist/index.d.ts +2 -9
- package/dist/index.js +3642 -3711
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3643 -3712
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.js +0 -20
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +0 -20
- package/dist/server/index.mjs.map +1 -1
- package/dist/styles.css +56 -0
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -289,10 +289,6 @@ async function handleExecute(client, body, config) {
|
|
|
289
289
|
chain: viemChain,
|
|
290
290
|
transport: http(rpcUrl)
|
|
291
291
|
});
|
|
292
|
-
const publicClient = createPublicClient({
|
|
293
|
-
chain: viemChain,
|
|
294
|
-
transport: http(rpcUrl)
|
|
295
|
-
});
|
|
296
292
|
const response = await client.gasSponsorship.gasSponsorshipPrepare({
|
|
297
293
|
chain,
|
|
298
294
|
owner,
|
|
@@ -313,12 +309,6 @@ async function handleExecute(client, body, config) {
|
|
|
313
309
|
value: transaction.value ? BigInt(transaction.value) : 0n,
|
|
314
310
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0
|
|
315
311
|
});
|
|
316
|
-
const receipt = await publicClient.waitForTransactionReceipt({
|
|
317
|
-
hash: txHash
|
|
318
|
-
});
|
|
319
|
-
if (receipt.status === "reverted") {
|
|
320
|
-
return jsonResponse({ error: "Transaction reverted" }, 500);
|
|
321
|
-
}
|
|
322
312
|
return jsonResponse({ txHash, success: true });
|
|
323
313
|
}
|
|
324
314
|
async function handleTransferApprove(client, body) {
|
|
@@ -501,10 +491,6 @@ async function handleTransferExecute(client, body, config) {
|
|
|
501
491
|
chain: viemChain,
|
|
502
492
|
transport: http(rpcUrl)
|
|
503
493
|
});
|
|
504
|
-
const publicClient = createPublicClient({
|
|
505
|
-
chain: viemChain,
|
|
506
|
-
transport: http(rpcUrl)
|
|
507
|
-
});
|
|
508
494
|
const response = await client.gasSponsorship.gasSponsorshipPrepare({
|
|
509
495
|
chain,
|
|
510
496
|
owner,
|
|
@@ -526,12 +512,6 @@ async function handleTransferExecute(client, body, config) {
|
|
|
526
512
|
value: transaction.value ? BigInt(transaction.value) : 0n,
|
|
527
513
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0
|
|
528
514
|
});
|
|
529
|
-
const receipt = await publicClient.waitForTransactionReceipt({
|
|
530
|
-
hash: txHash
|
|
531
|
-
});
|
|
532
|
-
if (receipt.status === "reverted") {
|
|
533
|
-
return jsonResponse({ error: "Transaction reverted" }, 500);
|
|
534
|
-
}
|
|
535
515
|
return jsonResponse({ txHash, success: true });
|
|
536
516
|
}
|
|
537
517
|
async function handleEarnAccountBalances(client, params) {
|