0xtrails 0.4.2 → 0.4.3
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/{ccip-Dl3umoGg.js → ccip-C9CA3tIi.js} +1 -1
- package/dist/{index-sMS_ge1R.js → index-CNB57v0n.js} +8491 -8440
- package/dist/index.js +2 -2
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/standardDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/crossChain.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/sameChainSameToken.d.ts.map +1 -1
- package/dist/widget/index.js +1 -1
- package/package.json +2 -2
- package/src/prepareSend.ts +4 -0
- package/src/transactionIntent/deposits/gaslessDeposit.ts +88 -43
- package/src/transactionIntent/deposits/standardDeposit.ts +91 -53
- package/src/transactionIntent/handlers/crossChain.ts +70 -0
- package/src/transactionIntent/handlers/sameChainSameToken.ts +22 -0
|
@@ -418,6 +418,12 @@ export async function handleSameChainSameToken({
|
|
|
418
418
|
|
|
419
419
|
try {
|
|
420
420
|
onTransactionStateChange(localTransactionStates)
|
|
421
|
+
// Also trigger checkout status update if handler is provided
|
|
422
|
+
if (checkoutOnHandlers?.triggerCheckoutStatusUpdate) {
|
|
423
|
+
checkoutOnHandlers.triggerCheckoutStatusUpdate(
|
|
424
|
+
localTransactionStates,
|
|
425
|
+
)
|
|
426
|
+
}
|
|
421
427
|
} catch (error) {
|
|
422
428
|
logger.console.error(
|
|
423
429
|
"[trails-sdk] Error calling onTransactionStateChange:",
|
|
@@ -514,6 +520,12 @@ export async function handleSameChainSameToken({
|
|
|
514
520
|
localTransactionStates[0]?.label,
|
|
515
521
|
)
|
|
516
522
|
onTransactionStateChange(localTransactionStates)
|
|
523
|
+
// Also trigger checkout status update if handler is provided
|
|
524
|
+
if (checkoutOnHandlers?.triggerCheckoutStatusUpdate) {
|
|
525
|
+
checkoutOnHandlers.triggerCheckoutStatusUpdate(
|
|
526
|
+
localTransactionStates,
|
|
527
|
+
)
|
|
528
|
+
}
|
|
517
529
|
} catch (error) {
|
|
518
530
|
logger.console.error(
|
|
519
531
|
"[trails-sdk] Error fetching deposit transaction receipt:",
|
|
@@ -551,6 +563,12 @@ export async function handleSameChainSameToken({
|
|
|
551
563
|
localTransactionStates[1]?.label,
|
|
552
564
|
)
|
|
553
565
|
onTransactionStateChange(localTransactionStates)
|
|
566
|
+
// Also trigger checkout status update if handler is provided
|
|
567
|
+
if (checkoutOnHandlers?.triggerCheckoutStatusUpdate) {
|
|
568
|
+
checkoutOnHandlers.triggerCheckoutStatusUpdate(
|
|
569
|
+
localTransactionStates,
|
|
570
|
+
)
|
|
571
|
+
}
|
|
554
572
|
} catch (error) {
|
|
555
573
|
logger.console.error(
|
|
556
574
|
"[trails-sdk] Error fetching origin transaction receipt:",
|
|
@@ -580,6 +598,10 @@ export async function handleSameChainSameToken({
|
|
|
580
598
|
),
|
|
581
599
|
]
|
|
582
600
|
onTransactionStateChange(updatedStates)
|
|
601
|
+
// Also trigger checkout status update if handler is provided
|
|
602
|
+
if (checkoutOnHandlers?.triggerCheckoutStatusUpdate) {
|
|
603
|
+
checkoutOnHandlers.triggerCheckoutStatusUpdate(updatedStates)
|
|
604
|
+
}
|
|
583
605
|
} catch (error) {
|
|
584
606
|
logger.console.error(
|
|
585
607
|
"[trails-sdk] Error calling onTransactionStateChange:",
|