@rhinestone/deposit-modal 0.7.0 → 0.8.1
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-T4RRW5FM.mjs → DepositModalReown-4BSHOQ5Y.mjs} +6 -6
- package/dist/{DepositModalReown-CHVDFNEX.cjs → DepositModalReown-UND3DEJH.cjs} +9 -9
- package/dist/{WithdrawModalReown-Q6MUMZTX.mjs → WithdrawModalReown-FVXSSGY5.mjs} +5 -5
- package/dist/{WithdrawModalReown-YZMZTN6E.cjs → WithdrawModalReown-TVZWJKQI.cjs} +8 -8
- package/dist/caip-C_ZYFIGa.d.cts +77 -0
- package/dist/caip-C_ZYFIGa.d.ts +77 -0
- package/dist/{chunk-J52W34Y7.mjs → chunk-2JPB3PLB.mjs} +2 -2
- package/dist/{chunk-XOBLFIGV.cjs → chunk-4NN7UTWQ.cjs} +4 -4
- package/dist/{chunk-UZENNYHS.mjs → chunk-7KHEIMWD.mjs} +102 -59
- package/dist/{chunk-UN6MEOOA.cjs → chunk-7OKA6GNA.cjs} +293 -137
- package/dist/{chunk-QSMPJQTX.cjs → chunk-D3Y7ZBED.cjs} +403 -360
- package/dist/{chunk-4JLYWRQA.mjs → chunk-DABKCJVL.mjs} +1 -1
- package/dist/{chunk-KUURQOTT.cjs → chunk-HQWZCOMS.cjs} +109 -106
- package/dist/{chunk-OYPFPEIT.mjs → chunk-NASHLEVQ.mjs} +304 -148
- package/dist/{chunk-CPMHRMPH.mjs → chunk-O5OKA27M.mjs} +55 -23
- package/dist/{chunk-6P3WNDED.cjs → chunk-Q3W53BKR.cjs} +7 -7
- package/dist/{chunk-CLUR2J72.mjs → chunk-T43VUEJH.mjs} +21 -18
- package/dist/{chunk-HH46H6ZI.cjs → chunk-U7SVYWVD.cjs} +56 -24
- package/dist/{chunk-K6J3RDDK.mjs → chunk-WK5AFRSP.mjs} +1 -1
- package/dist/{chunk-RLMXWLF4.cjs → chunk-XRWQMIBY.cjs} +3 -3
- package/dist/constants.cjs +4 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +5 -3
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +12 -8
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +29 -0
- package/dist/{types-6ROxwyfG.d.cts → types--LQWg_4W.d.cts} +1 -1
- package/dist/{types-6ROxwyfG.d.ts → types--LQWg_4W.d.ts} +1 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/caip-CsslyHGL.d.cts +0 -62
- package/dist/caip-CsslyHGL.d.ts +0 -62
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var _chunkUN6MEOOAcjs = require('./chunk-UN6MEOOA.cjs');
|
|
37
36
|
|
|
38
37
|
|
|
38
|
+
var _chunk7OKA6GNAcjs = require('./chunk-7OKA6GNA.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var _chunkRLMXWLF4cjs = require('./chunk-RLMXWLF4.cjs');
|
|
42
41
|
|
|
43
42
|
|
|
43
|
+
var _chunkXRWQMIBYcjs = require('./chunk-XRWQMIBY.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -52,7 +52,8 @@ var _chunkRLMXWLF4cjs = require('./chunk-RLMXWLF4.cjs');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
|
|
56
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
56
57
|
|
|
57
58
|
// src/WithdrawModal.tsx
|
|
58
59
|
|
|
@@ -244,8 +245,8 @@ function WithdrawFormStep({
|
|
|
244
245
|
const chainMismatch = Boolean(
|
|
245
246
|
_optionalChain([walletClient, 'optionalAccess', _3 => _3.chain, 'optionalAccess', _4 => _4.id]) && walletClient.chain.id !== asset.chainId
|
|
246
247
|
);
|
|
247
|
-
const targetSymbol =
|
|
248
|
-
const targetChainName =
|
|
248
|
+
const targetSymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
249
|
+
const targetChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
|
|
249
250
|
const isBusy = submitting || isSubmitting;
|
|
250
251
|
const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
|
|
251
252
|
_react.useEffect.call(void 0, () => {
|
|
@@ -264,7 +265,7 @@ function WithdrawFormStep({
|
|
|
264
265
|
setIsSwitching(true);
|
|
265
266
|
switchChain(asset.chainId).catch((err) => {
|
|
266
267
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
267
|
-
setError(
|
|
268
|
+
setError(_chunk7OKA6GNAcjs.formatUserError.call(void 0, raw));
|
|
268
269
|
}).finally(() => {
|
|
269
270
|
setIsSwitching(false);
|
|
270
271
|
});
|
|
@@ -284,7 +285,7 @@ function WithdrawFormStep({
|
|
|
284
285
|
return;
|
|
285
286
|
}
|
|
286
287
|
try {
|
|
287
|
-
const bal =
|
|
288
|
+
const bal = _chunk7OKA6GNAcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
288
289
|
address: asset.token,
|
|
289
290
|
abi: _viem.erc20Abi,
|
|
290
291
|
functionName: "balanceOf",
|
|
@@ -395,7 +396,7 @@ function WithdrawFormStep({
|
|
|
395
396
|
await onSubmit(recipient, amount);
|
|
396
397
|
} catch (err) {
|
|
397
398
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
398
|
-
setError(
|
|
399
|
+
setError(_chunk7OKA6GNAcjs.formatUserError.call(void 0, raw));
|
|
399
400
|
} finally {
|
|
400
401
|
setIsSubmitting(false);
|
|
401
402
|
}
|
|
@@ -411,16 +412,16 @@ function WithdrawFormStep({
|
|
|
411
412
|
if (isBalanceLoading) {
|
|
412
413
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
413
414
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
414
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
415
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.Spinner, { className: "rs-spinner--lg" }),
|
|
415
416
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
416
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${
|
|
417
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
417
418
|
] }),
|
|
418
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
419
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.PoweredBy, {})
|
|
419
420
|
] });
|
|
420
421
|
}
|
|
421
422
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
422
423
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
424
425
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
425
426
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
426
427
|
"label",
|
|
@@ -466,7 +467,7 @@ function WithdrawFormStep({
|
|
|
466
467
|
),
|
|
467
468
|
isRecipientConnected ? null : "Use connected"
|
|
468
469
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
|
|
470
471
|
isRecipientConnected ? null : "Use connected"
|
|
471
472
|
] })
|
|
472
473
|
}
|
|
@@ -506,7 +507,7 @@ function WithdrawFormStep({
|
|
|
506
507
|
) })
|
|
507
508
|
] }),
|
|
508
509
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
509
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
510
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunk7OKA6GNAcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
510
511
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
511
512
|
"Balance: ",
|
|
512
513
|
formattedBalance,
|
|
@@ -536,10 +537,10 @@ function WithdrawFormStep({
|
|
|
536
537
|
},
|
|
537
538
|
children: [
|
|
538
539
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
539
|
-
|
|
540
|
+
_chunkU7SVYWVDcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
540
541
|
"img",
|
|
541
542
|
{
|
|
542
|
-
src:
|
|
543
|
+
src: _chunkU7SVYWVDcjs.getChainIcon.call(void 0, targetChain),
|
|
543
544
|
alt: targetChainName,
|
|
544
545
|
className: "rs-withdraw-dropdown-icon"
|
|
545
546
|
}
|
|
@@ -547,7 +548,7 @@ function WithdrawFormStep({
|
|
|
547
548
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
548
549
|
] }),
|
|
549
550
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
550
|
-
|
|
551
|
+
_chunk7OKA6GNAcjs.ChevronDownIcon,
|
|
551
552
|
{
|
|
552
553
|
className: "rs-withdraw-dropdown-arrow",
|
|
553
554
|
style: {
|
|
@@ -568,10 +569,10 @@ function WithdrawFormStep({
|
|
|
568
569
|
setShowChainDropdown(false);
|
|
569
570
|
},
|
|
570
571
|
children: [
|
|
571
|
-
|
|
572
|
+
_chunkU7SVYWVDcjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
572
573
|
"img",
|
|
573
574
|
{
|
|
574
|
-
src:
|
|
575
|
+
src: _chunkU7SVYWVDcjs.getChainIcon.call(void 0, chain.id),
|
|
575
576
|
alt: chain.name,
|
|
576
577
|
className: "rs-withdraw-dropdown-icon"
|
|
577
578
|
}
|
|
@@ -605,18 +606,17 @@ function WithdrawFormStep({
|
|
|
605
606
|
},
|
|
606
607
|
children: [
|
|
607
608
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
608
|
-
|
|
609
|
-
|
|
609
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
610
|
+
_chunk7OKA6GNAcjs.TokenIcon,
|
|
610
611
|
{
|
|
611
|
-
|
|
612
|
-
alt: targetSymbol,
|
|
612
|
+
symbol: targetSymbol,
|
|
613
613
|
className: "rs-withdraw-dropdown-icon"
|
|
614
614
|
}
|
|
615
615
|
),
|
|
616
616
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
617
617
|
] }),
|
|
618
618
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
619
|
-
|
|
619
|
+
_chunk7OKA6GNAcjs.ChevronDownIcon,
|
|
620
620
|
{
|
|
621
621
|
className: "rs-withdraw-dropdown-arrow",
|
|
622
622
|
style: {
|
|
@@ -637,11 +637,10 @@ function WithdrawFormStep({
|
|
|
637
637
|
setShowTokenDropdown(false);
|
|
638
638
|
},
|
|
639
639
|
children: [
|
|
640
|
-
|
|
641
|
-
|
|
640
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
641
|
+
_chunk7OKA6GNAcjs.TokenIcon,
|
|
642
642
|
{
|
|
643
|
-
|
|
644
|
-
alt: option.symbol,
|
|
643
|
+
symbol: option.symbol,
|
|
645
644
|
className: "rs-withdraw-dropdown-icon"
|
|
646
645
|
}
|
|
647
646
|
),
|
|
@@ -655,11 +654,11 @@ function WithdrawFormStep({
|
|
|
655
654
|
)
|
|
656
655
|
] })
|
|
657
656
|
] }),
|
|
658
|
-
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${
|
|
659
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
660
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
657
|
+
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
|
|
658
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.Callout, { variant: "error", children: error }),
|
|
659
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.Callout, { variant: "error", children: registrationError }),
|
|
661
660
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
662
|
-
|
|
661
|
+
_chunk7OKA6GNAcjs.Button,
|
|
663
662
|
{
|
|
664
663
|
onClick: handleWithdraw,
|
|
665
664
|
fullWidth: true,
|
|
@@ -669,7 +668,7 @@ function WithdrawFormStep({
|
|
|
669
668
|
}
|
|
670
669
|
)
|
|
671
670
|
] }),
|
|
672
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
671
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.PoweredBy, {})
|
|
673
672
|
] });
|
|
674
673
|
}
|
|
675
674
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -683,6 +682,7 @@ function shortenAddress(addr) {
|
|
|
683
682
|
function WithdrawReviewStep({
|
|
684
683
|
sourceChain,
|
|
685
684
|
sourceSymbol,
|
|
685
|
+
sourceToken,
|
|
686
686
|
targetChain,
|
|
687
687
|
targetToken,
|
|
688
688
|
amount,
|
|
@@ -696,20 +696,22 @@ function WithdrawReviewStep({
|
|
|
696
696
|
}) {
|
|
697
697
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
698
698
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
699
|
-
const sourceChainName =
|
|
700
|
-
const sourceChainIcon =
|
|
701
|
-
const targetSymbol =
|
|
702
|
-
const targetChainName =
|
|
703
|
-
const targetChainIcon =
|
|
704
|
-
const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
705
|
-
const targetTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
699
|
+
const sourceChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, sourceChain);
|
|
700
|
+
const sourceChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, sourceChain);
|
|
701
|
+
const targetSymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
702
|
+
const targetChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
|
|
703
|
+
const targetChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, targetChain);
|
|
706
704
|
const amountNumber = Number(amount);
|
|
707
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
708
|
-
const prices =
|
|
709
|
-
|
|
705
|
+
const formattedSendAmount = _nullishCoalesce(_chunk7OKA6GNAcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
706
|
+
const prices = _chunk7OKA6GNAcjs.useTokenPrices.call(void 0, service, [
|
|
707
|
+
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
708
|
+
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
709
|
+
]);
|
|
710
|
+
const receiveDisplay = _nullishCoalesce(_chunk7OKA6GNAcjs.formatReceiveEstimate.call(void 0, {
|
|
710
711
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
711
712
|
sourceSymbol,
|
|
712
713
|
targetSymbol,
|
|
714
|
+
sourceTrusted: _chunk7OKA6GNAcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
|
|
713
715
|
prices
|
|
714
716
|
}), () => ( // No price for the target token — an honest dash beats a wrong number.
|
|
715
717
|
"\u2014"));
|
|
@@ -720,7 +722,7 @@ function WithdrawReviewStep({
|
|
|
720
722
|
await onConfirm();
|
|
721
723
|
} catch (err) {
|
|
722
724
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
723
|
-
const message =
|
|
725
|
+
const message = _chunk7OKA6GNAcjs.formatUserError.call(void 0, raw);
|
|
724
726
|
setError(message);
|
|
725
727
|
_optionalChain([onError, 'optionalCall', _10 => _10(message, "WITHDRAW_REVIEW_ERROR")]);
|
|
726
728
|
} finally {
|
|
@@ -731,9 +733,9 @@ function WithdrawReviewStep({
|
|
|
731
733
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
732
734
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
733
735
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
734
|
-
|
|
736
|
+
_chunk7OKA6GNAcjs.BodyHeader,
|
|
735
737
|
{
|
|
736
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
738
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.CircleArrowOutUpLeftIcon, {}),
|
|
737
739
|
title: "Review withdrawal"
|
|
738
740
|
}
|
|
739
741
|
),
|
|
@@ -746,7 +748,7 @@ function WithdrawReviewStep({
|
|
|
746
748
|
" ",
|
|
747
749
|
sourceSymbol
|
|
748
750
|
] }),
|
|
749
|
-
|
|
751
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
750
752
|
] })
|
|
751
753
|
] }),
|
|
752
754
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -764,7 +766,7 @@ function WithdrawReviewStep({
|
|
|
764
766
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
765
767
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
766
768
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
767
|
-
|
|
769
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
768
770
|
] })
|
|
769
771
|
] }),
|
|
770
772
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -779,10 +781,10 @@ function WithdrawReviewStep({
|
|
|
779
781
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
780
782
|
] })
|
|
781
783
|
] }),
|
|
782
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
783
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
784
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.Callout, { variant: "error", children: error }),
|
|
785
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.Callout, { variant: "error", children: registrationError }),
|
|
784
786
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
785
|
-
|
|
787
|
+
_chunk7OKA6GNAcjs.Button,
|
|
786
788
|
{
|
|
787
789
|
onClick: handleConfirm,
|
|
788
790
|
loading: isSubmitting,
|
|
@@ -793,7 +795,7 @@ function WithdrawReviewStep({
|
|
|
793
795
|
}
|
|
794
796
|
)
|
|
795
797
|
] }),
|
|
796
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
798
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.PoweredBy, {})
|
|
797
799
|
] });
|
|
798
800
|
}
|
|
799
801
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -805,15 +807,15 @@ var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
|
|
|
805
807
|
var REGISTRATION_DEBOUNCE_MS = 600;
|
|
806
808
|
var WITHDRAW_INDEXING_DELAY_MS = 2e3;
|
|
807
809
|
function resolveSessionOwner(eoaAddress) {
|
|
808
|
-
const localOwner =
|
|
810
|
+
const localOwner = _chunk7OKA6GNAcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
809
811
|
if (localOwner) {
|
|
810
812
|
return {
|
|
811
|
-
account:
|
|
813
|
+
account: _chunk7OKA6GNAcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
812
814
|
address: localOwner.address
|
|
813
815
|
};
|
|
814
816
|
}
|
|
815
|
-
const created =
|
|
816
|
-
|
|
817
|
+
const created = _chunk7OKA6GNAcjs.createSessionOwnerKey.call(void 0, );
|
|
818
|
+
_chunk7OKA6GNAcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
817
819
|
return { account: created.account, address: created.address };
|
|
818
820
|
}
|
|
819
821
|
function targetsEqual(a, b) {
|
|
@@ -833,7 +835,7 @@ function WithdrawFlow({
|
|
|
833
835
|
amount: defaultAmount,
|
|
834
836
|
service,
|
|
835
837
|
allowedRoutes,
|
|
836
|
-
signerAddress =
|
|
838
|
+
signerAddress = _chunkU7SVYWVDcjs.DEFAULT_SIGNER_ADDRESS,
|
|
837
839
|
sessionChainIds,
|
|
838
840
|
forceRegister = false,
|
|
839
841
|
reownWallet,
|
|
@@ -848,11 +850,11 @@ function WithdrawFlow({
|
|
|
848
850
|
onError,
|
|
849
851
|
debug
|
|
850
852
|
}) {
|
|
851
|
-
const rpcUrls =
|
|
852
|
-
const onStepChangeRef =
|
|
853
|
-
const onEventRef =
|
|
854
|
-
const onLifecycleRef =
|
|
855
|
-
const onErrorRef =
|
|
853
|
+
const rpcUrls = _chunk7OKA6GNAcjs.useRpcUrls.call(void 0, );
|
|
854
|
+
const onStepChangeRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onStepChange);
|
|
855
|
+
const onEventRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onEvent);
|
|
856
|
+
const onLifecycleRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onLifecycle);
|
|
857
|
+
const onErrorRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onError);
|
|
856
858
|
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
857
859
|
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
858
860
|
_react.useEffect.call(void 0, () => {
|
|
@@ -863,13 +865,13 @@ function WithdrawFlow({
|
|
|
863
865
|
}, []);
|
|
864
866
|
const logFlow = _react.useCallback.call(void 0,
|
|
865
867
|
(message, data) => {
|
|
866
|
-
|
|
868
|
+
_chunk7OKA6GNAcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
867
869
|
},
|
|
868
870
|
[debug]
|
|
869
871
|
);
|
|
870
872
|
const logFlowError = _react.useCallback.call(void 0,
|
|
871
873
|
(message, error, data) => {
|
|
872
|
-
|
|
874
|
+
_chunk7OKA6GNAcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
873
875
|
},
|
|
874
876
|
[debug]
|
|
875
877
|
);
|
|
@@ -945,14 +947,14 @@ function WithdrawFlow({
|
|
|
945
947
|
return {
|
|
946
948
|
ownerAddress: dappAddress,
|
|
947
949
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
948
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
950
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7OKA6GNAcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
949
951
|
switchChain: dappSwitchChain
|
|
950
952
|
};
|
|
951
953
|
}
|
|
952
954
|
return {
|
|
953
955
|
ownerAddress: dappWalletClient.account.address,
|
|
954
956
|
walletClient: dappWalletClient,
|
|
955
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
957
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7OKA6GNAcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
956
958
|
switchChain: dappSwitchChain
|
|
957
959
|
};
|
|
958
960
|
}
|
|
@@ -963,7 +965,7 @@ function WithdrawFlow({
|
|
|
963
965
|
return {
|
|
964
966
|
ownerAddress: dappWalletClient.account.address,
|
|
965
967
|
walletClient: dappWalletClient,
|
|
966
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
968
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7OKA6GNAcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
967
969
|
switchChain: dappSwitchChain
|
|
968
970
|
};
|
|
969
971
|
}
|
|
@@ -1021,7 +1023,7 @@ function WithdrawFlow({
|
|
|
1021
1023
|
const setup = await service.setupAccount({
|
|
1022
1024
|
ownerAddress,
|
|
1023
1025
|
sessionOwnerAddress: sessionOwner.address,
|
|
1024
|
-
targetChain:
|
|
1026
|
+
targetChain: _chunkU7SVYWVDcjs.toEvmCaip2.call(void 0, targetChain),
|
|
1025
1027
|
targetToken,
|
|
1026
1028
|
recipient: recipientForRegistration,
|
|
1027
1029
|
signerAddress,
|
|
@@ -1046,7 +1048,7 @@ function WithdrawFlow({
|
|
|
1046
1048
|
message: typedData.message
|
|
1047
1049
|
});
|
|
1048
1050
|
if (cancelled) return;
|
|
1049
|
-
const sessionDetails =
|
|
1051
|
+
const sessionDetails = _chunk7OKA6GNAcjs.buildSessionDetails.call(void 0,
|
|
1050
1052
|
setup.sessionDetailsUnsigned,
|
|
1051
1053
|
signature
|
|
1052
1054
|
);
|
|
@@ -1060,7 +1062,7 @@ function WithdrawFlow({
|
|
|
1060
1062
|
eoaAddress: ownerAddress,
|
|
1061
1063
|
sessionOwner: sessionOwner.address,
|
|
1062
1064
|
target: {
|
|
1063
|
-
chain:
|
|
1065
|
+
chain: _chunkU7SVYWVDcjs.toEvmCaip2.call(void 0, targetChain),
|
|
1064
1066
|
token: targetToken,
|
|
1065
1067
|
recipient: recipientForRegistration
|
|
1066
1068
|
}
|
|
@@ -1083,7 +1085,7 @@ function WithdrawFlow({
|
|
|
1083
1085
|
} catch (err) {
|
|
1084
1086
|
if (cancelled) return;
|
|
1085
1087
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1086
|
-
const message =
|
|
1088
|
+
const message = _chunk7OKA6GNAcjs.formatUserError.call(void 0, raw);
|
|
1087
1089
|
logFlowError("auto-register:failed", err, {
|
|
1088
1090
|
ownerAddress,
|
|
1089
1091
|
targetChain,
|
|
@@ -1116,10 +1118,10 @@ function WithdrawFlow({
|
|
|
1116
1118
|
onErrorRef
|
|
1117
1119
|
]);
|
|
1118
1120
|
const asset = _react.useMemo.call(void 0, () => {
|
|
1119
|
-
const symbol =
|
|
1120
|
-
const decimals =
|
|
1121
|
+
const symbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1122
|
+
const decimals = _chunkU7SVYWVDcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1121
1123
|
return {
|
|
1122
|
-
id:
|
|
1124
|
+
id: _chunk7OKA6GNAcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1123
1125
|
chainId: sourceChain,
|
|
1124
1126
|
token: sourceToken,
|
|
1125
1127
|
symbol,
|
|
@@ -1127,7 +1129,7 @@ function WithdrawFlow({
|
|
|
1127
1129
|
decimals
|
|
1128
1130
|
};
|
|
1129
1131
|
}, [sourceChain, sourceToken]);
|
|
1130
|
-
const isSourceNative = sourceToken.toLowerCase() ===
|
|
1132
|
+
const isSourceNative = sourceToken.toLowerCase() === _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
1131
1133
|
const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
|
|
1132
1134
|
const reviewedTarget = reviewedRecipient ? {
|
|
1133
1135
|
chain: targetChain,
|
|
@@ -1152,8 +1154,8 @@ function WithdrawFlow({
|
|
|
1152
1154
|
}
|
|
1153
1155
|
if (lastStepOpenEventKeyRef.current === "form") return;
|
|
1154
1156
|
lastStepOpenEventKeyRef.current = "form";
|
|
1155
|
-
const tokenSymbol =
|
|
1156
|
-
const chainName =
|
|
1157
|
+
const tokenSymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
1158
|
+
const chainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
|
|
1157
1159
|
_optionalChain([onEventRef, 'access', _39 => _39.current, 'optionalCall', _40 => _40({
|
|
1158
1160
|
type: "withdraw_modal_select_amount_open",
|
|
1159
1161
|
pred_balance: totalBalanceUsd,
|
|
@@ -1190,8 +1192,8 @@ function WithdrawFlow({
|
|
|
1190
1192
|
);
|
|
1191
1193
|
const handleFormContinue = _react.useCallback.call(void 0,
|
|
1192
1194
|
(recipient, amountValue) => {
|
|
1193
|
-
const tokenSymbol =
|
|
1194
|
-
const chainName =
|
|
1195
|
+
const tokenSymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
1196
|
+
const chainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
|
|
1195
1197
|
_optionalChain([onEventRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44({
|
|
1196
1198
|
type: "withdraw_modal_select_amount_cta_click",
|
|
1197
1199
|
pred_balance: totalBalanceUsd,
|
|
@@ -1259,7 +1261,7 @@ function WithdrawFlow({
|
|
|
1259
1261
|
targetToken
|
|
1260
1262
|
});
|
|
1261
1263
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1262
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _46 => _46.publicClient]), () => (
|
|
1264
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _46 => _46.publicClient]), () => ( _chunk7OKA6GNAcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
|
|
1263
1265
|
let result;
|
|
1264
1266
|
if (onSignTransaction) {
|
|
1265
1267
|
const transferTarget = isSameRoute ? recipient : smartAccount;
|
|
@@ -1272,7 +1274,7 @@ function WithdrawFlow({
|
|
|
1272
1274
|
args: [transferTarget, amountUnits]
|
|
1273
1275
|
})
|
|
1274
1276
|
};
|
|
1275
|
-
const request = await
|
|
1277
|
+
const request = await _chunkXRWQMIBYcjs.buildSafeTransaction.call(void 0, {
|
|
1276
1278
|
publicClient: pc,
|
|
1277
1279
|
safeAddress,
|
|
1278
1280
|
to: transferData.to,
|
|
@@ -1288,7 +1290,7 @@ function WithdrawFlow({
|
|
|
1288
1290
|
}
|
|
1289
1291
|
const relayResult = await service.relayWithdraw({
|
|
1290
1292
|
smartAccount,
|
|
1291
|
-
chainId:
|
|
1293
|
+
chainId: _chunkU7SVYWVDcjs.toEvmCaip2.call(void 0, sourceChain),
|
|
1292
1294
|
safeAddress,
|
|
1293
1295
|
safeTransaction: request.typedData.message,
|
|
1294
1296
|
signature
|
|
@@ -1301,7 +1303,7 @@ function WithdrawFlow({
|
|
|
1301
1303
|
if (!getMatchingRegistration()) {
|
|
1302
1304
|
throw new Error("Withdrawal target changed before submission");
|
|
1303
1305
|
}
|
|
1304
|
-
result = await
|
|
1306
|
+
result = await _chunkXRWQMIBYcjs.executeSafeEthTransfer.call(void 0, {
|
|
1305
1307
|
walletClient: signerContext.walletClient,
|
|
1306
1308
|
publicClient: pc,
|
|
1307
1309
|
safeAddress,
|
|
@@ -1313,7 +1315,7 @@ function WithdrawFlow({
|
|
|
1313
1315
|
if (!getMatchingRegistration()) {
|
|
1314
1316
|
throw new Error("Withdrawal target changed before submission");
|
|
1315
1317
|
}
|
|
1316
|
-
result = await
|
|
1318
|
+
result = await _chunkXRWQMIBYcjs.executeSafeErc20Transfer.call(void 0, {
|
|
1317
1319
|
walletClient: signerContext.walletClient,
|
|
1318
1320
|
publicClient: pc,
|
|
1319
1321
|
safeAddress,
|
|
@@ -1347,7 +1349,7 @@ function WithdrawFlow({
|
|
|
1347
1349
|
targetChain,
|
|
1348
1350
|
targetToken
|
|
1349
1351
|
});
|
|
1350
|
-
handleError(
|
|
1352
|
+
handleError(_chunk7OKA6GNAcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1351
1353
|
throw err;
|
|
1352
1354
|
}
|
|
1353
1355
|
},
|
|
@@ -1413,9 +1415,9 @@ function WithdrawFlow({
|
|
|
1413
1415
|
[_optionalChain([allowedRoutes, 'optionalAccess', _56 => _56.sourceTokens])]
|
|
1414
1416
|
);
|
|
1415
1417
|
const targetChainOptions = _react.useMemo.call(void 0, () => {
|
|
1416
|
-
return
|
|
1418
|
+
return _chunkU7SVYWVDcjs.SOURCE_CHAINS.filter((chain) => {
|
|
1417
1419
|
if (allowedChainSet && !allowedChainSet.has(chain.id)) return false;
|
|
1418
|
-
const tokens =
|
|
1420
|
+
const tokens = _chunkU7SVYWVDcjs.getSupportedTargetTokens.call(void 0, chain.id);
|
|
1419
1421
|
if (allowedTokenSet) {
|
|
1420
1422
|
return tokens.some((t) => allowedTokenSet.has(t.symbol.toUpperCase()));
|
|
1421
1423
|
}
|
|
@@ -1423,7 +1425,7 @@ function WithdrawFlow({
|
|
|
1423
1425
|
});
|
|
1424
1426
|
}, [allowedChainSet, allowedTokenSet]);
|
|
1425
1427
|
const targetTokenOptions = _react.useMemo.call(void 0, () => {
|
|
1426
|
-
const tokens =
|
|
1428
|
+
const tokens = _chunkU7SVYWVDcjs.getSupportedTargetTokens.call(void 0, targetChain);
|
|
1427
1429
|
if (!allowedTokenSet) return tokens;
|
|
1428
1430
|
return tokens.filter((t) => allowedTokenSet.has(t.symbol.toUpperCase()));
|
|
1429
1431
|
}, [targetChain, allowedTokenSet]);
|
|
@@ -1437,7 +1439,7 @@ function WithdrawFlow({
|
|
|
1437
1439
|
const handleTargetChainChange = _react.useCallback.call(void 0,
|
|
1438
1440
|
(chainId) => {
|
|
1439
1441
|
setTargetChain(chainId);
|
|
1440
|
-
let options =
|
|
1442
|
+
let options = _chunkU7SVYWVDcjs.getSupportedTargetTokens.call(void 0, chainId);
|
|
1441
1443
|
if (allowedTokenSet) {
|
|
1442
1444
|
options = options.filter(
|
|
1443
1445
|
(t) => allowedTokenSet.has(t.symbol.toUpperCase())
|
|
@@ -1487,7 +1489,7 @@ function WithdrawFlow({
|
|
|
1487
1489
|
state: "ready"
|
|
1488
1490
|
}));
|
|
1489
1491
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1490
|
-
|
|
1492
|
+
_chunk7OKA6GNAcjs.ConnectStep,
|
|
1491
1493
|
{
|
|
1492
1494
|
walletRows: withdrawRows,
|
|
1493
1495
|
onConfirmWallet: (walletId) => {
|
|
@@ -1505,7 +1507,7 @@ function WithdrawFlow({
|
|
|
1505
1507
|
if (!signerContext) return null;
|
|
1506
1508
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1507
1509
|
const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _63 => _63.kind]) === "external" ? selectedWalletOption.address : void 0;
|
|
1508
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1510
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunk7OKA6GNAcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
|
|
1509
1511
|
const depositAddress = registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : void 0;
|
|
1510
1512
|
const stepView = deriveStepView(flowStep, registration);
|
|
1511
1513
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
@@ -1540,6 +1542,7 @@ function WithdrawFlow({
|
|
|
1540
1542
|
{
|
|
1541
1543
|
sourceChain,
|
|
1542
1544
|
sourceSymbol: asset.symbol,
|
|
1545
|
+
sourceToken,
|
|
1543
1546
|
targetChain,
|
|
1544
1547
|
targetToken,
|
|
1545
1548
|
amount: _nullishCoalesce(storeApi.getState().amount, () => ( "0")),
|
|
@@ -1552,7 +1555,7 @@ function WithdrawFlow({
|
|
|
1552
1555
|
}
|
|
1553
1556
|
),
|
|
1554
1557
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
|
-
|
|
1558
|
+
_chunk7OKA6GNAcjs.ProcessingStep,
|
|
1556
1559
|
{
|
|
1557
1560
|
smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
|
|
1558
1561
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1594,7 +1597,7 @@ function deriveStepView(step, _registration) {
|
|
|
1594
1597
|
// src/WithdrawModal.tsx
|
|
1595
1598
|
|
|
1596
1599
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1597
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1600
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-TVZWJKQI.cjs"))).then((m) => ({
|
|
1598
1601
|
default: m.WithdrawModalReown
|
|
1599
1602
|
}))
|
|
1600
1603
|
);
|
|
@@ -1622,9 +1625,9 @@ function WithdrawModalInner({
|
|
|
1622
1625
|
inline,
|
|
1623
1626
|
closeOnOverlayClick,
|
|
1624
1627
|
allowedRoutes,
|
|
1625
|
-
backendUrl =
|
|
1628
|
+
backendUrl = _chunkU7SVYWVDcjs.DEFAULT_BACKEND_URL,
|
|
1626
1629
|
rpcUrls: rpcUrlsProp,
|
|
1627
|
-
signerAddress =
|
|
1630
|
+
signerAddress = _chunkU7SVYWVDcjs.DEFAULT_SIGNER_ADDRESS,
|
|
1628
1631
|
sessionChainIds,
|
|
1629
1632
|
forceRegister = false,
|
|
1630
1633
|
reownWallet,
|
|
@@ -1642,19 +1645,19 @@ function WithdrawModalInner({
|
|
|
1642
1645
|
debug
|
|
1643
1646
|
}) {
|
|
1644
1647
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1645
|
-
const onReadyRef =
|
|
1648
|
+
const onReadyRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onReady);
|
|
1646
1649
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1647
1650
|
void 0
|
|
1648
1651
|
);
|
|
1649
|
-
const targetChain =
|
|
1650
|
-
const sourceChain =
|
|
1651
|
-
const rpcUrls =
|
|
1652
|
+
const targetChain = _chunkU7SVYWVDcjs.getChainId.call(void 0, targetChainProp);
|
|
1653
|
+
const sourceChain = _chunkU7SVYWVDcjs.getChainId.call(void 0, sourceChainProp);
|
|
1654
|
+
const rpcUrls = _chunk7OKA6GNAcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1652
1655
|
const service = _react.useMemo.call(void 0,
|
|
1653
|
-
() =>
|
|
1656
|
+
() => _chunk7OKA6GNAcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1654
1657
|
[backendUrl, debug]
|
|
1655
1658
|
);
|
|
1656
1659
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1657
|
-
const onErrorRef =
|
|
1660
|
+
const onErrorRef = _chunk7OKA6GNAcjs.useLatestRef.call(void 0, onError);
|
|
1658
1661
|
_react.useEffect.call(void 0, () => {
|
|
1659
1662
|
if (isOpen && onSignTransaction && !dappAddress) {
|
|
1660
1663
|
_optionalChain([onErrorRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65({
|
|
@@ -1665,7 +1668,7 @@ function WithdrawModalInner({
|
|
|
1665
1668
|
}, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
|
|
1666
1669
|
_react.useEffect.call(void 0, () => {
|
|
1667
1670
|
if (isOpen && modalRef.current) {
|
|
1668
|
-
|
|
1671
|
+
_chunk7OKA6GNAcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1669
1672
|
}
|
|
1670
1673
|
}, [isOpen, theme]);
|
|
1671
1674
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1683,8 +1686,8 @@ function WithdrawModalInner({
|
|
|
1683
1686
|
}, []);
|
|
1684
1687
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _68 => _68.showBackButton]), () => ( true));
|
|
1685
1688
|
const canGoBack = backHandler !== void 0;
|
|
1686
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1687
|
-
|
|
1689
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1690
|
+
_chunk7OKA6GNAcjs.Modal,
|
|
1688
1691
|
{
|
|
1689
1692
|
isOpen,
|
|
1690
1693
|
onClose,
|
|
@@ -1700,7 +1703,7 @@ function WithdrawModalInner({
|
|
|
1700
1703
|
className: "rs-modal-header-back",
|
|
1701
1704
|
"aria-label": "Go back",
|
|
1702
1705
|
onClick: backHandler,
|
|
1703
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1706
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.ChevronLeftIcon, {})
|
|
1704
1707
|
}
|
|
1705
1708
|
) }),
|
|
1706
1709
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1710,7 +1713,7 @@ function WithdrawModalInner({
|
|
|
1710
1713
|
onClick: onClose,
|
|
1711
1714
|
className: "rs-modal-close",
|
|
1712
1715
|
"aria-label": "Close",
|
|
1713
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1716
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7OKA6GNAcjs.CloseIcon, {})
|
|
1714
1717
|
}
|
|
1715
1718
|
) })
|
|
1716
1719
|
] }),
|