@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
|
@@ -63,7 +63,7 @@ var _chunkNRNJAQUAcjs = require('./chunk-NRNJAQUA.cjs');
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var
|
|
66
|
+
var _chunkLJJCPDZOcjs = require('./chunk-LJJCPDZO.cjs');
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
var _chunkUEKPBRBYcjs = require('./chunk-UEKPBRBY.cjs');
|
|
@@ -143,13 +143,13 @@ function AssetSelectStep({
|
|
|
143
143
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
144
144
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
145
145
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
146
|
-
return
|
|
146
|
+
return _chunkLJJCPDZOcjs.getAssetId.call(void 0, {
|
|
147
147
|
chainId: defaultSourceChain,
|
|
148
148
|
token: defaultSourceToken
|
|
149
149
|
});
|
|
150
150
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
151
|
-
const onTotalBalanceComputedRef =
|
|
152
|
-
const onAssetsLoadedRef =
|
|
151
|
+
const onTotalBalanceComputedRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
152
|
+
const onAssetsLoadedRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onAssetsLoaded);
|
|
153
153
|
_react.useEffect.call(void 0, () => {
|
|
154
154
|
let active = true;
|
|
155
155
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -170,7 +170,7 @@ function AssetSelectStep({
|
|
|
170
170
|
try {
|
|
171
171
|
const portfolio = await service.fetchPortfolio(address);
|
|
172
172
|
if (!active) return;
|
|
173
|
-
const portfolioAssets =
|
|
173
|
+
const portfolioAssets = _chunkLJJCPDZOcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
174
174
|
setAssets(portfolioAssets);
|
|
175
175
|
emitAssetsUpdate(portfolioAssets);
|
|
176
176
|
const hasNative = portfolioAssets.some(
|
|
@@ -246,7 +246,7 @@ function AssetSelectStep({
|
|
|
246
246
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
247
247
|
const numeric = Number(raw);
|
|
248
248
|
if (!Number.isFinite(numeric)) return raw;
|
|
249
|
-
return
|
|
249
|
+
return _chunkLJJCPDZOcjs.tokenFormatter.format(numeric);
|
|
250
250
|
} catch (e3) {
|
|
251
251
|
return asset.balance;
|
|
252
252
|
}
|
|
@@ -254,20 +254,20 @@ function AssetSelectStep({
|
|
|
254
254
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
255
255
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
256
256
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
257
|
-
|
|
257
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
258
258
|
{
|
|
259
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
259
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}),
|
|
260
260
|
title: "Your assets",
|
|
261
261
|
subtitle: "Select source assets to transfer"
|
|
262
262
|
}
|
|
263
263
|
),
|
|
264
264
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
265
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
265
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
266
266
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
267
267
|
] }),
|
|
268
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
268
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
269
269
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
270
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
270
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
271
271
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
272
272
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
273
273
|
address.slice(0, 6),
|
|
@@ -334,14 +334,14 @@ function AssetSelectStep({
|
|
|
334
334
|
] })
|
|
335
335
|
] })
|
|
336
336
|
] }),
|
|
337
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
337
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkLJJCPDZOcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
338
338
|
]
|
|
339
339
|
},
|
|
340
340
|
asset.id
|
|
341
341
|
);
|
|
342
342
|
}) }),
|
|
343
343
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
344
|
-
|
|
344
|
+
_chunkLJJCPDZOcjs.Button,
|
|
345
345
|
{
|
|
346
346
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
347
347
|
disabled: !selectedAsset,
|
|
@@ -350,7 +350,7 @@ function AssetSelectStep({
|
|
|
350
350
|
}
|
|
351
351
|
)
|
|
352
352
|
] }),
|
|
353
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
353
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
354
354
|
] });
|
|
355
355
|
}
|
|
356
356
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
@@ -358,7 +358,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
358
358
|
const connectedChainId = _optionalChain([publicClient, 'access', _10 => _10.chain, 'optionalAccess', _11 => _11.id]);
|
|
359
359
|
if (!connectedChainId) return [];
|
|
360
360
|
if (!_chunkABVRVW3Pcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
361
|
-
const id =
|
|
361
|
+
const id = _chunkLJJCPDZOcjs.getAssetId.call(void 0, {
|
|
362
362
|
chainId: connectedChainId,
|
|
363
363
|
token: _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS
|
|
364
364
|
});
|
|
@@ -555,7 +555,7 @@ function AmountStep({
|
|
|
555
555
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
556
556
|
if (!balanceTarget || !publicClient) return;
|
|
557
557
|
try {
|
|
558
|
-
const bal =
|
|
558
|
+
const bal = _chunkLJJCPDZOcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
559
559
|
address: asset.token,
|
|
560
560
|
abi: _viem.erc20Abi,
|
|
561
561
|
functionName: "balanceOf",
|
|
@@ -576,7 +576,7 @@ function AmountStep({
|
|
|
576
576
|
hasAttemptedSwitch.current = true;
|
|
577
577
|
switchChain(asset.chainId).catch((err) => {
|
|
578
578
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
579
|
-
setError(
|
|
579
|
+
setError(_chunkLJJCPDZOcjs.formatUserError.call(void 0, raw));
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
582
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -629,7 +629,7 @@ function AmountStep({
|
|
|
629
629
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
630
630
|
const numeric = Number(raw);
|
|
631
631
|
if (!Number.isFinite(numeric)) return raw;
|
|
632
|
-
return
|
|
632
|
+
return _chunkLJJCPDZOcjs.tokenFormatter.format(numeric);
|
|
633
633
|
} catch (e8) {
|
|
634
634
|
return "\u2026";
|
|
635
635
|
}
|
|
@@ -748,7 +748,7 @@ function AmountStep({
|
|
|
748
748
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
749
749
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
750
750
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
751
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
752
752
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
753
753
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
754
754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -768,13 +768,13 @@ function AmountStep({
|
|
|
768
768
|
" available",
|
|
769
769
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
770
770
|
" (~",
|
|
771
|
-
|
|
771
|
+
_chunkLJJCPDZOcjs.currencyFormatter.format(balanceUsd),
|
|
772
772
|
")"
|
|
773
773
|
] })
|
|
774
774
|
] }),
|
|
775
775
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
776
776
|
"Min. deposit ",
|
|
777
|
-
|
|
777
|
+
_chunkLJJCPDZOcjs.currencyFormatter.format(minDepositUsd)
|
|
778
778
|
] })
|
|
779
779
|
] })
|
|
780
780
|
] }),
|
|
@@ -815,13 +815,13 @@ function AmountStep({
|
|
|
815
815
|
] }),
|
|
816
816
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
817
817
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
818
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
818
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkLJJCPDZOcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
819
819
|
] })
|
|
820
820
|
] }),
|
|
821
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
822
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
821
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
822
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
823
823
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
824
|
-
|
|
824
|
+
_chunkLJJCPDZOcjs.Button,
|
|
825
825
|
{
|
|
826
826
|
onClick: handleContinue,
|
|
827
827
|
fullWidth: true,
|
|
@@ -832,7 +832,7 @@ function AmountStep({
|
|
|
832
832
|
}
|
|
833
833
|
)
|
|
834
834
|
] }),
|
|
835
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
835
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
836
836
|
] });
|
|
837
837
|
}
|
|
838
838
|
|
|
@@ -879,12 +879,12 @@ function ConfirmStep({
|
|
|
879
879
|
const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
|
|
880
880
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol);
|
|
881
881
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
882
|
-
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(
|
|
882
|
+
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkLJJCPDZOcjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
|
|
883
883
|
const receiveDisplay = (() => {
|
|
884
884
|
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
885
885
|
const usdValue = Number(targetAmount);
|
|
886
886
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
887
|
-
const estimate =
|
|
887
|
+
const estimate = _chunkLJJCPDZOcjs.formatReceiveEstimate.call(void 0, {
|
|
888
888
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
889
889
|
sourceSymbol: asset.symbol,
|
|
890
890
|
targetSymbol,
|
|
@@ -903,7 +903,7 @@ function ConfirmStep({
|
|
|
903
903
|
hasAttemptedSwitch.current = true;
|
|
904
904
|
switchChain(asset.chainId).catch((err) => {
|
|
905
905
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
906
|
-
setError(
|
|
906
|
+
setError(_chunkLJJCPDZOcjs.formatUserError.call(void 0, raw));
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -983,7 +983,7 @@ function ConfirmStep({
|
|
|
983
983
|
const result = await executeTransfer(amountUnits);
|
|
984
984
|
hash = result.txHash;
|
|
985
985
|
resolvedSourceToken = result.sourceToken;
|
|
986
|
-
} else if (
|
|
986
|
+
} else if (_chunkLJJCPDZOcjs.isNativeAsset.call(void 0, asset)) {
|
|
987
987
|
hash = await walletClient.sendTransaction({
|
|
988
988
|
account,
|
|
989
989
|
chain,
|
|
@@ -1004,7 +1004,7 @@ function ConfirmStep({
|
|
|
1004
1004
|
onConfirm(hash, asset.chainId, amountUnits.toString(), resolvedSourceToken);
|
|
1005
1005
|
} catch (err) {
|
|
1006
1006
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1007
|
-
const message =
|
|
1007
|
+
const message = _chunkLJJCPDZOcjs.formatUserError.call(void 0, raw);
|
|
1008
1008
|
setError(message);
|
|
1009
1009
|
_optionalChain([onError, 'optionalCall', _30 => _30(message, "TRANSFER_ERROR")]);
|
|
1010
1010
|
} finally {
|
|
@@ -1013,7 +1013,7 @@ function ConfirmStep({
|
|
|
1013
1013
|
};
|
|
1014
1014
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1015
1015
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1016
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
1017
1017
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
1018
1018
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1019
1019
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -1067,14 +1067,14 @@ function ConfirmStep({
|
|
|
1067
1067
|
children: feeDisplay
|
|
1068
1068
|
}
|
|
1069
1069
|
),
|
|
1070
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1070
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.InfoIcon, {}) }) })
|
|
1071
1071
|
] })
|
|
1072
1072
|
] })
|
|
1073
1073
|
] }),
|
|
1074
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1075
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1074
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
1075
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
1076
1076
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1077
|
-
|
|
1077
|
+
_chunkLJJCPDZOcjs.Button,
|
|
1078
1078
|
{
|
|
1079
1079
|
onClick: handleConfirm,
|
|
1080
1080
|
loading: isSubmitting,
|
|
@@ -1085,7 +1085,7 @@ function ConfirmStep({
|
|
|
1085
1085
|
}
|
|
1086
1086
|
)
|
|
1087
1087
|
] }),
|
|
1088
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1088
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
1089
1089
|
] });
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
@@ -1108,9 +1108,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
1108
1108
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1109
1109
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
1110
1110
|
function isEventForTx(event, txHash) {
|
|
1111
|
-
const eventTxHash =
|
|
1111
|
+
const eventTxHash = _chunkLJJCPDZOcjs.getEventTxHash.call(void 0, event);
|
|
1112
1112
|
if (!eventTxHash) return false;
|
|
1113
|
-
return
|
|
1113
|
+
return _chunkLJJCPDZOcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
1114
1114
|
}
|
|
1115
1115
|
function truncateHash(hash) {
|
|
1116
1116
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -1160,7 +1160,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
return "Bridge failed";
|
|
1162
1162
|
}
|
|
1163
|
-
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1163
|
+
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1164
1164
|
function DepositNotification({
|
|
1165
1165
|
deposit,
|
|
1166
1166
|
smartAccount,
|
|
@@ -1195,7 +1195,7 @@ function DepositNotification({
|
|
|
1195
1195
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
1196
1196
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
1197
1197
|
const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
|
|
1198
|
-
const depositContextRef =
|
|
1198
|
+
const depositContextRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, {
|
|
1199
1199
|
amount,
|
|
1200
1200
|
sourceChain,
|
|
1201
1201
|
sourceToken: token,
|
|
@@ -1204,8 +1204,8 @@ function DepositNotification({
|
|
|
1204
1204
|
targetToken,
|
|
1205
1205
|
hasPostBridgeActions
|
|
1206
1206
|
});
|
|
1207
|
-
const onCompleteRef =
|
|
1208
|
-
const onFailedRef =
|
|
1207
|
+
const onCompleteRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onComplete);
|
|
1208
|
+
const onFailedRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onFailed);
|
|
1209
1209
|
const handleComplete = _react.useCallback.call(void 0,
|
|
1210
1210
|
(destTxHash) => {
|
|
1211
1211
|
if (completedRef.current) return;
|
|
@@ -1310,7 +1310,7 @@ function DepositNotification({
|
|
|
1310
1310
|
const destExplorerUrl = destinationTxHash ? _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1311
1311
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1312
1312
|
const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
|
|
1313
|
-
const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1313
|
+
const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1314
1314
|
"svg",
|
|
1315
1315
|
{
|
|
1316
1316
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1360,7 +1360,7 @@ function DepositNotification({
|
|
|
1360
1360
|
className: "rs-deposit-notification-close",
|
|
1361
1361
|
onClick: () => onDismiss(deposit.id),
|
|
1362
1362
|
"aria-label": "Dismiss",
|
|
1363
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1363
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {})
|
|
1364
1364
|
}
|
|
1365
1365
|
)
|
|
1366
1366
|
] }),
|
|
@@ -1376,7 +1376,7 @@ function DepositNotification({
|
|
|
1376
1376
|
"aria-expanded": expanded,
|
|
1377
1377
|
children: [
|
|
1378
1378
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
1379
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1379
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1380
1380
|
]
|
|
1381
1381
|
}
|
|
1382
1382
|
),
|
|
@@ -1723,10 +1723,10 @@ function DepositAddressStep({
|
|
|
1723
1723
|
return;
|
|
1724
1724
|
}
|
|
1725
1725
|
const event = status.lastEvent;
|
|
1726
|
-
const eventTxHash =
|
|
1726
|
+
const eventTxHash = _chunkLJJCPDZOcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkLJJCPDZOcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
1727
1727
|
if (baselineTxHashRef.current === void 0) {
|
|
1728
1728
|
baselineTxHashRef.current = eventTxHash;
|
|
1729
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
1729
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunkLJJCPDZOcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
1730
1730
|
const details = getDepositEventDetails(event);
|
|
1731
1731
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
1732
1732
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -1803,7 +1803,7 @@ function DepositAddressStep({
|
|
|
1803
1803
|
const qrIconSrc = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId);
|
|
1804
1804
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
1805
1805
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
1806
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1806
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1807
1807
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
1808
1808
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
1809
1809
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -1827,7 +1827,7 @@ function DepositAddressStep({
|
|
|
1827
1827
|
}
|
|
1828
1828
|
),
|
|
1829
1829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkABVRVW3Pcjs.getChainName.call(void 0, sourceChainId) }),
|
|
1830
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1830
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1831
1831
|
]
|
|
1832
1832
|
}
|
|
1833
1833
|
),
|
|
@@ -1858,8 +1858,8 @@ function DepositAddressStep({
|
|
|
1858
1858
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
1859
1859
|
"Min.$",
|
|
1860
1860
|
(targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkABVRVW3Pcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _76 => _76.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _77 => _77.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
1861
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1862
|
-
|
|
1861
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1862
|
+
_chunkLJJCPDZOcjs.InfoIcon,
|
|
1863
1863
|
{
|
|
1864
1864
|
className: "rs-deposit-address-min-icon",
|
|
1865
1865
|
"aria-hidden": "true"
|
|
@@ -1887,7 +1887,7 @@ function DepositAddressStep({
|
|
|
1887
1887
|
}
|
|
1888
1888
|
),
|
|
1889
1889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
1890
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1890
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1891
1891
|
]
|
|
1892
1892
|
}
|
|
1893
1893
|
),
|
|
@@ -1938,7 +1938,7 @@ function DepositAddressStep({
|
|
|
1938
1938
|
className: "rs-deposit-address-copy",
|
|
1939
1939
|
onClick: handleCopy,
|
|
1940
1940
|
children: [
|
|
1941
|
-
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1941
|
+
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CopyIcon, {}),
|
|
1942
1942
|
copied ? "Copied!" : "Copy address"
|
|
1943
1943
|
]
|
|
1944
1944
|
}
|
|
@@ -1946,7 +1946,7 @@ function DepositAddressStep({
|
|
|
1946
1946
|
]
|
|
1947
1947
|
}
|
|
1948
1948
|
),
|
|
1949
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1949
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "warning", children: "HyperCore's first deposit to a new account includes a ~1 USDC activation fee \u2014 send at least 1 USDC or it will fail." }),
|
|
1950
1950
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1951
1951
|
"div",
|
|
1952
1952
|
{
|
|
@@ -1964,16 +1964,16 @@ function DepositAddressStep({
|
|
|
1964
1964
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
1965
1965
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
1966
1966
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1967
|
-
|
|
1967
|
+
_chunkLJJCPDZOcjs.Tooltip,
|
|
1968
1968
|
{
|
|
1969
1969
|
className: "rs-price-impact-info",
|
|
1970
1970
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
1971
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1971
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1972
1972
|
}
|
|
1973
1973
|
)
|
|
1974
1974
|
] }),
|
|
1975
1975
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1976
|
-
|
|
1976
|
+
_chunkLJJCPDZOcjs.ChevronDownIcon,
|
|
1977
1977
|
{
|
|
1978
1978
|
className: "rs-price-impact-chevron",
|
|
1979
1979
|
"aria-hidden": "true"
|
|
@@ -1984,29 +1984,29 @@ function DepositAddressStep({
|
|
|
1984
1984
|
),
|
|
1985
1985
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-panel-inner", children: [
|
|
1986
1986
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
1987
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1987
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PercentIcon, {}) }),
|
|
1988
1988
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
1989
1989
|
"Max slippage: ",
|
|
1990
1990
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.2%" })
|
|
1991
1991
|
] }),
|
|
1992
1992
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1993
|
-
|
|
1993
|
+
_chunkLJJCPDZOcjs.Tooltip,
|
|
1994
1994
|
{
|
|
1995
1995
|
className: "rs-price-impact-info",
|
|
1996
1996
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
1997
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1997
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1998
1998
|
}
|
|
1999
1999
|
)
|
|
2000
2000
|
] }),
|
|
2001
2001
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2002
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2002
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ClockIcon, {}) }),
|
|
2003
2003
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2004
2004
|
"Processing time: ",
|
|
2005
2005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
|
|
2006
2006
|
] })
|
|
2007
2007
|
] }),
|
|
2008
2008
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PlusCircleIcon, {}) }),
|
|
2010
2010
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2011
2011
|
"Max deposit:",
|
|
2012
2012
|
" ",
|
|
@@ -2038,7 +2038,7 @@ function DepositAddressStep({
|
|
|
2038
2038
|
},
|
|
2039
2039
|
deposit.id
|
|
2040
2040
|
)) }),
|
|
2041
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2041
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2042
2042
|
] });
|
|
2043
2043
|
}
|
|
2044
2044
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -2054,13 +2054,13 @@ DepositAddressStep.displayName = "DepositAddressStep";
|
|
|
2054
2054
|
function FinalisingDepositStep() {
|
|
2055
2055
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-finalising", children: [
|
|
2056
2056
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
2057
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-finalising-spinner", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2057
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-finalising-spinner", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, {}) }),
|
|
2058
2058
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-finalising-text", children: [
|
|
2059
2059
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-finalising-title", children: "Finalising deposit" }),
|
|
2060
2060
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2061
2061
|
] })
|
|
2062
2062
|
] }),
|
|
2063
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2063
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2064
2064
|
] });
|
|
2065
2065
|
}
|
|
2066
2066
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
@@ -2091,7 +2091,7 @@ function SwappedOrderTracker({
|
|
|
2091
2091
|
];
|
|
2092
2092
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2093
2093
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2094
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2094
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.HandCoinsIcon, {}), title }),
|
|
2095
2095
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2096
2096
|
const status = stepStates[idx];
|
|
2097
2097
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -2105,7 +2105,7 @@ function SwappedOrderTracker({
|
|
|
2105
2105
|
{
|
|
2106
2106
|
className: "rs-swapped-tracker-step-marker",
|
|
2107
2107
|
"aria-hidden": "true",
|
|
2108
|
-
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2108
|
+
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, {}) : null
|
|
2109
2109
|
}
|
|
2110
2110
|
)
|
|
2111
2111
|
]
|
|
@@ -2132,7 +2132,7 @@ function SwappedOrderTracker({
|
|
|
2132
2132
|
}
|
|
2133
2133
|
)
|
|
2134
2134
|
] }),
|
|
2135
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2135
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2136
2136
|
] });
|
|
2137
2137
|
}
|
|
2138
2138
|
function formatTrackerAmount(amount) {
|
|
@@ -2296,10 +2296,10 @@ function SwappedIframeStep({
|
|
|
2296
2296
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
2297
2297
|
if (cancelled) return;
|
|
2298
2298
|
const event = status.lastEvent;
|
|
2299
|
-
const eventTxHash =
|
|
2299
|
+
const eventTxHash = _chunkLJJCPDZOcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkLJJCPDZOcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2300
2300
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
2301
2301
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
2302
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
2302
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkLJJCPDZOcjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
2303
2303
|
currentDepositTxHashRef.current = eventTxHash;
|
|
2304
2304
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
2305
2305
|
}
|
|
@@ -2360,10 +2360,10 @@ function SwappedIframeStep({
|
|
|
2360
2360
|
[orderState, latestEvent]
|
|
2361
2361
|
);
|
|
2362
2362
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
2363
|
-
if (
|
|
2363
|
+
if (_chunkLJJCPDZOcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2364
2364
|
return {
|
|
2365
2365
|
kind: "failed",
|
|
2366
|
-
message:
|
|
2366
|
+
message: _chunkLJJCPDZOcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2367
2367
|
};
|
|
2368
2368
|
}
|
|
2369
2369
|
if (_optionalChain([orderState, 'optionalAccess', _92 => _92.status]) === "order_cancelled") {
|
|
@@ -2385,19 +2385,19 @@ function SwappedIframeStep({
|
|
|
2385
2385
|
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _94 => _94.orderCrypto]), () => ( null)),
|
|
2386
2386
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
2387
2387
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
2388
|
-
amount: _nullishCoalesce(
|
|
2388
|
+
amount: _nullishCoalesce(_chunkLJJCPDZOcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null))
|
|
2389
2389
|
});
|
|
2390
2390
|
}, [latestEvent, orderState]);
|
|
2391
2391
|
_react.useEffect.call(void 0, () => {
|
|
2392
2392
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
2393
|
-
if (!
|
|
2393
|
+
if (!_chunkLJJCPDZOcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
2394
2394
|
const txHash = currentDepositTxHashRef.current;
|
|
2395
2395
|
if (!txHash) return;
|
|
2396
2396
|
failedFiredRef.current = true;
|
|
2397
2397
|
setPhase("tracker");
|
|
2398
2398
|
_optionalChain([onSwappedFailedRef, 'access', _95 => _95.current, 'optionalCall', _96 => _96(
|
|
2399
2399
|
txHash,
|
|
2400
|
-
|
|
2400
|
+
_chunkLJJCPDZOcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2401
2401
|
)]);
|
|
2402
2402
|
}, [latestEvent]);
|
|
2403
2403
|
if (phase === "tracker") {
|
|
@@ -2431,7 +2431,7 @@ function SwappedIframeStep({
|
|
|
2431
2431
|
}
|
|
2432
2432
|
)
|
|
2433
2433
|
] }),
|
|
2434
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2434
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, {}) }),
|
|
2435
2435
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2436
2436
|
"iframe",
|
|
2437
2437
|
{
|
|
@@ -2445,11 +2445,11 @@ function SwappedIframeStep({
|
|
|
2445
2445
|
retryToken
|
|
2446
2446
|
)
|
|
2447
2447
|
] }) }),
|
|
2448
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2448
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2449
2449
|
] });
|
|
2450
2450
|
}
|
|
2451
2451
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
2452
|
-
if (
|
|
2452
|
+
if (_chunkLJJCPDZOcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2453
2453
|
return ["complete", "complete", "failed", "pending"];
|
|
2454
2454
|
}
|
|
2455
2455
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -2609,7 +2609,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2609
2609
|
function ExchangeLogo({ exchange }) {
|
|
2610
2610
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
2611
2611
|
if (!exchange.logoUrl || failed) {
|
|
2612
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2612
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BankIcon, {});
|
|
2613
2613
|
}
|
|
2614
2614
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2615
2615
|
"img",
|
|
@@ -2655,14 +2655,14 @@ function ExchangeSelectStep({
|
|
|
2655
2655
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
2656
2656
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2657
2657
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2658
|
-
|
|
2658
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
2659
2659
|
{
|
|
2660
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2660
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.UnplugIcon, {}),
|
|
2661
2661
|
title: "Connect exchange",
|
|
2662
2662
|
subtitle: "Select an exchange to connect"
|
|
2663
2663
|
}
|
|
2664
2664
|
),
|
|
2665
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2665
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, {}) }),
|
|
2666
2666
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2667
2667
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2668
2668
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2688,7 +2688,7 @@ function ExchangeSelectStep({
|
|
|
2688
2688
|
)
|
|
2689
2689
|
] }),
|
|
2690
2690
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
2691
|
-
const brand =
|
|
2691
|
+
const brand = _chunkLJJCPDZOcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
|
|
2692
2692
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2693
2693
|
"button",
|
|
2694
2694
|
{
|
|
@@ -2711,7 +2711,7 @@ function ExchangeSelectStep({
|
|
|
2711
2711
|
);
|
|
2712
2712
|
}) })
|
|
2713
2713
|
] }),
|
|
2714
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2714
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2715
2715
|
] });
|
|
2716
2716
|
}
|
|
2717
2717
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
@@ -2741,7 +2741,7 @@ function DepositAddressSkeleton({
|
|
|
2741
2741
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2742
2742
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2743
2743
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2744
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2744
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2745
2745
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2746
2746
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
2747
2747
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -2755,7 +2755,7 @@ function DepositAddressSkeleton({
|
|
|
2755
2755
|
}
|
|
2756
2756
|
),
|
|
2757
2757
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
2758
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2758
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2759
2759
|
] })
|
|
2760
2760
|
] }),
|
|
2761
2761
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
@@ -2764,8 +2764,8 @@ function DepositAddressSkeleton({
|
|
|
2764
2764
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2765
2765
|
"Min.$",
|
|
2766
2766
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _104 => _104.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2767
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2768
|
-
|
|
2767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2768
|
+
_chunkLJJCPDZOcjs.InfoIcon,
|
|
2769
2769
|
{
|
|
2770
2770
|
className: "rs-deposit-address-min-icon",
|
|
2771
2771
|
"aria-hidden": "true"
|
|
@@ -2783,7 +2783,7 @@ function DepositAddressSkeleton({
|
|
|
2783
2783
|
}
|
|
2784
2784
|
),
|
|
2785
2785
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
2786
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2786
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2787
2787
|
] })
|
|
2788
2788
|
] })
|
|
2789
2789
|
] }),
|
|
@@ -2804,7 +2804,7 @@ function DepositAddressSkeleton({
|
|
|
2804
2804
|
disabled: true,
|
|
2805
2805
|
"aria-hidden": "true",
|
|
2806
2806
|
children: [
|
|
2807
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2807
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CopyIcon, {}),
|
|
2808
2808
|
"Copy address"
|
|
2809
2809
|
]
|
|
2810
2810
|
}
|
|
@@ -2817,16 +2817,16 @@ function DepositAddressSkeleton({
|
|
|
2817
2817
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2818
2818
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
2819
2819
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2820
|
-
|
|
2820
|
+
_chunkLJJCPDZOcjs.Tooltip,
|
|
2821
2821
|
{
|
|
2822
2822
|
className: "rs-price-impact-info",
|
|
2823
2823
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2824
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2824
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2825
2825
|
}
|
|
2826
2826
|
)
|
|
2827
2827
|
] }),
|
|
2828
2828
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2829
|
-
|
|
2829
|
+
_chunkLJJCPDZOcjs.ChevronDownIcon,
|
|
2830
2830
|
{
|
|
2831
2831
|
className: "rs-price-impact-chevron",
|
|
2832
2832
|
"aria-hidden": "true"
|
|
@@ -2834,7 +2834,7 @@ function DepositAddressSkeleton({
|
|
|
2834
2834
|
)
|
|
2835
2835
|
] }) })
|
|
2836
2836
|
] }),
|
|
2837
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
2838
2838
|
] });
|
|
2839
2839
|
}
|
|
2840
2840
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2866,7 +2866,7 @@ function SolanaTokenSelectStep({
|
|
|
2866
2866
|
setError(null);
|
|
2867
2867
|
const portfolioBySymbol = {};
|
|
2868
2868
|
try {
|
|
2869
|
-
|
|
2869
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
2870
2870
|
solanaAddress
|
|
2871
2871
|
});
|
|
2872
2872
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -2889,12 +2889,12 @@ function SolanaTokenSelectStep({
|
|
|
2889
2889
|
};
|
|
2890
2890
|
}
|
|
2891
2891
|
}
|
|
2892
|
-
|
|
2892
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
2893
2893
|
symbols: Object.keys(portfolioBySymbol)
|
|
2894
2894
|
});
|
|
2895
2895
|
} catch (err) {
|
|
2896
2896
|
if (!active) return;
|
|
2897
|
-
|
|
2897
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
2898
2898
|
solanaAddress
|
|
2899
2899
|
});
|
|
2900
2900
|
setError(
|
|
@@ -2941,7 +2941,7 @@ function SolanaTokenSelectStep({
|
|
|
2941
2941
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
2942
2942
|
const numeric = Number(raw);
|
|
2943
2943
|
if (!Number.isFinite(numeric)) return raw;
|
|
2944
|
-
return
|
|
2944
|
+
return _chunkLJJCPDZOcjs.tokenFormatter.format(numeric);
|
|
2945
2945
|
} catch (e20) {
|
|
2946
2946
|
return "--";
|
|
2947
2947
|
}
|
|
@@ -2951,20 +2951,20 @@ function SolanaTokenSelectStep({
|
|
|
2951
2951
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2952
2952
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2953
2953
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2954
|
-
|
|
2954
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
2955
2955
|
{
|
|
2956
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2956
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}),
|
|
2957
2957
|
title: "Your assets",
|
|
2958
2958
|
subtitle: "Select source assets to transfer"
|
|
2959
2959
|
}
|
|
2960
2960
|
),
|
|
2961
2961
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2962
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2962
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
2963
2963
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
2964
2964
|
] }),
|
|
2965
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2965
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
2966
2966
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
2967
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2967
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
2968
2968
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2969
2969
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
2970
2970
|
solanaAddress.slice(0, 6),
|
|
@@ -3013,14 +3013,14 @@ function SolanaTokenSelectStep({
|
|
|
3013
3013
|
] })
|
|
3014
3014
|
] })
|
|
3015
3015
|
] }),
|
|
3016
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
3016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkLJJCPDZOcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3017
3017
|
]
|
|
3018
3018
|
},
|
|
3019
3019
|
entry.token.symbol
|
|
3020
3020
|
);
|
|
3021
3021
|
}) }),
|
|
3022
3022
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3023
|
-
|
|
3023
|
+
_chunkLJJCPDZOcjs.Button,
|
|
3024
3024
|
{
|
|
3025
3025
|
onClick: () => selectedEntry && onContinue(
|
|
3026
3026
|
selectedEntry.token,
|
|
@@ -3033,7 +3033,7 @@ function SolanaTokenSelectStep({
|
|
|
3033
3033
|
}
|
|
3034
3034
|
)
|
|
3035
3035
|
] }),
|
|
3036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3036
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
3037
3037
|
] });
|
|
3038
3038
|
}
|
|
3039
3039
|
|
|
@@ -3086,7 +3086,7 @@ function SolanaAmountStep({
|
|
|
3086
3086
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
3087
3087
|
const numeric = Number(raw);
|
|
3088
3088
|
if (!Number.isFinite(numeric)) return raw;
|
|
3089
|
-
return
|
|
3089
|
+
return _chunkLJJCPDZOcjs.tokenFormatter.format(numeric);
|
|
3090
3090
|
} catch (e22) {
|
|
3091
3091
|
return "\u2026";
|
|
3092
3092
|
}
|
|
@@ -3179,7 +3179,7 @@ function SolanaAmountStep({
|
|
|
3179
3179
|
const handlePresetClick = (percentage) => {
|
|
3180
3180
|
const formatted = computePresetAmount(percentage);
|
|
3181
3181
|
if (!formatted) return;
|
|
3182
|
-
|
|
3182
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
3183
3183
|
percentage,
|
|
3184
3184
|
symbol: token.symbol,
|
|
3185
3185
|
formatted
|
|
@@ -3214,7 +3214,7 @@ function SolanaAmountStep({
|
|
|
3214
3214
|
try {
|
|
3215
3215
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
3216
3216
|
} catch (e27) {
|
|
3217
|
-
|
|
3217
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
3218
3218
|
amount,
|
|
3219
3219
|
sourceAmount: sourceAmountStr,
|
|
3220
3220
|
reason: "parse-units-failed"
|
|
@@ -3229,7 +3229,7 @@ function SolanaAmountStep({
|
|
|
3229
3229
|
);
|
|
3230
3230
|
return;
|
|
3231
3231
|
}
|
|
3232
|
-
|
|
3232
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
3233
3233
|
symbol: token.symbol,
|
|
3234
3234
|
inputAmountUsd: amount,
|
|
3235
3235
|
sourceAmount: sourceAmountStr,
|
|
@@ -3243,7 +3243,7 @@ function SolanaAmountStep({
|
|
|
3243
3243
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
|
|
3244
3244
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3245
3245
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3246
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3246
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
3247
3247
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
3248
3248
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
3249
3249
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3263,13 +3263,13 @@ function SolanaAmountStep({
|
|
|
3263
3263
|
" available",
|
|
3264
3264
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3265
3265
|
" (~",
|
|
3266
|
-
|
|
3266
|
+
_chunkLJJCPDZOcjs.currencyFormatter.format(computedBalanceUsd),
|
|
3267
3267
|
")"
|
|
3268
3268
|
] })
|
|
3269
3269
|
] }),
|
|
3270
3270
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
3271
3271
|
"Min. deposit ",
|
|
3272
|
-
|
|
3272
|
+
_chunkLJJCPDZOcjs.currencyFormatter.format(minDepositUsd)
|
|
3273
3273
|
] })
|
|
3274
3274
|
] })
|
|
3275
3275
|
] }),
|
|
@@ -3308,13 +3308,13 @@ function SolanaAmountStep({
|
|
|
3308
3308
|
] }),
|
|
3309
3309
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
3310
3310
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
3311
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
3311
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkLJJCPDZOcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
3312
3312
|
] })
|
|
3313
3313
|
] }),
|
|
3314
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3315
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3314
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
3315
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
3316
3316
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3317
|
-
|
|
3317
|
+
_chunkLJJCPDZOcjs.Button,
|
|
3318
3318
|
{
|
|
3319
3319
|
onClick: handleContinue,
|
|
3320
3320
|
fullWidth: true,
|
|
@@ -3323,7 +3323,7 @@ function SolanaAmountStep({
|
|
|
3323
3323
|
}
|
|
3324
3324
|
)
|
|
3325
3325
|
] }),
|
|
3326
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3326
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
3327
3327
|
] });
|
|
3328
3328
|
}
|
|
3329
3329
|
|
|
@@ -3468,11 +3468,11 @@ function SolanaConfirmStep({
|
|
|
3468
3468
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
3469
3469
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _115 => _115.feeSponsored]), () => ( false));
|
|
3470
3470
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _116 => _116.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
3471
|
-
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(
|
|
3471
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkLJJCPDZOcjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
|
|
3472
3472
|
const receiveDisplay = (() => {
|
|
3473
3473
|
const usdValue = Number(targetAmount);
|
|
3474
3474
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
3475
|
-
const estimate =
|
|
3475
|
+
const estimate = _chunkLJJCPDZOcjs.formatReceiveEstimate.call(void 0, {
|
|
3476
3476
|
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
3477
3477
|
sourceSymbol: token.symbol,
|
|
3478
3478
|
targetSymbol,
|
|
@@ -3484,7 +3484,7 @@ function SolanaConfirmStep({
|
|
|
3484
3484
|
})();
|
|
3485
3485
|
const handleConfirm = async () => {
|
|
3486
3486
|
if (!solanaProvider) {
|
|
3487
|
-
|
|
3487
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3488
3488
|
reason: "missing-provider"
|
|
3489
3489
|
});
|
|
3490
3490
|
setError("Solana wallet not connected");
|
|
@@ -3492,7 +3492,7 @@ function SolanaConfirmStep({
|
|
|
3492
3492
|
}
|
|
3493
3493
|
const parsedAmount = parseFloat(sourceAmount);
|
|
3494
3494
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
3495
|
-
|
|
3495
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3496
3496
|
reason: "invalid-amount",
|
|
3497
3497
|
sourceAmount
|
|
3498
3498
|
});
|
|
@@ -3501,7 +3501,7 @@ function SolanaConfirmStep({
|
|
|
3501
3501
|
}
|
|
3502
3502
|
setError(null);
|
|
3503
3503
|
setIsSubmitting(true);
|
|
3504
|
-
|
|
3504
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
3505
3505
|
smartAccount,
|
|
3506
3506
|
solanaAddress,
|
|
3507
3507
|
solanaDepositAddress,
|
|
@@ -3511,7 +3511,7 @@ function SolanaConfirmStep({
|
|
|
3511
3511
|
});
|
|
3512
3512
|
try {
|
|
3513
3513
|
const check = await service.checkAccount(smartAccount);
|
|
3514
|
-
|
|
3514
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
3515
3515
|
smartAccount,
|
|
3516
3516
|
isRegistered: check.isRegistered,
|
|
3517
3517
|
targetChain: check.targetChain,
|
|
@@ -3524,7 +3524,7 @@ function SolanaConfirmStep({
|
|
|
3524
3524
|
}
|
|
3525
3525
|
const connection = hasConfiguredSolanaRpcUrl() ? getSolanaConnection() : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection()));
|
|
3526
3526
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
3527
|
-
|
|
3527
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
3528
3528
|
token: token.symbol,
|
|
3529
3529
|
sourceAmount,
|
|
3530
3530
|
amountUnits: amountUnits.toString()
|
|
@@ -3541,7 +3541,7 @@ function SolanaConfirmStep({
|
|
|
3541
3541
|
token.mint,
|
|
3542
3542
|
amountUnits
|
|
3543
3543
|
);
|
|
3544
|
-
|
|
3544
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
3545
3545
|
token: token.symbol,
|
|
3546
3546
|
instructionCount: transaction.instructions.length,
|
|
3547
3547
|
feePayer: _optionalChain([transaction, 'access', _117 => _117.feePayer, 'optionalAccess', _118 => _118.toBase58, 'call', _119 => _119()]),
|
|
@@ -3552,15 +3552,15 @@ function SolanaConfirmStep({
|
|
|
3552
3552
|
connection,
|
|
3553
3553
|
transaction
|
|
3554
3554
|
);
|
|
3555
|
-
|
|
3555
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
3556
3556
|
txHash,
|
|
3557
3557
|
amountUnits: amountUnits.toString()
|
|
3558
3558
|
});
|
|
3559
3559
|
onConfirm(txHash, amountUnits.toString());
|
|
3560
3560
|
} catch (err) {
|
|
3561
3561
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
3562
|
-
const message =
|
|
3563
|
-
|
|
3562
|
+
const message = _chunkLJJCPDZOcjs.formatUserError.call(void 0, raw);
|
|
3563
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
3564
3564
|
smartAccount,
|
|
3565
3565
|
token: token.symbol,
|
|
3566
3566
|
sourceAmount
|
|
@@ -3573,7 +3573,7 @@ function SolanaConfirmStep({
|
|
|
3573
3573
|
};
|
|
3574
3574
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3575
3575
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3576
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3576
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
3577
3577
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
3578
3578
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3579
3579
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -3621,13 +3621,13 @@ function SolanaConfirmStep({
|
|
|
3621
3621
|
children: "$0.04"
|
|
3622
3622
|
}
|
|
3623
3623
|
),
|
|
3624
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3624
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.InfoIcon, {}) }) })
|
|
3625
3625
|
] })
|
|
3626
3626
|
] })
|
|
3627
3627
|
] }),
|
|
3628
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3628
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: error }),
|
|
3629
3629
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3630
|
-
|
|
3630
|
+
_chunkLJJCPDZOcjs.Button,
|
|
3631
3631
|
{
|
|
3632
3632
|
onClick: handleConfirm,
|
|
3633
3633
|
loading: isSubmitting,
|
|
@@ -3638,7 +3638,7 @@ function SolanaConfirmStep({
|
|
|
3638
3638
|
}
|
|
3639
3639
|
)
|
|
3640
3640
|
] }),
|
|
3641
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3641
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
3642
3642
|
] });
|
|
3643
3643
|
}
|
|
3644
3644
|
|
|
@@ -3652,18 +3652,18 @@ function DappImportAssetSelectStep({
|
|
|
3652
3652
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3653
3653
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3654
3654
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3655
|
-
|
|
3655
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
3656
3656
|
{
|
|
3657
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3657
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}),
|
|
3658
3658
|
title: `Transfer from ${sourceLabel}`,
|
|
3659
3659
|
subtitle: "Pick the balance to import"
|
|
3660
3660
|
}
|
|
3661
3661
|
),
|
|
3662
3662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3663
|
-
const tokenAmount = asset.balance ?
|
|
3663
|
+
const tokenAmount = asset.balance ? _chunkLJJCPDZOcjs.tokenFormatter.format(
|
|
3664
3664
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3665
3665
|
) : "0";
|
|
3666
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
3666
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkLJJCPDZOcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
3667
3667
|
const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol)));
|
|
3668
3668
|
const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
|
|
3669
3669
|
const badge = _chunkABVRVW3Pcjs.getChainBadge.call(void 0, asset.chainId);
|
|
@@ -3714,7 +3714,7 @@ function DappImportAssetSelectStep({
|
|
|
3714
3714
|
);
|
|
3715
3715
|
}) })
|
|
3716
3716
|
] }),
|
|
3717
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3717
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
3718
3718
|
] });
|
|
3719
3719
|
}
|
|
3720
3720
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -3731,9 +3731,9 @@ function DappImportAssetSelectSkeleton({
|
|
|
3731
3731
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
3732
3732
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3733
3733
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3734
|
-
|
|
3734
|
+
_chunkLJJCPDZOcjs.BodyHeader,
|
|
3735
3735
|
{
|
|
3736
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3736
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.WalletIcon, {}),
|
|
3737
3737
|
title: `Transfer from ${sourceLabel}`,
|
|
3738
3738
|
subtitle: "Pick the balance to import"
|
|
3739
3739
|
}
|
|
@@ -3771,7 +3771,7 @@ function DappImportAssetSelectSkeleton({
|
|
|
3771
3771
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
|
|
3772
3772
|
}
|
|
3773
3773
|
) }),
|
|
3774
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3774
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
3775
3775
|
] });
|
|
3776
3776
|
}
|
|
3777
3777
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -4897,15 +4897,15 @@ var SetupError = class extends Error {
|
|
|
4897
4897
|
}
|
|
4898
4898
|
};
|
|
4899
4899
|
async function resolveSessionOwner(eoaAddress) {
|
|
4900
|
-
const local =
|
|
4900
|
+
const local = _chunkLJJCPDZOcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
4901
4901
|
if (local) {
|
|
4902
4902
|
return {
|
|
4903
|
-
account:
|
|
4903
|
+
account: _chunkLJJCPDZOcjs.accountFromPrivateKey.call(void 0, local.privateKey),
|
|
4904
4904
|
address: local.address
|
|
4905
4905
|
};
|
|
4906
4906
|
}
|
|
4907
|
-
const created =
|
|
4908
|
-
|
|
4907
|
+
const created = _chunkLJJCPDZOcjs.createSessionOwnerKey.call(void 0, );
|
|
4908
|
+
_chunkLJJCPDZOcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
4909
4909
|
return { account: created.account, address: created.address };
|
|
4910
4910
|
}
|
|
4911
4911
|
function stableStringify(value) {
|
|
@@ -4973,7 +4973,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4973
4973
|
try {
|
|
4974
4974
|
const sessionOwner = await resolveSessionOwner(input.ownerAddress);
|
|
4975
4975
|
const cacheKey = computeCacheKey(input, sessionOwner.address);
|
|
4976
|
-
|
|
4976
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
4977
4977
|
owner: input.ownerAddress,
|
|
4978
4978
|
sessionOwner: sessionOwner.address,
|
|
4979
4979
|
hasPostBridgeActions: Boolean(_optionalChain([input, 'access', _133 => _133.postBridgeActions, 'optionalAccess', _134 => _134.length])),
|
|
@@ -5021,7 +5021,7 @@ async function runAccountSetup(input, deps) {
|
|
|
5021
5021
|
primaryType: typedData.primaryType,
|
|
5022
5022
|
message: typedData.message
|
|
5023
5023
|
});
|
|
5024
|
-
const sessionDetails =
|
|
5024
|
+
const sessionDetails = _chunkLJJCPDZOcjs.buildSessionDetails.call(void 0,
|
|
5025
5025
|
setup.sessionDetailsUnsigned,
|
|
5026
5026
|
signature
|
|
5027
5027
|
);
|
|
@@ -5057,7 +5057,7 @@ async function runAccountSetup(input, deps) {
|
|
|
5057
5057
|
isRegistered: true
|
|
5058
5058
|
};
|
|
5059
5059
|
} catch (error) {
|
|
5060
|
-
|
|
5060
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
5061
5061
|
owner: input.ownerAddress
|
|
5062
5062
|
});
|
|
5063
5063
|
if (error instanceof SetupError) throw error;
|
|
@@ -5068,7 +5068,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
5068
5068
|
const now = Date.now();
|
|
5069
5069
|
const existing = setupRequestDedupe.get(requestKey);
|
|
5070
5070
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
5071
|
-
|
|
5071
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
5072
5072
|
owner: input.ownerAddress,
|
|
5073
5073
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
5074
5074
|
});
|
|
@@ -5356,10 +5356,10 @@ function DepositFlow({
|
|
|
5356
5356
|
onError,
|
|
5357
5357
|
debug
|
|
5358
5358
|
}) {
|
|
5359
|
-
const onStepChangeRef =
|
|
5360
|
-
const onEventRef =
|
|
5361
|
-
const onLifecycleRef =
|
|
5362
|
-
const onErrorRef =
|
|
5359
|
+
const onStepChangeRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onStepChange);
|
|
5360
|
+
const onEventRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onEvent);
|
|
5361
|
+
const onLifecycleRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onLifecycle);
|
|
5362
|
+
const onErrorRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onError);
|
|
5363
5363
|
const hasInitialReownSession = Boolean(
|
|
5364
5364
|
enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _139 => _139.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _140 => _140.address]) : _optionalChain([reownWallet, 'optionalAccess', _141 => _141.address])
|
|
5365
5365
|
);
|
|
@@ -5384,13 +5384,13 @@ function DepositFlow({
|
|
|
5384
5384
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
5385
5385
|
const logFlow = _react.useCallback.call(void 0,
|
|
5386
5386
|
(message, data) => {
|
|
5387
|
-
|
|
5387
|
+
_chunkLJJCPDZOcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
5388
5388
|
},
|
|
5389
5389
|
[debug]
|
|
5390
5390
|
);
|
|
5391
5391
|
const logFlowError = _react.useCallback.call(void 0,
|
|
5392
5392
|
(message, error, data) => {
|
|
5393
|
-
|
|
5393
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
5394
5394
|
},
|
|
5395
5395
|
[debug]
|
|
5396
5396
|
);
|
|
@@ -5536,7 +5536,7 @@ function DepositFlow({
|
|
|
5536
5536
|
return {
|
|
5537
5537
|
ownerAddress: dappAddress,
|
|
5538
5538
|
walletClient: void 0,
|
|
5539
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5539
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5540
5540
|
switchChain: void 0
|
|
5541
5541
|
};
|
|
5542
5542
|
}
|
|
@@ -5545,7 +5545,7 @@ function DepositFlow({
|
|
|
5545
5545
|
return {
|
|
5546
5546
|
ownerAddress: dappWalletClient.account.address,
|
|
5547
5547
|
walletClient: dappWalletClient,
|
|
5548
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5548
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
5549
5549
|
switchChain: dappSwitchChain
|
|
5550
5550
|
};
|
|
5551
5551
|
}
|
|
@@ -5559,7 +5559,7 @@ function DepositFlow({
|
|
|
5559
5559
|
return {
|
|
5560
5560
|
ownerAddress: dappAddress,
|
|
5561
5561
|
walletClient: void 0,
|
|
5562
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5562
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5563
5563
|
switchChain: void 0
|
|
5564
5564
|
};
|
|
5565
5565
|
}
|
|
@@ -5568,7 +5568,7 @@ function DepositFlow({
|
|
|
5568
5568
|
return {
|
|
5569
5569
|
ownerAddress: dappWalletClient.account.address,
|
|
5570
5570
|
walletClient: dappWalletClient,
|
|
5571
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5571
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
5572
5572
|
switchChain: dappSwitchChain
|
|
5573
5573
|
};
|
|
5574
5574
|
}
|
|
@@ -5576,7 +5576,7 @@ function DepositFlow({
|
|
|
5576
5576
|
return {
|
|
5577
5577
|
ownerAddress: reownWallet.address,
|
|
5578
5578
|
walletClient: reownWallet.walletClient,
|
|
5579
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
5579
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5580
5580
|
switchChain: reownWallet.switchChain
|
|
5581
5581
|
};
|
|
5582
5582
|
}
|
|
@@ -5614,7 +5614,7 @@ function DepositFlow({
|
|
|
5614
5614
|
return {
|
|
5615
5615
|
ownerAddress: dappAddress,
|
|
5616
5616
|
walletClient: void 0,
|
|
5617
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5617
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkLJJCPDZOcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5618
5618
|
switchChain: void 0
|
|
5619
5619
|
};
|
|
5620
5620
|
}
|
|
@@ -5937,7 +5937,7 @@ function DepositFlow({
|
|
|
5937
5937
|
eoa: dappImportOwner,
|
|
5938
5938
|
getPublicClient: (chainId) => {
|
|
5939
5939
|
try {
|
|
5940
|
-
return
|
|
5940
|
+
return _chunkLJJCPDZOcjs.getPublicClient.call(void 0, chainId);
|
|
5941
5941
|
} catch (e29) {
|
|
5942
5942
|
return null;
|
|
5943
5943
|
}
|
|
@@ -6205,7 +6205,7 @@ function DepositFlow({
|
|
|
6205
6205
|
try {
|
|
6206
6206
|
sessionOwner = await resolveSessionOwner(owner);
|
|
6207
6207
|
} catch (error) {
|
|
6208
|
-
|
|
6208
|
+
_chunkLJJCPDZOcjs.debugError.call(void 0,
|
|
6209
6209
|
debug,
|
|
6210
6210
|
"deposit-flow",
|
|
6211
6211
|
"session-owner:resolve-failed",
|
|
@@ -6584,7 +6584,7 @@ function DepositFlow({
|
|
|
6584
6584
|
);
|
|
6585
6585
|
if (showConnectStep) {
|
|
6586
6586
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6587
|
-
|
|
6587
|
+
_chunkLJJCPDZOcjs.ConnectStep,
|
|
6588
6588
|
{
|
|
6589
6589
|
walletRows,
|
|
6590
6590
|
transferCryptoState: dappAddress ? transferCryptoState : void 0,
|
|
@@ -6714,7 +6714,7 @@ function DepositFlow({
|
|
|
6714
6714
|
}
|
|
6715
6715
|
),
|
|
6716
6716
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6717
|
-
|
|
6717
|
+
_chunkLJJCPDZOcjs.ProcessingStep,
|
|
6718
6718
|
{
|
|
6719
6719
|
smartAccount: step.smartAccount,
|
|
6720
6720
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6781,7 +6781,7 @@ function DepositFlow({
|
|
|
6781
6781
|
}
|
|
6782
6782
|
),
|
|
6783
6783
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6784
|
-
|
|
6784
|
+
_chunkLJJCPDZOcjs.ProcessingStep,
|
|
6785
6785
|
{
|
|
6786
6786
|
smartAccount: step.smartAccount,
|
|
6787
6787
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6911,7 +6911,7 @@ function DepositFlow({
|
|
|
6911
6911
|
) })
|
|
6912
6912
|
] }) : null,
|
|
6913
6913
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6914
|
-
|
|
6914
|
+
_chunkLJJCPDZOcjs.ProcessingStep,
|
|
6915
6915
|
{
|
|
6916
6916
|
smartAccount: effectiveStep.smartAccount,
|
|
6917
6917
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -6964,7 +6964,7 @@ function DepositFlow({
|
|
|
6964
6964
|
if (_optionalChain([signerContext, 'access', _247 => _247.publicClient, 'access', _248 => _248.chain, 'optionalAccess', _249 => _249.id]) === chainId) {
|
|
6965
6965
|
return signerContext.publicClient;
|
|
6966
6966
|
}
|
|
6967
|
-
return
|
|
6967
|
+
return _chunkLJJCPDZOcjs.getPublicClient.call(void 0, chainId);
|
|
6968
6968
|
};
|
|
6969
6969
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
6970
6970
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7074,7 +7074,7 @@ function DepositFlow({
|
|
|
7074
7074
|
}
|
|
7075
7075
|
),
|
|
7076
7076
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7077
|
-
|
|
7077
|
+
_chunkLJJCPDZOcjs.ProcessingStep,
|
|
7078
7078
|
{
|
|
7079
7079
|
smartAccount: effectiveStep.smartAccount,
|
|
7080
7080
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -7248,7 +7248,7 @@ function DepositHistoryPanel({
|
|
|
7248
7248
|
className: "rs-modal-header-back",
|
|
7249
7249
|
"aria-label": "Back",
|
|
7250
7250
|
onClick: onClose,
|
|
7251
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7251
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronLeftIcon, {})
|
|
7252
7252
|
}
|
|
7253
7253
|
) }),
|
|
7254
7254
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7258,29 +7258,29 @@ function DepositHistoryPanel({
|
|
|
7258
7258
|
className: "rs-modal-close",
|
|
7259
7259
|
"aria-label": "Close",
|
|
7260
7260
|
onClick: onCloseModal,
|
|
7261
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7261
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {})
|
|
7262
7262
|
}
|
|
7263
7263
|
) })
|
|
7264
7264
|
] }),
|
|
7265
7265
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
|
|
7266
7266
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
|
|
7267
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7267
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.HistoryIcon, {}), title: "History" }),
|
|
7268
7268
|
isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7269
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7269
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.HistoryIcon, {}) }),
|
|
7270
7270
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7271
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7271
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
7272
7272
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7273
7273
|
] })
|
|
7274
7274
|
] }),
|
|
7275
7275
|
error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7276
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7276
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.AlertTriangleIcon, {}) }),
|
|
7277
7277
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7278
7278
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7279
7279
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
|
|
7280
7280
|
] })
|
|
7281
7281
|
] }),
|
|
7282
7282
|
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7283
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7283
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.HistoryIcon, {}) }),
|
|
7284
7284
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7285
7285
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7286
7286
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
@@ -7300,7 +7300,7 @@ function DepositHistoryPanel({
|
|
|
7300
7300
|
)
|
|
7301
7301
|
] })
|
|
7302
7302
|
] }),
|
|
7303
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7303
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.PoweredBy, {})
|
|
7304
7304
|
] })
|
|
7305
7305
|
]
|
|
7306
7306
|
}
|
|
@@ -7375,7 +7375,7 @@ function HistoryCard({ deposit }) {
|
|
|
7375
7375
|
onClick: (e) => e.stopPropagation(),
|
|
7376
7376
|
children: [
|
|
7377
7377
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7378
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7378
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ArrowUpRightIcon, {})
|
|
7379
7379
|
]
|
|
7380
7380
|
}
|
|
7381
7381
|
)
|
|
@@ -7390,7 +7390,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7390
7390
|
// src/DepositModal.tsx
|
|
7391
7391
|
|
|
7392
7392
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
7393
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
7393
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-57L66M4T.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
7394
7394
|
);
|
|
7395
7395
|
function sortByCreatedAtDesc(items) {
|
|
7396
7396
|
return [...items].sort((a, b) => {
|
|
@@ -7469,7 +7469,7 @@ function DepositModalInner({
|
|
|
7469
7469
|
debug
|
|
7470
7470
|
}) {
|
|
7471
7471
|
const modalRef = _react.useRef.call(void 0, null);
|
|
7472
|
-
const onReadyRef =
|
|
7472
|
+
const onReadyRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onReady);
|
|
7473
7473
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
7474
7474
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
7475
7475
|
void 0
|
|
@@ -7488,14 +7488,14 @@ function DepositModalInner({
|
|
|
7488
7488
|
const targetChain = targetChainProp === "solana" ? "solana" : _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
|
|
7489
7489
|
const sourceChain = sourceChainProp ? _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
7490
7490
|
const [recipientIsContract, setRecipientIsContract] = _react.useState.call(void 0, false);
|
|
7491
|
-
const onErrorRef =
|
|
7491
|
+
const onErrorRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onError);
|
|
7492
7492
|
_react.useEffect.call(void 0, () => {
|
|
7493
7493
|
if (targetChain !== _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID || !_viem.isAddress.call(void 0, recipient, { strict: false })) {
|
|
7494
7494
|
setRecipientIsContract(false);
|
|
7495
7495
|
return;
|
|
7496
7496
|
}
|
|
7497
7497
|
let cancelled = false;
|
|
7498
|
-
|
|
7498
|
+
_chunkLJJCPDZOcjs.getHyperEvmReadClient.call(void 0, ).getCode({ address: recipient }).then((code) => {
|
|
7499
7499
|
if (cancelled) return;
|
|
7500
7500
|
const isContract = _chunkABVRVW3Pcjs.isContractBytecode.call(void 0, code);
|
|
7501
7501
|
setRecipientIsContract(isContract);
|
|
@@ -7513,7 +7513,7 @@ function DepositModalInner({
|
|
|
7513
7513
|
};
|
|
7514
7514
|
}, [targetChain, recipient, onErrorRef]);
|
|
7515
7515
|
const service = _react.useMemo.call(void 0,
|
|
7516
|
-
() =>
|
|
7516
|
+
() => _chunkLJJCPDZOcjs.createDepositService.call(void 0, backendUrl, {
|
|
7517
7517
|
debug,
|
|
7518
7518
|
debugScope: "service:deposit"
|
|
7519
7519
|
}),
|
|
@@ -7529,7 +7529,7 @@ function DepositModalInner({
|
|
|
7529
7529
|
}, [store, targetChain, targetToken]);
|
|
7530
7530
|
_react.useEffect.call(void 0, () => {
|
|
7531
7531
|
if (isOpen && modalRef.current) {
|
|
7532
|
-
|
|
7532
|
+
_chunkLJJCPDZOcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
7533
7533
|
}
|
|
7534
7534
|
}, [isOpen, theme]);
|
|
7535
7535
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7613,7 +7613,7 @@ function DepositModalInner({
|
|
|
7613
7613
|
fetchHistory("initial");
|
|
7614
7614
|
}
|
|
7615
7615
|
}, [historyOpen, fetchHistory]);
|
|
7616
|
-
const onLifecycleRef =
|
|
7616
|
+
const onLifecycleRef = _chunkLJJCPDZOcjs.useLatestRef.call(void 0, onLifecycle);
|
|
7617
7617
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
7618
7618
|
(event) => {
|
|
7619
7619
|
_optionalChain([onLifecycleRef, 'access', _263 => _263.current, 'optionalCall', _264 => _264(event)]);
|
|
@@ -7645,7 +7645,7 @@ function DepositModalInner({
|
|
|
7645
7645
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _265 => _265.showBackButton]), () => ( true));
|
|
7646
7646
|
const canGoBack = backHandler !== void 0;
|
|
7647
7647
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7648
|
-
|
|
7648
|
+
_chunkLJJCPDZOcjs.Modal,
|
|
7649
7649
|
{
|
|
7650
7650
|
isOpen,
|
|
7651
7651
|
onClose,
|
|
@@ -7661,7 +7661,7 @@ function DepositModalInner({
|
|
|
7661
7661
|
className: "rs-modal-header-back",
|
|
7662
7662
|
"aria-label": "Go back",
|
|
7663
7663
|
onClick: backHandler,
|
|
7664
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7664
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.ChevronLeftIcon, {})
|
|
7665
7665
|
}
|
|
7666
7666
|
) }),
|
|
7667
7667
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
@@ -7673,7 +7673,7 @@ function DepositModalInner({
|
|
|
7673
7673
|
"aria-label": "Deposit history",
|
|
7674
7674
|
onClick: handleHistoryOpen,
|
|
7675
7675
|
disabled: !recipient,
|
|
7676
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7676
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.HistoryIcon, {})
|
|
7677
7677
|
}
|
|
7678
7678
|
),
|
|
7679
7679
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7683,12 +7683,12 @@ function DepositModalInner({
|
|
|
7683
7683
|
onClick: onClose,
|
|
7684
7684
|
className: "rs-modal-close",
|
|
7685
7685
|
"aria-label": "Close",
|
|
7686
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7686
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.CloseIcon, {})
|
|
7687
7687
|
}
|
|
7688
7688
|
)
|
|
7689
7689
|
] })
|
|
7690
7690
|
] }),
|
|
7691
|
-
recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7691
|
+
recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLJJCPDZOcjs.Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7692
7692
|
DepositFlow,
|
|
7693
7693
|
{
|
|
7694
7694
|
dappWalletClient,
|