@rhinestone/deposit-modal 0.4.0 → 0.4.2
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-KFTMS2WX.cjs → DepositModalReown-MCDIOJLT.cjs} +6 -6
- package/dist/{DepositModalReown-PC7EX5VK.mjs → DepositModalReown-ORSBSEMO.mjs} +3 -3
- package/dist/{WithdrawModalReown-Z2YF2FSJ.cjs → WithdrawModalReown-AZ27OBAV.cjs} +6 -6
- package/dist/{WithdrawModalReown-BE23LUMT.mjs → WithdrawModalReown-L4SWLONE.mjs} +3 -3
- package/dist/{chunk-7MP2UWIQ.cjs → chunk-36R7XKXP.cjs} +421 -599
- package/dist/{chunk-GKC22JC4.mjs → chunk-7EQQD7B4.mjs} +387 -285
- package/dist/{chunk-WCIGOV34.mjs → chunk-7JVBUMFE.mjs} +56 -8
- package/dist/{chunk-3PVDRSJ7.mjs → chunk-ANPDY6NJ.mjs} +372 -550
- package/dist/{chunk-OQVLEVNR.cjs → chunk-EDUWRMQI.cjs} +196 -94
- package/dist/{chunk-AE5LHTPM.cjs → chunk-PNN2YBPF.cjs} +108 -60
- package/dist/{chunk-3MXWIYAT.cjs → chunk-PQDHZZ2B.cjs} +2 -2
- package/dist/{chunk-UFKFSGT3.mjs → chunk-V72YVCR6.mjs} +1 -1
- 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/styles.css +74 -34
- package/dist/{types-CFRuisqK.d.cts → types-CUOqIIvZ.d.cts} +7 -0
- package/dist/{types-CFRuisqK.d.ts → types-CUOqIIvZ.d.ts} +7 -0
- 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
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkEDUWRMQIcjs = require('./chunk-EDUWRMQI.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(_chunkEDUWRMQIcjs.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 = _chunkEDUWRMQIcjs.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(_chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.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 ? _chunkEDUWRMQIcjs.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
|
+
_chunkEDUWRMQIcjs.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
|
+
_chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: error }),
|
|
641
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: registrationError }),
|
|
642
642
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
643
|
-
|
|
643
|
+
_chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.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(_chunkEDUWRMQIcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
689
|
+
const prices = _chunkEDUWRMQIcjs.useTokenPrices.call(void 0, service, [sourceSymbol, targetSymbol]);
|
|
690
|
+
const receiveDisplay = _nullishCoalesce(_chunkEDUWRMQIcjs.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 = _chunkEDUWRMQIcjs.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
|
+
_chunkEDUWRMQIcjs.BodyHeader,
|
|
716
716
|
{
|
|
717
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
717
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: error }),
|
|
764
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: registrationError }),
|
|
765
765
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
766
|
-
|
|
766
|
+
_chunkEDUWRMQIcjs.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, _chunkEDUWRMQIcjs.PoweredBy, {})
|
|
778
778
|
] });
|
|
779
779
|
}
|
|
780
780
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -784,16 +784,17 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
|
784
784
|
|
|
785
785
|
var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
|
|
786
786
|
var REGISTRATION_DEBOUNCE_MS = 600;
|
|
787
|
+
var WITHDRAW_INDEXING_DELAY_MS = 2e3;
|
|
787
788
|
function resolveSessionOwner(eoaAddress) {
|
|
788
|
-
const localOwner =
|
|
789
|
+
const localOwner = _chunkEDUWRMQIcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
789
790
|
if (localOwner) {
|
|
790
791
|
return {
|
|
791
|
-
account:
|
|
792
|
+
account: _chunkEDUWRMQIcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
792
793
|
address: localOwner.address
|
|
793
794
|
};
|
|
794
795
|
}
|
|
795
|
-
const created =
|
|
796
|
-
|
|
796
|
+
const created = _chunkEDUWRMQIcjs.createSessionOwnerKey.call(void 0, );
|
|
797
|
+
_chunkEDUWRMQIcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
797
798
|
return { account: created.account, address: created.address };
|
|
798
799
|
}
|
|
799
800
|
function targetsEqual(a, b) {
|
|
@@ -828,19 +829,27 @@ function WithdrawFlow({
|
|
|
828
829
|
onError,
|
|
829
830
|
debug
|
|
830
831
|
}) {
|
|
831
|
-
const onStepChangeRef =
|
|
832
|
-
const onEventRef =
|
|
833
|
-
const onLifecycleRef =
|
|
834
|
-
const onErrorRef =
|
|
832
|
+
const onStepChangeRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onStepChange);
|
|
833
|
+
const onEventRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onEvent);
|
|
834
|
+
const onLifecycleRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onLifecycle);
|
|
835
|
+
const onErrorRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onError);
|
|
836
|
+
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
837
|
+
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
838
|
+
_react.useEffect.call(void 0, () => {
|
|
839
|
+
isFlowActiveRef.current = true;
|
|
840
|
+
return () => {
|
|
841
|
+
isFlowActiveRef.current = false;
|
|
842
|
+
};
|
|
843
|
+
}, []);
|
|
835
844
|
const logFlow = _react.useCallback.call(void 0,
|
|
836
845
|
(message, data) => {
|
|
837
|
-
|
|
846
|
+
_chunkEDUWRMQIcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
838
847
|
},
|
|
839
848
|
[debug]
|
|
840
849
|
);
|
|
841
850
|
const logFlowError = _react.useCallback.call(void 0,
|
|
842
851
|
(message, error, data) => {
|
|
843
|
-
|
|
852
|
+
_chunkEDUWRMQIcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
844
853
|
},
|
|
845
854
|
[debug]
|
|
846
855
|
);
|
|
@@ -905,6 +914,7 @@ function WithdrawFlow({
|
|
|
905
914
|
const selectedWalletId = useWithdrawStore((s) => s.selectedWalletId);
|
|
906
915
|
const registration = useWithdrawStore((s) => s.registration);
|
|
907
916
|
const flowStep = useWithdrawStore((s) => s.step);
|
|
917
|
+
const reviewedRecipient = useWithdrawStore((s) => s.recipient);
|
|
908
918
|
const setSelectedWalletId = _react.useCallback.call(void 0,
|
|
909
919
|
(walletId) => storeApi.dispatch({ type: "wallet/id-selected", walletId }),
|
|
910
920
|
[storeApi]
|
|
@@ -915,14 +925,14 @@ function WithdrawFlow({
|
|
|
915
925
|
return {
|
|
916
926
|
ownerAddress: dappAddress,
|
|
917
927
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
918
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
928
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
|
|
919
929
|
switchChain: dappSwitchChain
|
|
920
930
|
};
|
|
921
931
|
}
|
|
922
932
|
return {
|
|
923
933
|
ownerAddress: dappWalletClient.account.address,
|
|
924
934
|
walletClient: dappWalletClient,
|
|
925
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
935
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
|
|
926
936
|
switchChain: dappSwitchChain
|
|
927
937
|
};
|
|
928
938
|
}
|
|
@@ -933,7 +943,7 @@ function WithdrawFlow({
|
|
|
933
943
|
return {
|
|
934
944
|
ownerAddress: dappWalletClient.account.address,
|
|
935
945
|
walletClient: dappWalletClient,
|
|
936
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
946
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
|
|
937
947
|
switchChain: dappSwitchChain
|
|
938
948
|
};
|
|
939
949
|
}
|
|
@@ -965,7 +975,7 @@ function WithdrawFlow({
|
|
|
965
975
|
return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
|
|
966
976
|
}, [recipientInput]);
|
|
967
977
|
_react.useEffect.call(void 0, () => {
|
|
968
|
-
if (!ownerAddress) return;
|
|
978
|
+
if (!ownerAddress || !recipientForRegistration) return;
|
|
969
979
|
const desiredTarget = {
|
|
970
980
|
chain: targetChain,
|
|
971
981
|
token: targetToken,
|
|
@@ -1015,7 +1025,7 @@ function WithdrawFlow({
|
|
|
1015
1025
|
message: typedData.message
|
|
1016
1026
|
});
|
|
1017
1027
|
if (cancelled) return;
|
|
1018
|
-
const sessionDetails =
|
|
1028
|
+
const sessionDetails = _chunkEDUWRMQIcjs.buildSessionDetails.call(void 0,
|
|
1019
1029
|
setup.sessionDetailsUnsigned,
|
|
1020
1030
|
signature
|
|
1021
1031
|
);
|
|
@@ -1052,7 +1062,7 @@ function WithdrawFlow({
|
|
|
1052
1062
|
} catch (err) {
|
|
1053
1063
|
if (cancelled) return;
|
|
1054
1064
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1055
|
-
const message =
|
|
1065
|
+
const message = _chunkEDUWRMQIcjs.formatUserError.call(void 0, raw);
|
|
1056
1066
|
logFlowError("auto-register:failed", err, {
|
|
1057
1067
|
ownerAddress,
|
|
1058
1068
|
targetChain,
|
|
@@ -1088,7 +1098,7 @@ function WithdrawFlow({
|
|
|
1088
1098
|
const symbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1089
1099
|
const decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1090
1100
|
return {
|
|
1091
|
-
id:
|
|
1101
|
+
id: _chunkEDUWRMQIcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1092
1102
|
chainId: sourceChain,
|
|
1093
1103
|
token: sourceToken,
|
|
1094
1104
|
symbol,
|
|
@@ -1098,7 +1108,14 @@ function WithdrawFlow({
|
|
|
1098
1108
|
}, [sourceChain, sourceToken]);
|
|
1099
1109
|
const isSourceNative = sourceToken.toLowerCase() === _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
1100
1110
|
const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
|
|
1111
|
+
const reviewedTarget = reviewedRecipient ? {
|
|
1112
|
+
chain: targetChain,
|
|
1113
|
+
token: targetToken,
|
|
1114
|
+
recipient: reviewedRecipient
|
|
1115
|
+
} : null;
|
|
1116
|
+
const isReviewedTargetReady = registration.kind === "ready" && reviewedTarget !== null && targetsEqual(registration.registeredTarget, reviewedTarget);
|
|
1101
1117
|
const reviewBackHandler = _react.useCallback.call(void 0, () => {
|
|
1118
|
+
submitGenerationRef.current += 1;
|
|
1102
1119
|
storeApi.dispatch({ type: "review/back" });
|
|
1103
1120
|
}, [storeApi]);
|
|
1104
1121
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1173,19 +1190,38 @@ function WithdrawFlow({
|
|
|
1173
1190
|
const handleReviewConfirm = _react.useCallback.call(void 0,
|
|
1174
1191
|
async () => {
|
|
1175
1192
|
const state = storeApi.getState();
|
|
1176
|
-
if (state.registration.kind !== "ready") {
|
|
1177
|
-
throw new Error("Session not ready");
|
|
1178
|
-
}
|
|
1179
|
-
const smartAccount = state.registration.smartAccount;
|
|
1180
1193
|
const recipient = state.recipient;
|
|
1181
1194
|
const amountValue = state.amount;
|
|
1182
1195
|
if (!recipient || !amountValue) {
|
|
1183
1196
|
throw new Error("Missing recipient or amount");
|
|
1184
1197
|
}
|
|
1198
|
+
const desiredTarget = {
|
|
1199
|
+
chain: targetChain,
|
|
1200
|
+
token: targetToken,
|
|
1201
|
+
recipient
|
|
1202
|
+
};
|
|
1203
|
+
const getMatchingRegistration = () => {
|
|
1204
|
+
const current = storeApi.getState().registration;
|
|
1205
|
+
return current.kind === "ready" && targetsEqual(current.registeredTarget, desiredTarget) ? current : null;
|
|
1206
|
+
};
|
|
1207
|
+
const matchingRegistration = getMatchingRegistration();
|
|
1208
|
+
if (!matchingRegistration) {
|
|
1209
|
+
throw new Error("Withdrawal target is still being prepared");
|
|
1210
|
+
}
|
|
1211
|
+
const smartAccount = matchingRegistration.smartAccount;
|
|
1185
1212
|
if (!onSignTransaction && !_optionalChain([signerContext, 'optionalAccess', _43 => _43.walletClient])) {
|
|
1186
1213
|
throw new Error("Wallet not connected");
|
|
1187
1214
|
}
|
|
1215
|
+
const submitGeneration = submitGenerationRef.current += 1;
|
|
1216
|
+
const isSubmissionLive = () => isFlowActiveRef.current && submitGenerationRef.current === submitGeneration;
|
|
1188
1217
|
try {
|
|
1218
|
+
await new Promise((resolve) => {
|
|
1219
|
+
setTimeout(resolve, WITHDRAW_INDEXING_DELAY_MS);
|
|
1220
|
+
});
|
|
1221
|
+
if (!isSubmissionLive()) return;
|
|
1222
|
+
if (!getMatchingRegistration()) {
|
|
1223
|
+
throw new Error("Withdrawal target changed before submission");
|
|
1224
|
+
}
|
|
1189
1225
|
logFlow("submit:start", {
|
|
1190
1226
|
smartAccount,
|
|
1191
1227
|
recipient,
|
|
@@ -1196,7 +1232,7 @@ function WithdrawFlow({
|
|
|
1196
1232
|
targetToken
|
|
1197
1233
|
});
|
|
1198
1234
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1199
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => (
|
|
1235
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1200
1236
|
let result;
|
|
1201
1237
|
if (onSignTransaction) {
|
|
1202
1238
|
const transferTarget = isSameRoute ? recipient : smartAccount;
|
|
@@ -1217,7 +1253,12 @@ function WithdrawFlow({
|
|
|
1217
1253
|
data: transferData.data,
|
|
1218
1254
|
chainId: sourceChain
|
|
1219
1255
|
});
|
|
1256
|
+
if (!isSubmissionLive()) return;
|
|
1220
1257
|
const { signature } = await onSignTransaction(request);
|
|
1258
|
+
if (!isSubmissionLive()) return;
|
|
1259
|
+
if (!getMatchingRegistration()) {
|
|
1260
|
+
throw new Error("Withdrawal target changed before submission");
|
|
1261
|
+
}
|
|
1221
1262
|
const relayResult = await service.relayWithdraw({
|
|
1222
1263
|
smartAccount,
|
|
1223
1264
|
chainId: _chunkABVRVW3Pcjs.toEvmCaip2.call(void 0, sourceChain),
|
|
@@ -1230,6 +1271,9 @@ function WithdrawFlow({
|
|
|
1230
1271
|
}
|
|
1231
1272
|
result = { txHash: relayResult.txHash };
|
|
1232
1273
|
} else if (isSourceNative) {
|
|
1274
|
+
if (!getMatchingRegistration()) {
|
|
1275
|
+
throw new Error("Withdrawal target changed before submission");
|
|
1276
|
+
}
|
|
1233
1277
|
result = await _chunkUEKPBRBYcjs.executeSafeEthTransfer.call(void 0, {
|
|
1234
1278
|
walletClient: signerContext.walletClient,
|
|
1235
1279
|
publicClient: pc,
|
|
@@ -1239,6 +1283,9 @@ function WithdrawFlow({
|
|
|
1239
1283
|
chainId: sourceChain
|
|
1240
1284
|
});
|
|
1241
1285
|
} else {
|
|
1286
|
+
if (!getMatchingRegistration()) {
|
|
1287
|
+
throw new Error("Withdrawal target changed before submission");
|
|
1288
|
+
}
|
|
1242
1289
|
result = await _chunkUEKPBRBYcjs.executeSafeErc20Transfer.call(void 0, {
|
|
1243
1290
|
walletClient: signerContext.walletClient,
|
|
1244
1291
|
publicClient: pc,
|
|
@@ -1249,6 +1296,7 @@ function WithdrawFlow({
|
|
|
1249
1296
|
chainId: sourceChain
|
|
1250
1297
|
});
|
|
1251
1298
|
}
|
|
1299
|
+
if (!isSubmissionLive()) return;
|
|
1252
1300
|
logFlow("withdraw:submitted", {
|
|
1253
1301
|
txHash: result.txHash,
|
|
1254
1302
|
smartAccount,
|
|
@@ -1272,7 +1320,7 @@ function WithdrawFlow({
|
|
|
1272
1320
|
targetChain,
|
|
1273
1321
|
targetToken
|
|
1274
1322
|
});
|
|
1275
|
-
handleError(
|
|
1323
|
+
handleError(_chunkEDUWRMQIcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1276
1324
|
throw err;
|
|
1277
1325
|
}
|
|
1278
1326
|
},
|
|
@@ -1411,7 +1459,7 @@ function WithdrawFlow({
|
|
|
1411
1459
|
state: "ready"
|
|
1412
1460
|
}));
|
|
1413
1461
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
-
|
|
1462
|
+
_chunkEDUWRMQIcjs.ConnectStep,
|
|
1415
1463
|
{
|
|
1416
1464
|
walletRows: withdrawRows,
|
|
1417
1465
|
onConfirmWallet: (walletId) => {
|
|
@@ -1429,7 +1477,7 @@ function WithdrawFlow({
|
|
|
1429
1477
|
if (!signerContext) return null;
|
|
1430
1478
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1431
1479
|
const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _61 => _61.kind]) === "external" ? selectedWalletOption.address : void 0;
|
|
1432
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1480
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1433
1481
|
const stepView = deriveStepView(flowStep, registration);
|
|
1434
1482
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1435
1483
|
stepView === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1467,14 +1515,14 @@ function WithdrawFlow({
|
|
|
1467
1515
|
amount: _nullishCoalesce(storeApi.getState().amount, () => ( "0")),
|
|
1468
1516
|
recipient: _nullishCoalesce(_nullishCoalesce(storeApi.getState().recipient, () => ( recipientForRegistration)), () => ( "0x0")),
|
|
1469
1517
|
service,
|
|
1470
|
-
registrationPending: registration.kind === "pending" || registration.kind === "stale",
|
|
1518
|
+
registrationPending: registration.kind === "pending" || registration.kind === "stale" || !isReviewedTargetReady,
|
|
1471
1519
|
registrationError: registration.kind === "failed" ? registration.error : null,
|
|
1472
1520
|
onConfirm: handleReviewConfirm,
|
|
1473
1521
|
onError: handleError
|
|
1474
1522
|
}
|
|
1475
1523
|
),
|
|
1476
1524
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1477
|
-
|
|
1525
|
+
_chunkEDUWRMQIcjs.ProcessingStep,
|
|
1478
1526
|
{
|
|
1479
1527
|
smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
|
|
1480
1528
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1516,7 +1564,7 @@ function deriveStepView(step, _registration) {
|
|
|
1516
1564
|
// src/WithdrawModal.tsx
|
|
1517
1565
|
|
|
1518
1566
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1519
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1567
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-AZ27OBAV.cjs"))).then((m) => ({
|
|
1520
1568
|
default: m.WithdrawModalReown
|
|
1521
1569
|
}))
|
|
1522
1570
|
);
|
|
@@ -1563,18 +1611,18 @@ function WithdrawModalInner({
|
|
|
1563
1611
|
debug
|
|
1564
1612
|
}) {
|
|
1565
1613
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1566
|
-
const onReadyRef =
|
|
1614
|
+
const onReadyRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onReady);
|
|
1567
1615
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1568
1616
|
void 0
|
|
1569
1617
|
);
|
|
1570
1618
|
const targetChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
|
|
1571
1619
|
const sourceChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp);
|
|
1572
1620
|
const service = _react.useMemo.call(void 0,
|
|
1573
|
-
() =>
|
|
1621
|
+
() => _chunkEDUWRMQIcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1574
1622
|
[backendUrl, debug]
|
|
1575
1623
|
);
|
|
1576
1624
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1577
|
-
const onErrorRef =
|
|
1625
|
+
const onErrorRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onError);
|
|
1578
1626
|
_react.useEffect.call(void 0, () => {
|
|
1579
1627
|
if (isOpen && onSignTransaction && !dappAddress) {
|
|
1580
1628
|
_optionalChain([onErrorRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
|
|
@@ -1585,7 +1633,7 @@ function WithdrawModalInner({
|
|
|
1585
1633
|
}, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
|
|
1586
1634
|
_react.useEffect.call(void 0, () => {
|
|
1587
1635
|
if (isOpen && modalRef.current) {
|
|
1588
|
-
|
|
1636
|
+
_chunkEDUWRMQIcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1589
1637
|
}
|
|
1590
1638
|
}, [isOpen, theme]);
|
|
1591
1639
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1604,7 +1652,7 @@ function WithdrawModalInner({
|
|
|
1604
1652
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
|
|
1605
1653
|
const canGoBack = backHandler !== void 0;
|
|
1606
1654
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1607
|
-
|
|
1655
|
+
_chunkEDUWRMQIcjs.Modal,
|
|
1608
1656
|
{
|
|
1609
1657
|
isOpen,
|
|
1610
1658
|
onClose,
|
|
@@ -1620,7 +1668,7 @@ function WithdrawModalInner({
|
|
|
1620
1668
|
className: "rs-modal-header-back",
|
|
1621
1669
|
"aria-label": "Go back",
|
|
1622
1670
|
onClick: backHandler,
|
|
1623
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1671
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.ChevronLeftIcon, {})
|
|
1624
1672
|
}
|
|
1625
1673
|
) }),
|
|
1626
1674
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1630,7 +1678,7 @@ function WithdrawModalInner({
|
|
|
1630
1678
|
onClick: onClose,
|
|
1631
1679
|
className: "rs-modal-close",
|
|
1632
1680
|
"aria-label": "Close",
|
|
1633
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1681
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.CloseIcon, {})
|
|
1634
1682
|
}
|
|
1635
1683
|
) })
|
|
1636
1684
|
] }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEDUWRMQIcjs = require('./chunk-EDUWRMQI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -155,7 +155,7 @@ function useReownWallet() {
|
|
|
155
155
|
await switchChainAsync({ chainId });
|
|
156
156
|
}
|
|
157
157
|
} catch (err) {
|
|
158
|
-
if (
|
|
158
|
+
if (_chunkEDUWRMQIcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
159
159
|
throw new Error(
|
|
160
160
|
`Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
161
161
|
);
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
|
|
4
4
|
require('./chunk-NRNJAQUA.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-EDUWRMQI.cjs');
|
|
6
6
|
require('./chunk-UEKPBRBY.cjs');
|
|
7
7
|
require('./chunk-ABVRVW3P.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunk36R7XKXPcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { f as DepositModalProps } from './types-CUOqIIvZ.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { f as DepositModalProps } from './types-CUOqIIvZ.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ANPDY6NJ.mjs";
|
|
4
4
|
import "./chunk-FJWLC4AM.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-7EQQD7B4.mjs";
|
|
6
6
|
import "./chunk-F7P4MV72.mjs";
|
|
7
7
|
import "./chunk-WJX3TJFK.mjs";
|
|
8
8
|
export {
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
|
|
4
4
|
require('./chunk-NRNJAQUA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkPNN2YBPFcjs = require('./chunk-PNN2YBPF.cjs');
|
|
8
|
+
require('./chunk-EDUWRMQI.cjs');
|
|
9
9
|
require('./chunk-UEKPBRBY.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -85,4 +85,4 @@ async function disconnectWallet() {
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
88
|
+
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk36R7XKXPcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkPNN2YBPFcjs.WithdrawModal; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.isSupportedTokenAddressForChain;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.cjs';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
|
|
5
5
|
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.cjs';
|
|
6
6
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.js';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
|
|
5
5
|
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.js';
|
|
6
6
|
import 'react';
|