@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.js
CHANGED
|
@@ -291,10 +291,6 @@ async function handleExecute(client, body, config) {
|
|
|
291
291
|
chain: viemChain,
|
|
292
292
|
transport: viem.http(rpcUrl)
|
|
293
293
|
});
|
|
294
|
-
const publicClient = viem.createPublicClient({
|
|
295
|
-
chain: viemChain,
|
|
296
|
-
transport: viem.http(rpcUrl)
|
|
297
|
-
});
|
|
298
294
|
const response = await client.gasSponsorship.gasSponsorshipPrepare({
|
|
299
295
|
chain,
|
|
300
296
|
owner,
|
|
@@ -315,12 +311,6 @@ async function handleExecute(client, body, config) {
|
|
|
315
311
|
value: transaction.value ? BigInt(transaction.value) : 0n,
|
|
316
312
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0
|
|
317
313
|
});
|
|
318
|
-
const receipt = await publicClient.waitForTransactionReceipt({
|
|
319
|
-
hash: txHash
|
|
320
|
-
});
|
|
321
|
-
if (receipt.status === "reverted") {
|
|
322
|
-
return jsonResponse({ error: "Transaction reverted" }, 500);
|
|
323
|
-
}
|
|
324
314
|
return jsonResponse({ txHash, success: true });
|
|
325
315
|
}
|
|
326
316
|
async function handleTransferApprove(client, body) {
|
|
@@ -503,10 +493,6 @@ async function handleTransferExecute(client, body, config) {
|
|
|
503
493
|
chain: viemChain,
|
|
504
494
|
transport: viem.http(rpcUrl)
|
|
505
495
|
});
|
|
506
|
-
const publicClient = viem.createPublicClient({
|
|
507
|
-
chain: viemChain,
|
|
508
|
-
transport: viem.http(rpcUrl)
|
|
509
|
-
});
|
|
510
496
|
const response = await client.gasSponsorship.gasSponsorshipPrepare({
|
|
511
497
|
chain,
|
|
512
498
|
owner,
|
|
@@ -528,12 +514,6 @@ async function handleTransferExecute(client, body, config) {
|
|
|
528
514
|
value: transaction.value ? BigInt(transaction.value) : 0n,
|
|
529
515
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0
|
|
530
516
|
});
|
|
531
|
-
const receipt = await publicClient.waitForTransactionReceipt({
|
|
532
|
-
hash: txHash
|
|
533
|
-
});
|
|
534
|
-
if (receipt.status === "reverted") {
|
|
535
|
-
return jsonResponse({ error: "Transaction reverted" }, 500);
|
|
536
|
-
}
|
|
537
517
|
return jsonResponse({ txHash, success: true });
|
|
538
518
|
}
|
|
539
519
|
async function handleEarnAccountBalances(client, params) {
|