@rhinestone/deposit-modal 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-GHEUERDG.cjs → DepositModalReown-HWKF3O62.cjs} +6 -6
- package/dist/{DepositModalReown-6AO4QURQ.mjs → DepositModalReown-YJBDBCRA.mjs} +3 -3
- package/dist/{WithdrawModalReown-FRMD2ACH.mjs → WithdrawModalReown-AQTB4OZN.mjs} +3 -3
- package/dist/{WithdrawModalReown-LIP6FHCB.cjs → WithdrawModalReown-USNQEAEM.cjs} +6 -6
- package/dist/{chunk-PS7HJ62M.mjs → chunk-4YLVKTSU.mjs} +10 -1
- package/dist/{chunk-MXFZ6Q7F.cjs → chunk-AMEXFHB4.cjs} +213 -200
- package/dist/{chunk-H7727ABX.cjs → chunk-HT364QJK.cjs} +4 -4
- package/dist/{chunk-V6KJKRE7.mjs → chunk-KYHPKMTK.mjs} +5 -3
- package/dist/{chunk-PPFG3VBD.cjs → chunk-PDFLALUT.cjs} +87 -78
- package/dist/{chunk-LCKO6C76.mjs → chunk-QEW5NAGV.mjs} +1 -1
- package/dist/{chunk-XQH2APMO.cjs → chunk-V4XVFT25.cjs} +59 -57
- package/dist/{chunk-ZYYLKWU2.mjs → chunk-XPJJWJPM.mjs} +20 -7
- 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 +29 -17
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -67,7 +67,8 @@ var _chunkNRNJAQUAcjs = require('./chunk-NRNJAQUA.cjs');
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
var _chunkPDFLALUTcjs = require('./chunk-PDFLALUT.cjs');
|
|
71
72
|
|
|
72
73
|
|
|
73
74
|
var _chunkUEKPBRBYcjs = require('./chunk-UEKPBRBY.cjs');
|
|
@@ -145,12 +146,12 @@ function AssetSelectStep({
|
|
|
145
146
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
146
147
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
147
148
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
148
|
-
return
|
|
149
|
+
return _chunkPDFLALUTcjs.getAssetId.call(void 0, {
|
|
149
150
|
chainId: defaultSourceChain,
|
|
150
151
|
token: defaultSourceToken
|
|
151
152
|
});
|
|
152
153
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
153
|
-
const onTotalBalanceComputedRef =
|
|
154
|
+
const onTotalBalanceComputedRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
154
155
|
_react.useEffect.call(void 0, () => {
|
|
155
156
|
let active = true;
|
|
156
157
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -170,7 +171,7 @@ function AssetSelectStep({
|
|
|
170
171
|
try {
|
|
171
172
|
const portfolio = await service.fetchPortfolio(address);
|
|
172
173
|
if (!active) return;
|
|
173
|
-
const portfolioAssets =
|
|
174
|
+
const portfolioAssets = _chunkPDFLALUTcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
174
175
|
setAssets(portfolioAssets);
|
|
175
176
|
emitAssetsUpdate(portfolioAssets);
|
|
176
177
|
const hasNative = portfolioAssets.some(
|
|
@@ -246,7 +247,7 @@ function AssetSelectStep({
|
|
|
246
247
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
247
248
|
const numeric = Number(raw);
|
|
248
249
|
if (!Number.isFinite(numeric)) return raw;
|
|
249
|
-
return
|
|
250
|
+
return _chunkPDFLALUTcjs.tokenFormatter.format(numeric);
|
|
250
251
|
} catch (e3) {
|
|
251
252
|
return asset.balance;
|
|
252
253
|
}
|
|
@@ -254,20 +255,20 @@ function AssetSelectStep({
|
|
|
254
255
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
255
256
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
256
257
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
257
|
-
|
|
258
|
+
_chunkPDFLALUTcjs.BodyHeader,
|
|
258
259
|
{
|
|
259
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
260
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}),
|
|
260
261
|
title: "Your assets",
|
|
261
262
|
subtitle: "Select source assets to transfer"
|
|
262
263
|
}
|
|
263
264
|
),
|
|
264
265
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
265
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
266
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
266
267
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
267
268
|
] }),
|
|
268
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
269
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
269
270
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
270
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
271
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
271
272
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
272
273
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
273
274
|
address.slice(0, 6),
|
|
@@ -334,14 +335,14 @@ function AssetSelectStep({
|
|
|
334
335
|
] })
|
|
335
336
|
] })
|
|
336
337
|
] }),
|
|
337
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
338
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkPDFLALUTcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
338
339
|
]
|
|
339
340
|
},
|
|
340
341
|
asset.id
|
|
341
342
|
);
|
|
342
343
|
}) }),
|
|
343
344
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
344
|
-
|
|
345
|
+
_chunkPDFLALUTcjs.Button,
|
|
345
346
|
{
|
|
346
347
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
347
348
|
disabled: !selectedAsset,
|
|
@@ -350,7 +351,7 @@ function AssetSelectStep({
|
|
|
350
351
|
}
|
|
351
352
|
)
|
|
352
353
|
] }),
|
|
353
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
354
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
354
355
|
] });
|
|
355
356
|
}
|
|
356
357
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
@@ -358,7 +359,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
358
359
|
const connectedChainId = _optionalChain([publicClient, 'access', _8 => _8.chain, 'optionalAccess', _9 => _9.id]);
|
|
359
360
|
if (!connectedChainId) return [];
|
|
360
361
|
if (!_chunkABVRVW3Pcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
361
|
-
const id =
|
|
362
|
+
const id = _chunkPDFLALUTcjs.getAssetId.call(void 0, {
|
|
362
363
|
chainId: connectedChainId,
|
|
363
364
|
token: _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS
|
|
364
365
|
});
|
|
@@ -555,7 +556,7 @@ function AmountStep({
|
|
|
555
556
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
556
557
|
if (!balanceTarget || !publicClient) return;
|
|
557
558
|
try {
|
|
558
|
-
const bal =
|
|
559
|
+
const bal = _chunkPDFLALUTcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
559
560
|
address: asset.token,
|
|
560
561
|
abi: _viem.erc20Abi,
|
|
561
562
|
functionName: "balanceOf",
|
|
@@ -576,7 +577,7 @@ function AmountStep({
|
|
|
576
577
|
hasAttemptedSwitch.current = true;
|
|
577
578
|
switchChain(asset.chainId).catch((err) => {
|
|
578
579
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
579
|
-
setError(
|
|
580
|
+
setError(_chunkPDFLALUTcjs.formatUserError.call(void 0, raw));
|
|
580
581
|
});
|
|
581
582
|
}
|
|
582
583
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -629,7 +630,7 @@ function AmountStep({
|
|
|
629
630
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
630
631
|
const numeric = Number(raw);
|
|
631
632
|
if (!Number.isFinite(numeric)) return raw;
|
|
632
|
-
return
|
|
633
|
+
return _chunkPDFLALUTcjs.tokenFormatter.format(numeric);
|
|
633
634
|
} catch (e8) {
|
|
634
635
|
return "\u2026";
|
|
635
636
|
}
|
|
@@ -750,7 +751,7 @@ function AmountStep({
|
|
|
750
751
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
751
752
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
752
753
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
753
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
754
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
754
755
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
755
756
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
756
757
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -770,13 +771,13 @@ function AmountStep({
|
|
|
770
771
|
" available",
|
|
771
772
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
772
773
|
" (~",
|
|
773
|
-
|
|
774
|
+
_chunkPDFLALUTcjs.currencyFormatter.format(balanceUsd),
|
|
774
775
|
")"
|
|
775
776
|
] })
|
|
776
777
|
] }),
|
|
777
778
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
778
779
|
"Min. deposit ",
|
|
779
|
-
|
|
780
|
+
_chunkPDFLALUTcjs.currencyFormatter.format(minDepositUsd)
|
|
780
781
|
] })
|
|
781
782
|
] })
|
|
782
783
|
] }),
|
|
@@ -817,13 +818,13 @@ function AmountStep({
|
|
|
817
818
|
] }),
|
|
818
819
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
819
820
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
820
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
821
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkPDFLALUTcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
821
822
|
] })
|
|
822
823
|
] }),
|
|
823
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
824
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
824
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
825
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
825
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
826
|
-
|
|
827
|
+
_chunkPDFLALUTcjs.Button,
|
|
827
828
|
{
|
|
828
829
|
onClick: handleContinue,
|
|
829
830
|
fullWidth: true,
|
|
@@ -834,7 +835,7 @@ function AmountStep({
|
|
|
834
835
|
}
|
|
835
836
|
)
|
|
836
837
|
] }),
|
|
837
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
838
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
838
839
|
] });
|
|
839
840
|
}
|
|
840
841
|
|
|
@@ -881,16 +882,16 @@ function ConfirmStep({
|
|
|
881
882
|
const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
|
|
882
883
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol);
|
|
883
884
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
884
|
-
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(
|
|
885
|
+
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkPDFLALUTcjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
|
|
885
886
|
const receiveDisplay = (() => {
|
|
886
887
|
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
887
888
|
if (quote) {
|
|
888
|
-
const quoted =
|
|
889
|
+
const quoted = _chunkPDFLALUTcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
|
|
889
890
|
if (quoted !== void 0) return quoted;
|
|
890
891
|
}
|
|
891
892
|
const usdValue = Number(targetAmount);
|
|
892
893
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
893
|
-
const estimate =
|
|
894
|
+
const estimate = _chunkPDFLALUTcjs.formatReceiveEstimate.call(void 0, {
|
|
894
895
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
895
896
|
sourceSymbol: asset.symbol,
|
|
896
897
|
targetSymbol,
|
|
@@ -909,7 +910,7 @@ function ConfirmStep({
|
|
|
909
910
|
hasAttemptedSwitch.current = true;
|
|
910
911
|
switchChain(asset.chainId).catch((err) => {
|
|
911
912
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
912
|
-
setError(
|
|
913
|
+
setError(_chunkPDFLALUTcjs.formatUserError.call(void 0, raw));
|
|
913
914
|
});
|
|
914
915
|
}
|
|
915
916
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -989,7 +990,7 @@ function ConfirmStep({
|
|
|
989
990
|
const result = await executeTransfer(amountUnits);
|
|
990
991
|
hash = result.txHash;
|
|
991
992
|
resolvedSourceToken = result.sourceToken;
|
|
992
|
-
} else if (
|
|
993
|
+
} else if (_chunkPDFLALUTcjs.isNativeAsset.call(void 0, asset)) {
|
|
993
994
|
hash = await walletClient.sendTransaction({
|
|
994
995
|
account,
|
|
995
996
|
chain,
|
|
@@ -1010,7 +1011,7 @@ function ConfirmStep({
|
|
|
1010
1011
|
onConfirm(hash, asset.chainId, amountUnits.toString(), resolvedSourceToken);
|
|
1011
1012
|
} catch (err) {
|
|
1012
1013
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1013
|
-
const message =
|
|
1014
|
+
const message = _chunkPDFLALUTcjs.formatUserError.call(void 0, raw);
|
|
1014
1015
|
setError(message);
|
|
1015
1016
|
_optionalChain([onError, 'optionalCall', _29 => _29(message, "TRANSFER_ERROR")]);
|
|
1016
1017
|
} finally {
|
|
@@ -1019,7 +1020,7 @@ function ConfirmStep({
|
|
|
1019
1020
|
};
|
|
1020
1021
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1021
1022
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
1023
1024
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
1024
1025
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1025
1026
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -1073,14 +1074,14 @@ function ConfirmStep({
|
|
|
1073
1074
|
children: feeDisplay
|
|
1074
1075
|
}
|
|
1075
1076
|
),
|
|
1076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1077
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.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, _chunkPDFLALUTcjs.InfoIcon, {}) }) })
|
|
1077
1078
|
] })
|
|
1078
1079
|
] })
|
|
1079
1080
|
] }),
|
|
1080
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1081
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1081
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
1082
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
1082
1083
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1083
|
-
|
|
1084
|
+
_chunkPDFLALUTcjs.Button,
|
|
1084
1085
|
{
|
|
1085
1086
|
onClick: handleConfirm,
|
|
1086
1087
|
loading: isSubmitting,
|
|
@@ -1091,7 +1092,7 @@ function ConfirmStep({
|
|
|
1091
1092
|
}
|
|
1092
1093
|
)
|
|
1093
1094
|
] }),
|
|
1094
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1095
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
1095
1096
|
] });
|
|
1096
1097
|
}
|
|
1097
1098
|
|
|
@@ -1114,9 +1115,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
1114
1115
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1115
1116
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
1116
1117
|
function isEventForTx(event, txHash) {
|
|
1117
|
-
const eventTxHash =
|
|
1118
|
+
const eventTxHash = _chunkPDFLALUTcjs.getEventTxHash.call(void 0, event);
|
|
1118
1119
|
if (!eventTxHash) return false;
|
|
1119
|
-
return
|
|
1120
|
+
return _chunkPDFLALUTcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
1120
1121
|
}
|
|
1121
1122
|
function truncateHash(hash) {
|
|
1122
1123
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -1166,7 +1167,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1166
1167
|
}
|
|
1167
1168
|
return "Bridge failed";
|
|
1168
1169
|
}
|
|
1169
|
-
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1170
|
+
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1170
1171
|
function DepositNotification({
|
|
1171
1172
|
deposit,
|
|
1172
1173
|
smartAccount,
|
|
@@ -1201,7 +1202,7 @@ function DepositNotification({
|
|
|
1201
1202
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
1202
1203
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
1203
1204
|
const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
|
|
1204
|
-
const depositContextRef =
|
|
1205
|
+
const depositContextRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, {
|
|
1205
1206
|
amount,
|
|
1206
1207
|
sourceChain,
|
|
1207
1208
|
sourceToken: token,
|
|
@@ -1210,8 +1211,8 @@ function DepositNotification({
|
|
|
1210
1211
|
targetToken,
|
|
1211
1212
|
hasPostBridgeActions
|
|
1212
1213
|
});
|
|
1213
|
-
const onCompleteRef =
|
|
1214
|
-
const onFailedRef =
|
|
1214
|
+
const onCompleteRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onComplete);
|
|
1215
|
+
const onFailedRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onFailed);
|
|
1215
1216
|
const handleComplete = _react.useCallback.call(void 0,
|
|
1216
1217
|
(destTxHash) => {
|
|
1217
1218
|
if (completedRef.current) return;
|
|
@@ -1316,7 +1317,7 @@ function DepositNotification({
|
|
|
1316
1317
|
const destExplorerUrl = destinationTxHash ? _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1317
1318
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1318
1319
|
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.";
|
|
1319
|
-
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,
|
|
1320
|
+
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, _chunkPDFLALUTcjs.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, _chunkPDFLALUTcjs.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,
|
|
1320
1321
|
"svg",
|
|
1321
1322
|
{
|
|
1322
1323
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1366,7 +1367,7 @@ function DepositNotification({
|
|
|
1366
1367
|
className: "rs-deposit-notification-close",
|
|
1367
1368
|
onClick: () => onDismiss(deposit.id),
|
|
1368
1369
|
"aria-label": "Dismiss",
|
|
1369
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1370
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CloseIcon, {})
|
|
1370
1371
|
}
|
|
1371
1372
|
)
|
|
1372
1373
|
] }),
|
|
@@ -1382,7 +1383,7 @@ function DepositNotification({
|
|
|
1382
1383
|
"aria-expanded": expanded,
|
|
1383
1384
|
children: [
|
|
1384
1385
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
1385
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1386
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1386
1387
|
]
|
|
1387
1388
|
}
|
|
1388
1389
|
),
|
|
@@ -1729,10 +1730,10 @@ function DepositAddressStep({
|
|
|
1729
1730
|
return;
|
|
1730
1731
|
}
|
|
1731
1732
|
const event = status.lastEvent;
|
|
1732
|
-
const eventTxHash =
|
|
1733
|
+
const eventTxHash = _chunkPDFLALUTcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkPDFLALUTcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
1733
1734
|
if (baselineTxHashRef.current === void 0) {
|
|
1734
1735
|
baselineTxHashRef.current = eventTxHash;
|
|
1735
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
1736
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunkPDFLALUTcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
1736
1737
|
const details = getDepositEventDetails(event);
|
|
1737
1738
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
1738
1739
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -1809,7 +1810,7 @@ function DepositAddressStep({
|
|
|
1809
1810
|
const qrIconSrc = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId);
|
|
1810
1811
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
1811
1812
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
1812
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1813
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1813
1814
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
1814
1815
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
1815
1816
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -1833,7 +1834,7 @@ function DepositAddressStep({
|
|
|
1833
1834
|
}
|
|
1834
1835
|
),
|
|
1835
1836
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkABVRVW3Pcjs.getChainName.call(void 0, sourceChainId) }),
|
|
1836
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1837
1838
|
]
|
|
1838
1839
|
}
|
|
1839
1840
|
),
|
|
@@ -1864,8 +1865,8 @@ function DepositAddressStep({
|
|
|
1864
1865
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
1865
1866
|
"Min.$",
|
|
1866
1867
|
(targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkABVRVW3Pcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _75 => _75.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _76 => _76.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
1867
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1868
|
-
|
|
1868
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1869
|
+
_chunkPDFLALUTcjs.InfoIcon,
|
|
1869
1870
|
{
|
|
1870
1871
|
className: "rs-deposit-address-min-icon",
|
|
1871
1872
|
"aria-hidden": "true"
|
|
@@ -1893,7 +1894,7 @@ function DepositAddressStep({
|
|
|
1893
1894
|
}
|
|
1894
1895
|
),
|
|
1895
1896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
1896
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1897
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1897
1898
|
]
|
|
1898
1899
|
}
|
|
1899
1900
|
),
|
|
@@ -1944,7 +1945,7 @@ function DepositAddressStep({
|
|
|
1944
1945
|
className: "rs-deposit-address-copy",
|
|
1945
1946
|
onClick: handleCopy,
|
|
1946
1947
|
children: [
|
|
1947
|
-
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1948
|
+
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CopyIcon, {}),
|
|
1948
1949
|
copied ? "Copied!" : "Copy address"
|
|
1949
1950
|
]
|
|
1950
1951
|
}
|
|
@@ -1952,7 +1953,7 @@ function DepositAddressStep({
|
|
|
1952
1953
|
]
|
|
1953
1954
|
}
|
|
1954
1955
|
),
|
|
1955
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1956
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.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." }),
|
|
1956
1957
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1957
1958
|
"div",
|
|
1958
1959
|
{
|
|
@@ -1970,16 +1971,16 @@ function DepositAddressStep({
|
|
|
1970
1971
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
1971
1972
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
1972
1973
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1973
|
-
|
|
1974
|
+
_chunkPDFLALUTcjs.Tooltip,
|
|
1974
1975
|
{
|
|
1975
1976
|
className: "rs-price-impact-info",
|
|
1976
1977
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
1977
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1978
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1978
1979
|
}
|
|
1979
1980
|
)
|
|
1980
1981
|
] }),
|
|
1981
1982
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1982
|
-
|
|
1983
|
+
_chunkPDFLALUTcjs.ChevronDownIcon,
|
|
1983
1984
|
{
|
|
1984
1985
|
className: "rs-price-impact-chevron",
|
|
1985
1986
|
"aria-hidden": "true"
|
|
@@ -1990,29 +1991,29 @@ function DepositAddressStep({
|
|
|
1990
1991
|
),
|
|
1991
1992
|
/* @__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: [
|
|
1992
1993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
1993
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1994
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PercentIcon, {}) }),
|
|
1994
1995
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
1995
1996
|
"Max slippage: ",
|
|
1996
1997
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.2%" })
|
|
1997
1998
|
] }),
|
|
1998
1999
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1999
|
-
|
|
2000
|
+
_chunkPDFLALUTcjs.Tooltip,
|
|
2000
2001
|
{
|
|
2001
2002
|
className: "rs-price-impact-info",
|
|
2002
2003
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
2003
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2004
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2004
2005
|
}
|
|
2005
2006
|
)
|
|
2006
2007
|
] }),
|
|
2007
2008
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2008
|
-
/* @__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, _chunkPDFLALUTcjs.ClockIcon, {}) }),
|
|
2009
2010
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2010
2011
|
"Processing time: ",
|
|
2011
2012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
|
|
2012
2013
|
] })
|
|
2013
2014
|
] }),
|
|
2014
2015
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2015
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PlusCircleIcon, {}) }),
|
|
2016
2017
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2017
2018
|
"Max deposit:",
|
|
2018
2019
|
" ",
|
|
@@ -2044,7 +2045,7 @@ function DepositAddressStep({
|
|
|
2044
2045
|
},
|
|
2045
2046
|
deposit.id
|
|
2046
2047
|
)) }),
|
|
2047
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2048
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2048
2049
|
] });
|
|
2049
2050
|
}
|
|
2050
2051
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -2060,13 +2061,25 @@ DepositAddressStep.displayName = "DepositAddressStep";
|
|
|
2060
2061
|
function FinalisingDepositStep() {
|
|
2061
2062
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-finalising", children: [
|
|
2062
2063
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
2063
|
-
/* @__PURE__ */ _jsxruntime.
|
|
2064
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2065
|
+
"svg",
|
|
2066
|
+
{
|
|
2067
|
+
className: "rs-finalising-spinner",
|
|
2068
|
+
viewBox: "0 0 80 80",
|
|
2069
|
+
fill: "none",
|
|
2070
|
+
"aria-hidden": "true",
|
|
2071
|
+
children: [
|
|
2072
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "rs-finalising-spinner-track", cx: "40", cy: "40", r: "34" }),
|
|
2073
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "rs-finalising-spinner-head", cx: "40", cy: "40", r: "34" })
|
|
2074
|
+
]
|
|
2075
|
+
}
|
|
2076
|
+
),
|
|
2064
2077
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-finalising-text", children: [
|
|
2065
2078
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-finalising-title", children: "Finalising deposit" }),
|
|
2066
2079
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2067
2080
|
] })
|
|
2068
2081
|
] }),
|
|
2069
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2082
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2070
2083
|
] });
|
|
2071
2084
|
}
|
|
2072
2085
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
@@ -2082,7 +2095,6 @@ var STEP_LABELS = [
|
|
|
2082
2095
|
function SwappedOrderTracker({
|
|
2083
2096
|
amount,
|
|
2084
2097
|
currency = "USDC",
|
|
2085
|
-
chainLabel = "Base",
|
|
2086
2098
|
stepStates,
|
|
2087
2099
|
terminal = null,
|
|
2088
2100
|
onRetry
|
|
@@ -2091,13 +2103,13 @@ function SwappedOrderTracker({
|
|
|
2091
2103
|
const title = terminal ? terminal.kind === "cancelled" ? "Order cancelled" : "Deposit failed" : formattedAmount ? `Depositing ${formattedAmount} ${currency}` : `Depositing ${currency}`;
|
|
2092
2104
|
const labels = [
|
|
2093
2105
|
STEP_LABELS[0],
|
|
2094
|
-
`${currency} received
|
|
2106
|
+
`${currency} received`,
|
|
2095
2107
|
STEP_LABELS[2],
|
|
2096
2108
|
STEP_LABELS[3]
|
|
2097
2109
|
];
|
|
2098
2110
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2099
2111
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2100
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2112
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.HandCoinsIcon, {}), title }),
|
|
2101
2113
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2102
2114
|
const status = stepStates[idx];
|
|
2103
2115
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -2111,7 +2123,7 @@ function SwappedOrderTracker({
|
|
|
2111
2123
|
{
|
|
2112
2124
|
className: "rs-swapped-tracker-step-marker",
|
|
2113
2125
|
"aria-hidden": "true",
|
|
2114
|
-
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2126
|
+
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2115
2127
|
"svg",
|
|
2116
2128
|
{
|
|
2117
2129
|
className: "rs-swapped-tracker-step-ring",
|
|
@@ -2146,7 +2158,7 @@ function SwappedOrderTracker({
|
|
|
2146
2158
|
}
|
|
2147
2159
|
)
|
|
2148
2160
|
] }),
|
|
2149
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2161
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2150
2162
|
] });
|
|
2151
2163
|
}
|
|
2152
2164
|
function formatTrackerAmount(amount) {
|
|
@@ -2312,10 +2324,10 @@ function SwappedIframeStep({
|
|
|
2312
2324
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
2313
2325
|
if (cancelled) return;
|
|
2314
2326
|
const event = status.lastEvent;
|
|
2315
|
-
const eventTxHash =
|
|
2327
|
+
const eventTxHash = _chunkPDFLALUTcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkPDFLALUTcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2316
2328
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
2317
2329
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
2318
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
2330
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkPDFLALUTcjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
2319
2331
|
currentDepositTxHashRef.current = eventTxHash;
|
|
2320
2332
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
2321
2333
|
}
|
|
@@ -2381,10 +2393,10 @@ function SwappedIframeStep({
|
|
|
2381
2393
|
[orderState, latestEvent]
|
|
2382
2394
|
);
|
|
2383
2395
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
2384
|
-
if (
|
|
2396
|
+
if (_chunkPDFLALUTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2385
2397
|
return {
|
|
2386
2398
|
kind: "failed",
|
|
2387
|
-
message:
|
|
2399
|
+
message: _chunkPDFLALUTcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2388
2400
|
};
|
|
2389
2401
|
}
|
|
2390
2402
|
if (_optionalChain([orderState, 'optionalAccess', _92 => _92.status]) === "order_cancelled") {
|
|
@@ -2406,19 +2418,19 @@ function SwappedIframeStep({
|
|
|
2406
2418
|
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _94 => _94.orderCrypto]), () => ( null)),
|
|
2407
2419
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
2408
2420
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
2409
|
-
amount: _nullishCoalesce(
|
|
2421
|
+
amount: _nullishCoalesce(_chunkPDFLALUTcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null))
|
|
2410
2422
|
});
|
|
2411
2423
|
}, [latestEvent, orderState]);
|
|
2412
2424
|
_react.useEffect.call(void 0, () => {
|
|
2413
2425
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
2414
|
-
if (!
|
|
2426
|
+
if (!_chunkPDFLALUTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
2415
2427
|
const txHash = currentDepositTxHashRef.current;
|
|
2416
2428
|
if (!txHash) return;
|
|
2417
2429
|
failedFiredRef.current = true;
|
|
2418
2430
|
setPhase("tracker");
|
|
2419
2431
|
_optionalChain([onSwappedFailedRef, 'access', _95 => _95.current, 'optionalCall', _96 => _96(
|
|
2420
2432
|
txHash,
|
|
2421
|
-
|
|
2433
|
+
_chunkPDFLALUTcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2422
2434
|
)]);
|
|
2423
2435
|
}, [latestEvent]);
|
|
2424
2436
|
if (phase === "tracker") {
|
|
@@ -2452,7 +2464,7 @@ function SwappedIframeStep({
|
|
|
2452
2464
|
}
|
|
2453
2465
|
)
|
|
2454
2466
|
] }),
|
|
2455
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2467
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, {}) }),
|
|
2456
2468
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2457
2469
|
"iframe",
|
|
2458
2470
|
{
|
|
@@ -2467,11 +2479,11 @@ function SwappedIframeStep({
|
|
|
2467
2479
|
retryToken
|
|
2468
2480
|
)
|
|
2469
2481
|
] }) }),
|
|
2470
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2482
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2471
2483
|
] });
|
|
2472
2484
|
}
|
|
2473
2485
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
2474
|
-
if (
|
|
2486
|
+
if (_chunkPDFLALUTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2475
2487
|
return ["complete", "complete", "failed", "pending"];
|
|
2476
2488
|
}
|
|
2477
2489
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -2631,7 +2643,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2631
2643
|
function ExchangeLogo({ exchange }) {
|
|
2632
2644
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
2633
2645
|
if (!exchange.logoUrl || failed) {
|
|
2634
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2646
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BankIcon, {});
|
|
2635
2647
|
}
|
|
2636
2648
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2637
2649
|
"img",
|
|
@@ -2677,14 +2689,14 @@ function ExchangeSelectStep({
|
|
|
2677
2689
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
2678
2690
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2679
2691
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2680
|
-
|
|
2692
|
+
_chunkPDFLALUTcjs.BodyHeader,
|
|
2681
2693
|
{
|
|
2682
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2694
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.UnplugIcon, {}),
|
|
2683
2695
|
title: "Connect exchange",
|
|
2684
2696
|
subtitle: "Select an exchange to connect"
|
|
2685
2697
|
}
|
|
2686
2698
|
),
|
|
2687
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2699
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, {}) }),
|
|
2688
2700
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2689
2701
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2690
2702
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2710,7 +2722,7 @@ function ExchangeSelectStep({
|
|
|
2710
2722
|
)
|
|
2711
2723
|
] }),
|
|
2712
2724
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
2713
|
-
const brand =
|
|
2725
|
+
const brand = _chunkPDFLALUTcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
|
|
2714
2726
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2715
2727
|
"button",
|
|
2716
2728
|
{
|
|
@@ -2733,7 +2745,7 @@ function ExchangeSelectStep({
|
|
|
2733
2745
|
);
|
|
2734
2746
|
}) })
|
|
2735
2747
|
] }),
|
|
2736
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2748
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2737
2749
|
] });
|
|
2738
2750
|
}
|
|
2739
2751
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
@@ -2763,7 +2775,7 @@ function DepositAddressSkeleton({
|
|
|
2763
2775
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2764
2776
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2765
2777
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2766
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2778
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2767
2779
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2768
2780
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
2769
2781
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -2777,7 +2789,7 @@ function DepositAddressSkeleton({
|
|
|
2777
2789
|
}
|
|
2778
2790
|
),
|
|
2779
2791
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
2780
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2792
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2781
2793
|
] })
|
|
2782
2794
|
] }),
|
|
2783
2795
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
@@ -2786,8 +2798,8 @@ function DepositAddressSkeleton({
|
|
|
2786
2798
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2787
2799
|
"Min.$",
|
|
2788
2800
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _104 => _104.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2789
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2790
|
-
|
|
2801
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2802
|
+
_chunkPDFLALUTcjs.InfoIcon,
|
|
2791
2803
|
{
|
|
2792
2804
|
className: "rs-deposit-address-min-icon",
|
|
2793
2805
|
"aria-hidden": "true"
|
|
@@ -2805,7 +2817,7 @@ function DepositAddressSkeleton({
|
|
|
2805
2817
|
}
|
|
2806
2818
|
),
|
|
2807
2819
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
2808
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2809
2821
|
] })
|
|
2810
2822
|
] })
|
|
2811
2823
|
] }),
|
|
@@ -2826,7 +2838,7 @@ function DepositAddressSkeleton({
|
|
|
2826
2838
|
disabled: true,
|
|
2827
2839
|
"aria-hidden": "true",
|
|
2828
2840
|
children: [
|
|
2829
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2841
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CopyIcon, {}),
|
|
2830
2842
|
"Copy address"
|
|
2831
2843
|
]
|
|
2832
2844
|
}
|
|
@@ -2839,16 +2851,16 @@ function DepositAddressSkeleton({
|
|
|
2839
2851
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2840
2852
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
2841
2853
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2842
|
-
|
|
2854
|
+
_chunkPDFLALUTcjs.Tooltip,
|
|
2843
2855
|
{
|
|
2844
2856
|
className: "rs-price-impact-info",
|
|
2845
2857
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2846
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2858
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2847
2859
|
}
|
|
2848
2860
|
)
|
|
2849
2861
|
] }),
|
|
2850
2862
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2851
|
-
|
|
2863
|
+
_chunkPDFLALUTcjs.ChevronDownIcon,
|
|
2852
2864
|
{
|
|
2853
2865
|
className: "rs-price-impact-chevron",
|
|
2854
2866
|
"aria-hidden": "true"
|
|
@@ -2856,7 +2868,7 @@ function DepositAddressSkeleton({
|
|
|
2856
2868
|
)
|
|
2857
2869
|
] }) })
|
|
2858
2870
|
] }),
|
|
2859
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2871
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
2860
2872
|
] });
|
|
2861
2873
|
}
|
|
2862
2874
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2888,7 +2900,7 @@ function SolanaTokenSelectStep({
|
|
|
2888
2900
|
setError(null);
|
|
2889
2901
|
const portfolioBySymbol = {};
|
|
2890
2902
|
try {
|
|
2891
|
-
|
|
2903
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
2892
2904
|
solanaAddress
|
|
2893
2905
|
});
|
|
2894
2906
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -2911,12 +2923,12 @@ function SolanaTokenSelectStep({
|
|
|
2911
2923
|
};
|
|
2912
2924
|
}
|
|
2913
2925
|
}
|
|
2914
|
-
|
|
2926
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
2915
2927
|
symbols: Object.keys(portfolioBySymbol)
|
|
2916
2928
|
});
|
|
2917
2929
|
} catch (err) {
|
|
2918
2930
|
if (!active) return;
|
|
2919
|
-
|
|
2931
|
+
_chunkPDFLALUTcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
2920
2932
|
solanaAddress
|
|
2921
2933
|
});
|
|
2922
2934
|
setError(
|
|
@@ -2963,7 +2975,7 @@ function SolanaTokenSelectStep({
|
|
|
2963
2975
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
2964
2976
|
const numeric = Number(raw);
|
|
2965
2977
|
if (!Number.isFinite(numeric)) return raw;
|
|
2966
|
-
return
|
|
2978
|
+
return _chunkPDFLALUTcjs.tokenFormatter.format(numeric);
|
|
2967
2979
|
} catch (e20) {
|
|
2968
2980
|
return "--";
|
|
2969
2981
|
}
|
|
@@ -2973,20 +2985,20 @@ function SolanaTokenSelectStep({
|
|
|
2973
2985
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2974
2986
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2975
2987
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2976
|
-
|
|
2988
|
+
_chunkPDFLALUTcjs.BodyHeader,
|
|
2977
2989
|
{
|
|
2978
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2990
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}),
|
|
2979
2991
|
title: "Your assets",
|
|
2980
2992
|
subtitle: "Select source assets to transfer"
|
|
2981
2993
|
}
|
|
2982
2994
|
),
|
|
2983
2995
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2984
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2996
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
2985
2997
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
2986
2998
|
] }),
|
|
2987
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2999
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
2988
3000
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
2989
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
2990
3002
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2991
3003
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
2992
3004
|
solanaAddress.slice(0, 6),
|
|
@@ -3035,14 +3047,14 @@ function SolanaTokenSelectStep({
|
|
|
3035
3047
|
] })
|
|
3036
3048
|
] })
|
|
3037
3049
|
] }),
|
|
3038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
3050
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkPDFLALUTcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3039
3051
|
]
|
|
3040
3052
|
},
|
|
3041
3053
|
entry.token.symbol
|
|
3042
3054
|
);
|
|
3043
3055
|
}) }),
|
|
3044
3056
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3045
|
-
|
|
3057
|
+
_chunkPDFLALUTcjs.Button,
|
|
3046
3058
|
{
|
|
3047
3059
|
onClick: () => selectedEntry && onContinue(
|
|
3048
3060
|
selectedEntry.token,
|
|
@@ -3055,7 +3067,7 @@ function SolanaTokenSelectStep({
|
|
|
3055
3067
|
}
|
|
3056
3068
|
)
|
|
3057
3069
|
] }),
|
|
3058
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3070
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
3059
3071
|
] });
|
|
3060
3072
|
}
|
|
3061
3073
|
|
|
@@ -3108,7 +3120,7 @@ function SolanaAmountStep({
|
|
|
3108
3120
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
3109
3121
|
const numeric = Number(raw);
|
|
3110
3122
|
if (!Number.isFinite(numeric)) return raw;
|
|
3111
|
-
return
|
|
3123
|
+
return _chunkPDFLALUTcjs.tokenFormatter.format(numeric);
|
|
3112
3124
|
} catch (e22) {
|
|
3113
3125
|
return "\u2026";
|
|
3114
3126
|
}
|
|
@@ -3201,7 +3213,7 @@ function SolanaAmountStep({
|
|
|
3201
3213
|
const handlePresetClick = (percentage) => {
|
|
3202
3214
|
const formatted = computePresetAmount(percentage);
|
|
3203
3215
|
if (!formatted) return;
|
|
3204
|
-
|
|
3216
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
3205
3217
|
percentage,
|
|
3206
3218
|
symbol: token.symbol,
|
|
3207
3219
|
formatted
|
|
@@ -3236,7 +3248,7 @@ function SolanaAmountStep({
|
|
|
3236
3248
|
try {
|
|
3237
3249
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
3238
3250
|
} catch (e27) {
|
|
3239
|
-
|
|
3251
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
3240
3252
|
amount,
|
|
3241
3253
|
sourceAmount: sourceAmountStr,
|
|
3242
3254
|
reason: "parse-units-failed"
|
|
@@ -3251,7 +3263,7 @@ function SolanaAmountStep({
|
|
|
3251
3263
|
);
|
|
3252
3264
|
return;
|
|
3253
3265
|
}
|
|
3254
|
-
|
|
3266
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
3255
3267
|
symbol: token.symbol,
|
|
3256
3268
|
inputAmountUsd: amount,
|
|
3257
3269
|
sourceAmount: sourceAmountStr,
|
|
@@ -3265,7 +3277,7 @@ function SolanaAmountStep({
|
|
|
3265
3277
|
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
|
|
3266
3278
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3267
3279
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3268
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3280
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
3269
3281
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
3270
3282
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
3271
3283
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3285,13 +3297,13 @@ function SolanaAmountStep({
|
|
|
3285
3297
|
" available",
|
|
3286
3298
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3287
3299
|
" (~",
|
|
3288
|
-
|
|
3300
|
+
_chunkPDFLALUTcjs.currencyFormatter.format(computedBalanceUsd),
|
|
3289
3301
|
")"
|
|
3290
3302
|
] })
|
|
3291
3303
|
] }),
|
|
3292
3304
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
3293
3305
|
"Min. deposit ",
|
|
3294
|
-
|
|
3306
|
+
_chunkPDFLALUTcjs.currencyFormatter.format(minDepositUsd)
|
|
3295
3307
|
] })
|
|
3296
3308
|
] })
|
|
3297
3309
|
] }),
|
|
@@ -3330,13 +3342,13 @@ function SolanaAmountStep({
|
|
|
3330
3342
|
] }),
|
|
3331
3343
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
3332
3344
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
3333
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
3345
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkPDFLALUTcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
3334
3346
|
] })
|
|
3335
3347
|
] }),
|
|
3336
|
-
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3337
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3348
|
+
targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
3349
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
3338
3350
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3339
|
-
|
|
3351
|
+
_chunkPDFLALUTcjs.Button,
|
|
3340
3352
|
{
|
|
3341
3353
|
onClick: handleContinue,
|
|
3342
3354
|
fullWidth: true,
|
|
@@ -3345,7 +3357,7 @@ function SolanaAmountStep({
|
|
|
3345
3357
|
}
|
|
3346
3358
|
)
|
|
3347
3359
|
] }),
|
|
3348
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3360
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
3349
3361
|
] });
|
|
3350
3362
|
}
|
|
3351
3363
|
|
|
@@ -3368,10 +3380,10 @@ var _spltoken = require('@solana/spl-token');
|
|
|
3368
3380
|
var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
|
|
3369
3381
|
var cachedConnections = /* @__PURE__ */ new Map();
|
|
3370
3382
|
function getSolanaRpcUrl(rpcUrls) {
|
|
3371
|
-
return _nullishCoalesce(
|
|
3383
|
+
return _nullishCoalesce(_chunkPDFLALUTcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
|
|
3372
3384
|
}
|
|
3373
3385
|
function hasConfiguredSolanaRpcUrl(rpcUrls) {
|
|
3374
|
-
return
|
|
3386
|
+
return _chunkPDFLALUTcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
|
|
3375
3387
|
}
|
|
3376
3388
|
function getSolanaConnection(rpcUrls) {
|
|
3377
3389
|
const rpcUrl = getSolanaRpcUrl(rpcUrls);
|
|
@@ -3473,7 +3485,7 @@ function SolanaConfirmStep({
|
|
|
3473
3485
|
onError,
|
|
3474
3486
|
debug
|
|
3475
3487
|
}) {
|
|
3476
|
-
const rpcUrls =
|
|
3488
|
+
const rpcUrls = _chunkPDFLALUTcjs.useRpcUrls.call(void 0, );
|
|
3477
3489
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
3478
3490
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
3479
3491
|
const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
|
|
@@ -3485,11 +3497,11 @@ function SolanaConfirmStep({
|
|
|
3485
3497
|
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
3486
3498
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _113 => _113.feeSponsored]), () => ( false));
|
|
3487
3499
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _114 => _114.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
3488
|
-
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(
|
|
3500
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkPDFLALUTcjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
|
|
3489
3501
|
const receiveDisplay = (() => {
|
|
3490
3502
|
const usdValue = Number(targetAmount);
|
|
3491
3503
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
3492
|
-
const estimate =
|
|
3504
|
+
const estimate = _chunkPDFLALUTcjs.formatReceiveEstimate.call(void 0, {
|
|
3493
3505
|
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
3494
3506
|
sourceSymbol: token.symbol,
|
|
3495
3507
|
targetSymbol,
|
|
@@ -3501,7 +3513,7 @@ function SolanaConfirmStep({
|
|
|
3501
3513
|
})();
|
|
3502
3514
|
const handleConfirm = async () => {
|
|
3503
3515
|
if (!solanaProvider) {
|
|
3504
|
-
|
|
3516
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3505
3517
|
reason: "missing-provider"
|
|
3506
3518
|
});
|
|
3507
3519
|
setError("Solana wallet not connected");
|
|
@@ -3509,7 +3521,7 @@ function SolanaConfirmStep({
|
|
|
3509
3521
|
}
|
|
3510
3522
|
const parsedAmount = parseFloat(sourceAmount);
|
|
3511
3523
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
3512
|
-
|
|
3524
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3513
3525
|
reason: "invalid-amount",
|
|
3514
3526
|
sourceAmount
|
|
3515
3527
|
});
|
|
@@ -3518,7 +3530,7 @@ function SolanaConfirmStep({
|
|
|
3518
3530
|
}
|
|
3519
3531
|
setError(null);
|
|
3520
3532
|
setIsSubmitting(true);
|
|
3521
|
-
|
|
3533
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
3522
3534
|
smartAccount,
|
|
3523
3535
|
solanaAddress,
|
|
3524
3536
|
solanaDepositAddress,
|
|
@@ -3528,7 +3540,7 @@ function SolanaConfirmStep({
|
|
|
3528
3540
|
});
|
|
3529
3541
|
try {
|
|
3530
3542
|
const check = await service.checkAccount(smartAccount);
|
|
3531
|
-
|
|
3543
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
3532
3544
|
smartAccount,
|
|
3533
3545
|
isRegistered: check.isRegistered,
|
|
3534
3546
|
targetChain: check.targetChain,
|
|
@@ -3541,7 +3553,7 @@ function SolanaConfirmStep({
|
|
|
3541
3553
|
}
|
|
3542
3554
|
const connection = hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls)));
|
|
3543
3555
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
3544
|
-
|
|
3556
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
3545
3557
|
token: token.symbol,
|
|
3546
3558
|
sourceAmount,
|
|
3547
3559
|
amountUnits: amountUnits.toString()
|
|
@@ -3558,7 +3570,7 @@ function SolanaConfirmStep({
|
|
|
3558
3570
|
token.mint,
|
|
3559
3571
|
amountUnits
|
|
3560
3572
|
);
|
|
3561
|
-
|
|
3573
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
3562
3574
|
token: token.symbol,
|
|
3563
3575
|
instructionCount: transaction.instructions.length,
|
|
3564
3576
|
feePayer: _optionalChain([transaction, 'access', _115 => _115.feePayer, 'optionalAccess', _116 => _116.toBase58, 'call', _117 => _117()]),
|
|
@@ -3569,15 +3581,15 @@ function SolanaConfirmStep({
|
|
|
3569
3581
|
connection,
|
|
3570
3582
|
transaction
|
|
3571
3583
|
);
|
|
3572
|
-
|
|
3584
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
3573
3585
|
txHash,
|
|
3574
3586
|
amountUnits: amountUnits.toString()
|
|
3575
3587
|
});
|
|
3576
3588
|
onConfirm(txHash, amountUnits.toString());
|
|
3577
3589
|
} catch (err) {
|
|
3578
3590
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
3579
|
-
const message =
|
|
3580
|
-
|
|
3591
|
+
const message = _chunkPDFLALUTcjs.formatUserError.call(void 0, raw);
|
|
3592
|
+
_chunkPDFLALUTcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
3581
3593
|
smartAccount,
|
|
3582
3594
|
token: token.symbol,
|
|
3583
3595
|
sourceAmount
|
|
@@ -3590,7 +3602,7 @@ function SolanaConfirmStep({
|
|
|
3590
3602
|
};
|
|
3591
3603
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3592
3604
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3593
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3605
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
3594
3606
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
3595
3607
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3596
3608
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -3638,13 +3650,13 @@ function SolanaConfirmStep({
|
|
|
3638
3650
|
children: "$0.04"
|
|
3639
3651
|
}
|
|
3640
3652
|
),
|
|
3641
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.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, _chunkPDFLALUTcjs.InfoIcon, {}) }) })
|
|
3642
3654
|
] })
|
|
3643
3655
|
] })
|
|
3644
3656
|
] }),
|
|
3645
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3657
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Callout, { variant: "error", children: error }),
|
|
3646
3658
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3647
|
-
|
|
3659
|
+
_chunkPDFLALUTcjs.Button,
|
|
3648
3660
|
{
|
|
3649
3661
|
onClick: handleConfirm,
|
|
3650
3662
|
loading: isSubmitting,
|
|
@@ -3655,7 +3667,7 @@ function SolanaConfirmStep({
|
|
|
3655
3667
|
}
|
|
3656
3668
|
)
|
|
3657
3669
|
] }),
|
|
3658
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3670
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
3659
3671
|
] });
|
|
3660
3672
|
}
|
|
3661
3673
|
|
|
@@ -3669,18 +3681,18 @@ function DappImportAssetSelectStep({
|
|
|
3669
3681
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3670
3682
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3671
3683
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3672
|
-
|
|
3684
|
+
_chunkPDFLALUTcjs.BodyHeader,
|
|
3673
3685
|
{
|
|
3674
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3686
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}),
|
|
3675
3687
|
title: `Transfer from ${sourceLabel}`,
|
|
3676
3688
|
subtitle: "Pick the balance to import"
|
|
3677
3689
|
}
|
|
3678
3690
|
),
|
|
3679
3691
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3680
|
-
const tokenAmount = asset.balance ?
|
|
3692
|
+
const tokenAmount = asset.balance ? _chunkPDFLALUTcjs.tokenFormatter.format(
|
|
3681
3693
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3682
3694
|
) : "0";
|
|
3683
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
3695
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkPDFLALUTcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
3684
3696
|
const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol)));
|
|
3685
3697
|
const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
|
|
3686
3698
|
const badge = _chunkABVRVW3Pcjs.getChainBadge.call(void 0, asset.chainId);
|
|
@@ -3731,7 +3743,7 @@ function DappImportAssetSelectStep({
|
|
|
3731
3743
|
);
|
|
3732
3744
|
}) })
|
|
3733
3745
|
] }),
|
|
3734
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
3735
3747
|
] });
|
|
3736
3748
|
}
|
|
3737
3749
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -3748,9 +3760,9 @@ function DappImportAssetSelectSkeleton({
|
|
|
3748
3760
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
3749
3761
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3750
3762
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3751
|
-
|
|
3763
|
+
_chunkPDFLALUTcjs.BodyHeader,
|
|
3752
3764
|
{
|
|
3753
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3765
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.WalletIcon, {}),
|
|
3754
3766
|
title: `Transfer from ${sourceLabel}`,
|
|
3755
3767
|
subtitle: "Pick the balance to import"
|
|
3756
3768
|
}
|
|
@@ -3788,7 +3800,7 @@ function DappImportAssetSelectSkeleton({
|
|
|
3788
3800
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
|
|
3789
3801
|
}
|
|
3790
3802
|
) }),
|
|
3791
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3803
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
3792
3804
|
] });
|
|
3793
3805
|
}
|
|
3794
3806
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -4917,15 +4929,15 @@ var SetupError = class extends Error {
|
|
|
4917
4929
|
}
|
|
4918
4930
|
};
|
|
4919
4931
|
async function resolveSessionOwner(eoaAddress) {
|
|
4920
|
-
const local =
|
|
4932
|
+
const local = _chunkPDFLALUTcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
4921
4933
|
if (local) {
|
|
4922
4934
|
return {
|
|
4923
|
-
account:
|
|
4935
|
+
account: _chunkPDFLALUTcjs.accountFromPrivateKey.call(void 0, local.privateKey),
|
|
4924
4936
|
address: local.address
|
|
4925
4937
|
};
|
|
4926
4938
|
}
|
|
4927
|
-
const created =
|
|
4928
|
-
|
|
4939
|
+
const created = _chunkPDFLALUTcjs.createSessionOwnerKey.call(void 0, );
|
|
4940
|
+
_chunkPDFLALUTcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
4929
4941
|
return { account: created.account, address: created.address };
|
|
4930
4942
|
}
|
|
4931
4943
|
function stableStringify(value) {
|
|
@@ -4993,7 +5005,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4993
5005
|
try {
|
|
4994
5006
|
const sessionOwner = await resolveSessionOwner(input.ownerAddress);
|
|
4995
5007
|
const cacheKey = computeCacheKey(input, sessionOwner.address);
|
|
4996
|
-
|
|
5008
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
4997
5009
|
owner: input.ownerAddress,
|
|
4998
5010
|
sessionOwner: sessionOwner.address,
|
|
4999
5011
|
hasPostBridgeActions: Boolean(_optionalChain([input, 'access', _131 => _131.postBridgeActions, 'optionalAccess', _132 => _132.length])),
|
|
@@ -5041,7 +5053,7 @@ async function runAccountSetup(input, deps) {
|
|
|
5041
5053
|
primaryType: typedData.primaryType,
|
|
5042
5054
|
message: typedData.message
|
|
5043
5055
|
});
|
|
5044
|
-
const sessionDetails =
|
|
5056
|
+
const sessionDetails = _chunkPDFLALUTcjs.buildSessionDetails.call(void 0,
|
|
5045
5057
|
setup.sessionDetailsUnsigned,
|
|
5046
5058
|
signature
|
|
5047
5059
|
);
|
|
@@ -5077,7 +5089,7 @@ async function runAccountSetup(input, deps) {
|
|
|
5077
5089
|
isRegistered: true
|
|
5078
5090
|
};
|
|
5079
5091
|
} catch (error) {
|
|
5080
|
-
|
|
5092
|
+
_chunkPDFLALUTcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
5081
5093
|
owner: input.ownerAddress
|
|
5082
5094
|
});
|
|
5083
5095
|
if (error instanceof SetupError) throw error;
|
|
@@ -5088,7 +5100,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
5088
5100
|
const now = Date.now();
|
|
5089
5101
|
const existing = setupRequestDedupe.get(requestKey);
|
|
5090
5102
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
5091
|
-
|
|
5103
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
5092
5104
|
owner: input.ownerAddress,
|
|
5093
5105
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
5094
5106
|
});
|
|
@@ -5376,11 +5388,11 @@ function DepositFlow({
|
|
|
5376
5388
|
onError,
|
|
5377
5389
|
debug
|
|
5378
5390
|
}) {
|
|
5379
|
-
const rpcUrls =
|
|
5380
|
-
const onStepChangeRef =
|
|
5381
|
-
const onEventRef =
|
|
5382
|
-
const onLifecycleRef =
|
|
5383
|
-
const onErrorRef =
|
|
5391
|
+
const rpcUrls = _chunkPDFLALUTcjs.useRpcUrls.call(void 0, );
|
|
5392
|
+
const onStepChangeRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onStepChange);
|
|
5393
|
+
const onEventRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onEvent);
|
|
5394
|
+
const onLifecycleRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onLifecycle);
|
|
5395
|
+
const onErrorRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onError);
|
|
5384
5396
|
const storeApi = useDepositStoreApi();
|
|
5385
5397
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
5386
5398
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -5396,13 +5408,13 @@ function DepositFlow({
|
|
|
5396
5408
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
5397
5409
|
const logFlow = _react.useCallback.call(void 0,
|
|
5398
5410
|
(message, data) => {
|
|
5399
|
-
|
|
5411
|
+
_chunkPDFLALUTcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
5400
5412
|
},
|
|
5401
5413
|
[debug]
|
|
5402
5414
|
);
|
|
5403
5415
|
const logFlowError = _react.useCallback.call(void 0,
|
|
5404
5416
|
(message, error, data) => {
|
|
5405
|
-
|
|
5417
|
+
_chunkPDFLALUTcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
5406
5418
|
},
|
|
5407
5419
|
[debug]
|
|
5408
5420
|
);
|
|
@@ -5516,7 +5528,7 @@ function DepositFlow({
|
|
|
5516
5528
|
return {
|
|
5517
5529
|
ownerAddress: dappAddress,
|
|
5518
5530
|
walletClient: void 0,
|
|
5519
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5531
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
5520
5532
|
switchChain: void 0
|
|
5521
5533
|
};
|
|
5522
5534
|
}
|
|
@@ -5525,7 +5537,7 @@ function DepositFlow({
|
|
|
5525
5537
|
return {
|
|
5526
5538
|
ownerAddress: dappWalletClient.account.address,
|
|
5527
5539
|
walletClient: dappWalletClient,
|
|
5528
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5540
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
5529
5541
|
switchChain: dappSwitchChain
|
|
5530
5542
|
};
|
|
5531
5543
|
}
|
|
@@ -5539,7 +5551,7 @@ function DepositFlow({
|
|
|
5539
5551
|
return {
|
|
5540
5552
|
ownerAddress: dappAddress,
|
|
5541
5553
|
walletClient: void 0,
|
|
5542
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5554
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
5543
5555
|
switchChain: void 0
|
|
5544
5556
|
};
|
|
5545
5557
|
}
|
|
@@ -5548,7 +5560,7 @@ function DepositFlow({
|
|
|
5548
5560
|
return {
|
|
5549
5561
|
ownerAddress: dappWalletClient.account.address,
|
|
5550
5562
|
walletClient: dappWalletClient,
|
|
5551
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5563
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
5552
5564
|
switchChain: dappSwitchChain
|
|
5553
5565
|
};
|
|
5554
5566
|
}
|
|
@@ -5556,7 +5568,7 @@ function DepositFlow({
|
|
|
5556
5568
|
return {
|
|
5557
5569
|
ownerAddress: reownWallet.address,
|
|
5558
5570
|
walletClient: reownWallet.walletClient,
|
|
5559
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
5571
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
5560
5572
|
switchChain: reownWallet.switchChain
|
|
5561
5573
|
};
|
|
5562
5574
|
}
|
|
@@ -5595,7 +5607,7 @@ function DepositFlow({
|
|
|
5595
5607
|
return {
|
|
5596
5608
|
ownerAddress: dappAddress,
|
|
5597
5609
|
walletClient: void 0,
|
|
5598
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5610
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPDFLALUTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
5599
5611
|
switchChain: void 0
|
|
5600
5612
|
};
|
|
5601
5613
|
}
|
|
@@ -5914,7 +5926,7 @@ function DepositFlow({
|
|
|
5914
5926
|
eoa: dappImportOwner,
|
|
5915
5927
|
getPublicClient: (chainId) => {
|
|
5916
5928
|
try {
|
|
5917
|
-
return
|
|
5929
|
+
return _chunkPDFLALUTcjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
5918
5930
|
} catch (e28) {
|
|
5919
5931
|
return null;
|
|
5920
5932
|
}
|
|
@@ -6182,7 +6194,7 @@ function DepositFlow({
|
|
|
6182
6194
|
try {
|
|
6183
6195
|
sessionOwner = await resolveSessionOwner(owner);
|
|
6184
6196
|
} catch (error) {
|
|
6185
|
-
|
|
6197
|
+
_chunkPDFLALUTcjs.debugError.call(void 0,
|
|
6186
6198
|
debug,
|
|
6187
6199
|
"deposit-flow",
|
|
6188
6200
|
"session-owner:resolve-failed",
|
|
@@ -6550,7 +6562,7 @@ function DepositFlow({
|
|
|
6550
6562
|
);
|
|
6551
6563
|
if (showConnectStep) {
|
|
6552
6564
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6553
|
-
|
|
6565
|
+
_chunkPDFLALUTcjs.ConnectStep,
|
|
6554
6566
|
{
|
|
6555
6567
|
walletRows,
|
|
6556
6568
|
transferCryptoState: dappAddress ? transferCryptoState : void 0,
|
|
@@ -6680,7 +6692,7 @@ function DepositFlow({
|
|
|
6680
6692
|
}
|
|
6681
6693
|
),
|
|
6682
6694
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6683
|
-
|
|
6695
|
+
_chunkPDFLALUTcjs.ProcessingStep,
|
|
6684
6696
|
{
|
|
6685
6697
|
smartAccount: step.smartAccount,
|
|
6686
6698
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6748,7 +6760,7 @@ function DepositFlow({
|
|
|
6748
6760
|
}
|
|
6749
6761
|
),
|
|
6750
6762
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6751
|
-
|
|
6763
|
+
_chunkPDFLALUTcjs.ProcessingStep,
|
|
6752
6764
|
{
|
|
6753
6765
|
smartAccount: step.smartAccount,
|
|
6754
6766
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6879,7 +6891,7 @@ function DepositFlow({
|
|
|
6879
6891
|
) })
|
|
6880
6892
|
] }) : null,
|
|
6881
6893
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6882
|
-
|
|
6894
|
+
_chunkPDFLALUTcjs.ProcessingStep,
|
|
6883
6895
|
{
|
|
6884
6896
|
smartAccount: effectiveStep.smartAccount,
|
|
6885
6897
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -6932,7 +6944,7 @@ function DepositFlow({
|
|
|
6932
6944
|
if (_optionalChain([signerContext, 'access', _242 => _242.publicClient, 'access', _243 => _243.chain, 'optionalAccess', _244 => _244.id]) === chainId) {
|
|
6933
6945
|
return signerContext.publicClient;
|
|
6934
6946
|
}
|
|
6935
|
-
return
|
|
6947
|
+
return _chunkPDFLALUTcjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
6936
6948
|
};
|
|
6937
6949
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
6938
6950
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7041,7 +7053,7 @@ function DepositFlow({
|
|
|
7041
7053
|
}
|
|
7042
7054
|
),
|
|
7043
7055
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7044
|
-
|
|
7056
|
+
_chunkPDFLALUTcjs.ProcessingStep,
|
|
7045
7057
|
{
|
|
7046
7058
|
smartAccount: effectiveStep.smartAccount,
|
|
7047
7059
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -7215,7 +7227,7 @@ function DepositHistoryPanel({
|
|
|
7215
7227
|
className: "rs-modal-header-back",
|
|
7216
7228
|
"aria-label": "Back",
|
|
7217
7229
|
onClick: onClose,
|
|
7218
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7230
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronLeftIcon, {})
|
|
7219
7231
|
}
|
|
7220
7232
|
) }),
|
|
7221
7233
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7225,29 +7237,29 @@ function DepositHistoryPanel({
|
|
|
7225
7237
|
className: "rs-modal-close",
|
|
7226
7238
|
"aria-label": "Close",
|
|
7227
7239
|
onClick: onCloseModal,
|
|
7228
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7240
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CloseIcon, {})
|
|
7229
7241
|
}
|
|
7230
7242
|
) })
|
|
7231
7243
|
] }),
|
|
7232
7244
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
|
|
7233
7245
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
|
|
7234
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7246
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.HistoryIcon, {}), title: "History" }),
|
|
7235
7247
|
isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7236
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7248
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.HistoryIcon, {}) }),
|
|
7237
7249
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7238
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7250
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
7239
7251
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7240
7252
|
] })
|
|
7241
7253
|
] }),
|
|
7242
7254
|
error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7243
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7255
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.AlertTriangleIcon, {}) }),
|
|
7244
7256
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7245
7257
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7246
7258
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
|
|
7247
7259
|
] })
|
|
7248
7260
|
] }),
|
|
7249
7261
|
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7250
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7262
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.HistoryIcon, {}) }),
|
|
7251
7263
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7252
7264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7253
7265
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
@@ -7267,7 +7279,7 @@ function DepositHistoryPanel({
|
|
|
7267
7279
|
)
|
|
7268
7280
|
] })
|
|
7269
7281
|
] }),
|
|
7270
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7282
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.PoweredBy, {})
|
|
7271
7283
|
] })
|
|
7272
7284
|
]
|
|
7273
7285
|
}
|
|
@@ -7342,7 +7354,7 @@ function HistoryCard({ deposit }) {
|
|
|
7342
7354
|
onClick: (e) => e.stopPropagation(),
|
|
7343
7355
|
children: [
|
|
7344
7356
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7345
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7357
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ArrowUpRightIcon, {})
|
|
7346
7358
|
]
|
|
7347
7359
|
}
|
|
7348
7360
|
)
|
|
@@ -7357,7 +7369,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7357
7369
|
// src/DepositModal.tsx
|
|
7358
7370
|
|
|
7359
7371
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
7360
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
7372
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-HWKF3O62.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
7361
7373
|
);
|
|
7362
7374
|
function sortByCreatedAtDesc(items) {
|
|
7363
7375
|
return [...items].sort((a, b) => {
|
|
@@ -7407,7 +7419,7 @@ function DepositModalInner({
|
|
|
7407
7419
|
recipient,
|
|
7408
7420
|
appBalanceUsd,
|
|
7409
7421
|
backendUrl = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL,
|
|
7410
|
-
rpcUrls,
|
|
7422
|
+
rpcUrls: rpcUrlsProp,
|
|
7411
7423
|
signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
|
|
7412
7424
|
sessionChainIds,
|
|
7413
7425
|
forceRegister = false,
|
|
@@ -7436,7 +7448,7 @@ function DepositModalInner({
|
|
|
7436
7448
|
debug
|
|
7437
7449
|
}) {
|
|
7438
7450
|
const modalRef = _react.useRef.call(void 0, null);
|
|
7439
|
-
const onReadyRef =
|
|
7451
|
+
const onReadyRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onReady);
|
|
7440
7452
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
7441
7453
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
7442
7454
|
void 0
|
|
@@ -7454,15 +7466,16 @@ function DepositModalInner({
|
|
|
7454
7466
|
const historyLoadedRef = _react.useRef.call(void 0, false);
|
|
7455
7467
|
const targetChain = targetChainProp === "solana" ? "solana" : _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
|
|
7456
7468
|
const sourceChain = sourceChainProp ? _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
7469
|
+
const rpcUrls = _chunkPDFLALUTcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
7457
7470
|
const [recipientIsContract, setRecipientIsContract] = _react.useState.call(void 0, false);
|
|
7458
|
-
const onErrorRef =
|
|
7471
|
+
const onErrorRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onError);
|
|
7459
7472
|
_react.useEffect.call(void 0, () => {
|
|
7460
7473
|
if (targetChain !== _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID || !_viem.isAddress.call(void 0, recipient, { strict: false })) {
|
|
7461
7474
|
setRecipientIsContract(false);
|
|
7462
7475
|
return;
|
|
7463
7476
|
}
|
|
7464
7477
|
let cancelled = false;
|
|
7465
|
-
|
|
7478
|
+
_chunkPDFLALUTcjs.getHyperEvmReadClient.call(void 0, rpcUrls).getCode({ address: recipient }).then((code) => {
|
|
7466
7479
|
if (cancelled) return;
|
|
7467
7480
|
const isContract = _chunkABVRVW3Pcjs.isContractBytecode.call(void 0, code);
|
|
7468
7481
|
setRecipientIsContract(isContract);
|
|
@@ -7480,7 +7493,7 @@ function DepositModalInner({
|
|
|
7480
7493
|
};
|
|
7481
7494
|
}, [targetChain, recipient, onErrorRef, rpcUrls]);
|
|
7482
7495
|
const service = _react.useMemo.call(void 0,
|
|
7483
|
-
() =>
|
|
7496
|
+
() => _chunkPDFLALUTcjs.createDepositService.call(void 0, backendUrl, {
|
|
7484
7497
|
debug,
|
|
7485
7498
|
debugScope: "service:deposit"
|
|
7486
7499
|
}),
|
|
@@ -7496,7 +7509,7 @@ function DepositModalInner({
|
|
|
7496
7509
|
}, [store, targetChain, targetToken]);
|
|
7497
7510
|
_react.useEffect.call(void 0, () => {
|
|
7498
7511
|
if (isOpen && modalRef.current) {
|
|
7499
|
-
|
|
7512
|
+
_chunkPDFLALUTcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
7500
7513
|
}
|
|
7501
7514
|
}, [isOpen, theme]);
|
|
7502
7515
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7577,7 +7590,7 @@ function DepositModalInner({
|
|
|
7577
7590
|
fetchHistory("initial");
|
|
7578
7591
|
}
|
|
7579
7592
|
}, [historyOpen, fetchHistory]);
|
|
7580
|
-
const onLifecycleRef =
|
|
7593
|
+
const onLifecycleRef = _chunkPDFLALUTcjs.useLatestRef.call(void 0, onLifecycle);
|
|
7581
7594
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
7582
7595
|
(event) => {
|
|
7583
7596
|
_optionalChain([onLifecycleRef, 'access', _258 => _258.current, 'optionalCall', _259 => _259(event)]);
|
|
@@ -7608,8 +7621,8 @@ function DepositModalInner({
|
|
|
7608
7621
|
}, [isOpen, store]);
|
|
7609
7622
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _260 => _260.showBackButton]), () => ( true));
|
|
7610
7623
|
const canGoBack = backHandler !== void 0;
|
|
7611
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7612
|
-
|
|
7624
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7625
|
+
_chunkPDFLALUTcjs.Modal,
|
|
7613
7626
|
{
|
|
7614
7627
|
isOpen,
|
|
7615
7628
|
onClose,
|
|
@@ -7625,7 +7638,7 @@ function DepositModalInner({
|
|
|
7625
7638
|
className: "rs-modal-header-back",
|
|
7626
7639
|
"aria-label": "Go back",
|
|
7627
7640
|
onClick: backHandler,
|
|
7628
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7641
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.ChevronLeftIcon, {})
|
|
7629
7642
|
}
|
|
7630
7643
|
) }),
|
|
7631
7644
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
@@ -7637,7 +7650,7 @@ function DepositModalInner({
|
|
|
7637
7650
|
"aria-label": "Deposit history",
|
|
7638
7651
|
onClick: handleHistoryOpen,
|
|
7639
7652
|
disabled: !recipient,
|
|
7640
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7653
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.HistoryIcon, {})
|
|
7641
7654
|
}
|
|
7642
7655
|
),
|
|
7643
7656
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7647,12 +7660,12 @@ function DepositModalInner({
|
|
|
7647
7660
|
onClick: onClose,
|
|
7648
7661
|
className: "rs-modal-close",
|
|
7649
7662
|
"aria-label": "Close",
|
|
7650
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7663
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.CloseIcon, {})
|
|
7651
7664
|
}
|
|
7652
7665
|
)
|
|
7653
7666
|
] })
|
|
7654
7667
|
] }),
|
|
7655
|
-
recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7668
|
+
recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPDFLALUTcjs.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,
|
|
7656
7669
|
DepositFlow,
|
|
7657
7670
|
{
|
|
7658
7671
|
dappWalletClient,
|