@rhinestone/deposit-modal 0.0.0-dev-20260617160708 → 0.0.0-dev-20260619105734
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-TE5QXBVM.cjs → DepositModalReown-57L66M4T.cjs} +6 -6
- package/dist/{DepositModalReown-45FGNMM2.mjs → DepositModalReown-KKN6NSW5.mjs} +3 -3
- package/dist/{WithdrawModalReown-XAJJNJDV.cjs → WithdrawModalReown-DMUAZJY2.cjs} +6 -6
- package/dist/{WithdrawModalReown-C4K77TIT.mjs → WithdrawModalReown-XYBEGAOH.mjs} +3 -3
- package/dist/{chunk-X44MBJJM.mjs → chunk-43RTPRQY.mjs} +1 -1
- package/dist/{chunk-XOXF3RIG.cjs → chunk-4DGKZD56.cjs} +192 -192
- package/dist/{chunk-33WCLK5U.cjs → chunk-543J7MZT.cjs} +54 -54
- package/dist/{chunk-KNP4QWHF.mjs → chunk-75WJQYCX.mjs} +2 -2
- package/dist/{chunk-O754ZFAA.mjs → chunk-A33QFRKD.mjs} +127 -62
- package/dist/{chunk-FF27W35D.cjs → chunk-LJJCPDZO.cjs} +127 -62
- package/dist/{chunk-5UWBHOFH.mjs → chunk-PURTNYRW.mjs} +2 -2
- package/dist/{chunk-AVZSVC6E.cjs → chunk-ULCCXH2A.cjs} +2 -2
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/styles.css +12 -24
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkLJJCPDZOcjs = require('./chunk-LJJCPDZO.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -260,7 +260,7 @@ function WithdrawFormStep({
|
|
|
260
260
|
setIsSwitching(true);
|
|
261
261
|
switchChain(asset.chainId).catch((err) => {
|
|
262
262
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
263
|
-
setError(
|
|
263
|
+
setError(_chunkLJJCPDZOcjs.formatUserError.call(void 0, raw));
|
|
264
264
|
}).finally(() => {
|
|
265
265
|
setIsSwitching(false);
|
|
266
266
|
});
|
|
@@ -280,7 +280,7 @@ function WithdrawFormStep({
|
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
try {
|
|
283
|
-
const bal =
|
|
283
|
+
const bal = _chunkLJJCPDZOcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
284
284
|
address: asset.token,
|
|
285
285
|
abi: _viem.erc20Abi,
|
|
286
286
|
functionName: "balanceOf",
|
|
@@ -384,7 +384,7 @@ function WithdrawFormStep({
|
|
|
384
384
|
await onSubmit(recipient, amount);
|
|
385
385
|
} catch (err) {
|
|
386
386
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
387
|
-
setError(
|
|
387
|
+
setError(_chunkLJJCPDZOcjs.formatUserError.call(void 0, raw));
|
|
388
388
|
} finally {
|
|
389
389
|
setIsSubmitting(false);
|
|
390
390
|
}
|
|
@@ -392,16 +392,16 @@ function WithdrawFormStep({
|
|
|
392
392
|
if (isBalanceLoading) {
|
|
393
393
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
394
394
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
395
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
395
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, { className: "rs-spinner--lg" }),
|
|
396
396
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
397
397
|
/* @__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." })
|
|
398
398
|
] }),
|
|
399
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
399
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
400
400
|
] });
|
|
401
401
|
}
|
|
402
402
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
403
403
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
405
405
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
406
406
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
407
407
|
"label",
|
|
@@ -447,7 +447,7 @@ function WithdrawFormStep({
|
|
|
447
447
|
),
|
|
448
448
|
isRecipientConnected ? null : "Use connected"
|
|
449
449
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
450
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
450
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
|
|
451
451
|
isRecipientConnected ? null : "Use connected"
|
|
452
452
|
] })
|
|
453
453
|
}
|
|
@@ -487,7 +487,7 @@ function WithdrawFormStep({
|
|
|
487
487
|
) })
|
|
488
488
|
] }),
|
|
489
489
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
490
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
490
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkLJJCPDZOcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
491
491
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
492
492
|
"Balance: ",
|
|
493
493
|
formattedBalance,
|
|
@@ -528,7 +528,7 @@ function WithdrawFormStep({
|
|
|
528
528
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
529
529
|
] }),
|
|
530
530
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
531
|
-
|
|
531
|
+
_chunkLJJCPDZOcjs.ChevronDownIcon,
|
|
532
532
|
{
|
|
533
533
|
className: "rs-withdraw-dropdown-arrow",
|
|
534
534
|
style: {
|
|
@@ -597,7 +597,7 @@ function WithdrawFormStep({
|
|
|
597
597
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
598
598
|
] }),
|
|
599
599
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
-
|
|
600
|
+
_chunkLJJCPDZOcjs.ChevronDownIcon,
|
|
601
601
|
{
|
|
602
602
|
className: "rs-withdraw-dropdown-arrow",
|
|
603
603
|
style: {
|
|
@@ -637,10 +637,10 @@ function WithdrawFormStep({
|
|
|
637
637
|
] })
|
|
638
638
|
] }),
|
|
639
639
|
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.` }) }),
|
|
640
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
641
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
640
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
641
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: registrationError }),
|
|
642
642
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
643
|
-
|
|
643
|
+
_chunkLJJCPDZOcjs.Button,
|
|
644
644
|
{
|
|
645
645
|
onClick: handleWithdraw,
|
|
646
646
|
fullWidth: true,
|
|
@@ -650,7 +650,7 @@ function WithdrawFormStep({
|
|
|
650
650
|
}
|
|
651
651
|
)
|
|
652
652
|
] }),
|
|
653
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
654
654
|
] });
|
|
655
655
|
}
|
|
656
656
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -685,9 +685,9 @@ function WithdrawReviewStep({
|
|
|
685
685
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
686
686
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
687
687
|
const amountNumber = Number(amount);
|
|
688
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
689
|
-
const prices =
|
|
690
|
-
const receiveDisplay = _nullishCoalesce(
|
|
688
|
+
const formattedSendAmount = _nullishCoalesce(_chunkLJJCPDZOcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
689
|
+
const prices = _chunkLJJCPDZOcjs.useTokenPrices.call(void 0, service, [sourceSymbol, targetSymbol]);
|
|
690
|
+
const receiveDisplay = _nullishCoalesce(_chunkLJJCPDZOcjs.formatReceiveEstimate.call(void 0, {
|
|
691
691
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
692
692
|
sourceSymbol,
|
|
693
693
|
targetSymbol,
|
|
@@ -701,7 +701,7 @@ function WithdrawReviewStep({
|
|
|
701
701
|
await onConfirm();
|
|
702
702
|
} catch (err) {
|
|
703
703
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
704
|
-
const message =
|
|
704
|
+
const message = _chunkLJJCPDZOcjs.formatUserError.call(void 0, raw);
|
|
705
705
|
setError(message);
|
|
706
706
|
_optionalChain([onError, 'optionalCall', _8 => _8(message, "WITHDRAW_REVIEW_ERROR")]);
|
|
707
707
|
} finally {
|
|
@@ -712,9 +712,9 @@ function WithdrawReviewStep({
|
|
|
712
712
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
713
713
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
714
714
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
715
|
-
|
|
715
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
716
716
|
{
|
|
717
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
717
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CircleArrowOutUpLeftIcon, {}),
|
|
718
718
|
title: "Review withdrawal"
|
|
719
719
|
}
|
|
720
720
|
),
|
|
@@ -760,10 +760,10 @@ function WithdrawReviewStep({
|
|
|
760
760
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
761
761
|
] })
|
|
762
762
|
] }),
|
|
763
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
764
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
763
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
764
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: registrationError }),
|
|
765
765
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
766
|
-
|
|
766
|
+
_chunkLJJCPDZOcjs.Button,
|
|
767
767
|
{
|
|
768
768
|
onClick: handleConfirm,
|
|
769
769
|
loading: isSubmitting,
|
|
@@ -774,7 +774,7 @@ function WithdrawReviewStep({
|
|
|
774
774
|
}
|
|
775
775
|
)
|
|
776
776
|
] }),
|
|
777
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
777
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
778
778
|
] });
|
|
779
779
|
}
|
|
780
780
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -785,15 +785,15 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
|
785
785
|
var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
|
|
786
786
|
var REGISTRATION_DEBOUNCE_MS = 600;
|
|
787
787
|
function resolveSessionOwner(eoaAddress) {
|
|
788
|
-
const localOwner =
|
|
788
|
+
const localOwner = _chunkLJJCPDZOcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
789
789
|
if (localOwner) {
|
|
790
790
|
return {
|
|
791
|
-
account:
|
|
791
|
+
account: _chunkLJJCPDZOcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
792
792
|
address: localOwner.address
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
const created =
|
|
796
|
-
|
|
795
|
+
const created = _chunkLJJCPDZOcjs.createSessionOwnerKey.call(void 0, );
|
|
796
|
+
_chunkLJJCPDZOcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
797
797
|
return { account: created.account, address: created.address };
|
|
798
798
|
}
|
|
799
799
|
function targetsEqual(a, b) {
|
|
@@ -828,19 +828,19 @@ function WithdrawFlow({
|
|
|
828
828
|
onError,
|
|
829
829
|
debug
|
|
830
830
|
}) {
|
|
831
|
-
const onStepChangeRef =
|
|
832
|
-
const onEventRef =
|
|
833
|
-
const onLifecycleRef =
|
|
834
|
-
const onErrorRef =
|
|
831
|
+
const onStepChangeRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onStepChange);
|
|
832
|
+
const onEventRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onEvent);
|
|
833
|
+
const onLifecycleRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onLifecycle);
|
|
834
|
+
const onErrorRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onError);
|
|
835
835
|
const logFlow = _react.useCallback.call(void 0,
|
|
836
836
|
(message, data) => {
|
|
837
|
-
|
|
837
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
838
838
|
},
|
|
839
839
|
[debug]
|
|
840
840
|
);
|
|
841
841
|
const logFlowError = _react.useCallback.call(void 0,
|
|
842
842
|
(message, error, data) => {
|
|
843
|
-
|
|
843
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
844
844
|
},
|
|
845
845
|
[debug]
|
|
846
846
|
);
|
|
@@ -915,14 +915,14 @@ function WithdrawFlow({
|
|
|
915
915
|
return {
|
|
916
916
|
ownerAddress: dappAddress,
|
|
917
917
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
918
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
918
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, sourceChain))),
|
|
919
919
|
switchChain: dappSwitchChain
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
return {
|
|
923
923
|
ownerAddress: dappWalletClient.account.address,
|
|
924
924
|
walletClient: dappWalletClient,
|
|
925
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
925
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, sourceChain))),
|
|
926
926
|
switchChain: dappSwitchChain
|
|
927
927
|
};
|
|
928
928
|
}
|
|
@@ -933,7 +933,7 @@ function WithdrawFlow({
|
|
|
933
933
|
return {
|
|
934
934
|
ownerAddress: dappWalletClient.account.address,
|
|
935
935
|
walletClient: dappWalletClient,
|
|
936
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
936
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, sourceChain))),
|
|
937
937
|
switchChain: dappSwitchChain
|
|
938
938
|
};
|
|
939
939
|
}
|
|
@@ -1015,7 +1015,7 @@ function WithdrawFlow({
|
|
|
1015
1015
|
message: typedData.message
|
|
1016
1016
|
});
|
|
1017
1017
|
if (cancelled) return;
|
|
1018
|
-
const sessionDetails =
|
|
1018
|
+
const sessionDetails = _chunkLJJCPDZOcjs.buildSessionDetails.call(void 0,
|
|
1019
1019
|
setup.sessionDetailsUnsigned,
|
|
1020
1020
|
signature
|
|
1021
1021
|
);
|
|
@@ -1052,7 +1052,7 @@ function WithdrawFlow({
|
|
|
1052
1052
|
} catch (err) {
|
|
1053
1053
|
if (cancelled) return;
|
|
1054
1054
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1055
|
-
const message =
|
|
1055
|
+
const message = _chunkLJJCPDZOcjs.formatUserError.call(void 0, raw);
|
|
1056
1056
|
logFlowError("auto-register:failed", err, {
|
|
1057
1057
|
ownerAddress,
|
|
1058
1058
|
targetChain,
|
|
@@ -1088,7 +1088,7 @@ function WithdrawFlow({
|
|
|
1088
1088
|
const symbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1089
1089
|
const decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1090
1090
|
return {
|
|
1091
|
-
id:
|
|
1091
|
+
id: _chunkLJJCPDZOcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1092
1092
|
chainId: sourceChain,
|
|
1093
1093
|
token: sourceToken,
|
|
1094
1094
|
symbol,
|
|
@@ -1196,7 +1196,7 @@ function WithdrawFlow({
|
|
|
1196
1196
|
targetToken
|
|
1197
1197
|
});
|
|
1198
1198
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1199
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => (
|
|
1199
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1200
1200
|
let result;
|
|
1201
1201
|
if (onSignTransaction) {
|
|
1202
1202
|
const transferTarget = isSameRoute ? recipient : smartAccount;
|
|
@@ -1272,7 +1272,7 @@ function WithdrawFlow({
|
|
|
1272
1272
|
targetChain,
|
|
1273
1273
|
targetToken
|
|
1274
1274
|
});
|
|
1275
|
-
handleError(
|
|
1275
|
+
handleError(_chunkLJJCPDZOcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1276
1276
|
throw err;
|
|
1277
1277
|
}
|
|
1278
1278
|
},
|
|
@@ -1411,7 +1411,7 @@ function WithdrawFlow({
|
|
|
1411
1411
|
state: "ready"
|
|
1412
1412
|
}));
|
|
1413
1413
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
-
|
|
1414
|
+
_chunkLJJCPDZOcjs.ConnectStep,
|
|
1415
1415
|
{
|
|
1416
1416
|
walletRows: withdrawRows,
|
|
1417
1417
|
onConfirmWallet: (walletId) => {
|
|
@@ -1429,7 +1429,7 @@ function WithdrawFlow({
|
|
|
1429
1429
|
if (!signerContext) return null;
|
|
1430
1430
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1431
1431
|
const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _61 => _61.kind]) === "external" ? selectedWalletOption.address : void 0;
|
|
1432
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1432
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1433
1433
|
const stepView = deriveStepView(flowStep, registration);
|
|
1434
1434
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1435
1435
|
stepView === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1474,7 +1474,7 @@ function WithdrawFlow({
|
|
|
1474
1474
|
}
|
|
1475
1475
|
),
|
|
1476
1476
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1477
|
-
|
|
1477
|
+
_chunkLJJCPDZOcjs.ProcessingStep,
|
|
1478
1478
|
{
|
|
1479
1479
|
smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
|
|
1480
1480
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1516,7 +1516,7 @@ function deriveStepView(step, _registration) {
|
|
|
1516
1516
|
// src/WithdrawModal.tsx
|
|
1517
1517
|
|
|
1518
1518
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1519
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1519
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-DMUAZJY2.cjs"))).then((m) => ({
|
|
1520
1520
|
default: m.WithdrawModalReown
|
|
1521
1521
|
}))
|
|
1522
1522
|
);
|
|
@@ -1563,18 +1563,18 @@ function WithdrawModalInner({
|
|
|
1563
1563
|
debug
|
|
1564
1564
|
}) {
|
|
1565
1565
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1566
|
-
const onReadyRef =
|
|
1566
|
+
const onReadyRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onReady);
|
|
1567
1567
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1568
1568
|
void 0
|
|
1569
1569
|
);
|
|
1570
1570
|
const targetChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
|
|
1571
1571
|
const sourceChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp);
|
|
1572
1572
|
const service = _react.useMemo.call(void 0,
|
|
1573
|
-
() =>
|
|
1573
|
+
() => _chunkLJJCPDZOcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1574
1574
|
[backendUrl, debug]
|
|
1575
1575
|
);
|
|
1576
1576
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1577
|
-
const onErrorRef =
|
|
1577
|
+
const onErrorRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onError);
|
|
1578
1578
|
_react.useEffect.call(void 0, () => {
|
|
1579
1579
|
if (isOpen && onSignTransaction && !dappAddress) {
|
|
1580
1580
|
_optionalChain([onErrorRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
|
|
@@ -1585,7 +1585,7 @@ function WithdrawModalInner({
|
|
|
1585
1585
|
}, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
|
|
1586
1586
|
_react.useEffect.call(void 0, () => {
|
|
1587
1587
|
if (isOpen && modalRef.current) {
|
|
1588
|
-
|
|
1588
|
+
_chunkLJJCPDZOcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1589
1589
|
}
|
|
1590
1590
|
}, [isOpen, theme]);
|
|
1591
1591
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1604,7 +1604,7 @@ function WithdrawModalInner({
|
|
|
1604
1604
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
|
|
1605
1605
|
const canGoBack = backHandler !== void 0;
|
|
1606
1606
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1607
|
-
|
|
1607
|
+
_chunkLJJCPDZOcjs.Modal,
|
|
1608
1608
|
{
|
|
1609
1609
|
isOpen,
|
|
1610
1610
|
onClose,
|
|
@@ -1620,7 +1620,7 @@ function WithdrawModalInner({
|
|
|
1620
1620
|
className: "rs-modal-header-back",
|
|
1621
1621
|
"aria-label": "Go back",
|
|
1622
1622
|
onClick: backHandler,
|
|
1623
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1623
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronLeftIcon, {})
|
|
1624
1624
|
}
|
|
1625
1625
|
) }),
|
|
1626
1626
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1630,7 +1630,7 @@ function WithdrawModalInner({
|
|
|
1630
1630
|
onClick: onClose,
|
|
1631
1631
|
className: "rs-modal-close",
|
|
1632
1632
|
"aria-label": "Close",
|
|
1633
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1633
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {})
|
|
1634
1634
|
}
|
|
1635
1635
|
) })
|
|
1636
1636
|
] }),
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
tokenFormatter,
|
|
64
64
|
txRefsMatch,
|
|
65
65
|
useLatestRef
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-A33QFRKD.mjs";
|
|
67
67
|
import {
|
|
68
68
|
SAFE_ABI
|
|
69
69
|
} from "./chunk-F7P4MV72.mjs";
|
|
@@ -7390,7 +7390,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7390
7390
|
// src/DepositModal.tsx
|
|
7391
7391
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7392
7392
|
var ReownDepositInner = lazy2(
|
|
7393
|
-
() => import("./DepositModalReown-
|
|
7393
|
+
() => import("./DepositModalReown-KKN6NSW5.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7394
7394
|
);
|
|
7395
7395
|
function sortByCreatedAtDesc(items) {
|
|
7396
7396
|
return [...items].sort((a, b) => {
|
|
@@ -1787,6 +1787,7 @@ ListRow.displayName = "ListRow";
|
|
|
1787
1787
|
|
|
1788
1788
|
// src/components/ui/SegmentedToggle.tsx
|
|
1789
1789
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1790
|
+
var SEGMENTED_INSET_PX = 2;
|
|
1790
1791
|
function SegmentedToggle({
|
|
1791
1792
|
options,
|
|
1792
1793
|
value,
|
|
@@ -1797,36 +1798,51 @@ function SegmentedToggle({
|
|
|
1797
1798
|
0,
|
|
1798
1799
|
options.findIndex((opt) => opt.value === value)
|
|
1799
1800
|
);
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
|
|
1801
|
+
const count = Math.max(options.length, 1);
|
|
1802
|
+
const totalInsetPx = SEGMENTED_INSET_PX * (count + 1);
|
|
1803
|
+
const offsetPercent = activeIndex / count * 100;
|
|
1804
|
+
const offsetCorrectionPx = activeIndex * SEGMENTED_INSET_PX / count;
|
|
1805
|
+
const segmentedStyle = {
|
|
1806
|
+
"--rs-segmented-count": count,
|
|
1807
|
+
"--rs-segmented-index": activeIndex,
|
|
1808
|
+
"--rs-segmented-inset": `${SEGMENTED_INSET_PX}px`,
|
|
1809
|
+
"--rs-segmented-thumb-width": `calc((100% - ${totalInsetPx}px) / ${count})`,
|
|
1810
|
+
"--rs-segmented-thumb-offset": `calc(${offsetPercent}% - ${offsetCorrectionPx}px)`
|
|
1803
1811
|
};
|
|
1804
|
-
return /* @__PURE__ */ jsxs7(
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1812
|
+
return /* @__PURE__ */ jsxs7(
|
|
1813
|
+
"div",
|
|
1814
|
+
{
|
|
1815
|
+
className: "rs-segmented",
|
|
1816
|
+
role: "tablist",
|
|
1817
|
+
"aria-label": ariaLabel,
|
|
1818
|
+
style: segmentedStyle,
|
|
1819
|
+
children: [
|
|
1820
|
+
/* @__PURE__ */ jsx8(
|
|
1821
|
+
"span",
|
|
1822
|
+
{
|
|
1823
|
+
className: "rs-segmented-thumb",
|
|
1824
|
+
"data-value": value,
|
|
1825
|
+
"aria-hidden": "true"
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
options.map((opt) => {
|
|
1829
|
+
const active = opt.value === value;
|
|
1830
|
+
return /* @__PURE__ */ jsx8(
|
|
1831
|
+
"button",
|
|
1832
|
+
{
|
|
1833
|
+
type: "button",
|
|
1834
|
+
role: "tab",
|
|
1835
|
+
"aria-selected": active,
|
|
1836
|
+
className: `rs-segmented-option${active ? " rs-segmented-option--active" : ""}`,
|
|
1837
|
+
onClick: () => onChange(opt.value),
|
|
1838
|
+
children: opt.label
|
|
1839
|
+
},
|
|
1840
|
+
opt.value
|
|
1841
|
+
);
|
|
1842
|
+
})
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1830
1846
|
}
|
|
1831
1847
|
SegmentedToggle.displayName = "SegmentedToggle";
|
|
1832
1848
|
|
|
@@ -2180,47 +2196,96 @@ function getExchangeLogo(name, connection) {
|
|
|
2180
2196
|
// src/components/ui/BrandIcons.tsx
|
|
2181
2197
|
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2182
2198
|
function VisaMark() {
|
|
2183
|
-
return /* @__PURE__ */
|
|
2184
|
-
"
|
|
2199
|
+
return /* @__PURE__ */ jsxs15(
|
|
2200
|
+
"svg",
|
|
2185
2201
|
{
|
|
2186
|
-
|
|
2187
|
-
|
|
2202
|
+
width: "38",
|
|
2203
|
+
height: "24",
|
|
2204
|
+
viewBox: "0 0 38 24",
|
|
2205
|
+
fill: "none",
|
|
2206
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2207
|
+
"aria-hidden": "true",
|
|
2208
|
+
children: [
|
|
2209
|
+
/* @__PURE__ */ jsx17("rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "white" }),
|
|
2210
|
+
/* @__PURE__ */ jsx17(
|
|
2211
|
+
"path",
|
|
2212
|
+
{
|
|
2213
|
+
d: "M18.3993 8.08878L16.6616 16.2114H14.5605L16.2984 8.08878H18.3993ZM27.2397 13.3336L28.3459 10.2833L28.9824 13.3336H27.2397ZM29.584 16.2114H31.5276L29.8316 8.08878H28.0376C27.6345 8.08878 27.2944 8.32324 27.143 8.6847L23.9906 16.2114H26.1972L26.6352 14.9985H29.331L29.584 16.2114ZM24.1001 13.5593C24.1091 11.4155 21.1354 11.2975 21.156 10.3398C21.1622 10.048 21.4401 9.7385 22.0471 9.65906C22.3486 9.61972 23.1777 9.58964 24.1192 10.0228L24.4878 8.30036C23.9821 8.1168 23.3314 7.94019 22.5221 7.94019C20.4454 7.94019 18.9836 9.04437 18.9713 10.6254C18.9582 11.7947 20.0148 12.4471 20.811 12.8359C21.6295 13.2341 21.9046 13.4891 21.901 13.8452C21.8956 14.3905 21.248 14.6306 20.6439 14.6401C19.5873 14.6568 18.9741 14.355 18.4854 14.1272L18.1047 15.907C18.5954 16.1325 19.5017 16.3284 20.4418 16.3384C22.6489 16.3384 24.0929 15.2478 24.1001 13.5593ZM15.3968 8.08878L11.9925 16.2114H9.77099L8.09583 9.72898C7.99402 9.32973 7.90559 9.18371 7.59631 9.01532C7.09165 8.74152 6.25741 8.48418 5.52344 8.32479L5.57357 8.08878H9.14885C9.6044 8.08878 10.0145 8.39214 10.1178 8.91685L11.0027 13.6174L13.1892 8.08878H15.3968Z",
|
|
2214
|
+
fill: "#1434CB"
|
|
2215
|
+
}
|
|
2216
|
+
)
|
|
2217
|
+
]
|
|
2188
2218
|
}
|
|
2189
|
-
)
|
|
2219
|
+
);
|
|
2190
2220
|
}
|
|
2191
2221
|
function MastercardMark() {
|
|
2192
|
-
return /* @__PURE__ */ jsxs15(
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2222
|
+
return /* @__PURE__ */ jsxs15(
|
|
2223
|
+
"svg",
|
|
2224
|
+
{
|
|
2225
|
+
width: "38",
|
|
2226
|
+
height: "24",
|
|
2227
|
+
viewBox: "0 0 38 24",
|
|
2228
|
+
fill: "none",
|
|
2229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2230
|
+
"aria-hidden": "true",
|
|
2231
|
+
children: [
|
|
2232
|
+
/* @__PURE__ */ jsx17("rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "white" }),
|
|
2233
|
+
/* @__PURE__ */ jsx17(
|
|
2234
|
+
"path",
|
|
2235
|
+
{
|
|
2236
|
+
d: "M21.303 7.07157H15.8179V16.9284H21.303V7.07157Z",
|
|
2237
|
+
fill: "#FF5F00"
|
|
2238
|
+
}
|
|
2239
|
+
),
|
|
2240
|
+
/* @__PURE__ */ jsx17(
|
|
2241
|
+
"path",
|
|
2242
|
+
{
|
|
2243
|
+
d: "M16.1662 12C16.1653 11.0507 16.3804 10.1136 16.7953 9.25979C17.2101 8.40593 17.8137 7.65764 18.5605 7.07156C17.6357 6.34468 16.5251 5.89265 15.3556 5.76713C14.1861 5.6416 13.0048 5.84765 11.9469 6.36172C10.8889 6.87579 9.99698 7.67715 9.37294 8.67419C8.7489 9.67124 8.41797 10.8237 8.41797 12C8.41797 13.1762 8.7489 14.3287 9.37294 15.3257C9.99698 16.3228 10.8889 17.1241 11.9469 17.6382C13.0048 18.1523 14.1861 18.3583 15.3556 18.2328C16.5251 18.1073 17.6357 17.6553 18.5605 16.9284C17.8137 16.3423 17.2101 15.594 16.7953 14.7401C16.3805 13.8863 16.1653 12.9492 16.1662 12Z",
|
|
2244
|
+
fill: "#EB001B"
|
|
2245
|
+
}
|
|
2246
|
+
),
|
|
2247
|
+
/* @__PURE__ */ jsx17(
|
|
2248
|
+
"path",
|
|
2249
|
+
{
|
|
2250
|
+
d: "M28.7026 12C28.7027 13.1762 28.3718 14.3287 27.7478 15.3257C27.1238 16.3228 26.2318 17.1241 25.1739 17.6382C24.116 18.1523 22.9348 18.3583 21.7653 18.2328C20.5958 18.1073 19.4852 17.6553 18.5605 16.9284C19.3066 16.3417 19.9097 15.5933 20.3245 14.7396C20.7392 13.8858 20.9547 12.9491 20.9547 12C20.9547 11.0508 20.7392 10.1141 20.3245 9.26037C19.9097 8.40665 19.3066 7.65824 18.5605 7.07156C19.4852 6.34468 20.5958 5.89265 21.7653 5.76712C22.9348 5.6416 24.116 5.84765 25.1739 6.36173C26.2318 6.87581 27.1238 7.67717 27.7478 8.67421C28.3718 9.67126 28.7027 10.8238 28.7026 12Z",
|
|
2251
|
+
fill: "#F79E1B"
|
|
2252
|
+
}
|
|
2253
|
+
),
|
|
2254
|
+
/* @__PURE__ */ jsx17(
|
|
2255
|
+
"path",
|
|
2256
|
+
{
|
|
2257
|
+
d: "M28.1046 15.8844V15.6826H28.1859V15.6415H27.9787V15.6826H28.0601V15.8844H28.1046ZM28.5069 15.8844V15.6411H28.4434L28.3703 15.8084L28.2972 15.6411H28.2337V15.8844H28.2785V15.7009L28.347 15.8591H28.3936L28.4621 15.7005V15.8844H28.5069Z",
|
|
2258
|
+
fill: "#F79E1B"
|
|
2259
|
+
}
|
|
2260
|
+
)
|
|
2261
|
+
]
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2215
2264
|
}
|
|
2216
2265
|
function AmexMark() {
|
|
2217
|
-
return /* @__PURE__ */
|
|
2218
|
-
"
|
|
2266
|
+
return /* @__PURE__ */ jsxs15(
|
|
2267
|
+
"svg",
|
|
2219
2268
|
{
|
|
2220
|
-
|
|
2221
|
-
|
|
2269
|
+
width: "38",
|
|
2270
|
+
height: "24",
|
|
2271
|
+
viewBox: "0 0 38 24",
|
|
2272
|
+
fill: "none",
|
|
2273
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2274
|
+
"aria-hidden": "true",
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ jsx17("rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "#006FCF" }),
|
|
2277
|
+
/* @__PURE__ */ jsx17(
|
|
2278
|
+
"path",
|
|
2279
|
+
{
|
|
2280
|
+
fillRule: "evenodd",
|
|
2281
|
+
clipRule: "evenodd",
|
|
2282
|
+
d: "M37.268 4.34531H34.1845L32.5727 8.9706L30.8908 4.34531H27.7373V11.5472L24.5136 4.34531H21.9208L18.6971 11.7036H20.9395L21.5702 10.232H24.9341L25.5648 11.7036H29.7696V6.58776L31.6617 11.7036H33.4136L35.3057 6.58776V11.7036H37.268V12.8248H34.675L32.5727 15.1375L30.4003 12.8248H21.5003V20.1831H30.3303L32.5026 17.8004L34.675 20.1831H37.268V21.0939H34.1845L32.5026 19.272L30.8206 21.0939H20.379V12.6846H17.0151L21.2199 3.22388H25.2845L26.756 6.44759V3.22388H31.8019L32.6427 5.6767L33.4838 3.22388H37.268V4.34531ZM37.268 14.4366L35.3759 16.4689L37.268 18.5011V20.1831L33.8342 16.4689L37.268 12.8248V14.4366ZM27.7373 20.1831V18.4312H23.5325V17.3099H27.6671V15.628H23.5325V14.5068H27.7373V12.8248L31.2411 16.4689L27.7373 20.1831ZM22.2009 8.62005L23.1822 6.23742L24.1632 8.62005H22.2009Z",
|
|
2283
|
+
fill: "white"
|
|
2284
|
+
}
|
|
2285
|
+
)
|
|
2286
|
+
]
|
|
2222
2287
|
}
|
|
2223
|
-
)
|
|
2288
|
+
);
|
|
2224
2289
|
}
|
|
2225
2290
|
function ExchangeBadgeImage({ name }) {
|
|
2226
2291
|
const src = getExchangeLogoSrc(name);
|