@rhinestone/deposit-modal 0.20.0 → 0.20.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/README.md +3 -0
- package/dist/{BankOnrampStep-NPGXAA7U.cjs → BankOnrampStep-3SNUX6V2.cjs} +11 -11
- package/dist/{BankOnrampStep-JG32OCM2.mjs → BankOnrampStep-4D24HVHV.mjs} +4 -4
- package/dist/{DepositModalReown-ALVWADG7.cjs → DepositModalReown-7EHOJTFW.cjs} +16 -16
- package/dist/{DepositModalReown-3FGTPER6.mjs → DepositModalReown-SYQ2SCHC.mjs} +3 -3
- package/dist/WithdrawModal-LLJLEYXZ.cjs +12 -0
- package/dist/{WithdrawModal-LL4Z5WZP.mjs → WithdrawModal-LXDIT4UV.mjs} +3 -3
- package/dist/{chunk-BTEG2VNZ.cjs → chunk-CIVFT5KR.cjs} +58 -58
- package/dist/{chunk-EKFXUF5A.cjs → chunk-D3R3O4CY.cjs} +1 -1
- package/dist/{chunk-6CTJFR3T.mjs → chunk-EJDBIWNH.mjs} +1 -1
- package/dist/{chunk-247GJH57.mjs → chunk-FW7ZMXQS.mjs} +444 -477
- package/dist/{chunk-PYRXOP2Y.cjs → chunk-IPHKBBUV.cjs} +2 -2
- package/dist/{chunk-HP7S7AD6.mjs → chunk-IPKT3FU6.mjs} +1 -1
- package/dist/{chunk-5QUWEFD4.mjs → chunk-JPX4MEHV.mjs} +1 -1
- package/dist/{chunk-CXRH5MKO.cjs → chunk-KXSU24RU.cjs} +354 -275
- package/dist/{chunk-OPT5EW6L.cjs → chunk-LVMNNMOZ.cjs} +2 -2
- package/dist/{chunk-FMUSY563.cjs → chunk-O5OW4S7L.cjs} +3 -3
- package/dist/{chunk-32ERBFMO.mjs → chunk-OZPMRTW3.mjs} +93 -14
- package/dist/{chunk-Z4RBTNKX.cjs → chunk-PVFEZ3UG.cjs} +596 -629
- package/dist/{chunk-XBJCZYBX.mjs → chunk-YQCRXJIL.mjs} +1 -1
- package/dist/{chunk-B2LZQIGB.mjs → chunk-ZOJMB5TZ.mjs} +1 -1
- package/dist/compliance.cjs +4 -4
- package/dist/compliance.mjs +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +14 -14
- package/dist/embed.d.cts +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/onramp.cjs +4 -4
- package/dist/onramp.mjs +3 -3
- package/dist/{types-CixUBhrM.d.cts → types-BEEMfNi2.d.cts} +4 -2
- package/dist/{types-BxSrazbq.d.ts → types-DQDUqzsZ.d.ts} +4 -2
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +5 -5
- package/dist/WithdrawModal-5YWFJSYY.cjs +0 -12
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkKXSU24RUcjs = require('./chunk-KXSU24RU.cjs');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -249,7 +249,7 @@ function WithdrawFormStep({
|
|
|
249
249
|
const offeredTarget = targetTokenOptions.find(
|
|
250
250
|
(option) => option.address.toLowerCase() === targetToken.toLowerCase()
|
|
251
251
|
);
|
|
252
|
-
const resolvedTargetSymbol =
|
|
252
|
+
const resolvedTargetSymbol = _chunkKXSU24RUcjs.useTokenDisplay.call(void 0, targetChain, targetToken).symbol;
|
|
253
253
|
const targetSymbol = _nullishCoalesce(_optionalChain([offeredTarget, 'optionalAccess', _3 => _3.symbol]), () => ( resolvedTargetSymbol));
|
|
254
254
|
const targetChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, targetChain);
|
|
255
255
|
const isBusy = submitting || isSubmitting;
|
|
@@ -275,7 +275,7 @@ function WithdrawFormStep({
|
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
277
|
try {
|
|
278
|
-
const bal =
|
|
278
|
+
const bal = _chunkKXSU24RUcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
|
|
279
279
|
address: asset.token,
|
|
280
280
|
abi: _viem.erc20Abi,
|
|
281
281
|
functionName: "balanceOf",
|
|
@@ -379,7 +379,7 @@ function WithdrawFormStep({
|
|
|
379
379
|
await onSubmit(recipient, amount);
|
|
380
380
|
} catch (err) {
|
|
381
381
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
382
|
-
setError(
|
|
382
|
+
setError(_chunkKXSU24RUcjs.formatUserError.call(void 0, raw));
|
|
383
383
|
} finally {
|
|
384
384
|
setIsSubmitting(false);
|
|
385
385
|
}
|
|
@@ -401,7 +401,7 @@ function WithdrawFormStep({
|
|
|
401
401
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
402
402
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
|
|
403
403
|
] }),
|
|
404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.PoweredBy, {})
|
|
405
405
|
] });
|
|
406
406
|
}
|
|
407
407
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
@@ -466,7 +466,7 @@ function WithdrawFormStep({
|
|
|
466
466
|
) })
|
|
467
467
|
] }),
|
|
468
468
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${
|
|
469
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkKXSU24RUcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
|
|
470
470
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
471
471
|
"Balance: ",
|
|
472
472
|
formattedBalance,
|
|
@@ -497,7 +497,7 @@ function WithdrawFormStep({
|
|
|
497
497
|
children: [
|
|
498
498
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
499
499
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
500
|
-
|
|
500
|
+
_chunkKXSU24RUcjs.CdnIcon,
|
|
501
501
|
{
|
|
502
502
|
src: _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, targetChain),
|
|
503
503
|
alt: targetChainName,
|
|
@@ -529,7 +529,7 @@ function WithdrawFormStep({
|
|
|
529
529
|
},
|
|
530
530
|
children: [
|
|
531
531
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
532
|
-
|
|
532
|
+
_chunkKXSU24RUcjs.CdnIcon,
|
|
533
533
|
{
|
|
534
534
|
src: _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, chain.id),
|
|
535
535
|
alt: chain.name,
|
|
@@ -566,7 +566,7 @@ function WithdrawFormStep({
|
|
|
566
566
|
children: [
|
|
567
567
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
568
568
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
569
|
-
|
|
569
|
+
_chunkKXSU24RUcjs.TokenIcon,
|
|
570
570
|
{
|
|
571
571
|
token: { chain: targetChain, address: targetToken },
|
|
572
572
|
symbol: targetSymbol,
|
|
@@ -598,7 +598,7 @@ function WithdrawFormStep({
|
|
|
598
598
|
},
|
|
599
599
|
children: [
|
|
600
600
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
601
|
-
|
|
601
|
+
_chunkKXSU24RUcjs.TokenIcon,
|
|
602
602
|
{
|
|
603
603
|
token: { chain: targetChain, address: option.address },
|
|
604
604
|
symbol: option.symbol,
|
|
@@ -615,11 +615,11 @@ function WithdrawFormStep({
|
|
|
615
615
|
)
|
|
616
616
|
] })
|
|
617
617
|
] }),
|
|
618
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
619
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
620
|
-
decimalsStatus === "unresolved" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
618
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.Callout, { variant: "error", children: error }),
|
|
619
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.Callout, { variant: "error", children: registrationError }),
|
|
620
|
+
decimalsStatus === "unresolved" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.Callout, { variant: "error", children: "This token's decimals couldn't be determined, so this withdrawal can't be prepared." }),
|
|
621
621
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
622
|
-
|
|
622
|
+
_chunkKXSU24RUcjs.Button,
|
|
623
623
|
{
|
|
624
624
|
onClick: handleWithdraw,
|
|
625
625
|
fullWidth: true,
|
|
@@ -634,7 +634,7 @@ function WithdrawFormStep({
|
|
|
634
634
|
}
|
|
635
635
|
)
|
|
636
636
|
] }),
|
|
637
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
637
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.PoweredBy, {})
|
|
638
638
|
] });
|
|
639
639
|
}
|
|
640
640
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -671,7 +671,7 @@ function WithdrawReviewStep({
|
|
|
671
671
|
}, [isSubmitting]);
|
|
672
672
|
const sourceChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, sourceChain);
|
|
673
673
|
const sourceChainIcon = _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, sourceChain);
|
|
674
|
-
const [sourceDisplay, targetDisplay] =
|
|
674
|
+
const [sourceDisplay, targetDisplay] = _chunkKXSU24RUcjs.useTokenDisplays.call(void 0, [
|
|
675
675
|
{ chain: sourceChain, address: sourceToken },
|
|
676
676
|
{ chain: targetChain, address: targetToken }
|
|
677
677
|
]);
|
|
@@ -679,12 +679,12 @@ function WithdrawReviewStep({
|
|
|
679
679
|
const targetChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, targetChain);
|
|
680
680
|
const targetChainIcon = _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, targetChain);
|
|
681
681
|
const amountNumber = Number(amount);
|
|
682
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
683
|
-
const prices =
|
|
682
|
+
const formattedSendAmount = _nullishCoalesce(_chunkKXSU24RUcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
683
|
+
const prices = _chunkKXSU24RUcjs.useTokenPrices.call(void 0, [
|
|
684
684
|
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
685
685
|
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
686
686
|
]);
|
|
687
|
-
const receiveDisplay = _nullishCoalesce(
|
|
687
|
+
const receiveDisplay = _nullishCoalesce(_chunkKXSU24RUcjs.formatReceiveEstimate.call(void 0, {
|
|
688
688
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
689
689
|
sourceSymbol,
|
|
690
690
|
targetSymbol,
|
|
@@ -700,8 +700,8 @@ function WithdrawReviewStep({
|
|
|
700
700
|
await onConfirm();
|
|
701
701
|
} catch (err) {
|
|
702
702
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
703
|
-
const uncertain =
|
|
704
|
-
const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." :
|
|
703
|
+
const uncertain = _chunkKXSU24RUcjs.isSubmissionUncertain.call(void 0, err);
|
|
704
|
+
const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." : _chunkKXSU24RUcjs.formatUserError.call(void 0, raw);
|
|
705
705
|
if (uncertain) setSubmissionUncertain(true);
|
|
706
706
|
setError(message);
|
|
707
707
|
_optionalChain([onError, 'optionalCall', _20 => _20(message, "WITHDRAW_REVIEW_ERROR", raw)]);
|
|
@@ -729,7 +729,7 @@ function WithdrawReviewStep({
|
|
|
729
729
|
sourceSymbol
|
|
730
730
|
] }),
|
|
731
731
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
-
|
|
732
|
+
_chunkKXSU24RUcjs.TokenIcon,
|
|
733
733
|
{
|
|
734
734
|
token: { chain: sourceChain, address: sourceToken },
|
|
735
735
|
symbol: sourceSymbol
|
|
@@ -741,7 +741,7 @@ function WithdrawReviewStep({
|
|
|
741
741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
742
742
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
743
743
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
744
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
744
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
745
745
|
] })
|
|
746
746
|
] }),
|
|
747
747
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -753,7 +753,7 @@ function WithdrawReviewStep({
|
|
|
753
753
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
754
754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
755
755
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
756
|
-
|
|
756
|
+
_chunkKXSU24RUcjs.TokenIcon,
|
|
757
757
|
{
|
|
758
758
|
token: { chain: targetChain, address: targetToken },
|
|
759
759
|
symbol: targetSymbol
|
|
@@ -765,7 +765,7 @@ function WithdrawReviewStep({
|
|
|
765
765
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
766
766
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
767
767
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
768
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
768
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.CdnIcon, { src: targetChainIcon }) })
|
|
769
769
|
] })
|
|
770
770
|
] }),
|
|
771
771
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -773,10 +773,10 @@ function WithdrawReviewStep({
|
|
|
773
773
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
774
774
|
] })
|
|
775
775
|
] }),
|
|
776
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
777
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
776
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.Callout, { variant: "error", children: error }),
|
|
777
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.Callout, { variant: "error", children: registrationError }),
|
|
778
778
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
779
|
-
|
|
779
|
+
_chunkKXSU24RUcjs.Button,
|
|
780
780
|
{
|
|
781
781
|
onClick: handleConfirm,
|
|
782
782
|
loading: isSubmitting,
|
|
@@ -787,7 +787,7 @@ function WithdrawReviewStep({
|
|
|
787
787
|
}
|
|
788
788
|
)
|
|
789
789
|
] }),
|
|
790
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
790
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.PoweredBy, {})
|
|
791
791
|
] });
|
|
792
792
|
}
|
|
793
793
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -803,7 +803,7 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
|
803
803
|
|
|
804
804
|
|
|
805
805
|
function withdrawFailureReasonForError(error) {
|
|
806
|
-
if (
|
|
806
|
+
if (_chunkKXSU24RUcjs.isSubmissionUncertain.call(void 0, error)) return "submission_uncertain";
|
|
807
807
|
const message = (error instanceof Error ? error.message : String(_nullishCoalesce(error, () => ( "")))).toLowerCase();
|
|
808
808
|
if (message.includes("changed before submission")) {
|
|
809
809
|
return "registration_target_changed";
|
|
@@ -962,7 +962,7 @@ function WithdrawAnalyticsControllerProvider({
|
|
|
962
962
|
children,
|
|
963
963
|
controllerRef
|
|
964
964
|
}) {
|
|
965
|
-
const emit =
|
|
965
|
+
const emit = _chunkKXSU24RUcjs.useWithdrawAnalyticsEmitter.call(void 0, );
|
|
966
966
|
const controller = _react.useMemo.call(void 0,
|
|
967
967
|
() => createWithdrawAnalyticsController(emit),
|
|
968
968
|
[emit]
|
|
@@ -1002,7 +1002,7 @@ function WithdrawFlow({
|
|
|
1002
1002
|
onError,
|
|
1003
1003
|
debug
|
|
1004
1004
|
}) {
|
|
1005
|
-
const rpcUrls =
|
|
1005
|
+
const rpcUrls = _chunkKXSU24RUcjs.useRpcUrls.call(void 0, );
|
|
1006
1006
|
const onStepChangeRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onStepChange);
|
|
1007
1007
|
const analytics = useWithdrawAnalyticsController();
|
|
1008
1008
|
const onLifecycleRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onLifecycle);
|
|
@@ -1020,13 +1020,13 @@ function WithdrawFlow({
|
|
|
1020
1020
|
}, []);
|
|
1021
1021
|
const logFlow = _react.useCallback.call(void 0,
|
|
1022
1022
|
(message, data) => {
|
|
1023
|
-
|
|
1023
|
+
_chunkKXSU24RUcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
1024
1024
|
},
|
|
1025
1025
|
[debug]
|
|
1026
1026
|
);
|
|
1027
1027
|
const logFlowError = _react.useCallback.call(void 0,
|
|
1028
1028
|
(message, error, data) => {
|
|
1029
|
-
|
|
1029
|
+
_chunkKXSU24RUcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
1030
1030
|
},
|
|
1031
1031
|
[debug]
|
|
1032
1032
|
);
|
|
@@ -1048,7 +1048,7 @@ function WithdrawFlow({
|
|
|
1048
1048
|
const registration = useWithdrawStore((s) => s.registration);
|
|
1049
1049
|
const flowStep = useWithdrawStore((s) => s.step);
|
|
1050
1050
|
const reviewedRecipient = useWithdrawStore((s) => s.recipient);
|
|
1051
|
-
const publicClient =
|
|
1051
|
+
const publicClient = _chunkKXSU24RUcjs.useReadClient.call(void 0, sourceChain, rpcUrls);
|
|
1052
1052
|
const recipientForRegistration = _react.useMemo.call(void 0, () => {
|
|
1053
1053
|
if (!recipientInput) return void 0;
|
|
1054
1054
|
return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
|
|
@@ -1089,7 +1089,7 @@ function WithdrawFlow({
|
|
|
1089
1089
|
targetToken,
|
|
1090
1090
|
recipient: recipientForRegistration
|
|
1091
1091
|
});
|
|
1092
|
-
const salt =
|
|
1092
|
+
const salt = _chunkKXSU24RUcjs.deriveAccountSalt.call(void 0, {
|
|
1093
1093
|
recipient: recipientForRegistration,
|
|
1094
1094
|
targetChain,
|
|
1095
1095
|
targetToken
|
|
@@ -1119,7 +1119,7 @@ function WithdrawFlow({
|
|
|
1119
1119
|
} catch (err) {
|
|
1120
1120
|
if (cancelled) return;
|
|
1121
1121
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1122
|
-
const message =
|
|
1122
|
+
const message = _chunkKXSU24RUcjs.formatUserError.call(void 0, raw);
|
|
1123
1123
|
logFlowError("auto-register:failed", err, {
|
|
1124
1124
|
accountAddress,
|
|
1125
1125
|
targetChain,
|
|
@@ -1149,13 +1149,13 @@ function WithdrawFlow({
|
|
|
1149
1149
|
onLifecycleRef,
|
|
1150
1150
|
onErrorRef
|
|
1151
1151
|
]);
|
|
1152
|
-
const sourceDisplay =
|
|
1153
|
-
const { isLoading: catalogLoading } =
|
|
1152
|
+
const sourceDisplay = _chunkKXSU24RUcjs.useTokenDisplay.call(void 0, sourceChain, sourceToken);
|
|
1153
|
+
const { isLoading: catalogLoading } = _chunkKXSU24RUcjs.useChainCatalog.call(void 0, );
|
|
1154
1154
|
const decimalsStatus = sourceDisplay.decimals !== void 0 ? "ready" : sourceDisplay.pending || catalogLoading ? "pending" : "unresolved";
|
|
1155
1155
|
const asset = _react.useMemo.call(void 0, () => {
|
|
1156
1156
|
const symbol = sourceDisplay.symbol;
|
|
1157
1157
|
return {
|
|
1158
|
-
id:
|
|
1158
|
+
id: _chunkKXSU24RUcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1159
1159
|
chainId: sourceChain,
|
|
1160
1160
|
token: sourceToken,
|
|
1161
1161
|
symbol,
|
|
@@ -1357,7 +1357,7 @@ function WithdrawFlow({
|
|
|
1357
1357
|
targetChain,
|
|
1358
1358
|
targetToken
|
|
1359
1359
|
});
|
|
1360
|
-
handleError(
|
|
1360
|
+
handleError(_chunkKXSU24RUcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1361
1361
|
throw err;
|
|
1362
1362
|
}
|
|
1363
1363
|
},
|
|
@@ -1417,8 +1417,8 @@ function WithdrawFlow({
|
|
|
1417
1417
|
},
|
|
1418
1418
|
[analytics, logFlowError, onLifecycleRef, storeApi]
|
|
1419
1419
|
);
|
|
1420
|
-
const targetChainOptions =
|
|
1421
|
-
const targetTokensFor =
|
|
1420
|
+
const targetChainOptions = _chunkKXSU24RUcjs.useDestinationChains.call(void 0, );
|
|
1421
|
+
const targetTokensFor = _chunkKXSU24RUcjs.useTargetTokens.call(void 0, );
|
|
1422
1422
|
const targetTokenOptions = _react.useMemo.call(void 0,
|
|
1423
1423
|
() => targetTokensFor(targetChain),
|
|
1424
1424
|
[targetChain, targetTokensFor]
|
|
@@ -1500,7 +1500,7 @@ function WithdrawFlow({
|
|
|
1500
1500
|
}
|
|
1501
1501
|
),
|
|
1502
1502
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1503
|
-
|
|
1503
|
+
_chunkKXSU24RUcjs.ProcessingStep,
|
|
1504
1504
|
{
|
|
1505
1505
|
smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
|
|
1506
1506
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1570,7 +1570,7 @@ function buildWithdrawAnalyticsSessionProperties({
|
|
|
1570
1570
|
recipient: recipient !== void 0,
|
|
1571
1571
|
amount: defaultAmount !== void 0
|
|
1572
1572
|
},
|
|
1573
|
-
...
|
|
1573
|
+
..._chunkKXSU24RUcjs.analyticsTargetProperties.call(void 0, {
|
|
1574
1574
|
targetChain: seedTargetChain,
|
|
1575
1575
|
targetToken: seedTargetToken
|
|
1576
1576
|
})
|
|
@@ -1611,8 +1611,8 @@ function WithdrawModal({
|
|
|
1611
1611
|
onUiState,
|
|
1612
1612
|
...removedProps
|
|
1613
1613
|
}) {
|
|
1614
|
-
|
|
1615
|
-
|
|
1614
|
+
_chunkKXSU24RUcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
|
|
1615
|
+
_chunkKXSU24RUcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
|
|
1616
1616
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1617
1617
|
const onReadyRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onReady);
|
|
1618
1618
|
const analyticsControllerRef = _react.useRef.call(void 0,
|
|
@@ -1631,20 +1631,20 @@ function WithdrawModal({
|
|
|
1631
1631
|
const onUiStateRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onUiState);
|
|
1632
1632
|
const targetChain = _chunkFKJ6EJHHcjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
|
|
1633
1633
|
const sourceChain = _chunkFKJ6EJHHcjs.getChainId.call(void 0, sourceChainProp);
|
|
1634
|
-
const rpcUrls =
|
|
1634
|
+
const rpcUrls = _chunkKXSU24RUcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1635
1635
|
const service = _react.useMemo.call(void 0,
|
|
1636
|
-
() =>
|
|
1636
|
+
() => _chunkKXSU24RUcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1637
1637
|
[backendUrl, debug]
|
|
1638
1638
|
);
|
|
1639
1639
|
const historyAnalytics = _react.useMemo.call(void 0,
|
|
1640
|
-
() =>
|
|
1640
|
+
() => _chunkKXSU24RUcjs.createHistoryAnalytics.call(void 0, {
|
|
1641
1641
|
modal: "withdraw",
|
|
1642
1642
|
controllerRef: analyticsControllerRef,
|
|
1643
1643
|
sessionIdRef: analyticsSessionIdRef
|
|
1644
1644
|
}),
|
|
1645
1645
|
[]
|
|
1646
1646
|
);
|
|
1647
|
-
const history =
|
|
1647
|
+
const history = _chunkKXSU24RUcjs.useHistoryPanel.call(void 0, {
|
|
1648
1648
|
isOpen,
|
|
1649
1649
|
recipient: historyRecipient,
|
|
1650
1650
|
service,
|
|
@@ -1652,7 +1652,7 @@ function WithdrawModal({
|
|
|
1652
1652
|
analytics: historyAnalytics
|
|
1653
1653
|
});
|
|
1654
1654
|
const { markStale: markHistoryStale, recoverySubmitting } = history;
|
|
1655
|
-
const historyButtonVisible =
|
|
1655
|
+
const historyButtonVisible = _chunkKXSU24RUcjs.isHistoryEntryVisible.call(void 0, {
|
|
1656
1656
|
screen,
|
|
1657
1657
|
submitting,
|
|
1658
1658
|
settled: false
|
|
@@ -1700,7 +1700,7 @@ function WithdrawModal({
|
|
|
1700
1700
|
}, [isOpen]);
|
|
1701
1701
|
_react.useEffect.call(void 0, () => {
|
|
1702
1702
|
if (!isOpen || !modalRef.current) return;
|
|
1703
|
-
return
|
|
1703
|
+
return _chunkKXSU24RUcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1704
1704
|
}, [isOpen, theme]);
|
|
1705
1705
|
_react.useEffect.call(void 0, () => {
|
|
1706
1706
|
if (isOpen) {
|
|
@@ -1748,8 +1748,8 @@ function WithdrawModal({
|
|
|
1748
1748
|
});
|
|
1749
1749
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
|
|
1750
1750
|
const canGoBack = backHandler !== void 0 && !submitting;
|
|
1751
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1752
|
-
|
|
1751
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKXSU24RUcjs.AssetMetadataProvider, { service, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1752
|
+
_chunkKXSU24RUcjs.Modal,
|
|
1753
1753
|
{
|
|
1754
1754
|
isOpen,
|
|
1755
1755
|
onClose: handleModalDismiss,
|
|
@@ -1758,7 +1758,7 @@ function WithdrawModal({
|
|
|
1758
1758
|
closeOnOverlayClick,
|
|
1759
1759
|
ariaLabel: "Withdraw",
|
|
1760
1760
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1761
|
-
|
|
1761
|
+
_chunkKXSU24RUcjs.AnalyticsSession,
|
|
1762
1762
|
{
|
|
1763
1763
|
modal: "withdraw",
|
|
1764
1764
|
sessionProperties: analyticsSessionProperties,
|
|
@@ -1785,7 +1785,7 @@ function WithdrawModal({
|
|
|
1785
1785
|
) }),
|
|
1786
1786
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
1787
1787
|
historyButtonVisible && historyRecipient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1788
|
-
|
|
1788
|
+
_chunkKXSU24RUcjs.HistoryEntryButton,
|
|
1789
1789
|
{
|
|
1790
1790
|
badge: history.badge,
|
|
1791
1791
|
onClick: history.openPanel
|
|
@@ -1826,7 +1826,7 @@ function WithdrawModal({
|
|
|
1826
1826
|
}
|
|
1827
1827
|
),
|
|
1828
1828
|
history.isPanelOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1829
|
-
|
|
1829
|
+
_chunkKXSU24RUcjs.HistoryOverlay,
|
|
1830
1830
|
{
|
|
1831
1831
|
controller: history,
|
|
1832
1832
|
backLabel: "Withdraw",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/core/version.ts
|
|
2
|
-
var MODAL_VERSION = "0.20.
|
|
2
|
+
var MODAL_VERSION = "0.20.1";
|
|
3
3
|
var SERVICE_HEADERS = {
|
|
4
4
|
"Content-Type": "application/json",
|
|
5
5
|
"x-deposit-modal-version": MODAL_VERSION
|