@rhinestone/deposit-modal 0.3.0-alpha.13 → 0.3.0-alpha.14
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-CXPRZRXL.cjs → DepositModalReown-4I47KSPN.cjs} +6 -6
- package/dist/{DepositModalReown-HBAWSK6K.mjs → DepositModalReown-DIUIB3MU.mjs} +3 -3
- package/dist/{QRCode-KG47KTGX.cjs → QRCode-5DXFNKI2.cjs} +1 -1
- package/dist/{QRCode-YJ3EGWQS.mjs → QRCode-WUC652SH.mjs} +1 -1
- package/dist/{WithdrawModalReown-EEWQRENY.mjs → WithdrawModalReown-WRUEALDP.mjs} +3 -3
- package/dist/{WithdrawModalReown-T3TPJIME.cjs → WithdrawModalReown-Y3NRAKXJ.cjs} +6 -6
- package/dist/{chunk-6RCOF3XU.cjs → chunk-2NUXDEEO.cjs} +57 -57
- package/dist/{chunk-SEOQ66FW.cjs → chunk-3CYGTYMY.cjs} +228 -222
- package/dist/{chunk-6K4JHM2D.mjs → chunk-4ZN726P5.mjs} +2 -4
- package/dist/{chunk-YB3JPWJW.mjs → chunk-JTMGFWXO.mjs} +1 -1
- package/dist/{chunk-PWV2UJP3.cjs → chunk-JTULAFMU.cjs} +2 -2
- package/dist/{chunk-DZNXG5JK.cjs → chunk-N4XRQPVA.cjs} +2 -4
- package/dist/{chunk-EC63ZHY4.mjs → chunk-VD4WTEHP.mjs} +2 -2
- package/dist/{chunk-HZBO2SIZ.mjs → chunk-XG474KUR.mjs} +46 -40
- 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 +60 -65
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkN4XRQPVAcjs = require('./chunk-N4XRQPVA.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
@@ -120,13 +120,13 @@ function AssetSelectStep({
|
|
|
120
120
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
121
121
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
122
122
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
123
|
-
return
|
|
123
|
+
return _chunkN4XRQPVAcjs.getAssetId.call(void 0, {
|
|
124
124
|
chainId: defaultSourceChain,
|
|
125
125
|
token: defaultSourceToken
|
|
126
126
|
});
|
|
127
127
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
128
|
-
const onTotalBalanceComputedRef =
|
|
129
|
-
const onAssetsLoadedRef =
|
|
128
|
+
const onTotalBalanceComputedRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
129
|
+
const onAssetsLoadedRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onAssetsLoaded);
|
|
130
130
|
_react.useEffect.call(void 0, () => {
|
|
131
131
|
let active = true;
|
|
132
132
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -147,7 +147,7 @@ function AssetSelectStep({
|
|
|
147
147
|
try {
|
|
148
148
|
const portfolio = await service.fetchPortfolio(address);
|
|
149
149
|
if (!active) return;
|
|
150
|
-
const portfolioAssets =
|
|
150
|
+
const portfolioAssets = _chunkN4XRQPVAcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
151
151
|
setAssets(portfolioAssets);
|
|
152
152
|
emitAssetsUpdate(portfolioAssets);
|
|
153
153
|
const hasNative = portfolioAssets.some(
|
|
@@ -223,7 +223,7 @@ function AssetSelectStep({
|
|
|
223
223
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
224
224
|
const numeric = Number(raw);
|
|
225
225
|
if (!Number.isFinite(numeric)) return raw;
|
|
226
|
-
return
|
|
226
|
+
return _chunkN4XRQPVAcjs.tokenFormatter.format(numeric);
|
|
227
227
|
} catch (e3) {
|
|
228
228
|
return asset.balance;
|
|
229
229
|
}
|
|
@@ -231,20 +231,20 @@ function AssetSelectStep({
|
|
|
231
231
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
232
232
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
233
233
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
234
|
-
|
|
234
|
+
_chunkN4XRQPVAcjs.BodyHeader,
|
|
235
235
|
{
|
|
236
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
236
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}),
|
|
237
237
|
title: "Your assets",
|
|
238
238
|
subtitle: "Select source assets to transfer"
|
|
239
239
|
}
|
|
240
240
|
),
|
|
241
241
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
242
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
242
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
243
243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
244
244
|
] }),
|
|
245
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
245
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
246
246
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
247
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
247
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
248
248
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
249
249
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
250
250
|
address.slice(0, 6),
|
|
@@ -311,14 +311,14 @@ function AssetSelectStep({
|
|
|
311
311
|
] })
|
|
312
312
|
] })
|
|
313
313
|
] }),
|
|
314
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
314
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkN4XRQPVAcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
315
315
|
]
|
|
316
316
|
},
|
|
317
317
|
asset.id
|
|
318
318
|
);
|
|
319
319
|
}) }),
|
|
320
320
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
321
|
-
|
|
321
|
+
_chunkN4XRQPVAcjs.Button,
|
|
322
322
|
{
|
|
323
323
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
324
324
|
disabled: !selectedAsset,
|
|
@@ -327,7 +327,7 @@ function AssetSelectStep({
|
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] }),
|
|
330
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
330
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
331
331
|
] });
|
|
332
332
|
}
|
|
333
333
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
@@ -335,7 +335,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
335
335
|
const connectedChainId = _optionalChain([publicClient, 'access', _9 => _9.chain, 'optionalAccess', _10 => _10.id]);
|
|
336
336
|
if (!connectedChainId) return [];
|
|
337
337
|
if (!_chunk7JIDIX27cjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
338
|
-
const id =
|
|
338
|
+
const id = _chunkN4XRQPVAcjs.getAssetId.call(void 0, {
|
|
339
339
|
chainId: connectedChainId,
|
|
340
340
|
token: _chunk7JIDIX27cjs.NATIVE_TOKEN_ADDRESS
|
|
341
341
|
});
|
|
@@ -532,7 +532,7 @@ function AmountStep({
|
|
|
532
532
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
533
533
|
if (!balanceTarget || !publicClient) return;
|
|
534
534
|
try {
|
|
535
|
-
const bal =
|
|
535
|
+
const bal = _chunkN4XRQPVAcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
536
536
|
address: asset.token,
|
|
537
537
|
abi: _viem.erc20Abi,
|
|
538
538
|
functionName: "balanceOf",
|
|
@@ -553,7 +553,7 @@ function AmountStep({
|
|
|
553
553
|
hasAttemptedSwitch.current = true;
|
|
554
554
|
switchChain(asset.chainId).catch((err) => {
|
|
555
555
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
556
|
-
setError(
|
|
556
|
+
setError(_chunkN4XRQPVAcjs.formatUserError.call(void 0, raw));
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -606,7 +606,7 @@ function AmountStep({
|
|
|
606
606
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
607
607
|
const numeric = Number(raw);
|
|
608
608
|
if (!Number.isFinite(numeric)) return raw;
|
|
609
|
-
return
|
|
609
|
+
return _chunkN4XRQPVAcjs.tokenFormatter.format(numeric);
|
|
610
610
|
} catch (e8) {
|
|
611
611
|
return "\u2026";
|
|
612
612
|
}
|
|
@@ -725,7 +725,7 @@ function AmountStep({
|
|
|
725
725
|
const targetTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol);
|
|
726
726
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
727
727
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
729
729
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
730
730
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
731
731
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -745,13 +745,13 @@ function AmountStep({
|
|
|
745
745
|
" available",
|
|
746
746
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
747
747
|
" (~",
|
|
748
|
-
|
|
748
|
+
_chunkN4XRQPVAcjs.currencyFormatter.format(balanceUsd),
|
|
749
749
|
")"
|
|
750
750
|
] })
|
|
751
751
|
] }),
|
|
752
752
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
753
753
|
"Min. deposit ",
|
|
754
|
-
|
|
754
|
+
_chunkN4XRQPVAcjs.currencyFormatter.format(minDepositUsd)
|
|
755
755
|
] })
|
|
756
756
|
] })
|
|
757
757
|
] }),
|
|
@@ -792,12 +792,12 @@ function AmountStep({
|
|
|
792
792
|
] }),
|
|
793
793
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
794
794
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
795
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
795
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkN4XRQPVAcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
796
796
|
] })
|
|
797
797
|
] }),
|
|
798
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
798
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
799
799
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
800
|
-
|
|
800
|
+
_chunkN4XRQPVAcjs.Button,
|
|
801
801
|
{
|
|
802
802
|
onClick: handleContinue,
|
|
803
803
|
fullWidth: true,
|
|
@@ -808,7 +808,7 @@ function AmountStep({
|
|
|
808
808
|
}
|
|
809
809
|
)
|
|
810
810
|
] }),
|
|
811
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
811
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
812
812
|
] });
|
|
813
813
|
}
|
|
814
814
|
|
|
@@ -879,7 +879,7 @@ function ConfirmStep({
|
|
|
879
879
|
hasAttemptedSwitch.current = true;
|
|
880
880
|
switchChain(asset.chainId).catch((err) => {
|
|
881
881
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
882
|
-
setError(
|
|
882
|
+
setError(_chunkN4XRQPVAcjs.formatUserError.call(void 0, raw));
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -926,7 +926,7 @@ function ConfirmStep({
|
|
|
926
926
|
const result = await executeTransfer(amountUnits);
|
|
927
927
|
hash = result.txHash;
|
|
928
928
|
resolvedSourceToken = result.sourceToken;
|
|
929
|
-
} else if (
|
|
929
|
+
} else if (_chunkN4XRQPVAcjs.isNativeAsset.call(void 0, asset)) {
|
|
930
930
|
hash = await walletClient.sendTransaction({
|
|
931
931
|
account,
|
|
932
932
|
chain,
|
|
@@ -947,7 +947,7 @@ function ConfirmStep({
|
|
|
947
947
|
onConfirm(hash, asset.chainId, amountUnits.toString(), resolvedSourceToken);
|
|
948
948
|
} catch (err) {
|
|
949
949
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
950
|
-
const message =
|
|
950
|
+
const message = _chunkN4XRQPVAcjs.formatUserError.call(void 0, raw);
|
|
951
951
|
setError(message);
|
|
952
952
|
_optionalChain([onError, 'optionalCall', _28 => _28(message, "TRANSFER_ERROR")]);
|
|
953
953
|
} finally {
|
|
@@ -956,7 +956,7 @@ function ConfirmStep({
|
|
|
956
956
|
};
|
|
957
957
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
958
958
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
959
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
959
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
960
960
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
961
961
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
962
962
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -1008,13 +1008,13 @@ function ConfirmStep({
|
|
|
1008
1008
|
children: "$0.04"
|
|
1009
1009
|
}
|
|
1010
1010
|
),
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.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, _chunkN4XRQPVAcjs.InfoIcon, {}) }) })
|
|
1012
1012
|
] })
|
|
1013
1013
|
] })
|
|
1014
1014
|
] }),
|
|
1015
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1015
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
1016
1016
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1017
|
-
|
|
1017
|
+
_chunkN4XRQPVAcjs.Button,
|
|
1018
1018
|
{
|
|
1019
1019
|
onClick: handleConfirm,
|
|
1020
1020
|
loading: isSubmitting,
|
|
@@ -1025,7 +1025,7 @@ function ConfirmStep({
|
|
|
1025
1025
|
}
|
|
1026
1026
|
)
|
|
1027
1027
|
] }),
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
1029
1029
|
] });
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
@@ -1048,9 +1048,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
1048
1048
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1049
1049
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
1050
1050
|
function isEventForTx(event, txHash) {
|
|
1051
|
-
const eventTxHash =
|
|
1051
|
+
const eventTxHash = _chunkN4XRQPVAcjs.getEventTxHash.call(void 0, event);
|
|
1052
1052
|
if (!eventTxHash) return false;
|
|
1053
|
-
return
|
|
1053
|
+
return _chunkN4XRQPVAcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
1054
1054
|
}
|
|
1055
1055
|
function truncateHash(hash) {
|
|
1056
1056
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -1100,7 +1100,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return "Bridge failed";
|
|
1102
1102
|
}
|
|
1103
|
-
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1103
|
+
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1104
1104
|
function DepositNotification({
|
|
1105
1105
|
deposit,
|
|
1106
1106
|
smartAccount,
|
|
@@ -1127,7 +1127,7 @@ function DepositNotification({
|
|
|
1127
1127
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
1128
1128
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
1129
1129
|
const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
|
|
1130
|
-
const depositContextRef =
|
|
1130
|
+
const depositContextRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, {
|
|
1131
1131
|
amount,
|
|
1132
1132
|
sourceChain,
|
|
1133
1133
|
sourceToken: token,
|
|
@@ -1135,8 +1135,8 @@ function DepositNotification({
|
|
|
1135
1135
|
targetToken,
|
|
1136
1136
|
hasPostBridgeActions
|
|
1137
1137
|
});
|
|
1138
|
-
const onCompleteRef =
|
|
1139
|
-
const onFailedRef =
|
|
1138
|
+
const onCompleteRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onComplete);
|
|
1139
|
+
const onFailedRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onFailed);
|
|
1140
1140
|
const handleComplete = _react.useCallback.call(void 0,
|
|
1141
1141
|
(destTxHash) => {
|
|
1142
1142
|
if (completedRef.current) return;
|
|
@@ -1240,7 +1240,38 @@ function DepositNotification({
|
|
|
1240
1240
|
const destExplorerUrl = destinationTxHash ? _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1241
1241
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1242
1242
|
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.";
|
|
1243
|
-
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,
|
|
1243
|
+
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, _chunkN4XRQPVAcjs.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, _chunkN4XRQPVAcjs.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,
|
|
1244
|
+
"svg",
|
|
1245
|
+
{
|
|
1246
|
+
className: "rs-deposit-notification-spinner",
|
|
1247
|
+
viewBox: "0 0 44 44",
|
|
1248
|
+
fill: "none",
|
|
1249
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1250
|
+
"aria-hidden": "true",
|
|
1251
|
+
children: [
|
|
1252
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1253
|
+
"path",
|
|
1254
|
+
{
|
|
1255
|
+
className: "rs-deposit-notification-spinner-track",
|
|
1256
|
+
d: "M21.5882 42.1765C32.9588 42.1765 42.1765 32.9588 42.1765 21.5882C42.1765 10.2177 32.9588 1 21.5882 1C10.2177 1 1 10.2177 1 21.5882C1 32.9588 10.2177 42.1765 21.5882 42.1765Z",
|
|
1257
|
+
stroke: "#D4D4D8",
|
|
1258
|
+
strokeWidth: "2",
|
|
1259
|
+
strokeLinecap: "round"
|
|
1260
|
+
}
|
|
1261
|
+
),
|
|
1262
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1263
|
+
"path",
|
|
1264
|
+
{
|
|
1265
|
+
className: "rs-deposit-notification-spinner-head",
|
|
1266
|
+
d: "M28.0422 2.03186C31.4239 3.1515 34.458 5.1279 36.8489 7.76854C39.2398 10.4092 40.906 13.624 41.6852 17.1",
|
|
1267
|
+
stroke: "#52525C",
|
|
1268
|
+
strokeWidth: "2",
|
|
1269
|
+
strokeLinecap: "round"
|
|
1270
|
+
}
|
|
1271
|
+
)
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
) });
|
|
1244
1275
|
const showClose = status !== "processing";
|
|
1245
1276
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1246
1277
|
"div",
|
|
@@ -1259,7 +1290,7 @@ function DepositNotification({
|
|
|
1259
1290
|
className: "rs-deposit-notification-close",
|
|
1260
1291
|
onClick: () => onDismiss(deposit.id),
|
|
1261
1292
|
"aria-label": "Dismiss",
|
|
1262
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1293
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CloseIcon, {})
|
|
1263
1294
|
}
|
|
1264
1295
|
)
|
|
1265
1296
|
] }),
|
|
@@ -1275,7 +1306,7 @@ function DepositNotification({
|
|
|
1275
1306
|
"aria-expanded": expanded,
|
|
1276
1307
|
children: [
|
|
1277
1308
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
1278
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1309
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1279
1310
|
]
|
|
1280
1311
|
}
|
|
1281
1312
|
),
|
|
@@ -1329,7 +1360,7 @@ function DepositNotification({
|
|
|
1329
1360
|
// src/components/steps/DepositAddressStep.tsx
|
|
1330
1361
|
|
|
1331
1362
|
var QRCode = _react.lazy.call(void 0,
|
|
1332
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./QRCode-
|
|
1363
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./QRCode-5DXFNKI2.cjs"))).then((m) => ({ default: m.QRCode }))
|
|
1333
1364
|
);
|
|
1334
1365
|
var POLL_INTERVAL_MS = 4e3;
|
|
1335
1366
|
function isRecord(value) {
|
|
@@ -1418,7 +1449,6 @@ function pickFallbackToken(tokens, current) {
|
|
|
1418
1449
|
function DepositAddressStep({
|
|
1419
1450
|
smartAccount,
|
|
1420
1451
|
solanaDepositAddress,
|
|
1421
|
-
isUpdating = false,
|
|
1422
1452
|
service,
|
|
1423
1453
|
allowedRoutes,
|
|
1424
1454
|
targetChain,
|
|
@@ -1544,7 +1574,6 @@ function DepositAddressStep({
|
|
|
1544
1574
|
};
|
|
1545
1575
|
}, [chainDropdownOpen, tokenDropdownOpen]);
|
|
1546
1576
|
const handleCopy = _react.useCallback.call(void 0, async () => {
|
|
1547
|
-
if (isUpdating) return;
|
|
1548
1577
|
_optionalChain([onCopyAddress, 'optionalCall', _65 => _65()]);
|
|
1549
1578
|
try {
|
|
1550
1579
|
await navigator.clipboard.writeText(displayAddress);
|
|
@@ -1562,7 +1591,7 @@ function DepositAddressStep({
|
|
|
1562
1591
|
setCopied(true);
|
|
1563
1592
|
setTimeout(() => setCopied(false), 2e3);
|
|
1564
1593
|
}
|
|
1565
|
-
}, [displayAddress, onCopyAddress
|
|
1594
|
+
}, [displayAddress, onCopyAddress]);
|
|
1566
1595
|
const handleSelectChain = _react.useCallback.call(void 0,
|
|
1567
1596
|
(nextChain) => {
|
|
1568
1597
|
const nextTokens = computeTokensForChain(nextChain, allowedTokenSet);
|
|
@@ -1624,10 +1653,10 @@ function DepositAddressStep({
|
|
|
1624
1653
|
return;
|
|
1625
1654
|
}
|
|
1626
1655
|
const event = status.lastEvent;
|
|
1627
|
-
const eventTxHash =
|
|
1656
|
+
const eventTxHash = _chunkN4XRQPVAcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkN4XRQPVAcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
1628
1657
|
if (baselineTxHashRef.current === void 0) {
|
|
1629
1658
|
baselineTxHashRef.current = eventTxHash;
|
|
1630
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
1659
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunkN4XRQPVAcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
1631
1660
|
const details = getDepositEventDetails(event);
|
|
1632
1661
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
1633
1662
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -1700,7 +1729,7 @@ function DepositAddressStep({
|
|
|
1700
1729
|
const qrIconSrc = _chunk7JIDIX27cjs.getChainIcon.call(void 0, sourceChainId);
|
|
1701
1730
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
1702
1731
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
1703
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1704
1733
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
1705
1734
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
1706
1735
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -1724,7 +1753,7 @@ function DepositAddressStep({
|
|
|
1724
1753
|
}
|
|
1725
1754
|
),
|
|
1726
1755
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunk7JIDIX27cjs.getChainName.call(void 0, sourceChainId) }),
|
|
1727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1728
1757
|
]
|
|
1729
1758
|
}
|
|
1730
1759
|
),
|
|
@@ -1755,8 +1784,8 @@ function DepositAddressStep({
|
|
|
1755
1784
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
1756
1785
|
"Min.$",
|
|
1757
1786
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _74 => _74.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
1758
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1759
|
-
|
|
1787
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1788
|
+
_chunkN4XRQPVAcjs.InfoIcon,
|
|
1760
1789
|
{
|
|
1761
1790
|
className: "rs-deposit-address-min-icon",
|
|
1762
1791
|
"aria-hidden": "true"
|
|
@@ -1784,7 +1813,7 @@ function DepositAddressStep({
|
|
|
1784
1813
|
}
|
|
1785
1814
|
),
|
|
1786
1815
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
1787
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1816
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1788
1817
|
]
|
|
1789
1818
|
}
|
|
1790
1819
|
),
|
|
@@ -1818,45 +1847,24 @@ function DepositAddressStep({
|
|
|
1818
1847
|
{
|
|
1819
1848
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
1820
1849
|
children: [
|
|
1850
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-well", children: [
|
|
1851
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1852
|
+
_react.Suspense,
|
|
1853
|
+
{
|
|
1854
|
+
fallback: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }),
|
|
1855
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, QRCode, { value: displayAddress, size: 190, iconSrc: qrIconSrc })
|
|
1856
|
+
}
|
|
1857
|
+
) }),
|
|
1858
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
1859
|
+
] }),
|
|
1821
1860
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1822
|
-
"div",
|
|
1823
|
-
{
|
|
1824
|
-
className: `rs-deposit-address-well ${isUpdating ? "rs-deposit-address-well--updating" : ""}`,
|
|
1825
|
-
children: [
|
|
1826
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1827
|
-
_react.Suspense,
|
|
1828
|
-
{
|
|
1829
|
-
fallback: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1830
|
-
"div",
|
|
1831
|
-
{
|
|
1832
|
-
style: {
|
|
1833
|
-
width: 200,
|
|
1834
|
-
height: 200,
|
|
1835
|
-
display: "flex",
|
|
1836
|
-
alignItems: "center",
|
|
1837
|
-
justifyContent: "center"
|
|
1838
|
-
},
|
|
1839
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDZNXG5JKcjs.Spinner, {})
|
|
1840
|
-
}
|
|
1841
|
-
),
|
|
1842
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, QRCode, { value: displayAddress, size: 200, iconSrc: qrIconSrc })
|
|
1843
|
-
}
|
|
1844
|
-
) }),
|
|
1845
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
1846
|
-
]
|
|
1847
|
-
}
|
|
1848
|
-
),
|
|
1849
|
-
isUpdating ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "output", { className: "rs-deposit-address-updating", children: [
|
|
1850
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDZNXG5JKcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
1851
|
-
"Updating deposit details\u2026"
|
|
1852
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1853
1861
|
"button",
|
|
1854
1862
|
{
|
|
1855
1863
|
type: "button",
|
|
1856
1864
|
className: "rs-deposit-address-copy",
|
|
1857
1865
|
onClick: handleCopy,
|
|
1858
1866
|
children: [
|
|
1859
|
-
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1867
|
+
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CopyIcon, {}),
|
|
1860
1868
|
copied ? "Copied!" : "Copy address"
|
|
1861
1869
|
]
|
|
1862
1870
|
}
|
|
@@ -1881,16 +1889,16 @@ function DepositAddressStep({
|
|
|
1881
1889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
1882
1890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
1883
1891
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1884
|
-
|
|
1892
|
+
_chunkN4XRQPVAcjs.Tooltip,
|
|
1885
1893
|
{
|
|
1886
1894
|
className: "rs-price-impact-info",
|
|
1887
1895
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
1888
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1896
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1889
1897
|
}
|
|
1890
1898
|
)
|
|
1891
1899
|
] }),
|
|
1892
1900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1893
|
-
|
|
1901
|
+
_chunkN4XRQPVAcjs.ChevronDownIcon,
|
|
1894
1902
|
{
|
|
1895
1903
|
className: "rs-price-impact-chevron",
|
|
1896
1904
|
"aria-hidden": "true"
|
|
@@ -1901,29 +1909,29 @@ function DepositAddressStep({
|
|
|
1901
1909
|
),
|
|
1902
1910
|
/* @__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: [
|
|
1903
1911
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
1904
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1912
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PercentIcon, {}) }),
|
|
1905
1913
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
1906
1914
|
"Max slippage: ",
|
|
1907
1915
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.2%" })
|
|
1908
1916
|
] }),
|
|
1909
1917
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1910
|
-
|
|
1918
|
+
_chunkN4XRQPVAcjs.Tooltip,
|
|
1911
1919
|
{
|
|
1912
1920
|
className: "rs-price-impact-info",
|
|
1913
1921
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
1914
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1922
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1915
1923
|
}
|
|
1916
1924
|
)
|
|
1917
1925
|
] }),
|
|
1918
1926
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
1919
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1927
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ClockIcon, {}) }),
|
|
1920
1928
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
1921
1929
|
"Processing time: ",
|
|
1922
1930
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
|
|
1923
1931
|
] })
|
|
1924
1932
|
] }),
|
|
1925
1933
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
1926
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1934
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PlusCircleIcon, {}) }),
|
|
1927
1935
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
1928
1936
|
"Max deposit:",
|
|
1929
1937
|
" ",
|
|
@@ -1955,7 +1963,7 @@ function DepositAddressStep({
|
|
|
1955
1963
|
},
|
|
1956
1964
|
deposit.id
|
|
1957
1965
|
)) }),
|
|
1958
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1966
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
1959
1967
|
] });
|
|
1960
1968
|
}
|
|
1961
1969
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -1992,7 +2000,7 @@ function SwappedOrderTracker({
|
|
|
1992
2000
|
];
|
|
1993
2001
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
1994
2002
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1995
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HandCoinsIcon, {}), title }),
|
|
1996
2004
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
1997
2005
|
const status = stepStates[idx];
|
|
1998
2006
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -2006,7 +2014,7 @@ function SwappedOrderTracker({
|
|
|
2006
2014
|
{
|
|
2007
2015
|
className: "rs-swapped-tracker-step-marker",
|
|
2008
2016
|
"aria-hidden": "true",
|
|
2009
|
-
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2017
|
+
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, {}) : null
|
|
2010
2018
|
}
|
|
2011
2019
|
)
|
|
2012
2020
|
]
|
|
@@ -2033,7 +2041,7 @@ function SwappedOrderTracker({
|
|
|
2033
2041
|
}
|
|
2034
2042
|
)
|
|
2035
2043
|
] }),
|
|
2036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2044
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
2037
2045
|
] });
|
|
2038
2046
|
}
|
|
2039
2047
|
function formatTrackerAmount(amount) {
|
|
@@ -2197,10 +2205,10 @@ function SwappedIframeStep({
|
|
|
2197
2205
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
2198
2206
|
if (cancelled) return;
|
|
2199
2207
|
const event = status.lastEvent;
|
|
2200
|
-
const eventTxHash =
|
|
2208
|
+
const eventTxHash = _chunkN4XRQPVAcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkN4XRQPVAcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2201
2209
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
2202
2210
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
2203
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
2211
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkN4XRQPVAcjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
2204
2212
|
currentDepositTxHashRef.current = eventTxHash;
|
|
2205
2213
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
2206
2214
|
}
|
|
@@ -2261,10 +2269,10 @@ function SwappedIframeStep({
|
|
|
2261
2269
|
[orderState, latestEvent]
|
|
2262
2270
|
);
|
|
2263
2271
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
2264
|
-
if (
|
|
2272
|
+
if (_chunkN4XRQPVAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2265
2273
|
return {
|
|
2266
2274
|
kind: "failed",
|
|
2267
|
-
message:
|
|
2275
|
+
message: _chunkN4XRQPVAcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2268
2276
|
};
|
|
2269
2277
|
}
|
|
2270
2278
|
if (_optionalChain([orderState, 'optionalAccess', _89 => _89.status]) === "order_cancelled") {
|
|
@@ -2286,19 +2294,19 @@ function SwappedIframeStep({
|
|
|
2286
2294
|
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _91 => _91.orderCrypto]), () => ( null)),
|
|
2287
2295
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
2288
2296
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
2289
|
-
amount: _nullishCoalesce(
|
|
2297
|
+
amount: _nullishCoalesce(_chunkN4XRQPVAcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null))
|
|
2290
2298
|
});
|
|
2291
2299
|
}, [latestEvent, orderState]);
|
|
2292
2300
|
_react.useEffect.call(void 0, () => {
|
|
2293
2301
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
2294
|
-
if (!
|
|
2302
|
+
if (!_chunkN4XRQPVAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
2295
2303
|
const txHash = currentDepositTxHashRef.current;
|
|
2296
2304
|
if (!txHash) return;
|
|
2297
2305
|
failedFiredRef.current = true;
|
|
2298
2306
|
setPhase("tracker");
|
|
2299
2307
|
_optionalChain([onSwappedFailedRef, 'access', _92 => _92.current, 'optionalCall', _93 => _93(
|
|
2300
2308
|
txHash,
|
|
2301
|
-
|
|
2309
|
+
_chunkN4XRQPVAcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
2302
2310
|
)]);
|
|
2303
2311
|
}, [latestEvent]);
|
|
2304
2312
|
if (phase === "tracker") {
|
|
@@ -2317,9 +2325,9 @@ function SwappedIframeStep({
|
|
|
2317
2325
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
2318
2326
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2319
2327
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2320
|
-
|
|
2328
|
+
_chunkN4XRQPVAcjs.BodyHeader,
|
|
2321
2329
|
{
|
|
2322
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2330
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HandCoinsIcon, {}),
|
|
2323
2331
|
title: "Deposit",
|
|
2324
2332
|
subtitle: "Add money to your balance"
|
|
2325
2333
|
}
|
|
@@ -2337,7 +2345,7 @@ function SwappedIframeStep({
|
|
|
2337
2345
|
}
|
|
2338
2346
|
)
|
|
2339
2347
|
] }),
|
|
2340
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2348
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, {}) }),
|
|
2341
2349
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2342
2350
|
"iframe",
|
|
2343
2351
|
{
|
|
@@ -2352,11 +2360,11 @@ function SwappedIframeStep({
|
|
|
2352
2360
|
)
|
|
2353
2361
|
] })
|
|
2354
2362
|
] }),
|
|
2355
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2363
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
2356
2364
|
] });
|
|
2357
2365
|
}
|
|
2358
2366
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
2359
|
-
if (
|
|
2367
|
+
if (_chunkN4XRQPVAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
2360
2368
|
return ["complete", "complete", "failed", "pending"];
|
|
2361
2369
|
}
|
|
2362
2370
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -2526,7 +2534,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2526
2534
|
function ExchangeLogo({ exchange }) {
|
|
2527
2535
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
2528
2536
|
if (!exchange.logoUrl || failed) {
|
|
2529
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2537
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BankIcon, {});
|
|
2530
2538
|
}
|
|
2531
2539
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2532
2540
|
"img",
|
|
@@ -2572,14 +2580,14 @@ function ExchangeSelectStep({
|
|
|
2572
2580
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
2573
2581
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2574
2582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2575
|
-
|
|
2583
|
+
_chunkN4XRQPVAcjs.BodyHeader,
|
|
2576
2584
|
{
|
|
2577
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2585
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BankIcon, {}),
|
|
2578
2586
|
title: "Fund from Exchange",
|
|
2579
2587
|
subtitle: "Choose your exchange"
|
|
2580
2588
|
}
|
|
2581
2589
|
),
|
|
2582
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2590
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, {}) }),
|
|
2583
2591
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2584
2592
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2585
2593
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2619,7 +2627,7 @@ function ExchangeSelectStep({
|
|
|
2619
2627
|
exchange.connection
|
|
2620
2628
|
)) })
|
|
2621
2629
|
] }),
|
|
2622
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2630
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
2623
2631
|
] });
|
|
2624
2632
|
}
|
|
2625
2633
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
@@ -2649,7 +2657,7 @@ function DepositAddressSkeleton({
|
|
|
2649
2657
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2650
2658
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2651
2659
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2652
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2660
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2653
2661
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2654
2662
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
2655
2663
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -2663,7 +2671,7 @@ function DepositAddressSkeleton({
|
|
|
2663
2671
|
}
|
|
2664
2672
|
),
|
|
2665
2673
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
2666
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2674
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2667
2675
|
] })
|
|
2668
2676
|
] }),
|
|
2669
2677
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
@@ -2672,8 +2680,8 @@ function DepositAddressSkeleton({
|
|
|
2672
2680
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2673
2681
|
"Min.$",
|
|
2674
2682
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _101 => _101.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2675
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2676
|
-
|
|
2683
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2684
|
+
_chunkN4XRQPVAcjs.InfoIcon,
|
|
2677
2685
|
{
|
|
2678
2686
|
className: "rs-deposit-address-min-icon",
|
|
2679
2687
|
"aria-hidden": "true"
|
|
@@ -2691,7 +2699,7 @@ function DepositAddressSkeleton({
|
|
|
2691
2699
|
}
|
|
2692
2700
|
),
|
|
2693
2701
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
2694
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2695
2703
|
] })
|
|
2696
2704
|
] })
|
|
2697
2705
|
] }),
|
|
@@ -2712,7 +2720,7 @@ function DepositAddressSkeleton({
|
|
|
2712
2720
|
disabled: true,
|
|
2713
2721
|
"aria-hidden": "true",
|
|
2714
2722
|
children: [
|
|
2715
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2723
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CopyIcon, {}),
|
|
2716
2724
|
"Copy address"
|
|
2717
2725
|
]
|
|
2718
2726
|
}
|
|
@@ -2725,16 +2733,16 @@ function DepositAddressSkeleton({
|
|
|
2725
2733
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2726
2734
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
2727
2735
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2728
|
-
|
|
2736
|
+
_chunkN4XRQPVAcjs.Tooltip,
|
|
2729
2737
|
{
|
|
2730
2738
|
className: "rs-price-impact-info",
|
|
2731
2739
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2732
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2740
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2733
2741
|
}
|
|
2734
2742
|
)
|
|
2735
2743
|
] }),
|
|
2736
2744
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2737
|
-
|
|
2745
|
+
_chunkN4XRQPVAcjs.ChevronDownIcon,
|
|
2738
2746
|
{
|
|
2739
2747
|
className: "rs-price-impact-chevron",
|
|
2740
2748
|
"aria-hidden": "true"
|
|
@@ -2742,7 +2750,7 @@ function DepositAddressSkeleton({
|
|
|
2742
2750
|
)
|
|
2743
2751
|
] }) })
|
|
2744
2752
|
] }),
|
|
2745
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2753
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
2746
2754
|
] });
|
|
2747
2755
|
}
|
|
2748
2756
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2774,7 +2782,7 @@ function SolanaTokenSelectStep({
|
|
|
2774
2782
|
setError(null);
|
|
2775
2783
|
const portfolioBySymbol = {};
|
|
2776
2784
|
try {
|
|
2777
|
-
|
|
2785
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
2778
2786
|
solanaAddress
|
|
2779
2787
|
});
|
|
2780
2788
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -2797,12 +2805,12 @@ function SolanaTokenSelectStep({
|
|
|
2797
2805
|
};
|
|
2798
2806
|
}
|
|
2799
2807
|
}
|
|
2800
|
-
|
|
2808
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
2801
2809
|
symbols: Object.keys(portfolioBySymbol)
|
|
2802
2810
|
});
|
|
2803
2811
|
} catch (err) {
|
|
2804
2812
|
if (!active) return;
|
|
2805
|
-
|
|
2813
|
+
_chunkN4XRQPVAcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
2806
2814
|
solanaAddress
|
|
2807
2815
|
});
|
|
2808
2816
|
setError(
|
|
@@ -2849,7 +2857,7 @@ function SolanaTokenSelectStep({
|
|
|
2849
2857
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
2850
2858
|
const numeric = Number(raw);
|
|
2851
2859
|
if (!Number.isFinite(numeric)) return raw;
|
|
2852
|
-
return
|
|
2860
|
+
return _chunkN4XRQPVAcjs.tokenFormatter.format(numeric);
|
|
2853
2861
|
} catch (e19) {
|
|
2854
2862
|
return "--";
|
|
2855
2863
|
}
|
|
@@ -2859,20 +2867,20 @@ function SolanaTokenSelectStep({
|
|
|
2859
2867
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2860
2868
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2861
2869
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2862
|
-
|
|
2870
|
+
_chunkN4XRQPVAcjs.BodyHeader,
|
|
2863
2871
|
{
|
|
2864
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2872
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}),
|
|
2865
2873
|
title: "Your assets",
|
|
2866
2874
|
subtitle: "Select source assets to transfer"
|
|
2867
2875
|
}
|
|
2868
2876
|
),
|
|
2869
2877
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2870
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2878
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
2871
2879
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
2872
2880
|
] }),
|
|
2873
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2881
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
2874
2882
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
2875
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2883
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
2876
2884
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2877
2885
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
2878
2886
|
solanaAddress.slice(0, 6),
|
|
@@ -2921,14 +2929,14 @@ function SolanaTokenSelectStep({
|
|
|
2921
2929
|
] })
|
|
2922
2930
|
] })
|
|
2923
2931
|
] }),
|
|
2924
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
2932
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkN4XRQPVAcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
2925
2933
|
]
|
|
2926
2934
|
},
|
|
2927
2935
|
entry.token.symbol
|
|
2928
2936
|
);
|
|
2929
2937
|
}) }),
|
|
2930
2938
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2931
|
-
|
|
2939
|
+
_chunkN4XRQPVAcjs.Button,
|
|
2932
2940
|
{
|
|
2933
2941
|
onClick: () => selectedEntry && onContinue(
|
|
2934
2942
|
selectedEntry.token,
|
|
@@ -2941,7 +2949,7 @@ function SolanaTokenSelectStep({
|
|
|
2941
2949
|
}
|
|
2942
2950
|
)
|
|
2943
2951
|
] }),
|
|
2944
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2952
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
2945
2953
|
] });
|
|
2946
2954
|
}
|
|
2947
2955
|
|
|
@@ -2993,7 +3001,7 @@ function SolanaAmountStep({
|
|
|
2993
3001
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
2994
3002
|
const numeric = Number(raw);
|
|
2995
3003
|
if (!Number.isFinite(numeric)) return raw;
|
|
2996
|
-
return
|
|
3004
|
+
return _chunkN4XRQPVAcjs.tokenFormatter.format(numeric);
|
|
2997
3005
|
} catch (e21) {
|
|
2998
3006
|
return "\u2026";
|
|
2999
3007
|
}
|
|
@@ -3086,7 +3094,7 @@ function SolanaAmountStep({
|
|
|
3086
3094
|
const handlePresetClick = (percentage) => {
|
|
3087
3095
|
const formatted = computePresetAmount(percentage);
|
|
3088
3096
|
if (!formatted) return;
|
|
3089
|
-
|
|
3097
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
3090
3098
|
percentage,
|
|
3091
3099
|
symbol: token.symbol,
|
|
3092
3100
|
formatted
|
|
@@ -3121,7 +3129,7 @@ function SolanaAmountStep({
|
|
|
3121
3129
|
try {
|
|
3122
3130
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
3123
3131
|
} catch (e26) {
|
|
3124
|
-
|
|
3132
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
3125
3133
|
amount,
|
|
3126
3134
|
sourceAmount: sourceAmountStr,
|
|
3127
3135
|
reason: "parse-units-failed"
|
|
@@ -3136,7 +3144,7 @@ function SolanaAmountStep({
|
|
|
3136
3144
|
);
|
|
3137
3145
|
return;
|
|
3138
3146
|
}
|
|
3139
|
-
|
|
3147
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
3140
3148
|
symbol: token.symbol,
|
|
3141
3149
|
inputAmountUsd: amount,
|
|
3142
3150
|
sourceAmount: sourceAmountStr,
|
|
@@ -3150,7 +3158,7 @@ function SolanaAmountStep({
|
|
|
3150
3158
|
const sourceTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, token.symbol);
|
|
3151
3159
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3152
3160
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3153
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3161
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
3154
3162
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
3155
3163
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
3156
3164
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3170,13 +3178,13 @@ function SolanaAmountStep({
|
|
|
3170
3178
|
" available",
|
|
3171
3179
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3172
3180
|
" (~",
|
|
3173
|
-
|
|
3181
|
+
_chunkN4XRQPVAcjs.currencyFormatter.format(computedBalanceUsd),
|
|
3174
3182
|
")"
|
|
3175
3183
|
] })
|
|
3176
3184
|
] }),
|
|
3177
3185
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
3178
3186
|
"Min. deposit ",
|
|
3179
|
-
|
|
3187
|
+
_chunkN4XRQPVAcjs.currencyFormatter.format(minDepositUsd)
|
|
3180
3188
|
] })
|
|
3181
3189
|
] })
|
|
3182
3190
|
] }),
|
|
@@ -3215,12 +3223,12 @@ function SolanaAmountStep({
|
|
|
3215
3223
|
] }),
|
|
3216
3224
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
3217
3225
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
3218
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
3226
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkN4XRQPVAcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
3219
3227
|
] })
|
|
3220
3228
|
] }),
|
|
3221
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3229
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
3222
3230
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3223
|
-
|
|
3231
|
+
_chunkN4XRQPVAcjs.Button,
|
|
3224
3232
|
{
|
|
3225
3233
|
onClick: handleContinue,
|
|
3226
3234
|
fullWidth: true,
|
|
@@ -3229,7 +3237,7 @@ function SolanaAmountStep({
|
|
|
3229
3237
|
}
|
|
3230
3238
|
)
|
|
3231
3239
|
] }),
|
|
3232
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
3233
3241
|
] });
|
|
3234
3242
|
}
|
|
3235
3243
|
|
|
@@ -3396,7 +3404,7 @@ function SolanaConfirmStep({
|
|
|
3396
3404
|
const receiveAmount = isSameToken ? formattedReceiveAmount : `~${formattedReceiveAmount}`;
|
|
3397
3405
|
const handleConfirm = async () => {
|
|
3398
3406
|
if (!solanaProvider) {
|
|
3399
|
-
|
|
3407
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3400
3408
|
reason: "missing-provider"
|
|
3401
3409
|
});
|
|
3402
3410
|
setError("Solana wallet not connected");
|
|
@@ -3404,7 +3412,7 @@ function SolanaConfirmStep({
|
|
|
3404
3412
|
}
|
|
3405
3413
|
const parsedAmount = parseFloat(sourceAmount);
|
|
3406
3414
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
3407
|
-
|
|
3415
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
3408
3416
|
reason: "invalid-amount",
|
|
3409
3417
|
sourceAmount
|
|
3410
3418
|
});
|
|
@@ -3413,7 +3421,7 @@ function SolanaConfirmStep({
|
|
|
3413
3421
|
}
|
|
3414
3422
|
setError(null);
|
|
3415
3423
|
setIsSubmitting(true);
|
|
3416
|
-
|
|
3424
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
3417
3425
|
smartAccount,
|
|
3418
3426
|
solanaAddress,
|
|
3419
3427
|
solanaDepositAddress,
|
|
@@ -3423,7 +3431,7 @@ function SolanaConfirmStep({
|
|
|
3423
3431
|
});
|
|
3424
3432
|
try {
|
|
3425
3433
|
const check = await service.checkAccount(smartAccount);
|
|
3426
|
-
|
|
3434
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
3427
3435
|
smartAccount,
|
|
3428
3436
|
isRegistered: check.isRegistered,
|
|
3429
3437
|
targetChain: check.targetChain,
|
|
@@ -3436,7 +3444,7 @@ function SolanaConfirmStep({
|
|
|
3436
3444
|
}
|
|
3437
3445
|
const connection = hasConfiguredSolanaRpcUrl() ? getSolanaConnection() : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection()));
|
|
3438
3446
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
3439
|
-
|
|
3447
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
3440
3448
|
token: token.symbol,
|
|
3441
3449
|
sourceAmount,
|
|
3442
3450
|
amountUnits: amountUnits.toString()
|
|
@@ -3453,7 +3461,7 @@ function SolanaConfirmStep({
|
|
|
3453
3461
|
token.mint,
|
|
3454
3462
|
amountUnits
|
|
3455
3463
|
);
|
|
3456
|
-
|
|
3464
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
3457
3465
|
token: token.symbol,
|
|
3458
3466
|
instructionCount: transaction.instructions.length,
|
|
3459
3467
|
feePayer: _optionalChain([transaction, 'access', _113 => _113.feePayer, 'optionalAccess', _114 => _114.toBase58, 'call', _115 => _115()]),
|
|
@@ -3464,15 +3472,15 @@ function SolanaConfirmStep({
|
|
|
3464
3472
|
connection,
|
|
3465
3473
|
transaction
|
|
3466
3474
|
);
|
|
3467
|
-
|
|
3475
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
3468
3476
|
txHash,
|
|
3469
3477
|
amountUnits: amountUnits.toString()
|
|
3470
3478
|
});
|
|
3471
3479
|
onConfirm(txHash, amountUnits.toString());
|
|
3472
3480
|
} catch (err) {
|
|
3473
3481
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
3474
|
-
const message =
|
|
3475
|
-
|
|
3482
|
+
const message = _chunkN4XRQPVAcjs.formatUserError.call(void 0, raw);
|
|
3483
|
+
_chunkN4XRQPVAcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
3476
3484
|
smartAccount,
|
|
3477
3485
|
token: token.symbol,
|
|
3478
3486
|
sourceAmount
|
|
@@ -3485,7 +3493,7 @@ function SolanaConfirmStep({
|
|
|
3485
3493
|
};
|
|
3486
3494
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3487
3495
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3488
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3496
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
3489
3497
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
3490
3498
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3491
3499
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
@@ -3537,13 +3545,13 @@ function SolanaConfirmStep({
|
|
|
3537
3545
|
children: "$0.04"
|
|
3538
3546
|
}
|
|
3539
3547
|
),
|
|
3540
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3548
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.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, _chunkN4XRQPVAcjs.InfoIcon, {}) }) })
|
|
3541
3549
|
] })
|
|
3542
3550
|
] })
|
|
3543
3551
|
] }),
|
|
3544
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3552
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Callout, { variant: "error", children: error }),
|
|
3545
3553
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3546
|
-
|
|
3554
|
+
_chunkN4XRQPVAcjs.Button,
|
|
3547
3555
|
{
|
|
3548
3556
|
onClick: handleConfirm,
|
|
3549
3557
|
loading: isSubmitting,
|
|
@@ -3554,7 +3562,7 @@ function SolanaConfirmStep({
|
|
|
3554
3562
|
}
|
|
3555
3563
|
)
|
|
3556
3564
|
] }),
|
|
3557
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3565
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
3558
3566
|
] });
|
|
3559
3567
|
}
|
|
3560
3568
|
|
|
@@ -3568,18 +3576,18 @@ function DappImportAssetSelectStep({
|
|
|
3568
3576
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3569
3577
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3570
3578
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3571
|
-
|
|
3579
|
+
_chunkN4XRQPVAcjs.BodyHeader,
|
|
3572
3580
|
{
|
|
3573
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3581
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.WalletIcon, {}),
|
|
3574
3582
|
title: `Transfer from ${sourceLabel}`,
|
|
3575
3583
|
subtitle: "Pick the balance to import"
|
|
3576
3584
|
}
|
|
3577
3585
|
),
|
|
3578
3586
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3579
|
-
const tokenAmount = asset.balance ?
|
|
3587
|
+
const tokenAmount = asset.balance ? _chunkN4XRQPVAcjs.tokenFormatter.format(
|
|
3580
3588
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3581
3589
|
) : "0";
|
|
3582
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
3590
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkN4XRQPVAcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
3583
3591
|
const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunk7JIDIX27cjs.getTokenIcon.call(void 0, asset.symbol)));
|
|
3584
3592
|
const chainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, asset.chainId);
|
|
3585
3593
|
const badge = _chunk7JIDIX27cjs.getChainBadge.call(void 0, asset.chainId);
|
|
@@ -3630,7 +3638,7 @@ function DappImportAssetSelectStep({
|
|
|
3630
3638
|
);
|
|
3631
3639
|
}) })
|
|
3632
3640
|
] }),
|
|
3633
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3641
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
3634
3642
|
] });
|
|
3635
3643
|
}
|
|
3636
3644
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -3696,7 +3704,7 @@ async function detectPolymarketWalletKind(params) {
|
|
|
3696
3704
|
contracts: [
|
|
3697
3705
|
{
|
|
3698
3706
|
address: proxyWallet,
|
|
3699
|
-
abi:
|
|
3707
|
+
abi: _chunkN4XRQPVAcjs.SAFE_ABI,
|
|
3700
3708
|
functionName: "isOwner",
|
|
3701
3709
|
args: [eoa]
|
|
3702
3710
|
},
|
|
@@ -3907,7 +3915,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
3907
3915
|
}
|
|
3908
3916
|
const isOwner = await publicClient.readContract({
|
|
3909
3917
|
address: safeAddress,
|
|
3910
|
-
abi:
|
|
3918
|
+
abi: _chunkN4XRQPVAcjs.SAFE_ABI,
|
|
3911
3919
|
functionName: "isOwner",
|
|
3912
3920
|
args: [account.address]
|
|
3913
3921
|
});
|
|
@@ -3924,7 +3932,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
3924
3932
|
account,
|
|
3925
3933
|
chain,
|
|
3926
3934
|
address: safeAddress,
|
|
3927
|
-
abi:
|
|
3935
|
+
abi: _chunkN4XRQPVAcjs.SAFE_ABI,
|
|
3928
3936
|
functionName: "execTransaction",
|
|
3929
3937
|
args: [
|
|
3930
3938
|
safeTx.to,
|
|
@@ -3943,7 +3951,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
3943
3951
|
hash: txHash
|
|
3944
3952
|
});
|
|
3945
3953
|
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
3946
|
-
abi:
|
|
3954
|
+
abi: _chunkN4XRQPVAcjs.SAFE_ABI,
|
|
3947
3955
|
logs: receipt.logs.filter(
|
|
3948
3956
|
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
3949
3957
|
),
|
|
@@ -4827,15 +4835,15 @@ var SetupError = class extends Error {
|
|
|
4827
4835
|
}
|
|
4828
4836
|
};
|
|
4829
4837
|
async function resolveSessionOwner(eoaAddress) {
|
|
4830
|
-
const local =
|
|
4838
|
+
const local = _chunkN4XRQPVAcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
4831
4839
|
if (local) {
|
|
4832
4840
|
return {
|
|
4833
|
-
account:
|
|
4841
|
+
account: _chunkN4XRQPVAcjs.accountFromPrivateKey.call(void 0, local.privateKey),
|
|
4834
4842
|
address: local.address
|
|
4835
4843
|
};
|
|
4836
4844
|
}
|
|
4837
|
-
const created =
|
|
4838
|
-
|
|
4845
|
+
const created = _chunkN4XRQPVAcjs.createSessionOwnerKey.call(void 0, );
|
|
4846
|
+
_chunkN4XRQPVAcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
4839
4847
|
return { account: created.account, address: created.address };
|
|
4840
4848
|
}
|
|
4841
4849
|
function stableStringify(value) {
|
|
@@ -4903,7 +4911,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4903
4911
|
try {
|
|
4904
4912
|
const sessionOwner = await resolveSessionOwner(input.ownerAddress);
|
|
4905
4913
|
const cacheKey = computeCacheKey(input, sessionOwner.address);
|
|
4906
|
-
|
|
4914
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
4907
4915
|
owner: input.ownerAddress,
|
|
4908
4916
|
sessionOwner: sessionOwner.address,
|
|
4909
4917
|
hasPostBridgeActions: Boolean(_optionalChain([input, 'access', _127 => _127.postBridgeActions, 'optionalAccess', _128 => _128.length])),
|
|
@@ -4912,7 +4920,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4912
4920
|
const setup = await service.setupAccount({
|
|
4913
4921
|
ownerAddress: input.ownerAddress,
|
|
4914
4922
|
sessionOwnerAddress: sessionOwner.address,
|
|
4915
|
-
targetChain:
|
|
4923
|
+
targetChain: _chunkN4XRQPVAcjs.targetChainToCaip2.call(void 0, input.targetChain),
|
|
4916
4924
|
targetToken: input.targetToken,
|
|
4917
4925
|
recipient: input.recipient,
|
|
4918
4926
|
postBridgeActions: input.postBridgeActions,
|
|
@@ -4951,7 +4959,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4951
4959
|
primaryType: typedData.primaryType,
|
|
4952
4960
|
message: typedData.message
|
|
4953
4961
|
});
|
|
4954
|
-
const sessionDetails =
|
|
4962
|
+
const sessionDetails = _chunkN4XRQPVAcjs.buildSessionDetails.call(void 0,
|
|
4955
4963
|
setup.sessionDetailsUnsigned,
|
|
4956
4964
|
signature
|
|
4957
4965
|
);
|
|
@@ -4965,7 +4973,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4965
4973
|
eoaAddress: input.ownerAddress,
|
|
4966
4974
|
sessionOwner: sessionOwner.address,
|
|
4967
4975
|
target: {
|
|
4968
|
-
chain:
|
|
4976
|
+
chain: _chunkN4XRQPVAcjs.targetChainToCaip2.call(void 0, input.targetChain),
|
|
4969
4977
|
token: input.targetToken,
|
|
4970
4978
|
...input.recipient && { recipient: input.recipient },
|
|
4971
4979
|
..._optionalChain([input, 'access', _129 => _129.postBridgeActions, 'optionalAccess', _130 => _130.length]) && {
|
|
@@ -4987,7 +4995,7 @@ async function runAccountSetup(input, deps) {
|
|
|
4987
4995
|
isRegistered: true
|
|
4988
4996
|
};
|
|
4989
4997
|
} catch (error) {
|
|
4990
|
-
|
|
4998
|
+
_chunkN4XRQPVAcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
4991
4999
|
owner: input.ownerAddress
|
|
4992
5000
|
});
|
|
4993
5001
|
if (error instanceof SetupError) throw error;
|
|
@@ -4998,7 +5006,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
4998
5006
|
const now = Date.now();
|
|
4999
5007
|
const existing = setupRequestDedupe.get(requestKey);
|
|
5000
5008
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
5001
|
-
|
|
5009
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
5002
5010
|
owner: input.ownerAddress,
|
|
5003
5011
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
5004
5012
|
});
|
|
@@ -5260,10 +5268,10 @@ function DepositFlow({
|
|
|
5260
5268
|
onError,
|
|
5261
5269
|
debug
|
|
5262
5270
|
}) {
|
|
5263
|
-
const onStepChangeRef =
|
|
5264
|
-
const onEventRef =
|
|
5265
|
-
const onLifecycleRef =
|
|
5266
|
-
const onErrorRef =
|
|
5271
|
+
const onStepChangeRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onStepChange);
|
|
5272
|
+
const onEventRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onEvent);
|
|
5273
|
+
const onLifecycleRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onLifecycle);
|
|
5274
|
+
const onErrorRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onError);
|
|
5267
5275
|
const hasInitialReownSession = Boolean(
|
|
5268
5276
|
enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _133 => _133.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _134 => _134.address]) : _optionalChain([reownWallet, 'optionalAccess', _135 => _135.address])
|
|
5269
5277
|
);
|
|
@@ -5288,13 +5296,13 @@ function DepositFlow({
|
|
|
5288
5296
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
5289
5297
|
const logFlow = _react.useCallback.call(void 0,
|
|
5290
5298
|
(message, data) => {
|
|
5291
|
-
|
|
5299
|
+
_chunkN4XRQPVAcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
5292
5300
|
},
|
|
5293
5301
|
[debug]
|
|
5294
5302
|
);
|
|
5295
5303
|
const logFlowError = _react.useCallback.call(void 0,
|
|
5296
5304
|
(message, error, data) => {
|
|
5297
|
-
|
|
5305
|
+
_chunkN4XRQPVAcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
5298
5306
|
},
|
|
5299
5307
|
[debug]
|
|
5300
5308
|
);
|
|
@@ -5437,7 +5445,7 @@ function DepositFlow({
|
|
|
5437
5445
|
return {
|
|
5438
5446
|
ownerAddress: dappAddress,
|
|
5439
5447
|
walletClient: void 0,
|
|
5440
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5448
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5441
5449
|
switchChain: void 0
|
|
5442
5450
|
};
|
|
5443
5451
|
}
|
|
@@ -5446,7 +5454,7 @@ function DepositFlow({
|
|
|
5446
5454
|
return {
|
|
5447
5455
|
ownerAddress: dappWalletClient.account.address,
|
|
5448
5456
|
walletClient: dappWalletClient,
|
|
5449
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5457
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
5450
5458
|
switchChain: dappSwitchChain
|
|
5451
5459
|
};
|
|
5452
5460
|
}
|
|
@@ -5460,7 +5468,7 @@ function DepositFlow({
|
|
|
5460
5468
|
return {
|
|
5461
5469
|
ownerAddress: dappAddress,
|
|
5462
5470
|
walletClient: void 0,
|
|
5463
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5471
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5464
5472
|
switchChain: void 0
|
|
5465
5473
|
};
|
|
5466
5474
|
}
|
|
@@ -5469,7 +5477,7 @@ function DepositFlow({
|
|
|
5469
5477
|
return {
|
|
5470
5478
|
ownerAddress: dappWalletClient.account.address,
|
|
5471
5479
|
walletClient: dappWalletClient,
|
|
5472
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5480
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
5473
5481
|
switchChain: dappSwitchChain
|
|
5474
5482
|
};
|
|
5475
5483
|
}
|
|
@@ -5477,7 +5485,7 @@ function DepositFlow({
|
|
|
5477
5485
|
return {
|
|
5478
5486
|
ownerAddress: reownWallet.address,
|
|
5479
5487
|
walletClient: reownWallet.walletClient,
|
|
5480
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
5488
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5481
5489
|
switchChain: reownWallet.switchChain
|
|
5482
5490
|
};
|
|
5483
5491
|
}
|
|
@@ -5515,7 +5523,7 @@ function DepositFlow({
|
|
|
5515
5523
|
return {
|
|
5516
5524
|
ownerAddress: dappAddress,
|
|
5517
5525
|
walletClient: void 0,
|
|
5518
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
5526
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkN4XRQPVAcjs.getPublicClient.call(void 0, setupChainId))),
|
|
5519
5527
|
switchChain: void 0
|
|
5520
5528
|
};
|
|
5521
5529
|
}
|
|
@@ -5828,7 +5836,7 @@ function DepositFlow({
|
|
|
5828
5836
|
eoa: dappImportOwner,
|
|
5829
5837
|
getPublicClient: (chainId) => {
|
|
5830
5838
|
try {
|
|
5831
|
-
return
|
|
5839
|
+
return _chunkN4XRQPVAcjs.getPublicClient.call(void 0, chainId);
|
|
5832
5840
|
} catch (e31) {
|
|
5833
5841
|
return null;
|
|
5834
5842
|
}
|
|
@@ -6021,7 +6029,7 @@ function DepositFlow({
|
|
|
6021
6029
|
try {
|
|
6022
6030
|
sessionOwner = await resolveSessionOwner(owner);
|
|
6023
6031
|
} catch (error) {
|
|
6024
|
-
|
|
6032
|
+
_chunkN4XRQPVAcjs.debugError.call(void 0,
|
|
6025
6033
|
debug,
|
|
6026
6034
|
"deposit-flow",
|
|
6027
6035
|
"session-owner:resolve-failed",
|
|
@@ -6381,7 +6389,7 @@ function DepositFlow({
|
|
|
6381
6389
|
);
|
|
6382
6390
|
if (showConnectStep) {
|
|
6383
6391
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6384
|
-
|
|
6392
|
+
_chunkN4XRQPVAcjs.ConnectStep,
|
|
6385
6393
|
{
|
|
6386
6394
|
walletRows,
|
|
6387
6395
|
transferCryptoState: dappAddress ? transferCryptoState : void 0,
|
|
@@ -6391,7 +6399,6 @@ function DepositFlow({
|
|
|
6391
6399
|
handleRetrySetup(dappAddress);
|
|
6392
6400
|
return;
|
|
6393
6401
|
}
|
|
6394
|
-
if (transferCryptoState !== "ready") return;
|
|
6395
6402
|
handleSelectTransferCrypto();
|
|
6396
6403
|
} : void 0,
|
|
6397
6404
|
onSelectPayWithCard: enableFiatOnramp && dappAddress && (!fiatOnrampMethods || fiatOnrampMethods.length === 0) ? () => handleSelectFiatMethod() : void 0,
|
|
@@ -6450,7 +6457,6 @@ function DepositFlow({
|
|
|
6450
6457
|
{
|
|
6451
6458
|
smartAccount: effectiveStep.smartAccount,
|
|
6452
6459
|
solanaDepositAddress: enableSolana ? effectiveStep.solanaDepositAddress : void 0,
|
|
6453
|
-
isUpdating: activeEntry.status !== "ready",
|
|
6454
6460
|
service,
|
|
6455
6461
|
allowedRoutes,
|
|
6456
6462
|
targetChain,
|
|
@@ -6507,7 +6513,7 @@ function DepositFlow({
|
|
|
6507
6513
|
}
|
|
6508
6514
|
),
|
|
6509
6515
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6510
|
-
|
|
6516
|
+
_chunkN4XRQPVAcjs.ProcessingStep,
|
|
6511
6517
|
{
|
|
6512
6518
|
smartAccount: step.smartAccount,
|
|
6513
6519
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6572,7 +6578,7 @@ function DepositFlow({
|
|
|
6572
6578
|
}
|
|
6573
6579
|
),
|
|
6574
6580
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6575
|
-
|
|
6581
|
+
_chunkN4XRQPVAcjs.ProcessingStep,
|
|
6576
6582
|
{
|
|
6577
6583
|
smartAccount: step.smartAccount,
|
|
6578
6584
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -6699,7 +6705,7 @@ function DepositFlow({
|
|
|
6699
6705
|
) })
|
|
6700
6706
|
] }) : null,
|
|
6701
6707
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6702
|
-
|
|
6708
|
+
_chunkN4XRQPVAcjs.ProcessingStep,
|
|
6703
6709
|
{
|
|
6704
6710
|
smartAccount: effectiveStep.smartAccount,
|
|
6705
6711
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -6733,7 +6739,7 @@ function DepositFlow({
|
|
|
6733
6739
|
if (_optionalChain([signerContext, 'access', _232 => _232.publicClient, 'access', _233 => _233.chain, 'optionalAccess', _234 => _234.id]) === chainId) {
|
|
6734
6740
|
return signerContext.publicClient;
|
|
6735
6741
|
}
|
|
6736
|
-
return
|
|
6742
|
+
return _chunkN4XRQPVAcjs.getPublicClient.call(void 0, chainId);
|
|
6737
6743
|
};
|
|
6738
6744
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
6739
6745
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -6842,7 +6848,7 @@ function DepositFlow({
|
|
|
6842
6848
|
}
|
|
6843
6849
|
),
|
|
6844
6850
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6845
|
-
|
|
6851
|
+
_chunkN4XRQPVAcjs.ProcessingStep,
|
|
6846
6852
|
{
|
|
6847
6853
|
smartAccount: effectiveStep.smartAccount,
|
|
6848
6854
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -6893,8 +6899,8 @@ function formatDate(iso) {
|
|
|
6893
6899
|
function resolveChainId(value) {
|
|
6894
6900
|
if (value === void 0 || value === null) return null;
|
|
6895
6901
|
if (typeof value === "number") return value;
|
|
6896
|
-
if (
|
|
6897
|
-
const parsed =
|
|
6902
|
+
if (_chunkN4XRQPVAcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
|
|
6903
|
+
const parsed = _chunkN4XRQPVAcjs.parseEvmChainId.call(void 0, value);
|
|
6898
6904
|
if (parsed !== null) return parsed;
|
|
6899
6905
|
const num = Number(value);
|
|
6900
6906
|
return Number.isFinite(num) ? num : null;
|
|
@@ -7015,7 +7021,7 @@ function DepositHistoryPanel({
|
|
|
7015
7021
|
className: "rs-modal-header-back",
|
|
7016
7022
|
"aria-label": "Back",
|
|
7017
7023
|
onClick: onClose,
|
|
7018
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7024
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronLeftIcon, {})
|
|
7019
7025
|
}
|
|
7020
7026
|
) }),
|
|
7021
7027
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7025,29 +7031,29 @@ function DepositHistoryPanel({
|
|
|
7025
7031
|
className: "rs-modal-close",
|
|
7026
7032
|
"aria-label": "Close",
|
|
7027
7033
|
onClick: onCloseModal,
|
|
7028
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7034
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CloseIcon, {})
|
|
7029
7035
|
}
|
|
7030
7036
|
) })
|
|
7031
7037
|
] }),
|
|
7032
7038
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
|
|
7033
7039
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
|
|
7034
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7040
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HistoryIcon, {}), title: "History" }),
|
|
7035
7041
|
isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7042
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HistoryIcon, {}) }),
|
|
7037
7043
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7044
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
7039
7045
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7040
7046
|
] })
|
|
7041
7047
|
] }),
|
|
7042
7048
|
error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7043
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7049
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.AlertTriangleIcon, {}) }),
|
|
7044
7050
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7045
7051
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7046
7052
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
|
|
7047
7053
|
] })
|
|
7048
7054
|
] }),
|
|
7049
7055
|
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
7050
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7056
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HistoryIcon, {}) }),
|
|
7051
7057
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
7052
7058
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7053
7059
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
@@ -7067,7 +7073,7 @@ function DepositHistoryPanel({
|
|
|
7067
7073
|
)
|
|
7068
7074
|
] })
|
|
7069
7075
|
] }),
|
|
7070
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7076
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.PoweredBy, {})
|
|
7071
7077
|
] })
|
|
7072
7078
|
]
|
|
7073
7079
|
}
|
|
@@ -7142,7 +7148,7 @@ function HistoryCard({ deposit }) {
|
|
|
7142
7148
|
onClick: (e) => e.stopPropagation(),
|
|
7143
7149
|
children: [
|
|
7144
7150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7145
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7151
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ArrowUpRightIcon, {})
|
|
7146
7152
|
]
|
|
7147
7153
|
}
|
|
7148
7154
|
)
|
|
@@ -7157,7 +7163,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7157
7163
|
// src/DepositModal.tsx
|
|
7158
7164
|
|
|
7159
7165
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
7160
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
7166
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-4I47KSPN.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
7161
7167
|
);
|
|
7162
7168
|
function sortByCreatedAtDesc(items) {
|
|
7163
7169
|
return [...items].sort((a, b) => {
|
|
@@ -7235,7 +7241,7 @@ function DepositModalInner({
|
|
|
7235
7241
|
debug
|
|
7236
7242
|
}) {
|
|
7237
7243
|
const modalRef = _react.useRef.call(void 0, null);
|
|
7238
|
-
const onReadyRef =
|
|
7244
|
+
const onReadyRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onReady);
|
|
7239
7245
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
7240
7246
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
7241
7247
|
void 0
|
|
@@ -7254,7 +7260,7 @@ function DepositModalInner({
|
|
|
7254
7260
|
const targetChain = targetChainProp === "solana" ? "solana" : _chunk7JIDIX27cjs.getChainId.call(void 0, targetChainProp);
|
|
7255
7261
|
const sourceChain = sourceChainProp ? _chunk7JIDIX27cjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
7256
7262
|
const service = _react.useMemo.call(void 0,
|
|
7257
|
-
() =>
|
|
7263
|
+
() => _chunkN4XRQPVAcjs.createDepositService.call(void 0, backendUrl, {
|
|
7258
7264
|
debug,
|
|
7259
7265
|
debugScope: "service:deposit"
|
|
7260
7266
|
}),
|
|
@@ -7270,7 +7276,7 @@ function DepositModalInner({
|
|
|
7270
7276
|
}, [store, targetChain, targetToken]);
|
|
7271
7277
|
_react.useEffect.call(void 0, () => {
|
|
7272
7278
|
if (isOpen && modalRef.current) {
|
|
7273
|
-
|
|
7279
|
+
_chunkN4XRQPVAcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
7274
7280
|
}
|
|
7275
7281
|
}, [isOpen, theme]);
|
|
7276
7282
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7354,7 +7360,7 @@ function DepositModalInner({
|
|
|
7354
7360
|
fetchHistory("initial");
|
|
7355
7361
|
}
|
|
7356
7362
|
}, [historyOpen, fetchHistory]);
|
|
7357
|
-
const onLifecycleRef =
|
|
7363
|
+
const onLifecycleRef = _chunkN4XRQPVAcjs.useLatestRef.call(void 0, onLifecycle);
|
|
7358
7364
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
7359
7365
|
(event) => {
|
|
7360
7366
|
_optionalChain([onLifecycleRef, 'access', _246 => _246.current, 'optionalCall', _247 => _247(event)]);
|
|
@@ -7386,7 +7392,7 @@ function DepositModalInner({
|
|
|
7386
7392
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _248 => _248.showBackButton]), () => ( true));
|
|
7387
7393
|
const canGoBack = backHandler !== void 0;
|
|
7388
7394
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7389
|
-
|
|
7395
|
+
_chunkN4XRQPVAcjs.Modal,
|
|
7390
7396
|
{
|
|
7391
7397
|
isOpen,
|
|
7392
7398
|
onClose,
|
|
@@ -7402,7 +7408,7 @@ function DepositModalInner({
|
|
|
7402
7408
|
className: "rs-modal-header-back",
|
|
7403
7409
|
"aria-label": "Go back",
|
|
7404
7410
|
onClick: backHandler,
|
|
7405
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7411
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.ChevronLeftIcon, {})
|
|
7406
7412
|
}
|
|
7407
7413
|
) }),
|
|
7408
7414
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
@@ -7414,7 +7420,7 @@ function DepositModalInner({
|
|
|
7414
7420
|
"aria-label": "Deposit history",
|
|
7415
7421
|
onClick: handleHistoryOpen,
|
|
7416
7422
|
disabled: !recipient,
|
|
7417
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7423
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.HistoryIcon, {})
|
|
7418
7424
|
}
|
|
7419
7425
|
),
|
|
7420
7426
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7424,7 +7430,7 @@ function DepositModalInner({
|
|
|
7424
7430
|
onClick: onClose,
|
|
7425
7431
|
className: "rs-modal-close",
|
|
7426
7432
|
"aria-label": "Close",
|
|
7427
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7433
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN4XRQPVAcjs.CloseIcon, {})
|
|
7428
7434
|
}
|
|
7429
7435
|
)
|
|
7430
7436
|
] })
|