@rhinestone/deposit-modal 0.5.1 → 0.6.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-HWKF3O62.cjs → DepositModalReown-J3KYAOD3.cjs} +6 -6
- package/dist/{DepositModalReown-YJBDBCRA.mjs → DepositModalReown-YD7TLEAA.mjs} +3 -3
- package/dist/{WithdrawModalReown-USNQEAEM.cjs → WithdrawModalReown-QSQUV6HX.cjs} +6 -6
- package/dist/{WithdrawModalReown-AQTB4OZN.mjs → WithdrawModalReown-ZPDMX47Z.mjs} +3 -3
- package/dist/{chunk-KYHPKMTK.mjs → chunk-3JVGI7FC.mjs} +2 -2
- package/dist/{chunk-AMEXFHB4.cjs → chunk-7LVI3VAL.cjs} +687 -450
- package/dist/{chunk-V4XVFT25.cjs → chunk-DASS33PJ.cjs} +57 -57
- package/dist/{chunk-QEW5NAGV.mjs → chunk-DXGM6YET.mjs} +1 -1
- package/dist/{chunk-4YLVKTSU.mjs → chunk-GQDVHMOT.mjs} +107 -100
- package/dist/{chunk-XPJJWJPM.mjs → chunk-NSAODZSS.mjs} +346 -109
- package/dist/{chunk-HT364QJK.cjs → chunk-YYIE5U5K.cjs} +4 -4
- package/dist/{chunk-PDFLALUT.cjs → chunk-ZDYV536Q.cjs} +176 -169
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-_m8w8BYq.d.cts → types-6ROxwyfG.d.cts} +1 -8
- package/dist/{types-_m8w8BYq.d.ts → types-6ROxwyfG.d.ts} +1 -8
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkZDYV536Qcjs = require('./chunk-ZDYV536Q.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -264,7 +264,7 @@ function WithdrawFormStep({
|
|
|
264
264
|
setIsSwitching(true);
|
|
265
265
|
switchChain(asset.chainId).catch((err) => {
|
|
266
266
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
267
|
-
setError(
|
|
267
|
+
setError(_chunkZDYV536Qcjs.formatUserError.call(void 0, raw));
|
|
268
268
|
}).finally(() => {
|
|
269
269
|
setIsSwitching(false);
|
|
270
270
|
});
|
|
@@ -284,7 +284,7 @@ function WithdrawFormStep({
|
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
286
|
try {
|
|
287
|
-
const bal =
|
|
287
|
+
const bal = _chunkZDYV536Qcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
288
288
|
address: asset.token,
|
|
289
289
|
abi: _viem.erc20Abi,
|
|
290
290
|
functionName: "balanceOf",
|
|
@@ -395,7 +395,7 @@ function WithdrawFormStep({
|
|
|
395
395
|
await onSubmit(recipient, amount);
|
|
396
396
|
} catch (err) {
|
|
397
397
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
398
|
-
setError(
|
|
398
|
+
setError(_chunkZDYV536Qcjs.formatUserError.call(void 0, raw));
|
|
399
399
|
} finally {
|
|
400
400
|
setIsSubmitting(false);
|
|
401
401
|
}
|
|
@@ -411,16 +411,16 @@ function WithdrawFormStep({
|
|
|
411
411
|
if (isBalanceLoading) {
|
|
412
412
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
413
413
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
414
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
414
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Spinner, { className: "rs-spinner--lg" }),
|
|
415
415
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
416
416
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
417
417
|
] }),
|
|
418
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
418
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
|
|
419
419
|
] });
|
|
420
420
|
}
|
|
421
421
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
422
422
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
423
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
424
424
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
425
425
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
426
426
|
"label",
|
|
@@ -466,7 +466,7 @@ function WithdrawFormStep({
|
|
|
466
466
|
),
|
|
467
467
|
isRecipientConnected ? null : "Use connected"
|
|
468
468
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
469
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
|
|
470
470
|
isRecipientConnected ? null : "Use connected"
|
|
471
471
|
] })
|
|
472
472
|
}
|
|
@@ -506,7 +506,7 @@ function WithdrawFormStep({
|
|
|
506
506
|
) })
|
|
507
507
|
] }),
|
|
508
508
|
/* @__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 ?
|
|
509
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkZDYV536Qcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
510
510
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
511
511
|
"Balance: ",
|
|
512
512
|
formattedBalance,
|
|
@@ -547,7 +547,7 @@ function WithdrawFormStep({
|
|
|
547
547
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
548
548
|
] }),
|
|
549
549
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
550
|
-
|
|
550
|
+
_chunkZDYV536Qcjs.ChevronDownIcon,
|
|
551
551
|
{
|
|
552
552
|
className: "rs-withdraw-dropdown-arrow",
|
|
553
553
|
style: {
|
|
@@ -616,7 +616,7 @@ function WithdrawFormStep({
|
|
|
616
616
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
617
617
|
] }),
|
|
618
618
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
619
|
-
|
|
619
|
+
_chunkZDYV536Qcjs.ChevronDownIcon,
|
|
620
620
|
{
|
|
621
621
|
className: "rs-withdraw-dropdown-arrow",
|
|
622
622
|
style: {
|
|
@@ -656,10 +656,10 @@ function WithdrawFormStep({
|
|
|
656
656
|
] })
|
|
657
657
|
] }),
|
|
658
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 ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
|
|
659
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
660
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
659
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: error }),
|
|
660
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: registrationError }),
|
|
661
661
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
662
|
-
|
|
662
|
+
_chunkZDYV536Qcjs.Button,
|
|
663
663
|
{
|
|
664
664
|
onClick: handleWithdraw,
|
|
665
665
|
fullWidth: true,
|
|
@@ -669,7 +669,7 @@ function WithdrawFormStep({
|
|
|
669
669
|
}
|
|
670
670
|
)
|
|
671
671
|
] }),
|
|
672
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
672
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
|
|
673
673
|
] });
|
|
674
674
|
}
|
|
675
675
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -704,9 +704,9 @@ function WithdrawReviewStep({
|
|
|
704
704
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
705
705
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
706
706
|
const amountNumber = Number(amount);
|
|
707
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
708
|
-
const prices =
|
|
709
|
-
const receiveDisplay = _nullishCoalesce(
|
|
707
|
+
const formattedSendAmount = _nullishCoalesce(_chunkZDYV536Qcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
708
|
+
const prices = _chunkZDYV536Qcjs.useTokenPrices.call(void 0, service, [sourceSymbol, targetSymbol]);
|
|
709
|
+
const receiveDisplay = _nullishCoalesce(_chunkZDYV536Qcjs.formatReceiveEstimate.call(void 0, {
|
|
710
710
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
711
711
|
sourceSymbol,
|
|
712
712
|
targetSymbol,
|
|
@@ -720,7 +720,7 @@ function WithdrawReviewStep({
|
|
|
720
720
|
await onConfirm();
|
|
721
721
|
} catch (err) {
|
|
722
722
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
723
|
-
const message =
|
|
723
|
+
const message = _chunkZDYV536Qcjs.formatUserError.call(void 0, raw);
|
|
724
724
|
setError(message);
|
|
725
725
|
_optionalChain([onError, 'optionalCall', _10 => _10(message, "WITHDRAW_REVIEW_ERROR")]);
|
|
726
726
|
} finally {
|
|
@@ -731,9 +731,9 @@ function WithdrawReviewStep({
|
|
|
731
731
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
732
732
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
733
733
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
734
|
-
|
|
734
|
+
_chunkZDYV536Qcjs.BodyHeader,
|
|
735
735
|
{
|
|
736
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
736
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CircleArrowOutUpLeftIcon, {}),
|
|
737
737
|
title: "Review withdrawal"
|
|
738
738
|
}
|
|
739
739
|
),
|
|
@@ -779,10 +779,10 @@ function WithdrawReviewStep({
|
|
|
779
779
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
780
780
|
] })
|
|
781
781
|
] }),
|
|
782
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
783
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
782
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: error }),
|
|
783
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: registrationError }),
|
|
784
784
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
785
|
-
|
|
785
|
+
_chunkZDYV536Qcjs.Button,
|
|
786
786
|
{
|
|
787
787
|
onClick: handleConfirm,
|
|
788
788
|
loading: isSubmitting,
|
|
@@ -793,7 +793,7 @@ function WithdrawReviewStep({
|
|
|
793
793
|
}
|
|
794
794
|
)
|
|
795
795
|
] }),
|
|
796
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
796
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
|
|
797
797
|
] });
|
|
798
798
|
}
|
|
799
799
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -805,15 +805,15 @@ var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
|
|
|
805
805
|
var REGISTRATION_DEBOUNCE_MS = 600;
|
|
806
806
|
var WITHDRAW_INDEXING_DELAY_MS = 2e3;
|
|
807
807
|
function resolveSessionOwner(eoaAddress) {
|
|
808
|
-
const localOwner =
|
|
808
|
+
const localOwner = _chunkZDYV536Qcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
809
809
|
if (localOwner) {
|
|
810
810
|
return {
|
|
811
|
-
account:
|
|
811
|
+
account: _chunkZDYV536Qcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
812
812
|
address: localOwner.address
|
|
813
813
|
};
|
|
814
814
|
}
|
|
815
|
-
const created =
|
|
816
|
-
|
|
815
|
+
const created = _chunkZDYV536Qcjs.createSessionOwnerKey.call(void 0, );
|
|
816
|
+
_chunkZDYV536Qcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
817
817
|
return { account: created.account, address: created.address };
|
|
818
818
|
}
|
|
819
819
|
function targetsEqual(a, b) {
|
|
@@ -848,11 +848,11 @@ function WithdrawFlow({
|
|
|
848
848
|
onError,
|
|
849
849
|
debug
|
|
850
850
|
}) {
|
|
851
|
-
const rpcUrls =
|
|
852
|
-
const onStepChangeRef =
|
|
853
|
-
const onEventRef =
|
|
854
|
-
const onLifecycleRef =
|
|
855
|
-
const onErrorRef =
|
|
851
|
+
const rpcUrls = _chunkZDYV536Qcjs.useRpcUrls.call(void 0, );
|
|
852
|
+
const onStepChangeRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onStepChange);
|
|
853
|
+
const onEventRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onEvent);
|
|
854
|
+
const onLifecycleRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onLifecycle);
|
|
855
|
+
const onErrorRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onError);
|
|
856
856
|
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
857
857
|
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
858
858
|
_react.useEffect.call(void 0, () => {
|
|
@@ -863,13 +863,13 @@ function WithdrawFlow({
|
|
|
863
863
|
}, []);
|
|
864
864
|
const logFlow = _react.useCallback.call(void 0,
|
|
865
865
|
(message, data) => {
|
|
866
|
-
|
|
866
|
+
_chunkZDYV536Qcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
867
867
|
},
|
|
868
868
|
[debug]
|
|
869
869
|
);
|
|
870
870
|
const logFlowError = _react.useCallback.call(void 0,
|
|
871
871
|
(message, error, data) => {
|
|
872
|
-
|
|
872
|
+
_chunkZDYV536Qcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
873
873
|
},
|
|
874
874
|
[debug]
|
|
875
875
|
);
|
|
@@ -945,14 +945,14 @@ function WithdrawFlow({
|
|
|
945
945
|
return {
|
|
946
946
|
ownerAddress: dappAddress,
|
|
947
947
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
948
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
948
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
949
949
|
switchChain: dappSwitchChain
|
|
950
950
|
};
|
|
951
951
|
}
|
|
952
952
|
return {
|
|
953
953
|
ownerAddress: dappWalletClient.account.address,
|
|
954
954
|
walletClient: dappWalletClient,
|
|
955
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
955
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
956
956
|
switchChain: dappSwitchChain
|
|
957
957
|
};
|
|
958
958
|
}
|
|
@@ -963,7 +963,7 @@ function WithdrawFlow({
|
|
|
963
963
|
return {
|
|
964
964
|
ownerAddress: dappWalletClient.account.address,
|
|
965
965
|
walletClient: dappWalletClient,
|
|
966
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
966
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
|
|
967
967
|
switchChain: dappSwitchChain
|
|
968
968
|
};
|
|
969
969
|
}
|
|
@@ -1046,7 +1046,7 @@ function WithdrawFlow({
|
|
|
1046
1046
|
message: typedData.message
|
|
1047
1047
|
});
|
|
1048
1048
|
if (cancelled) return;
|
|
1049
|
-
const sessionDetails =
|
|
1049
|
+
const sessionDetails = _chunkZDYV536Qcjs.buildSessionDetails.call(void 0,
|
|
1050
1050
|
setup.sessionDetailsUnsigned,
|
|
1051
1051
|
signature
|
|
1052
1052
|
);
|
|
@@ -1083,7 +1083,7 @@ function WithdrawFlow({
|
|
|
1083
1083
|
} catch (err) {
|
|
1084
1084
|
if (cancelled) return;
|
|
1085
1085
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1086
|
-
const message =
|
|
1086
|
+
const message = _chunkZDYV536Qcjs.formatUserError.call(void 0, raw);
|
|
1087
1087
|
logFlowError("auto-register:failed", err, {
|
|
1088
1088
|
ownerAddress,
|
|
1089
1089
|
targetChain,
|
|
@@ -1119,7 +1119,7 @@ function WithdrawFlow({
|
|
|
1119
1119
|
const symbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1120
1120
|
const decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1121
1121
|
return {
|
|
1122
|
-
id:
|
|
1122
|
+
id: _chunkZDYV536Qcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1123
1123
|
chainId: sourceChain,
|
|
1124
1124
|
token: sourceToken,
|
|
1125
1125
|
symbol,
|
|
@@ -1259,7 +1259,7 @@ function WithdrawFlow({
|
|
|
1259
1259
|
targetToken
|
|
1260
1260
|
});
|
|
1261
1261
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1262
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _46 => _46.publicClient]), () => (
|
|
1262
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _46 => _46.publicClient]), () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
|
|
1263
1263
|
let result;
|
|
1264
1264
|
if (onSignTransaction) {
|
|
1265
1265
|
const transferTarget = isSameRoute ? recipient : smartAccount;
|
|
@@ -1347,7 +1347,7 @@ function WithdrawFlow({
|
|
|
1347
1347
|
targetChain,
|
|
1348
1348
|
targetToken
|
|
1349
1349
|
});
|
|
1350
|
-
handleError(
|
|
1350
|
+
handleError(_chunkZDYV536Qcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1351
1351
|
throw err;
|
|
1352
1352
|
}
|
|
1353
1353
|
},
|
|
@@ -1487,7 +1487,7 @@ function WithdrawFlow({
|
|
|
1487
1487
|
state: "ready"
|
|
1488
1488
|
}));
|
|
1489
1489
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1490
|
-
|
|
1490
|
+
_chunkZDYV536Qcjs.ConnectStep,
|
|
1491
1491
|
{
|
|
1492
1492
|
walletRows: withdrawRows,
|
|
1493
1493
|
onConfirmWallet: (walletId) => {
|
|
@@ -1505,7 +1505,7 @@ function WithdrawFlow({
|
|
|
1505
1505
|
if (!signerContext) return null;
|
|
1506
1506
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1507
1507
|
const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _63 => _63.kind]) === "external" ? selectedWalletOption.address : void 0;
|
|
1508
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1508
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
|
|
1509
1509
|
const depositAddress = registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : void 0;
|
|
1510
1510
|
const stepView = deriveStepView(flowStep, registration);
|
|
1511
1511
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
@@ -1552,7 +1552,7 @@ function WithdrawFlow({
|
|
|
1552
1552
|
}
|
|
1553
1553
|
),
|
|
1554
1554
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
|
-
|
|
1555
|
+
_chunkZDYV536Qcjs.ProcessingStep,
|
|
1556
1556
|
{
|
|
1557
1557
|
smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
|
|
1558
1558
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1594,7 +1594,7 @@ function deriveStepView(step, _registration) {
|
|
|
1594
1594
|
// src/WithdrawModal.tsx
|
|
1595
1595
|
|
|
1596
1596
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1597
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1597
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-QSQUV6HX.cjs"))).then((m) => ({
|
|
1598
1598
|
default: m.WithdrawModalReown
|
|
1599
1599
|
}))
|
|
1600
1600
|
);
|
|
@@ -1642,19 +1642,19 @@ function WithdrawModalInner({
|
|
|
1642
1642
|
debug
|
|
1643
1643
|
}) {
|
|
1644
1644
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1645
|
-
const onReadyRef =
|
|
1645
|
+
const onReadyRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onReady);
|
|
1646
1646
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1647
1647
|
void 0
|
|
1648
1648
|
);
|
|
1649
1649
|
const targetChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
|
|
1650
1650
|
const sourceChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp);
|
|
1651
|
-
const rpcUrls =
|
|
1651
|
+
const rpcUrls = _chunkZDYV536Qcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1652
1652
|
const service = _react.useMemo.call(void 0,
|
|
1653
|
-
() =>
|
|
1653
|
+
() => _chunkZDYV536Qcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1654
1654
|
[backendUrl, debug]
|
|
1655
1655
|
);
|
|
1656
1656
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1657
|
-
const onErrorRef =
|
|
1657
|
+
const onErrorRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onError);
|
|
1658
1658
|
_react.useEffect.call(void 0, () => {
|
|
1659
1659
|
if (isOpen && onSignTransaction && !dappAddress) {
|
|
1660
1660
|
_optionalChain([onErrorRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65({
|
|
@@ -1665,7 +1665,7 @@ function WithdrawModalInner({
|
|
|
1665
1665
|
}, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
|
|
1666
1666
|
_react.useEffect.call(void 0, () => {
|
|
1667
1667
|
if (isOpen && modalRef.current) {
|
|
1668
|
-
|
|
1668
|
+
_chunkZDYV536Qcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1669
1669
|
}
|
|
1670
1670
|
}, [isOpen, theme]);
|
|
1671
1671
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1683,8 +1683,8 @@ function WithdrawModalInner({
|
|
|
1683
1683
|
}, []);
|
|
1684
1684
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _68 => _68.showBackButton]), () => ( true));
|
|
1685
1685
|
const canGoBack = backHandler !== void 0;
|
|
1686
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1687
|
-
|
|
1686
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1687
|
+
_chunkZDYV536Qcjs.Modal,
|
|
1688
1688
|
{
|
|
1689
1689
|
isOpen,
|
|
1690
1690
|
onClose,
|
|
@@ -1700,7 +1700,7 @@ function WithdrawModalInner({
|
|
|
1700
1700
|
className: "rs-modal-header-back",
|
|
1701
1701
|
"aria-label": "Go back",
|
|
1702
1702
|
onClick: backHandler,
|
|
1703
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1703
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ChevronLeftIcon, {})
|
|
1704
1704
|
}
|
|
1705
1705
|
) }),
|
|
1706
1706
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1710,7 +1710,7 @@ function WithdrawModalInner({
|
|
|
1710
1710
|
onClick: onClose,
|
|
1711
1711
|
className: "rs-modal-close",
|
|
1712
1712
|
"aria-label": "Close",
|
|
1713
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1713
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CloseIcon, {})
|
|
1714
1714
|
}
|
|
1715
1715
|
) })
|
|
1716
1716
|
] }),
|