@rhinestone/deposit-modal 0.9.1 → 0.10.0
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/{DepositModalReown-JUJI7UHE.mjs → DepositModalReown-MTWT6Y66.mjs} +5 -5
- package/dist/{DepositModalReown-YQSO4SVY.cjs → DepositModalReown-S3DSFXTX.cjs} +9 -9
- package/dist/{chunk-7OQO6JDC.mjs → chunk-5NJYW5FT.mjs} +3 -3
- package/dist/{chunk-QLZ5RZTA.mjs → chunk-5OEWGJR4.mjs} +1 -1
- package/dist/{chunk-WUQZYQRK.mjs → chunk-7TV7GLJB.mjs} +62 -1
- package/dist/{chunk-EEEQZOTJ.cjs → chunk-A42XAHIB.cjs} +66 -66
- package/dist/{chunk-SQOEHQNT.cjs → chunk-DEF767BA.cjs} +52 -52
- package/dist/{chunk-AYWEWI47.mjs → chunk-KW32UBUQ.mjs} +1 -1
- package/dist/{chunk-QGXAAFHU.mjs → chunk-LR7MKHYV.mjs} +2 -2
- package/dist/{chunk-N3OHR3T2.mjs → chunk-MHIOMTMM.mjs} +227 -24
- package/dist/{chunk-XJE5MRY4.cjs → chunk-NF4NBRUP.cjs} +1 -1
- package/dist/{chunk-6U2H3R3T.cjs → chunk-PUJHXHRA.cjs} +108 -47
- package/dist/{chunk-ITFRTPGF.cjs → chunk-UMCDZJMG.cjs} +57 -57
- package/dist/{chunk-GYEUZSQP.mjs → chunk-VDGT6NZQ.mjs} +1 -1
- package/dist/{chunk-EAUF7SGM.cjs → chunk-VTVOHNXM.cjs} +3 -3
- package/dist/{chunk-VQJHYWAE.cjs → chunk-W4YAOJPG.cjs} +570 -367
- package/dist/claim.cjs +5 -5
- package/dist/claim.mjs +4 -4
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +8 -8
- package/dist/index.mjs +7 -7
- package/dist/styles.css +14 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkA42XAHIBcjs = require('./chunk-A42XAHIB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -34,7 +34,7 @@ var _chunkEEEQZOTJcjs = require('./chunk-EEEQZOTJ.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkPUJHXHRAcjs = require('./chunk-PUJHXHRA.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -257,7 +257,7 @@ function WithdrawFormStep({
|
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
try {
|
|
260
|
-
const bal =
|
|
260
|
+
const bal = _chunkPUJHXHRAcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
|
|
261
261
|
address: asset.token,
|
|
262
262
|
abi: _viem.erc20Abi,
|
|
263
263
|
functionName: "balanceOf",
|
|
@@ -362,7 +362,7 @@ function WithdrawFormStep({
|
|
|
362
362
|
await onSubmit(recipient, amount);
|
|
363
363
|
} catch (err) {
|
|
364
364
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
365
|
-
setError(
|
|
365
|
+
setError(_chunkPUJHXHRAcjs.formatUserError.call(void 0, raw));
|
|
366
366
|
} finally {
|
|
367
367
|
setIsSubmitting(false);
|
|
368
368
|
}
|
|
@@ -378,16 +378,16 @@ function WithdrawFormStep({
|
|
|
378
378
|
if (isBalanceLoading) {
|
|
379
379
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
380
380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
381
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
381
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Spinner, { className: "rs-spinner--lg" }),
|
|
382
382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
383
383
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
|
|
384
384
|
] }),
|
|
385
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
385
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.PoweredBy, {})
|
|
386
386
|
] });
|
|
387
387
|
}
|
|
388
388
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
389
389
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
391
391
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
392
392
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
393
393
|
"label",
|
|
@@ -447,7 +447,7 @@ function WithdrawFormStep({
|
|
|
447
447
|
) })
|
|
448
448
|
] }),
|
|
449
449
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
450
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${
|
|
450
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkPUJHXHRAcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
|
|
451
451
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
452
452
|
"Balance: ",
|
|
453
453
|
formattedBalance,
|
|
@@ -478,7 +478,7 @@ function WithdrawFormStep({
|
|
|
478
478
|
children: [
|
|
479
479
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
480
480
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
481
|
-
|
|
481
|
+
_chunkPUJHXHRAcjs.CdnIcon,
|
|
482
482
|
{
|
|
483
483
|
src: _chunkH577RJN5cjs.getChainIcon.call(void 0, targetChain),
|
|
484
484
|
alt: targetChainName,
|
|
@@ -488,7 +488,7 @@ function WithdrawFormStep({
|
|
|
488
488
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
489
489
|
] }),
|
|
490
490
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
491
|
-
|
|
491
|
+
_chunkPUJHXHRAcjs.ChevronDownIcon,
|
|
492
492
|
{
|
|
493
493
|
className: "rs-withdraw-dropdown-arrow",
|
|
494
494
|
style: {
|
|
@@ -510,7 +510,7 @@ function WithdrawFormStep({
|
|
|
510
510
|
},
|
|
511
511
|
children: [
|
|
512
512
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
513
|
-
|
|
513
|
+
_chunkPUJHXHRAcjs.CdnIcon,
|
|
514
514
|
{
|
|
515
515
|
src: _chunkH577RJN5cjs.getChainIcon.call(void 0, chain.id),
|
|
516
516
|
alt: chain.name,
|
|
@@ -547,7 +547,7 @@ function WithdrawFormStep({
|
|
|
547
547
|
children: [
|
|
548
548
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
549
549
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
550
|
-
|
|
550
|
+
_chunkPUJHXHRAcjs.TokenIcon,
|
|
551
551
|
{
|
|
552
552
|
symbol: targetSymbol,
|
|
553
553
|
className: "rs-withdraw-dropdown-icon"
|
|
@@ -556,7 +556,7 @@ function WithdrawFormStep({
|
|
|
556
556
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
557
557
|
] }),
|
|
558
558
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
|
|
559
|
+
_chunkPUJHXHRAcjs.ChevronDownIcon,
|
|
560
560
|
{
|
|
561
561
|
className: "rs-withdraw-dropdown-arrow",
|
|
562
562
|
style: {
|
|
@@ -578,7 +578,7 @@ function WithdrawFormStep({
|
|
|
578
578
|
},
|
|
579
579
|
children: [
|
|
580
580
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
581
|
-
|
|
581
|
+
_chunkPUJHXHRAcjs.TokenIcon,
|
|
582
582
|
{
|
|
583
583
|
symbol: option.symbol,
|
|
584
584
|
className: "rs-withdraw-dropdown-icon"
|
|
@@ -594,10 +594,10 @@ function WithdrawFormStep({
|
|
|
594
594
|
)
|
|
595
595
|
] })
|
|
596
596
|
] }),
|
|
597
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
598
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
597
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Callout, { variant: "error", children: error }),
|
|
598
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Callout, { variant: "error", children: registrationError }),
|
|
599
599
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
-
|
|
600
|
+
_chunkPUJHXHRAcjs.Button,
|
|
601
601
|
{
|
|
602
602
|
onClick: handleWithdraw,
|
|
603
603
|
fullWidth: true,
|
|
@@ -607,7 +607,7 @@ function WithdrawFormStep({
|
|
|
607
607
|
}
|
|
608
608
|
)
|
|
609
609
|
] }),
|
|
610
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.PoweredBy, {})
|
|
611
611
|
] });
|
|
612
612
|
}
|
|
613
613
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -641,16 +641,16 @@ function WithdrawReviewStep({
|
|
|
641
641
|
const targetChainName = _chunkH577RJN5cjs.getChainName.call(void 0, targetChain);
|
|
642
642
|
const targetChainIcon = _chunkH577RJN5cjs.getChainIcon.call(void 0, targetChain);
|
|
643
643
|
const amountNumber = Number(amount);
|
|
644
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
645
|
-
const prices =
|
|
644
|
+
const formattedSendAmount = _nullishCoalesce(_chunkPUJHXHRAcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
645
|
+
const prices = _chunkA42XAHIBcjs.useTokenPrices.call(void 0, service, [
|
|
646
646
|
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
647
647
|
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
648
648
|
]);
|
|
649
|
-
const receiveDisplay = _nullishCoalesce(
|
|
649
|
+
const receiveDisplay = _nullishCoalesce(_chunkPUJHXHRAcjs.formatReceiveEstimate.call(void 0, {
|
|
650
650
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
651
651
|
sourceSymbol,
|
|
652
652
|
targetSymbol,
|
|
653
|
-
sourceTrusted:
|
|
653
|
+
sourceTrusted: _chunkPUJHXHRAcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
|
|
654
654
|
prices
|
|
655
655
|
}), () => ( // No price for the target token — an honest dash beats a wrong number.
|
|
656
656
|
"\u2014"));
|
|
@@ -661,7 +661,7 @@ function WithdrawReviewStep({
|
|
|
661
661
|
await onConfirm();
|
|
662
662
|
} catch (err) {
|
|
663
663
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
664
|
-
const message =
|
|
664
|
+
const message = _chunkPUJHXHRAcjs.formatUserError.call(void 0, raw);
|
|
665
665
|
setError(message);
|
|
666
666
|
_optionalChain([onError, 'optionalCall', _7 => _7(message, "WITHDRAW_REVIEW_ERROR")]);
|
|
667
667
|
} finally {
|
|
@@ -672,9 +672,9 @@ function WithdrawReviewStep({
|
|
|
672
672
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
673
673
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
674
674
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
675
|
-
|
|
675
|
+
_chunkPUJHXHRAcjs.BodyHeader,
|
|
676
676
|
{
|
|
677
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
677
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CircleArrowOutUpLeftIcon, {}),
|
|
678
678
|
title: "Review withdrawal"
|
|
679
679
|
}
|
|
680
680
|
),
|
|
@@ -687,14 +687,14 @@ function WithdrawReviewStep({
|
|
|
687
687
|
" ",
|
|
688
688
|
sourceSymbol
|
|
689
689
|
] }),
|
|
690
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
691
691
|
] })
|
|
692
692
|
] }),
|
|
693
693
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
694
694
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
695
695
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
696
696
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
697
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
697
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
698
698
|
] })
|
|
699
699
|
] }),
|
|
700
700
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -705,14 +705,14 @@ function WithdrawReviewStep({
|
|
|
705
705
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
706
706
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
707
707
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
708
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
708
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
709
709
|
] })
|
|
710
710
|
] }),
|
|
711
711
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
712
712
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
713
713
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
714
714
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
715
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
715
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src: targetChainIcon }) })
|
|
716
716
|
] })
|
|
717
717
|
] }),
|
|
718
718
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -720,10 +720,10 @@ function WithdrawReviewStep({
|
|
|
720
720
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
721
721
|
] })
|
|
722
722
|
] }),
|
|
723
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
724
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Callout, { variant: "error", children: error }),
|
|
724
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Callout, { variant: "error", children: registrationError }),
|
|
725
725
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
726
|
-
|
|
726
|
+
_chunkPUJHXHRAcjs.Button,
|
|
727
727
|
{
|
|
728
728
|
onClick: handleConfirm,
|
|
729
729
|
loading: isSubmitting,
|
|
@@ -734,7 +734,7 @@ function WithdrawReviewStep({
|
|
|
734
734
|
}
|
|
735
735
|
)
|
|
736
736
|
] }),
|
|
737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.PoweredBy, {})
|
|
738
738
|
] });
|
|
739
739
|
}
|
|
740
740
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -767,11 +767,11 @@ function WithdrawFlow({
|
|
|
767
767
|
onError,
|
|
768
768
|
debug
|
|
769
769
|
}) {
|
|
770
|
-
const rpcUrls =
|
|
771
|
-
const onStepChangeRef =
|
|
772
|
-
const onEventRef =
|
|
773
|
-
const onLifecycleRef =
|
|
774
|
-
const onErrorRef =
|
|
770
|
+
const rpcUrls = _chunkPUJHXHRAcjs.useRpcUrls.call(void 0, );
|
|
771
|
+
const onStepChangeRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onStepChange);
|
|
772
|
+
const onEventRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onEvent);
|
|
773
|
+
const onLifecycleRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onLifecycle);
|
|
774
|
+
const onErrorRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onError);
|
|
775
775
|
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
776
776
|
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
777
777
|
_react.useEffect.call(void 0, () => {
|
|
@@ -782,13 +782,13 @@ function WithdrawFlow({
|
|
|
782
782
|
}, []);
|
|
783
783
|
const logFlow = _react.useCallback.call(void 0,
|
|
784
784
|
(message, data) => {
|
|
785
|
-
|
|
785
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
786
786
|
},
|
|
787
787
|
[debug]
|
|
788
788
|
);
|
|
789
789
|
const logFlowError = _react.useCallback.call(void 0,
|
|
790
790
|
(message, error, data) => {
|
|
791
|
-
|
|
791
|
+
_chunkPUJHXHRAcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
792
792
|
},
|
|
793
793
|
[debug]
|
|
794
794
|
);
|
|
@@ -812,7 +812,7 @@ function WithdrawFlow({
|
|
|
812
812
|
const flowStep = useWithdrawStore((s) => s.step);
|
|
813
813
|
const reviewedRecipient = useWithdrawStore((s) => s.recipient);
|
|
814
814
|
const publicClient = _react.useMemo.call(void 0,
|
|
815
|
-
() =>
|
|
815
|
+
() => _chunkA42XAHIBcjs.getPublicClient.call(void 0, sourceChain, rpcUrls),
|
|
816
816
|
[sourceChain, rpcUrls]
|
|
817
817
|
);
|
|
818
818
|
const recipientForRegistration = _react.useMemo.call(void 0, () => {
|
|
@@ -840,7 +840,7 @@ function WithdrawFlow({
|
|
|
840
840
|
targetToken,
|
|
841
841
|
recipient: recipientForRegistration
|
|
842
842
|
});
|
|
843
|
-
const salt =
|
|
843
|
+
const salt = _chunkA42XAHIBcjs.deriveAccountSalt.call(void 0, {
|
|
844
844
|
recipient: recipientForRegistration,
|
|
845
845
|
targetChain,
|
|
846
846
|
targetToken
|
|
@@ -870,7 +870,7 @@ function WithdrawFlow({
|
|
|
870
870
|
} catch (err) {
|
|
871
871
|
if (cancelled) return;
|
|
872
872
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
873
|
-
const message =
|
|
873
|
+
const message = _chunkPUJHXHRAcjs.formatUserError.call(void 0, raw);
|
|
874
874
|
logFlowError("auto-register:failed", err, {
|
|
875
875
|
accountAddress,
|
|
876
876
|
targetChain,
|
|
@@ -904,7 +904,7 @@ function WithdrawFlow({
|
|
|
904
904
|
const symbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
905
905
|
const decimals = _chunkH577RJN5cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
906
906
|
return {
|
|
907
|
-
id:
|
|
907
|
+
id: _chunkPUJHXHRAcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
908
908
|
chainId: sourceChain,
|
|
909
909
|
token: sourceToken,
|
|
910
910
|
symbol,
|
|
@@ -1084,7 +1084,7 @@ function WithdrawFlow({
|
|
|
1084
1084
|
targetChain,
|
|
1085
1085
|
targetToken
|
|
1086
1086
|
});
|
|
1087
|
-
handleError(
|
|
1087
|
+
handleError(_chunkPUJHXHRAcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1088
1088
|
throw err;
|
|
1089
1089
|
}
|
|
1090
1090
|
},
|
|
@@ -1214,7 +1214,7 @@ function WithdrawFlow({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
),
|
|
1216
1216
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1217
|
-
|
|
1217
|
+
_chunkA42XAHIBcjs.ProcessingStep,
|
|
1218
1218
|
{
|
|
1219
1219
|
smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
|
|
1220
1220
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1284,22 +1284,22 @@ function WithdrawModal({
|
|
|
1284
1284
|
// one only ever applied to the deposit flow.
|
|
1285
1285
|
...removedProps
|
|
1286
1286
|
}) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1287
|
+
_chunkA42XAHIBcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
|
|
1288
|
+
_chunkPUJHXHRAcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
|
|
1289
1289
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1290
|
-
const onReadyRef =
|
|
1290
|
+
const onReadyRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onReady);
|
|
1291
1291
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1292
1292
|
void 0
|
|
1293
1293
|
);
|
|
1294
1294
|
const targetChain = _chunkH577RJN5cjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
|
|
1295
1295
|
const sourceChain = _chunkH577RJN5cjs.getChainId.call(void 0, sourceChainProp);
|
|
1296
|
-
const rpcUrls =
|
|
1296
|
+
const rpcUrls = _chunkPUJHXHRAcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1297
1297
|
const service = _react.useMemo.call(void 0,
|
|
1298
|
-
() =>
|
|
1298
|
+
() => _chunkPUJHXHRAcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1299
1299
|
[backendUrl, debug]
|
|
1300
1300
|
);
|
|
1301
1301
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1302
|
-
const onErrorRef =
|
|
1302
|
+
const onErrorRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onError);
|
|
1303
1303
|
_react.useEffect.call(void 0, () => {
|
|
1304
1304
|
if (isOpen && typeof onSendTransaction !== "function") {
|
|
1305
1305
|
_optionalChain([onErrorRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({
|
|
@@ -1310,7 +1310,7 @@ function WithdrawModal({
|
|
|
1310
1310
|
}, [isOpen, onSendTransaction, onErrorRef]);
|
|
1311
1311
|
_react.useEffect.call(void 0, () => {
|
|
1312
1312
|
if (isOpen && modalRef.current) {
|
|
1313
|
-
|
|
1313
|
+
_chunkPUJHXHRAcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1314
1314
|
}
|
|
1315
1315
|
}, [isOpen, theme]);
|
|
1316
1316
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1328,8 +1328,8 @@ function WithdrawModal({
|
|
|
1328
1328
|
}, []);
|
|
1329
1329
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _37 => _37.showBackButton]), () => ( true));
|
|
1330
1330
|
const canGoBack = backHandler !== void 0;
|
|
1331
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
-
|
|
1331
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
+
_chunkPUJHXHRAcjs.Modal,
|
|
1333
1333
|
{
|
|
1334
1334
|
isOpen,
|
|
1335
1335
|
onClose,
|
|
@@ -1345,7 +1345,7 @@ function WithdrawModal({
|
|
|
1345
1345
|
className: "rs-modal-header-back",
|
|
1346
1346
|
"aria-label": "Go back",
|
|
1347
1347
|
onClick: backHandler,
|
|
1348
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1348
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.ChevronLeftIcon, {})
|
|
1349
1349
|
}
|
|
1350
1350
|
) }),
|
|
1351
1351
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1355,7 +1355,7 @@ function WithdrawModal({
|
|
|
1355
1355
|
onClick: onClose,
|
|
1356
1356
|
className: "rs-modal-close",
|
|
1357
1357
|
"aria-label": "Close",
|
|
1358
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1358
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CloseIcon, {})
|
|
1359
1359
|
}
|
|
1360
1360
|
) })
|
|
1361
1361
|
] }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkPUJHXHRAcjs = require('./chunk-PUJHXHRA.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/ui/ListRow.tsx
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -19,7 +19,7 @@ function ListRow({
|
|
|
19
19
|
...props
|
|
20
20
|
}) {
|
|
21
21
|
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
22
|
-
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22
|
+
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src: leadingMedia }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
|
|
23
23
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-body", children: [
|
|
24
24
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-text", children: [
|
|
25
25
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-title", children: title }),
|
|
@@ -39,7 +39,7 @@ function ListRow({
|
|
|
39
39
|
}
|
|
40
40
|
) : meta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list-row-meta", children: meta })
|
|
41
41
|
] }),
|
|
42
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.ChevronRightIcon, {})))) })
|
|
43
43
|
] });
|
|
44
44
|
if (action) {
|
|
45
45
|
const handleKey = (e) => {
|