@rhinestone/deposit-modal 0.7.0 → 0.8.0
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-CHVDFNEX.cjs → DepositModalReown-J5YFZKFS.cjs} +9 -9
- package/dist/{DepositModalReown-T4RRW5FM.mjs → DepositModalReown-RZ6VSMKP.mjs} +6 -6
- package/dist/{WithdrawModalReown-Q6MUMZTX.mjs → WithdrawModalReown-4YUV2WWV.mjs} +5 -5
- package/dist/{WithdrawModalReown-YZMZTN6E.cjs → WithdrawModalReown-B6BGY52S.cjs} +8 -8
- package/dist/caip-C_ZYFIGa.d.cts +77 -0
- package/dist/caip-C_ZYFIGa.d.ts +77 -0
- package/dist/{chunk-XOBLFIGV.cjs → chunk-4IOQIWDY.cjs} +4 -4
- package/dist/{chunk-UZENNYHS.mjs → chunk-5S5BQ2GM.mjs} +83 -53
- package/dist/{chunk-CLUR2J72.mjs → chunk-7JJ4EFDY.mjs} +13 -17
- package/dist/{chunk-UN6MEOOA.cjs → chunk-IRI34U6N.cjs} +71 -33
- package/dist/{chunk-KUURQOTT.cjs → chunk-JRFPKFL6.cjs} +102 -106
- package/dist/{chunk-J52W34Y7.mjs → chunk-LXTAAHPC.mjs} +2 -2
- package/dist/{chunk-HH46H6ZI.cjs → chunk-PUMTR35E.cjs} +49 -24
- package/dist/{chunk-OYPFPEIT.mjs → chunk-RXWJ267K.mjs} +153 -115
- package/dist/{chunk-CPMHRMPH.mjs → chunk-SX52FXKH.mjs} +48 -23
- package/dist/{chunk-K6J3RDDK.mjs → chunk-TYB6AA6D.mjs} +1 -1
- package/dist/{chunk-6P3WNDED.cjs → chunk-VURI4G2Z.cjs} +7 -7
- package/dist/{chunk-RLMXWLF4.cjs → chunk-WL7AXYQ4.cjs} +3 -3
- package/dist/{chunk-QSMPJQTX.cjs → chunk-XLXJW44N.cjs} +384 -354
- package/dist/{chunk-4JLYWRQA.mjs → chunk-YLIPI3NU.mjs} +1 -1
- package/dist/constants.cjs +4 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +5 -3
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +12 -8
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/{types-6ROxwyfG.d.cts → types--LQWg_4W.d.cts} +1 -1
- package/dist/{types-6ROxwyfG.d.ts → types--LQWg_4W.d.ts} +1 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/caip-CsslyHGL.d.cts +0 -62
- package/dist/caip-CsslyHGL.d.ts +0 -62
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
executePolymarketSafeTransfer,
|
|
8
8
|
fetchPolymarketProxyWallet,
|
|
9
9
|
readPolymarketBalances
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YLIPI3NU.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AlertTriangleIcon,
|
|
13
13
|
ArrowUpRightIcon,
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
ProcessingStep,
|
|
34
34
|
RpcUrlsProvider,
|
|
35
35
|
Spinner,
|
|
36
|
+
TokenIcon,
|
|
36
37
|
Tooltip,
|
|
37
38
|
TransferCryptoIcon,
|
|
38
39
|
UnplugIcon,
|
|
@@ -68,10 +69,10 @@ import {
|
|
|
68
69
|
useLatestRef,
|
|
69
70
|
useRpcUrls,
|
|
70
71
|
useStableRpcUrls
|
|
71
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-RXWJ267K.mjs";
|
|
72
73
|
import {
|
|
73
74
|
SAFE_ABI
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TYB6AA6D.mjs";
|
|
75
76
|
import {
|
|
76
77
|
DEFAULT_BACKEND_URL,
|
|
77
78
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -93,9 +94,9 @@ import {
|
|
|
93
94
|
getTargetTokenSymbolsForChain,
|
|
94
95
|
getTokenAddress,
|
|
95
96
|
getTokenDecimalsByAddress,
|
|
96
|
-
getTokenIcon,
|
|
97
97
|
getTokenSymbol,
|
|
98
98
|
isContractBytecode,
|
|
99
|
+
isHyperCoreCaip2,
|
|
99
100
|
isNativeSol,
|
|
100
101
|
isSolanaCaip2,
|
|
101
102
|
isStablecoinSymbol,
|
|
@@ -103,7 +104,7 @@ import {
|
|
|
103
104
|
isVirtualDestination,
|
|
104
105
|
parseEvmChainId,
|
|
105
106
|
targetChainToCaip2
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-SX52FXKH.mjs";
|
|
107
108
|
|
|
108
109
|
// src/DepositModal.tsx
|
|
109
110
|
import {
|
|
@@ -296,7 +297,6 @@ function AssetSelectStep({
|
|
|
296
297
|
const isSelected = selectedAssetId === asset.id;
|
|
297
298
|
const tokenAmount = formatBalance(asset);
|
|
298
299
|
const badge = getChainBadge(asset.chainId);
|
|
299
|
-
const tokenIcon = getTokenIcon(asset.symbol);
|
|
300
300
|
const chainIcon = getChainIcon(asset.chainId);
|
|
301
301
|
return /* @__PURE__ */ jsxs(
|
|
302
302
|
"button",
|
|
@@ -308,7 +308,13 @@ function AssetSelectStep({
|
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ jsxs("div", { className: "rs-asset-info", children: [
|
|
310
310
|
/* @__PURE__ */ jsxs("div", { className: "rs-asset-icon-wrapper", children: [
|
|
311
|
-
|
|
311
|
+
/* @__PURE__ */ jsx("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx(
|
|
312
|
+
TokenIcon,
|
|
313
|
+
{
|
|
314
|
+
symbol: asset.symbol,
|
|
315
|
+
fallback: asset.symbol.slice(0, 4)
|
|
316
|
+
}
|
|
317
|
+
) }),
|
|
312
318
|
chainIcon ? /* @__PURE__ */ jsx("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx(
|
|
313
319
|
"img",
|
|
314
320
|
{
|
|
@@ -755,8 +761,6 @@ function AmountStep({
|
|
|
755
761
|
const continueDisabled = chainMismatch || isCheckingLiquidity || exceedsBalance || numericAmount === 0 && !isBelowMin || balance === null;
|
|
756
762
|
const sourceChainName = getChainName(asset.chainId);
|
|
757
763
|
const targetChainName = getChainName(targetChain);
|
|
758
|
-
const sourceTokenIcon = getTokenIcon(asset.symbol);
|
|
759
|
-
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
760
764
|
return /* @__PURE__ */ jsxs3("div", { className: "rs-screen", children: [
|
|
761
765
|
/* @__PURE__ */ jsxs3("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
762
766
|
/* @__PURE__ */ jsx3(BodyHeader, { icon: /* @__PURE__ */ jsx3(WalletIcon, {}), title: "Wallet deposit" }),
|
|
@@ -810,7 +814,7 @@ function AmountStep({
|
|
|
810
814
|
" ",
|
|
811
815
|
asset.symbol
|
|
812
816
|
] }),
|
|
813
|
-
|
|
817
|
+
/* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3(TokenIcon, { symbol: asset.symbol }) })
|
|
814
818
|
] })
|
|
815
819
|
] }),
|
|
816
820
|
/* @__PURE__ */ jsxs3("div", { className: "rs-amount-detail-row", children: [
|
|
@@ -821,7 +825,7 @@ function AmountStep({
|
|
|
821
825
|
" ",
|
|
822
826
|
targetSymbol
|
|
823
827
|
] }),
|
|
824
|
-
|
|
828
|
+
/* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3(TokenIcon, { symbol: targetSymbol }) })
|
|
825
829
|
] })
|
|
826
830
|
] }),
|
|
827
831
|
balanceAfterUsd !== null && /* @__PURE__ */ jsxs3("div", { className: "rs-amount-detail-row", children: [
|
|
@@ -888,8 +892,6 @@ function ConfirmStep({
|
|
|
888
892
|
const targetChainName = getChainName(targetChain);
|
|
889
893
|
const sourceChainIcon = getChainIcon(asset.chainId);
|
|
890
894
|
const targetChainIcon = getChainIcon(targetChain);
|
|
891
|
-
const sourceTokenIcon = getTokenIcon(asset.symbol);
|
|
892
|
-
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
893
895
|
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? formatTokenAmount(Number(amount), asset.symbol) ?? "0" : "0";
|
|
894
896
|
const receiveDisplay = (() => {
|
|
895
897
|
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
@@ -1062,14 +1064,14 @@ function ConfirmStep({
|
|
|
1062
1064
|
" ",
|
|
1063
1065
|
asset.symbol
|
|
1064
1066
|
] }),
|
|
1065
|
-
|
|
1067
|
+
/* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4(TokenIcon, { symbol: asset.symbol }) })
|
|
1066
1068
|
] })
|
|
1067
1069
|
] }),
|
|
1068
1070
|
/* @__PURE__ */ jsxs4("div", { className: "rs-review-detail-row", children: [
|
|
1069
1071
|
/* @__PURE__ */ jsx4("span", { children: "Receive" }),
|
|
1070
1072
|
/* @__PURE__ */ jsxs4("span", { className: "rs-review-detail-value", children: [
|
|
1071
1073
|
/* @__PURE__ */ jsx4("span", { children: receiveDisplay }),
|
|
1072
|
-
|
|
1074
|
+
/* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4(TokenIcon, { symbol: targetSymbol }) })
|
|
1073
1075
|
] })
|
|
1074
1076
|
] }),
|
|
1075
1077
|
/* @__PURE__ */ jsxs4("div", { className: "rs-review-detail-row", children: [
|
|
@@ -1456,6 +1458,7 @@ function asNumber(value) {
|
|
|
1456
1458
|
function asChainId(value) {
|
|
1457
1459
|
if (typeof value === "string") {
|
|
1458
1460
|
if (value.startsWith("solana")) return "solana";
|
|
1461
|
+
if (value.startsWith("hypercore")) return "hypercore";
|
|
1459
1462
|
const eip155Match = value.match(/^eip155:(\d+)$/);
|
|
1460
1463
|
if (eip155Match) return Number(eip155Match[1]);
|
|
1461
1464
|
}
|
|
@@ -1521,7 +1524,11 @@ function chainLabel(chainId) {
|
|
|
1521
1524
|
}
|
|
1522
1525
|
function computeTokensForChain(chainId, allowedTokenSet, topTokens) {
|
|
1523
1526
|
const fromBackend = topTokens?.[String(chainId)]?.map((t) => t.symbol);
|
|
1524
|
-
const all = fromBackend ?? (chainId === "solana" ? SOLANA_TOKENS.map((t) => t.symbol) :
|
|
1527
|
+
const all = fromBackend ?? (chainId === "solana" ? SOLANA_TOKENS.map((t) => t.symbol) : (
|
|
1528
|
+
// HyperCore accepts USDC + USDT0 as origin tokens (native Hyperliquid L1
|
|
1529
|
+
// spot transfers); it has no EVM source-chain matrix entry.
|
|
1530
|
+
chainId === "hypercore" ? ["USDC", "USDT0"] : getTargetTokenSymbolsForChain(chainId)
|
|
1531
|
+
));
|
|
1525
1532
|
return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
|
|
1526
1533
|
}
|
|
1527
1534
|
function resolveSourceTokenAddress(symbol, chainId, topTokens) {
|
|
@@ -1529,8 +1536,14 @@ function resolveSourceTokenAddress(symbol, chainId, topTokens) {
|
|
|
1529
1536
|
return top?.address ?? getTokenAddress(symbol, chainId);
|
|
1530
1537
|
}
|
|
1531
1538
|
function TokenGlyph({ symbol }) {
|
|
1532
|
-
|
|
1533
|
-
|
|
1539
|
+
return /* @__PURE__ */ jsx6(
|
|
1540
|
+
TokenIcon,
|
|
1541
|
+
{
|
|
1542
|
+
symbol,
|
|
1543
|
+
className: "rs-deposit-address-dropdown-icon",
|
|
1544
|
+
fallback: /* @__PURE__ */ jsx6("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) })
|
|
1545
|
+
}
|
|
1546
|
+
);
|
|
1534
1547
|
}
|
|
1535
1548
|
function pickFallbackToken(tokens, current) {
|
|
1536
1549
|
if (tokens.includes(current)) return current;
|
|
@@ -1565,18 +1578,24 @@ function DepositAddressStep({
|
|
|
1565
1578
|
return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
|
|
1566
1579
|
}, [allowedChainSet]);
|
|
1567
1580
|
const chainOptions = useMemo3(() => {
|
|
1568
|
-
if (!hasSolana) return evmChainIds;
|
|
1569
1581
|
const options = [...evmChainIds];
|
|
1570
|
-
|
|
1582
|
+
const extras = [];
|
|
1583
|
+
if (hasSolana) extras.push("solana");
|
|
1584
|
+
if (!allowedChainSet || allowedChainSet.has(HYPERCORE_CHAIN_ID)) {
|
|
1585
|
+
extras.push("hypercore");
|
|
1586
|
+
}
|
|
1587
|
+
options.splice(1, 0, ...extras);
|
|
1571
1588
|
return options;
|
|
1572
|
-
}, [evmChainIds, hasSolana]);
|
|
1589
|
+
}, [evmChainIds, hasSolana, allowedChainSet]);
|
|
1573
1590
|
const BASE_CHAIN_ID2 = 8453;
|
|
1574
1591
|
const chainHasAllowedToken = (id) => !allowedTokenSet || getTargetTokenSymbolsForChain(id).some(
|
|
1575
1592
|
(s) => allowedTokenSet.has(s.toUpperCase())
|
|
1576
1593
|
);
|
|
1577
|
-
const
|
|
1594
|
+
const evmDefault = evmChainIds.includes(BASE_CHAIN_ID2) && chainHasAllowedToken(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : evmChainIds.find(chainHasAllowedToken) ?? evmChainIds[0];
|
|
1595
|
+
const defaultChainId = evmDefault ?? chainOptions[0];
|
|
1578
1596
|
const [sourceChainId, setSourceChainId] = useState5(defaultChainId);
|
|
1579
1597
|
const isSolana = sourceChainId === "solana";
|
|
1598
|
+
const isHyperCore = sourceChainId === "hypercore";
|
|
1580
1599
|
const [topTokens, setTopTokens] = useState5(null);
|
|
1581
1600
|
useEffect5(() => {
|
|
1582
1601
|
let active = true;
|
|
@@ -1613,7 +1632,7 @@ function DepositAddressStep({
|
|
|
1613
1632
|
kind: "idle"
|
|
1614
1633
|
});
|
|
1615
1634
|
useEffect5(() => {
|
|
1616
|
-
if (isSolana) {
|
|
1635
|
+
if (isSolana || isHyperCore) {
|
|
1617
1636
|
setLiquidityHelper({ kind: "idle" });
|
|
1618
1637
|
return;
|
|
1619
1638
|
}
|
|
@@ -1657,6 +1676,7 @@ function DepositAddressStep({
|
|
|
1657
1676
|
};
|
|
1658
1677
|
}, [
|
|
1659
1678
|
isSolana,
|
|
1679
|
+
isHyperCore,
|
|
1660
1680
|
sourceChainId,
|
|
1661
1681
|
sourceTokenSymbol,
|
|
1662
1682
|
targetChain,
|
|
@@ -1901,7 +1921,7 @@ function DepositAddressStep({
|
|
|
1901
1921
|
/* @__PURE__ */ jsx6("span", { children: "Supported token" }),
|
|
1902
1922
|
/* @__PURE__ */ jsxs6("span", { className: "rs-deposit-address-min", children: [
|
|
1903
1923
|
"Min.$",
|
|
1904
|
-
(targetChain === HYPERCORE_CHAIN_ID ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
1924
|
+
(targetChain === HYPERCORE_CHAIN_ID || isHyperCore ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
1905
1925
|
/* @__PURE__ */ jsx6(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx6(
|
|
1906
1926
|
InfoIcon,
|
|
1907
1927
|
{
|
|
@@ -2877,7 +2897,6 @@ function DepositAddressSkeleton({
|
|
|
2877
2897
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
2878
2898
|
const chainName = getChainName(defaultChainId);
|
|
2879
2899
|
const chainIcon = getChainIcon(defaultChainId);
|
|
2880
|
-
const tokenIcon = getTokenIcon(defaultToken);
|
|
2881
2900
|
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2882
2901
|
/* @__PURE__ */ jsx13("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2883
2902
|
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body", children: [
|
|
@@ -2914,11 +2933,10 @@ function DepositAddressSkeleton({
|
|
|
2914
2933
|
] })
|
|
2915
2934
|
] }),
|
|
2916
2935
|
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2917
|
-
|
|
2918
|
-
|
|
2936
|
+
/* @__PURE__ */ jsx13(
|
|
2937
|
+
TokenIcon,
|
|
2919
2938
|
{
|
|
2920
|
-
|
|
2921
|
-
alt: "",
|
|
2939
|
+
symbol: defaultToken,
|
|
2922
2940
|
className: "rs-deposit-address-dropdown-icon"
|
|
2923
2941
|
}
|
|
2924
2942
|
),
|
|
@@ -3124,7 +3142,6 @@ function SolanaTokenSelectStep({
|
|
|
3124
3142
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx14("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
3125
3143
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
3126
3144
|
const tokenAmount = formatBalance(entry);
|
|
3127
|
-
const tokenIcon = getTokenIcon(entry.token.symbol);
|
|
3128
3145
|
return /* @__PURE__ */ jsxs12(
|
|
3129
3146
|
"button",
|
|
3130
3147
|
{
|
|
@@ -3135,7 +3152,13 @@ function SolanaTokenSelectStep({
|
|
|
3135
3152
|
children: [
|
|
3136
3153
|
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-info", children: [
|
|
3137
3154
|
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3138
|
-
|
|
3155
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx14(
|
|
3156
|
+
TokenIcon,
|
|
3157
|
+
{
|
|
3158
|
+
symbol: entry.token.symbol,
|
|
3159
|
+
fallback: entry.token.symbol.slice(0, 4)
|
|
3160
|
+
}
|
|
3161
|
+
) }),
|
|
3139
3162
|
chainIcon && /* @__PURE__ */ jsx14("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx14("img", { src: chainIcon, alt: chainName }) })
|
|
3140
3163
|
] }),
|
|
3141
3164
|
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-text", children: [
|
|
@@ -3197,7 +3220,6 @@ function SolanaAmountStep({
|
|
|
3197
3220
|
targetChain,
|
|
3198
3221
|
targetChainName,
|
|
3199
3222
|
targetTokenSymbol,
|
|
3200
|
-
targetTokenIcon,
|
|
3201
3223
|
appBalanceUsd,
|
|
3202
3224
|
onContinue,
|
|
3203
3225
|
debug
|
|
@@ -3380,7 +3402,6 @@ function SolanaAmountStep({
|
|
|
3380
3402
|
};
|
|
3381
3403
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
3382
3404
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
3383
|
-
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
3384
3405
|
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
|
|
3385
3406
|
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3386
3407
|
/* @__PURE__ */ jsx15(BodyHeader, { icon: /* @__PURE__ */ jsx15(WalletIcon, {}), title: "Wallet deposit" }),
|
|
@@ -3432,7 +3453,7 @@ function SolanaAmountStep({
|
|
|
3432
3453
|
"Solana ",
|
|
3433
3454
|
token.symbol
|
|
3434
3455
|
] }),
|
|
3435
|
-
|
|
3456
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15(TokenIcon, { symbol: token.symbol }) })
|
|
3436
3457
|
] })
|
|
3437
3458
|
] }),
|
|
3438
3459
|
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
@@ -3443,7 +3464,7 @@ function SolanaAmountStep({
|
|
|
3443
3464
|
" ",
|
|
3444
3465
|
targetTokenSymbol
|
|
3445
3466
|
] }),
|
|
3446
|
-
|
|
3467
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15(TokenIcon, { symbol: targetTokenSymbol }) })
|
|
3447
3468
|
] })
|
|
3448
3469
|
] }),
|
|
3449
3470
|
balanceAfterUsd !== null && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
@@ -3599,8 +3620,6 @@ function SolanaConfirmStep({
|
|
|
3599
3620
|
const targetChainName = getChainName(targetChain);
|
|
3600
3621
|
const sourceChainIcon = getChainIcon("solana");
|
|
3601
3622
|
const targetChainIcon = getChainIcon(targetChain);
|
|
3602
|
-
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
3603
|
-
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
3604
3623
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
3605
3624
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
3606
3625
|
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? formatTokenAmount(Number(sourceAmount), token.symbol) ?? "0" : "0";
|
|
@@ -3736,14 +3755,14 @@ function SolanaConfirmStep({
|
|
|
3736
3755
|
" ",
|
|
3737
3756
|
token.symbol
|
|
3738
3757
|
] }),
|
|
3739
|
-
|
|
3758
|
+
/* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16(TokenIcon, { symbol: token.symbol }) })
|
|
3740
3759
|
] })
|
|
3741
3760
|
] }),
|
|
3742
3761
|
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3743
3762
|
/* @__PURE__ */ jsx16("span", { children: "Receive" }),
|
|
3744
3763
|
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3745
3764
|
/* @__PURE__ */ jsx16("span", { children: receiveDisplay }),
|
|
3746
|
-
|
|
3765
|
+
/* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16(TokenIcon, { symbol: targetSymbol }) })
|
|
3747
3766
|
] })
|
|
3748
3767
|
] }),
|
|
3749
3768
|
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
@@ -3799,7 +3818,7 @@ function DappImportAssetSelectStep({
|
|
|
3799
3818
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3800
3819
|
) : "0";
|
|
3801
3820
|
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
3802
|
-
const
|
|
3821
|
+
const assetIcon = asset.icon;
|
|
3803
3822
|
const chainIcon = getChainIcon(asset.chainId);
|
|
3804
3823
|
const badge = getChainBadge(asset.chainId);
|
|
3805
3824
|
return /* @__PURE__ */ jsxs15(
|
|
@@ -3811,7 +3830,13 @@ function DappImportAssetSelectStep({
|
|
|
3811
3830
|
children: [
|
|
3812
3831
|
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
|
|
3813
3832
|
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3814
|
-
/* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children:
|
|
3833
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ jsx17("img", { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ jsx17(
|
|
3834
|
+
TokenIcon,
|
|
3835
|
+
{
|
|
3836
|
+
symbol: asset.symbol,
|
|
3837
|
+
fallback: asset.symbol.slice(0, 4)
|
|
3838
|
+
}
|
|
3839
|
+
) }),
|
|
3815
3840
|
chainIcon ? /* @__PURE__ */ jsx17("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx17(
|
|
3816
3841
|
"img",
|
|
3817
3842
|
{
|
|
@@ -5550,7 +5575,12 @@ function deriveStep(flow, d, p, activeEntry, fiat, exchange) {
|
|
|
5550
5575
|
balanceUsd: d.balanceUsd
|
|
5551
5576
|
};
|
|
5552
5577
|
case "processing":
|
|
5553
|
-
if (!smartAccount || !p.txHash || !d.amount || d.sourceChain === null || d.sourceChain === "unknown" ||
|
|
5578
|
+
if (!smartAccount || !p.txHash || !d.amount || d.sourceChain === null || d.sourceChain === "unknown" || // HyperCore is a QR/deposit-address-only source (no wallet flow), so it
|
|
5579
|
+
// never dispatches `deposit/submitted` and never reaches this store
|
|
5580
|
+
// `processing` step — its completion is tracked by the DepositNotification
|
|
5581
|
+
// on the deposit-address screen. Excluding it here keeps `sourceChain`
|
|
5582
|
+
// narrowed to the EVM/Solana shape ProcessingStep expects.
|
|
5583
|
+
d.sourceChain === "hypercore" || !d.sourceToken) {
|
|
5554
5584
|
return { type: "setup" };
|
|
5555
5585
|
}
|
|
5556
5586
|
return {
|
|
@@ -7208,9 +7238,6 @@ function DepositFlow({
|
|
|
7208
7238
|
targetChain,
|
|
7209
7239
|
targetChainName: getChainName(targetChain),
|
|
7210
7240
|
targetTokenSymbol: getTargetTokenSymbol(targetToken, targetChain),
|
|
7211
|
-
targetTokenIcon: getTokenIcon(
|
|
7212
|
-
getTargetTokenSymbol(targetToken, targetChain)
|
|
7213
|
-
),
|
|
7214
7241
|
appBalanceUsd,
|
|
7215
7242
|
onContinue: handleSolanaAmountContinue,
|
|
7216
7243
|
debug
|
|
@@ -7489,6 +7516,7 @@ function resolveChainId(value) {
|
|
|
7489
7516
|
if (value === void 0 || value === null) return null;
|
|
7490
7517
|
if (typeof value === "number") return value;
|
|
7491
7518
|
if (isSolanaCaip2(value) || value === "solana") return "solana";
|
|
7519
|
+
if (isHyperCoreCaip2(value) || value === "hypercore") return "hypercore";
|
|
7492
7520
|
const parsed = parseEvmChainId(value);
|
|
7493
7521
|
if (parsed !== null) return parsed;
|
|
7494
7522
|
const num = Number(value);
|
|
@@ -7507,7 +7535,8 @@ function resolveTokenSymbol(token, chainId) {
|
|
|
7507
7535
|
}
|
|
7508
7536
|
}
|
|
7509
7537
|
if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
7510
|
-
const
|
|
7538
|
+
const evmChainId = chainId === "hypercore" ? HYPERCORE_CHAIN_ID : chainId;
|
|
7539
|
+
const sym = getTokenSymbol(token, evmChainId);
|
|
7511
7540
|
if (sym !== "Token") return sym;
|
|
7512
7541
|
}
|
|
7513
7542
|
return shortenHash(token);
|
|
@@ -7527,7 +7556,8 @@ function formatAmount(rawAmount, token, chainId) {
|
|
|
7527
7556
|
decimals = 9;
|
|
7528
7557
|
}
|
|
7529
7558
|
} else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
7530
|
-
|
|
7559
|
+
const evmChainId = chainId === "hypercore" ? HYPERCORE_CHAIN_ID : chainId;
|
|
7560
|
+
decimals = getTokenDecimalsByAddress(token, evmChainId);
|
|
7531
7561
|
}
|
|
7532
7562
|
}
|
|
7533
7563
|
try {
|
|
@@ -7678,7 +7708,6 @@ function HistoryCard({ deposit }) {
|
|
|
7678
7708
|
const sourceChainIcon = sourceChainId ? getChainIcon(sourceChainId) : void 0;
|
|
7679
7709
|
const targetChainIcon = targetChainId ? getChainIcon(targetChainId) : void 0;
|
|
7680
7710
|
const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
|
|
7681
|
-
const sourceTokenIcon = sourceSymbol ? getTokenIcon(sourceSymbol) : void 0;
|
|
7682
7711
|
const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
|
|
7683
7712
|
const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
|
|
7684
7713
|
const displayAmount = formattedAmount ? sourceSymbol && /^USD/.test(sourceSymbol) ? `$${Number(formattedAmount).toLocaleString("en-US", {
|
|
@@ -7687,7 +7716,8 @@ function HistoryCard({ deposit }) {
|
|
|
7687
7716
|
})}` : `${formattedAmount} ${sourceSymbol}` : "\u2014";
|
|
7688
7717
|
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
7689
7718
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
7690
|
-
const
|
|
7719
|
+
const srcTxHash = sourceChainId === "hypercore" ? deposit.txHash : deposit.sourceTxHash;
|
|
7720
|
+
const srcTxUrl = srcTxHash ? getTxExplorerUrl(srcTxHash, sourceChainId) : null;
|
|
7691
7721
|
return /* @__PURE__ */ jsxs18(
|
|
7692
7722
|
"button",
|
|
7693
7723
|
{
|
|
@@ -7698,7 +7728,7 @@ function HistoryCard({ deposit }) {
|
|
|
7698
7728
|
children: [
|
|
7699
7729
|
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-row", children: [
|
|
7700
7730
|
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-icons", children: [
|
|
7701
|
-
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children:
|
|
7731
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
|
|
7702
7732
|
sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
|
|
7703
7733
|
] }),
|
|
7704
7734
|
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-text", children: [
|
|
@@ -7725,7 +7755,7 @@ function HistoryCard({ deposit }) {
|
|
|
7725
7755
|
targetChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: targetChainIcon, alt: "" }) })
|
|
7726
7756
|
] })
|
|
7727
7757
|
] }),
|
|
7728
|
-
srcTxUrl &&
|
|
7758
|
+
srcTxUrl && srcTxHash && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7729
7759
|
/* @__PURE__ */ jsx20("span", { children: "Transaction details" }),
|
|
7730
7760
|
/* @__PURE__ */ jsxs18(
|
|
7731
7761
|
"a",
|
|
@@ -7736,7 +7766,7 @@ function HistoryCard({ deposit }) {
|
|
|
7736
7766
|
className: "rs-history-card-link",
|
|
7737
7767
|
onClick: (e) => e.stopPropagation(),
|
|
7738
7768
|
children: [
|
|
7739
|
-
/* @__PURE__ */ jsx20("span", { children: shortenHash(
|
|
7769
|
+
/* @__PURE__ */ jsx20("span", { children: shortenHash(srcTxHash) }),
|
|
7740
7770
|
/* @__PURE__ */ jsx20(ArrowUpRightIcon, {})
|
|
7741
7771
|
]
|
|
7742
7772
|
}
|
|
@@ -7752,7 +7782,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7752
7782
|
// src/DepositModal.tsx
|
|
7753
7783
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7754
7784
|
var ReownDepositInner = lazy2(
|
|
7755
|
-
() => import("./DepositModalReown-
|
|
7785
|
+
() => import("./DepositModalReown-RZ6VSMKP.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7756
7786
|
);
|
|
7757
7787
|
function sortByCreatedAtDesc(items) {
|
|
7758
7788
|
return [...items].sort((a, b) => {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
ProcessingStep,
|
|
13
13
|
RpcUrlsProvider,
|
|
14
14
|
Spinner,
|
|
15
|
+
TokenIcon,
|
|
15
16
|
WalletIcon,
|
|
16
17
|
accountFromPrivateKey,
|
|
17
18
|
applyTheme,
|
|
@@ -33,12 +34,12 @@ import {
|
|
|
33
34
|
useRpcUrls,
|
|
34
35
|
useStableRpcUrls,
|
|
35
36
|
useTokenPrices
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RXWJ267K.mjs";
|
|
37
38
|
import {
|
|
38
39
|
buildSafeTransaction,
|
|
39
40
|
executeSafeErc20Transfer,
|
|
40
41
|
executeSafeEthTransfer
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TYB6AA6D.mjs";
|
|
42
43
|
import {
|
|
43
44
|
DEFAULT_BACKEND_URL,
|
|
44
45
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -49,10 +50,9 @@ import {
|
|
|
49
50
|
getChainName,
|
|
50
51
|
getSupportedTargetTokens,
|
|
51
52
|
getTokenDecimalsByAddress,
|
|
52
|
-
getTokenIcon,
|
|
53
53
|
getTokenSymbol,
|
|
54
54
|
toEvmCaip2
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-SX52FXKH.mjs";
|
|
56
56
|
|
|
57
57
|
// src/WithdrawModal.tsx
|
|
58
58
|
import {
|
|
@@ -605,11 +605,10 @@ function WithdrawFormStep({
|
|
|
605
605
|
},
|
|
606
606
|
children: [
|
|
607
607
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-dropdown-value", children: [
|
|
608
|
-
|
|
609
|
-
|
|
608
|
+
/* @__PURE__ */ jsx(
|
|
609
|
+
TokenIcon,
|
|
610
610
|
{
|
|
611
|
-
|
|
612
|
-
alt: targetSymbol,
|
|
611
|
+
symbol: targetSymbol,
|
|
613
612
|
className: "rs-withdraw-dropdown-icon"
|
|
614
613
|
}
|
|
615
614
|
),
|
|
@@ -637,11 +636,10 @@ function WithdrawFormStep({
|
|
|
637
636
|
setShowTokenDropdown(false);
|
|
638
637
|
},
|
|
639
638
|
children: [
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
/* @__PURE__ */ jsx(
|
|
640
|
+
TokenIcon,
|
|
642
641
|
{
|
|
643
|
-
|
|
644
|
-
alt: option.symbol,
|
|
642
|
+
symbol: option.symbol,
|
|
645
643
|
className: "rs-withdraw-dropdown-icon"
|
|
646
644
|
}
|
|
647
645
|
),
|
|
@@ -701,8 +699,6 @@ function WithdrawReviewStep({
|
|
|
701
699
|
const targetSymbol = getTokenSymbol(targetToken, targetChain);
|
|
702
700
|
const targetChainName = getChainName(targetChain);
|
|
703
701
|
const targetChainIcon = getChainIcon(targetChain);
|
|
704
|
-
const sourceTokenIcon = getTokenIcon(sourceSymbol);
|
|
705
|
-
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
706
702
|
const amountNumber = Number(amount);
|
|
707
703
|
const formattedSendAmount = formatTokenAmount(amountNumber, sourceSymbol) ?? amount;
|
|
708
704
|
const prices = useTokenPrices(service, [sourceSymbol, targetSymbol]);
|
|
@@ -746,7 +742,7 @@ function WithdrawReviewStep({
|
|
|
746
742
|
" ",
|
|
747
743
|
sourceSymbol
|
|
748
744
|
] }),
|
|
749
|
-
|
|
745
|
+
/* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2(TokenIcon, { symbol: sourceSymbol }) })
|
|
750
746
|
] })
|
|
751
747
|
] }),
|
|
752
748
|
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
@@ -764,7 +760,7 @@ function WithdrawReviewStep({
|
|
|
764
760
|
/* @__PURE__ */ jsx2("span", { children: "Receive" }),
|
|
765
761
|
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
766
762
|
/* @__PURE__ */ jsx2("span", { children: receiveDisplay }),
|
|
767
|
-
|
|
763
|
+
/* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2(TokenIcon, { symbol: targetSymbol }) })
|
|
768
764
|
] })
|
|
769
765
|
] }),
|
|
770
766
|
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
@@ -1594,7 +1590,7 @@ function deriveStepView(step, _registration) {
|
|
|
1594
1590
|
// src/WithdrawModal.tsx
|
|
1595
1591
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1596
1592
|
var ReownWithdrawInner = lazy(
|
|
1597
|
-
() => import("./WithdrawModalReown-
|
|
1593
|
+
() => import("./WithdrawModalReown-4YUV2WWV.mjs").then((m) => ({
|
|
1598
1594
|
default: m.WithdrawModalReown
|
|
1599
1595
|
}))
|
|
1600
1596
|
);
|