@rhinestone/deposit-modal 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-G7UX4IBZ.mjs → DepositModalReown-EXI7MW65.mjs} +6 -6
- package/dist/{DepositModalReown-MECHBE6P.cjs → DepositModalReown-FMAPWBQM.cjs} +9 -9
- package/dist/{WithdrawModalReown-WJ6VBZKK.cjs → WithdrawModalReown-CTT3EXMG.cjs} +8 -8
- package/dist/{WithdrawModalReown-CUJAFUQM.mjs → WithdrawModalReown-G7EM6HXO.mjs} +5 -5
- package/dist/{chunk-DZQD3DAV.mjs → chunk-3GLQC2KQ.mjs} +86 -18
- package/dist/{chunk-R5WDHHVM.mjs → chunk-43RTPRQY.mjs} +14 -4
- package/dist/{chunk-3C35DVPE.mjs → chunk-A33QFRKD.mjs} +985 -428
- package/dist/{chunk-MILJQWPT.cjs → chunk-ABVRVW3P.cjs} +133 -8
- package/dist/{chunk-SPUZLWQS.cjs → chunk-BTDRUAPJ.cjs} +514 -543
- package/dist/{chunk-TQ2AYMWS.mjs → chunk-F7P4MV72.mjs} +1 -1
- package/dist/{chunk-BAEB5AFZ.mjs → chunk-FJWLC4AM.mjs} +1 -1
- package/dist/{chunk-LEL6GMEQ.cjs → chunk-JHT2MJ42.cjs} +175 -107
- package/dist/{chunk-MQIJZNTP.cjs → chunk-LJJCPDZO.cjs} +844 -287
- package/dist/{chunk-R5CPOBCF.cjs → chunk-NRNJAQUA.cjs} +4 -4
- package/dist/{chunk-QYSCCX4K.mjs → chunk-RTAIW3WW.mjs} +452 -481
- package/dist/{chunk-AJHFNHG3.cjs → chunk-UEKPBRBY.cjs} +3 -3
- package/dist/{chunk-ULEAK63T.cjs → chunk-ULCCXH2A.cjs} +16 -6
- package/dist/{chunk-6YRDD462.mjs → chunk-WJX3TJFK.mjs} +135 -10
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- 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 +7 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6 -6
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +276 -27
- package/dist/{types-RzfAD14B.d.ts → types-CFRuisqK.d.cts} +1 -1
- package/dist/{types-RzfAD14B.d.cts → types-CFRuisqK.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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkABVRVW3Pcjs = require('./chunk-ABVRVW3P.cjs');
|
|
17
17
|
|
|
18
18
|
// src/components/ui/Modal.tsx
|
|
19
19
|
|
|
@@ -214,7 +214,40 @@ var PlusCircleIcon = _lucidereact.CirclePlus;
|
|
|
214
214
|
var CircleArrowOutUpLeftIcon = _lucidereact.CircleArrowOutUpLeft;
|
|
215
215
|
var CardIcon = _lucidereact.CreditCard;
|
|
216
216
|
var BankIcon = _lucidereact.Landmark;
|
|
217
|
-
var
|
|
217
|
+
var UnplugIcon = _lucidereact.Unplug;
|
|
218
|
+
function AppleIcon() {
|
|
219
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
220
|
+
"svg",
|
|
221
|
+
{
|
|
222
|
+
width: "24",
|
|
223
|
+
height: "24",
|
|
224
|
+
viewBox: "0 0 24 24",
|
|
225
|
+
fill: "none",
|
|
226
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
227
|
+
"aria-hidden": "true",
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
230
|
+
"path",
|
|
231
|
+
{
|
|
232
|
+
d: "M16.36 1.43c0 1.14-.49 2.27-1.18 3.08-.74.9-1.99 1.57-2.98 1.57-.12 0-.23-.02-.3-.03-.01-.06-.04-.22-.04-.39 0-1.15.57-2.27 1.2-2.98.8-.94 2.15-1.64 3.25-1.68.03.13.05.28.05.43z",
|
|
233
|
+
stroke: "currentColor",
|
|
234
|
+
strokeWidth: "1.6",
|
|
235
|
+
strokeLinejoin: "round"
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
239
|
+
"path",
|
|
240
|
+
{
|
|
241
|
+
d: "M20.93 17.14c-.03.07-.46 1.58-1.52 3.12-.94 1.34-1.94 2.71-3.43 2.71-1.51 0-1.9-.88-3.63-.88-1.7 0-2.3.91-3.67.91-1.38 0-2.33-1.26-3.43-2.8-1.29-1.82-2.32-4.63-2.32-7.28 0-4.28 2.8-6.55 5.55-6.55 1.45 0 2.68.95 3.6.95.86 0 2.22-1.01 3.9-1.01.61 0 2.89.06 4.37 2.19-.13.09-2.38 1.37-2.38 4.19 0 3.26 2.85 4.42 2.96 4.45z",
|
|
242
|
+
stroke: "currentColor",
|
|
243
|
+
strokeWidth: "1.6",
|
|
244
|
+
strokeLinejoin: "round"
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
218
251
|
|
|
219
252
|
// src/components/ui/Callout.tsx
|
|
220
253
|
|
|
@@ -916,7 +949,7 @@ function createDepositService(baseUrl, options) {
|
|
|
916
949
|
},
|
|
917
950
|
async checkLiquidity(params) {
|
|
918
951
|
if (params.destinationChainId === "solana") {
|
|
919
|
-
const token =
|
|
952
|
+
const token = _chunkABVRVW3Pcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
920
953
|
return {
|
|
921
954
|
hasLiquidity: true,
|
|
922
955
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _22 => _22.symbol]), () => ( "Token")),
|
|
@@ -1207,14 +1240,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1207
1240
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _29 => _29.balance, 'optionalAccess', _30 => _30.unlocked]), () => ( "0"));
|
|
1208
1241
|
const normalizedName = tokenData.tokenName.trim();
|
|
1209
1242
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1210
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1211
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1243
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkABVRVW3Pcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1244
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1212
1245
|
if (!resolvedTokenAddress) {
|
|
1213
1246
|
continue;
|
|
1214
1247
|
}
|
|
1215
|
-
const registrySymbol =
|
|
1248
|
+
const registrySymbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1216
1249
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1217
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1250
|
+
const decimals = registrySymbol !== "Token" ? _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1218
1251
|
tokens.push({
|
|
1219
1252
|
chainId: chainBalance.chainId,
|
|
1220
1253
|
address: resolvedTokenAddress,
|
|
@@ -1234,7 +1267,7 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1234
1267
|
function normalizeDirectToken(token) {
|
|
1235
1268
|
const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
|
|
1236
1269
|
const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
|
|
1237
|
-
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ?
|
|
1270
|
+
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkABVRVW3Pcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : _chunkABVRVW3Pcjs.parseEvmChainId.call(void 0, rawChainString) : null)));
|
|
1238
1271
|
if (chainId === null) return null;
|
|
1239
1272
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
1240
1273
|
if (!symbol) return null;
|
|
@@ -1243,14 +1276,14 @@ function normalizeDirectToken(token) {
|
|
|
1243
1276
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1244
1277
|
token.token,
|
|
1245
1278
|
"address"
|
|
1246
|
-
))), () => ( (typeof chainId === "number" ?
|
|
1279
|
+
))), () => ( (typeof chainId === "number" ? _chunkABVRVW3Pcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
1247
1280
|
if (!address) return null;
|
|
1248
1281
|
const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
|
|
1249
1282
|
const isSolanaToken = chainId === "solana";
|
|
1250
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1283
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, address, chainId);
|
|
1251
1284
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1252
1285
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1253
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1286
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1254
1287
|
return {
|
|
1255
1288
|
chainId,
|
|
1256
1289
|
address,
|
|
@@ -1369,7 +1402,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
1369
1402
|
function getPublicClient(chainId) {
|
|
1370
1403
|
let client = clientCache.get(chainId);
|
|
1371
1404
|
if (!client) {
|
|
1372
|
-
const chain =
|
|
1405
|
+
const chain = _chunkABVRVW3Pcjs.CHAIN_BY_ID[chainId];
|
|
1373
1406
|
client = _viem.createPublicClient.call(void 0, {
|
|
1374
1407
|
chain,
|
|
1375
1408
|
transport: _viem.http.call(void 0, )
|
|
@@ -1554,7 +1587,8 @@ function BodyHeader({
|
|
|
1554
1587
|
icon,
|
|
1555
1588
|
title,
|
|
1556
1589
|
subtitle,
|
|
1557
|
-
variant = "default"
|
|
1590
|
+
variant = "default",
|
|
1591
|
+
aside
|
|
1558
1592
|
}) {
|
|
1559
1593
|
const iconClasses = [
|
|
1560
1594
|
"rs-body-header-icon",
|
|
@@ -1563,9 +1597,12 @@ function BodyHeader({
|
|
|
1563
1597
|
].filter(Boolean).join(" ");
|
|
1564
1598
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
1565
1599
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: iconClasses, children: icon }),
|
|
1566
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header-
|
|
1567
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1568
|
-
|
|
1600
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header-main", children: [
|
|
1601
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header-text", children: [
|
|
1602
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: title }),
|
|
1603
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-body-header-subtitle", children: subtitle })
|
|
1604
|
+
] }),
|
|
1605
|
+
aside && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-aside", children: aside })
|
|
1569
1606
|
] })
|
|
1570
1607
|
] });
|
|
1571
1608
|
}
|
|
@@ -1672,6 +1709,9 @@ function Spinner({ className }) {
|
|
|
1672
1709
|
);
|
|
1673
1710
|
}
|
|
1674
1711
|
|
|
1712
|
+
// src/components/steps/ConnectStep.tsx
|
|
1713
|
+
|
|
1714
|
+
|
|
1675
1715
|
// src/components/ui/ListRow.tsx
|
|
1676
1716
|
|
|
1677
1717
|
function ListRow({
|
|
@@ -1745,6 +1785,67 @@ function ListRow({
|
|
|
1745
1785
|
}
|
|
1746
1786
|
ListRow.displayName = "ListRow";
|
|
1747
1787
|
|
|
1788
|
+
// src/components/ui/SegmentedToggle.tsx
|
|
1789
|
+
|
|
1790
|
+
var SEGMENTED_INSET_PX = 2;
|
|
1791
|
+
function SegmentedToggle({
|
|
1792
|
+
options,
|
|
1793
|
+
value,
|
|
1794
|
+
onChange,
|
|
1795
|
+
ariaLabel
|
|
1796
|
+
}) {
|
|
1797
|
+
const activeIndex = Math.max(
|
|
1798
|
+
0,
|
|
1799
|
+
options.findIndex((opt) => opt.value === value)
|
|
1800
|
+
);
|
|
1801
|
+
const count = Math.max(options.length, 1);
|
|
1802
|
+
const totalInsetPx = SEGMENTED_INSET_PX * (count + 1);
|
|
1803
|
+
const offsetPercent = activeIndex / count * 100;
|
|
1804
|
+
const offsetCorrectionPx = activeIndex * SEGMENTED_INSET_PX / count;
|
|
1805
|
+
const segmentedStyle = {
|
|
1806
|
+
"--rs-segmented-count": count,
|
|
1807
|
+
"--rs-segmented-index": activeIndex,
|
|
1808
|
+
"--rs-segmented-inset": `${SEGMENTED_INSET_PX}px`,
|
|
1809
|
+
"--rs-segmented-thumb-width": `calc((100% - ${totalInsetPx}px) / ${count})`,
|
|
1810
|
+
"--rs-segmented-thumb-offset": `calc(${offsetPercent}% - ${offsetCorrectionPx}px)`
|
|
1811
|
+
};
|
|
1812
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1813
|
+
"div",
|
|
1814
|
+
{
|
|
1815
|
+
className: "rs-segmented",
|
|
1816
|
+
role: "tablist",
|
|
1817
|
+
"aria-label": ariaLabel,
|
|
1818
|
+
style: segmentedStyle,
|
|
1819
|
+
children: [
|
|
1820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1821
|
+
"span",
|
|
1822
|
+
{
|
|
1823
|
+
className: "rs-segmented-thumb",
|
|
1824
|
+
"data-value": value,
|
|
1825
|
+
"aria-hidden": "true"
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
options.map((opt) => {
|
|
1829
|
+
const active = opt.value === value;
|
|
1830
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1831
|
+
"button",
|
|
1832
|
+
{
|
|
1833
|
+
type: "button",
|
|
1834
|
+
role: "tab",
|
|
1835
|
+
"aria-selected": active,
|
|
1836
|
+
className: `rs-segmented-option${active ? " rs-segmented-option--active" : ""}`,
|
|
1837
|
+
onClick: () => onChange(opt.value),
|
|
1838
|
+
children: opt.label
|
|
1839
|
+
},
|
|
1840
|
+
opt.value
|
|
1841
|
+
);
|
|
1842
|
+
})
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1846
|
+
}
|
|
1847
|
+
SegmentedToggle.displayName = "SegmentedToggle";
|
|
1848
|
+
|
|
1748
1849
|
// src/components/ui/WalletBadgeIcons/RabbyIcon.tsx
|
|
1749
1850
|
|
|
1750
1851
|
function RabbyIcon() {
|
|
@@ -2061,6 +2162,152 @@ function ChainBadgeIcons() {
|
|
|
2061
2162
|
}
|
|
2062
2163
|
ChainBadgeIcons.displayName = "ChainBadgeIcons";
|
|
2063
2164
|
|
|
2165
|
+
// src/components/ui/ExchangeLogos.tsx
|
|
2166
|
+
|
|
2167
|
+
var EXCHANGE_LOGO_SOURCES = {
|
|
2168
|
+
binance: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUwIiBoZWlnaHQ9IjI1MCIgdmlld0JveD0iMCAwIDI1MCAyNTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIyNTAiIGhlaWdodD0iMjUwIiBmaWxsPSIjMEMwRTEyIi8+CjxwYXRoIGQ9Ik05Mi4zMDEgMTExLjczNkwxMjUuMzE5IDc4LjczMTdMMTU4LjM1MSAxMTEuNzYzTDE3Ny41NTIgOTIuNTQ4NkwxMjUuMzE5IDQwLjMwMjJMNzMuMDg2MyA5Mi41MzUyTDkyLjMwMSAxMTEuNzM2WiIgZmlsbD0iI0YzQkEyRiIvPgo8cGF0aCBkPSJNNDAuMzAzIDEyNS4zMDhMNTkuNTEwNyAxMDYuMUw3OC43MTg0IDEyNS4zMDhMNTkuNTEwNyAxNDQuNTE2TDQwLjMwMyAxMjUuMzA4WiIgZmlsbD0iI0YzQkEyRiIvPgo8cGF0aCBkPSJNOTIuMzAxMiAxMzguODczTDEyNS4zMTkgMT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DkgMjA1LjgwMkwxOTguMjUxIDE2My45OTZDMjAzLjg5NSAxNTguMzc4IDIwMy45MTggMTQ5LjIyNyAxOTguMyAxNDMuNTU5QzE5Mi42NTcgMTM3LjkyIDE4My41MDYgMTM3Ljg5MiAxNzcuODYzIDE0My41MVoiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik0xNDYuMTQxIDEzOS41ODVDMTU0LjE4OSAxMzkuNTg1IDE2MC43MTQgMTMzLjA2MSAxNjAuNzE0IDEyNS4wMTJDMTYwLjcxNCAxMTYuOTY0IDE1NC4xODkgMTEwLjQzOSAxNDYuMTQxIDExMC40MzlDMTM4LjA5MiAxMTAuNDM5IDEzMS41NjggMTE2Ljk2NCAxMzEuNTY4IDEyNS4wMTJDMTMxLjU2OCAxMzMuMDYxIDEzOC4wOTIgMTM5LjU4NSAxNDYuMTQxIDEzOS41ODVaIiBmaWxsPSJibGFjayIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzQ3NjlfMTYwMDI0Ij4KPHJlY3Qgd2lkdGg9IjE1NS40OTgiIGhlaWdodD0iMTcwIiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNDcgNDApIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="
|
|
2177
|
+
};
|
|
2178
|
+
var EXCHANGE_LOGO_ALIASES = {
|
|
2179
|
+
gate: "gateio"
|
|
2180
|
+
};
|
|
2181
|
+
function normalize(value) {
|
|
2182
|
+
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
2183
|
+
}
|
|
2184
|
+
function getLogoSource(value) {
|
|
2185
|
+
const key = normalize(value);
|
|
2186
|
+
return _nullishCoalesce(EXCHANGE_LOGO_SOURCES[_nullishCoalesce(EXCHANGE_LOGO_ALIASES[key], () => ( key))], () => ( null));
|
|
2187
|
+
}
|
|
2188
|
+
function getExchangeLogoSrc(name, connection) {
|
|
2189
|
+
return _nullishCoalesce(getLogoSource(name), () => ( getLogoSource(_nullishCoalesce(connection, () => ( "")))));
|
|
2190
|
+
}
|
|
2191
|
+
function getExchangeLogo(name, connection) {
|
|
2192
|
+
const src = getExchangeLogoSrc(name, connection);
|
|
2193
|
+
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src, alt: "", loading: "lazy", decoding: "async" }) : null;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
// src/components/ui/BrandIcons.tsx
|
|
2197
|
+
|
|
2198
|
+
function VisaMark() {
|
|
2199
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2200
|
+
"svg",
|
|
2201
|
+
{
|
|
2202
|
+
width: "38",
|
|
2203
|
+
height: "24",
|
|
2204
|
+
viewBox: "0 0 38 24",
|
|
2205
|
+
fill: "none",
|
|
2206
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2207
|
+
"aria-hidden": "true",
|
|
2208
|
+
children: [
|
|
2209
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "white" }),
|
|
2210
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2211
|
+
"path",
|
|
2212
|
+
{
|
|
2213
|
+
d: "M18.3993 8.08878L16.6616 16.2114H14.5605L16.2984 8.08878H18.3993ZM27.2397 13.3336L28.3459 10.2833L28.9824 13.3336H27.2397ZM29.584 16.2114H31.5276L29.8316 8.08878H28.0376C27.6345 8.08878 27.2944 8.32324 27.143 8.6847L23.9906 16.2114H26.1972L26.6352 14.9985H29.331L29.584 16.2114ZM24.1001 13.5593C24.1091 11.4155 21.1354 11.2975 21.156 10.3398C21.1622 10.048 21.4401 9.7385 22.0471 9.65906C22.3486 9.61972 23.1777 9.58964 24.1192 10.0228L24.4878 8.30036C23.9821 8.1168 23.3314 7.94019 22.5221 7.94019C20.4454 7.94019 18.9836 9.04437 18.9713 10.6254C18.9582 11.7947 20.0148 12.4471 20.811 12.8359C21.6295 13.2341 21.9046 13.4891 21.901 13.8452C21.8956 14.3905 21.248 14.6306 20.6439 14.6401C19.5873 14.6568 18.9741 14.355 18.4854 14.1272L18.1047 15.907C18.5954 16.1325 19.5017 16.3284 20.4418 16.3384C22.6489 16.3384 24.0929 15.2478 24.1001 13.5593ZM15.3968 8.08878L11.9925 16.2114H9.77099L8.09583 9.72898C7.99402 9.32973 7.90559 9.18371 7.59631 9.01532C7.09165 8.74152 6.25741 8.48418 5.52344 8.32479L5.57357 8.08878H9.14885C9.6044 8.08878 10.0145 8.39214 10.1178 8.91685L11.0027 13.6174L13.1892 8.08878H15.3968Z",
|
|
2214
|
+
fill: "#1434CB"
|
|
2215
|
+
}
|
|
2216
|
+
)
|
|
2217
|
+
]
|
|
2218
|
+
}
|
|
2219
|
+
);
|
|
2220
|
+
}
|
|
2221
|
+
function MastercardMark() {
|
|
2222
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2223
|
+
"svg",
|
|
2224
|
+
{
|
|
2225
|
+
width: "38",
|
|
2226
|
+
height: "24",
|
|
2227
|
+
viewBox: "0 0 38 24",
|
|
2228
|
+
fill: "none",
|
|
2229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2230
|
+
"aria-hidden": "true",
|
|
2231
|
+
children: [
|
|
2232
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "white" }),
|
|
2233
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2234
|
+
"path",
|
|
2235
|
+
{
|
|
2236
|
+
d: "M21.303 7.07157H15.8179V16.9284H21.303V7.07157Z",
|
|
2237
|
+
fill: "#FF5F00"
|
|
2238
|
+
}
|
|
2239
|
+
),
|
|
2240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2241
|
+
"path",
|
|
2242
|
+
{
|
|
2243
|
+
d: "M16.1662 12C16.1653 11.0507 16.3804 10.1136 16.7953 9.25979C17.2101 8.40593 17.8137 7.65764 18.5605 7.07156C17.6357 6.34468 16.5251 5.89265 15.3556 5.76713C14.1861 5.6416 13.0048 5.84765 11.9469 6.36172C10.8889 6.87579 9.99698 7.67715 9.37294 8.67419C8.7489 9.67124 8.41797 10.8237 8.41797 12C8.41797 13.1762 8.7489 14.3287 9.37294 15.3257C9.99698 16.3228 10.8889 17.1241 11.9469 17.6382C13.0048 18.1523 14.1861 18.3583 15.3556 18.2328C16.5251 18.1073 17.6357 17.6553 18.5605 16.9284C17.8137 16.3423 17.2101 15.594 16.7953 14.7401C16.3805 13.8863 16.1653 12.9492 16.1662 12Z",
|
|
2244
|
+
fill: "#EB001B"
|
|
2245
|
+
}
|
|
2246
|
+
),
|
|
2247
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2248
|
+
"path",
|
|
2249
|
+
{
|
|
2250
|
+
d: "M28.7026 12C28.7027 13.1762 28.3718 14.3287 27.7478 15.3257C27.1238 16.3228 26.2318 17.1241 25.1739 17.6382C24.116 18.1523 22.9348 18.3583 21.7653 18.2328C20.5958 18.1073 19.4852 17.6553 18.5605 16.9284C19.3066 16.3417 19.9097 15.5933 20.3245 14.7396C20.7392 13.8858 20.9547 12.9491 20.9547 12C20.9547 11.0508 20.7392 10.1141 20.3245 9.26037C19.9097 8.40665 19.3066 7.65824 18.5605 7.07156C19.4852 6.34468 20.5958 5.89265 21.7653 5.76712C22.9348 5.6416 24.116 5.84765 25.1739 6.36173C26.2318 6.87581 27.1238 7.67717 27.7478 8.67421C28.3718 9.67126 28.7027 10.8238 28.7026 12Z",
|
|
2251
|
+
fill: "#F79E1B"
|
|
2252
|
+
}
|
|
2253
|
+
),
|
|
2254
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2255
|
+
"path",
|
|
2256
|
+
{
|
|
2257
|
+
d: "M28.1046 15.8844V15.6826H28.1859V15.6415H27.9787V15.6826H28.0601V15.8844H28.1046ZM28.5069 15.8844V15.6411H28.4434L28.3703 15.8084L28.2972 15.6411H28.2337V15.8844H28.2785V15.7009L28.347 15.8591H28.3936L28.4621 15.7005V15.8844H28.5069Z",
|
|
2258
|
+
fill: "#F79E1B"
|
|
2259
|
+
}
|
|
2260
|
+
)
|
|
2261
|
+
]
|
|
2262
|
+
}
|
|
2263
|
+
);
|
|
2264
|
+
}
|
|
2265
|
+
function AmexMark() {
|
|
2266
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2267
|
+
"svg",
|
|
2268
|
+
{
|
|
2269
|
+
width: "38",
|
|
2270
|
+
height: "24",
|
|
2271
|
+
viewBox: "0 0 38 24",
|
|
2272
|
+
fill: "none",
|
|
2273
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2274
|
+
"aria-hidden": "true",
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "37.2537", height: "24", rx: "4.2985", fill: "#006FCF" }),
|
|
2277
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2278
|
+
"path",
|
|
2279
|
+
{
|
|
2280
|
+
fillRule: "evenodd",
|
|
2281
|
+
clipRule: "evenodd",
|
|
2282
|
+
d: "M37.268 4.34531H34.1845L32.5727 8.9706L30.8908 4.34531H27.7373V11.5472L24.5136 4.34531H21.9208L18.6971 11.7036H20.9395L21.5702 10.232H24.9341L25.5648 11.7036H29.7696V6.58776L31.6617 11.7036H33.4136L35.3057 6.58776V11.7036H37.268V12.8248H34.675L32.5727 15.1375L30.4003 12.8248H21.5003V20.1831H30.3303L32.5026 17.8004L34.675 20.1831H37.268V21.0939H34.1845L32.5026 19.272L30.8206 21.0939H20.379V12.6846H17.0151L21.2199 3.22388H25.2845L26.756 6.44759V3.22388H31.8019L32.6427 5.6767L33.4838 3.22388H37.268V4.34531ZM37.268 14.4366L35.3759 16.4689L37.268 18.5011V20.1831L33.8342 16.4689L37.268 12.8248V14.4366ZM27.7373 20.1831V18.4312H23.5325V17.3099H27.6671V15.628H23.5325V14.5068H27.7373V12.8248L31.2411 16.4689L27.7373 20.1831ZM22.2009 8.62005L23.1822 6.23742L24.1632 8.62005H22.2009Z",
|
|
2283
|
+
fill: "white"
|
|
2284
|
+
}
|
|
2285
|
+
)
|
|
2286
|
+
]
|
|
2287
|
+
}
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
function ExchangeBadgeImage({ name }) {
|
|
2291
|
+
const src = getExchangeLogoSrc(name);
|
|
2292
|
+
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src, alt: "", loading: "lazy", decoding: "async" }) : null;
|
|
2293
|
+
}
|
|
2294
|
+
function CardNetworkIcons() {
|
|
2295
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--cards", children: [
|
|
2296
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-network rs-card-network--amex", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AmexMark, {}) }),
|
|
2297
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-network rs-card-network--visa", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VisaMark, {}) }),
|
|
2298
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-network rs-card-network--mastercard", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MastercardMark, {}) })
|
|
2299
|
+
] });
|
|
2300
|
+
}
|
|
2301
|
+
CardNetworkIcons.displayName = "CardNetworkIcons";
|
|
2302
|
+
function ExchangeBadgeIcons() {
|
|
2303
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--exchanges", children: [
|
|
2304
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Coinbase" }) }),
|
|
2305
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Binance" }) }),
|
|
2306
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Kraken" }) })
|
|
2307
|
+
] });
|
|
2308
|
+
}
|
|
2309
|
+
ExchangeBadgeIcons.displayName = "ExchangeBadgeIcons";
|
|
2310
|
+
|
|
2064
2311
|
// src/components/steps/ConnectStep.tsx
|
|
2065
2312
|
|
|
2066
2313
|
function formatBalanceUsd(value) {
|
|
@@ -2072,6 +2319,10 @@ function fiatIcon(name) {
|
|
|
2072
2319
|
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BankIcon, {});
|
|
2073
2320
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardIcon, {});
|
|
2074
2321
|
}
|
|
2322
|
+
function fiatMeta(name) {
|
|
2323
|
+
if (name === "apple" || name === "bank") return void 0;
|
|
2324
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardNetworkIcons, {});
|
|
2325
|
+
}
|
|
2075
2326
|
function shorten(addr) {
|
|
2076
2327
|
return addr.length > 12 ? `${addr.slice(0, 6)}...${addr.slice(-4)}` : addr;
|
|
2077
2328
|
}
|
|
@@ -2090,15 +2341,20 @@ function renderWalletLeading(row) {
|
|
|
2090
2341
|
}
|
|
2091
2342
|
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransferCryptoIcon, {});
|
|
2092
2343
|
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
|
|
2344
|
+
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UnplugIcon, {});
|
|
2093
2345
|
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" });
|
|
2094
2346
|
var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2095
2347
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
2096
|
-
"+100
|
|
2348
|
+
"+100"
|
|
2349
|
+
] });
|
|
2350
|
+
var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2351
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
2352
|
+
"+6"
|
|
2097
2353
|
] });
|
|
2098
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
2354
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkABVRVW3Pcjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
2099
2355
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2100
2356
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
2101
|
-
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}
|
|
2357
|
+
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
2102
2358
|
] });
|
|
2103
2359
|
function renderRowTrailing(state) {
|
|
2104
2360
|
if (state === "loading") {
|
|
@@ -2122,7 +2378,8 @@ function ConnectStep({
|
|
|
2122
2378
|
dappImports,
|
|
2123
2379
|
onSelectDappImport,
|
|
2124
2380
|
title = "Deposit",
|
|
2125
|
-
subtitle
|
|
2381
|
+
subtitle,
|
|
2382
|
+
defaultMethodTab = "crypto"
|
|
2126
2383
|
}) {
|
|
2127
2384
|
const rows = _nullishCoalesce(walletRows, () => ( []));
|
|
2128
2385
|
const handleConnect = _nullishCoalesce(onConnect, () => ( onRequestConnect));
|
|
@@ -2131,143 +2388,209 @@ function ConnectStep({
|
|
|
2131
2388
|
);
|
|
2132
2389
|
const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _63 => _63.length]), () => ( 0))) > 0;
|
|
2133
2390
|
const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
|
|
2134
|
-
|
|
2135
|
-
|
|
2391
|
+
const cryptoRows = [];
|
|
2392
|
+
if (onSelectTransferCrypto) {
|
|
2393
|
+
cryptoRows.push(
|
|
2136
2394
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2137
|
-
|
|
2395
|
+
ListRow,
|
|
2138
2396
|
{
|
|
2139
|
-
|
|
2140
|
-
title,
|
|
2141
|
-
subtitle: _nullishCoalesce(
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2397
|
+
leading: TRANSFER_CRYPTO_LEADING,
|
|
2398
|
+
title: "Transfer crypto",
|
|
2399
|
+
subtitle: transferCryptoState === "error" ? _nullishCoalesce(transferCryptoErrorReason, () => ( "Couldn't prepare account \u2014 tap to retry")) : "Instant - No limit",
|
|
2400
|
+
meta: CHAIN_BADGE_META,
|
|
2401
|
+
onClick: onSelectTransferCrypto
|
|
2402
|
+
},
|
|
2403
|
+
"transfer-crypto"
|
|
2404
|
+
)
|
|
2405
|
+
);
|
|
2406
|
+
}
|
|
2407
|
+
for (const row of rows) {
|
|
2408
|
+
const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
|
|
2409
|
+
const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
|
|
2410
|
+
cryptoRows.push(
|
|
2411
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2412
|
+
ListRow,
|
|
2413
|
+
{
|
|
2414
|
+
leading: renderWalletLeading(row),
|
|
2415
|
+
title: collapseToExternal ? "External wallet" : row.label,
|
|
2416
|
+
subtitle: subtitleText,
|
|
2417
|
+
onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _64 => _64(row.id)]),
|
|
2418
|
+
disabled: row.state === "loading",
|
|
2419
|
+
trailing: renderRowTrailing(row.state)
|
|
2420
|
+
},
|
|
2421
|
+
row.id
|
|
2422
|
+
)
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2425
|
+
if (!hasReownWallet && handleConnect) {
|
|
2426
|
+
cryptoRows.push(
|
|
2427
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2428
|
+
ListRow,
|
|
2429
|
+
{
|
|
2430
|
+
leading: WALLET_LEADING,
|
|
2431
|
+
title: "Connect wallet",
|
|
2432
|
+
subtitle: "Instant - No limit",
|
|
2433
|
+
meta: CONNECT_META,
|
|
2434
|
+
onClick: handleConnect
|
|
2435
|
+
},
|
|
2436
|
+
"connect-wallet"
|
|
2437
|
+
)
|
|
2438
|
+
);
|
|
2439
|
+
}
|
|
2440
|
+
if (onSelectFundFromExchange) {
|
|
2441
|
+
cryptoRows.push(
|
|
2442
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2443
|
+
ListRow,
|
|
2444
|
+
{
|
|
2445
|
+
leading: EXCHANGE_LEADING,
|
|
2446
|
+
title: "Connect exchange",
|
|
2447
|
+
subtitle: "Instant - No limit",
|
|
2448
|
+
meta: EXCHANGE_META,
|
|
2449
|
+
onClick: onSelectFundFromExchange
|
|
2450
|
+
},
|
|
2451
|
+
"connect-exchange"
|
|
2452
|
+
)
|
|
2453
|
+
);
|
|
2454
|
+
}
|
|
2455
|
+
if (showDappImports) {
|
|
2456
|
+
for (const row of _nullishCoalesce(dappImports, () => ( []))) {
|
|
2457
|
+
if (!hasReownWallet) {
|
|
2458
|
+
cryptoRows.push(
|
|
2459
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2186
2460
|
ListRow,
|
|
2187
2461
|
{
|
|
2188
|
-
leading:
|
|
2189
|
-
title:
|
|
2190
|
-
subtitle:
|
|
2191
|
-
onClick:
|
|
2192
|
-
disabled:
|
|
2193
|
-
trailing: renderRowTrailing(row.state)
|
|
2462
|
+
leading: row.icon,
|
|
2463
|
+
title: row.label,
|
|
2464
|
+
subtitle: "Connect wallet to view balance",
|
|
2465
|
+
onClick: handleConnect,
|
|
2466
|
+
disabled: !handleConnect
|
|
2194
2467
|
},
|
|
2195
2468
|
row.id
|
|
2196
|
-
)
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
}
|
|
2235
|
-
if (row.status.enabled) {
|
|
2236
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2237
|
-
ListRow,
|
|
2238
|
-
{
|
|
2239
|
-
leading: row.icon,
|
|
2240
|
-
title: row.label,
|
|
2241
|
-
subtitle: formatBalanceUsd(row.status.balanceUsd),
|
|
2242
|
-
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _67 => _67(row.id)])
|
|
2243
|
-
},
|
|
2244
|
-
row.id
|
|
2245
|
-
);
|
|
2246
|
-
}
|
|
2247
|
-
if (row.status.retryable) {
|
|
2248
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2249
|
-
ListRow,
|
|
2250
|
-
{
|
|
2251
|
-
leading: row.icon,
|
|
2252
|
-
title: row.label,
|
|
2253
|
-
subtitle: row.status.reason,
|
|
2254
|
-
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _68 => _68(row.id)])
|
|
2255
|
-
},
|
|
2256
|
-
row.id
|
|
2257
|
-
);
|
|
2258
|
-
}
|
|
2259
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2469
|
+
)
|
|
2470
|
+
);
|
|
2471
|
+
continue;
|
|
2472
|
+
}
|
|
2473
|
+
if (row.status === "loading" || row.status === "needs-connect") {
|
|
2474
|
+
cryptoRows.push(
|
|
2475
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2476
|
+
ListRow,
|
|
2477
|
+
{
|
|
2478
|
+
leading: row.icon,
|
|
2479
|
+
title: row.label,
|
|
2480
|
+
subtitle: "Checking balance\u2026",
|
|
2481
|
+
disabled: true,
|
|
2482
|
+
trailing: SMALL_SPINNER
|
|
2483
|
+
},
|
|
2484
|
+
row.id
|
|
2485
|
+
)
|
|
2486
|
+
);
|
|
2487
|
+
continue;
|
|
2488
|
+
}
|
|
2489
|
+
if (row.status.enabled) {
|
|
2490
|
+
cryptoRows.push(
|
|
2491
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2492
|
+
ListRow,
|
|
2493
|
+
{
|
|
2494
|
+
leading: row.icon,
|
|
2495
|
+
title: row.label,
|
|
2496
|
+
subtitle: formatBalanceUsd(row.status.balanceUsd),
|
|
2497
|
+
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _65 => _65(row.id)])
|
|
2498
|
+
},
|
|
2499
|
+
row.id
|
|
2500
|
+
)
|
|
2501
|
+
);
|
|
2502
|
+
continue;
|
|
2503
|
+
}
|
|
2504
|
+
if (row.status.retryable) {
|
|
2505
|
+
cryptoRows.push(
|
|
2506
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2260
2507
|
ListRow,
|
|
2261
2508
|
{
|
|
2262
2509
|
leading: row.icon,
|
|
2263
2510
|
title: row.label,
|
|
2264
2511
|
subtitle: row.status.reason,
|
|
2265
|
-
|
|
2512
|
+
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
|
|
2266
2513
|
},
|
|
2267
2514
|
row.id
|
|
2268
|
-
)
|
|
2269
|
-
|
|
2270
|
-
|
|
2515
|
+
)
|
|
2516
|
+
);
|
|
2517
|
+
continue;
|
|
2518
|
+
}
|
|
2519
|
+
cryptoRows.push(
|
|
2520
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2521
|
+
ListRow,
|
|
2522
|
+
{
|
|
2523
|
+
leading: row.icon,
|
|
2524
|
+
title: row.label,
|
|
2525
|
+
subtitle: row.status.reason,
|
|
2526
|
+
disabled: true
|
|
2527
|
+
},
|
|
2528
|
+
row.id
|
|
2529
|
+
)
|
|
2530
|
+
);
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
const cashRows = [];
|
|
2534
|
+
if (fiatPaymentMethods && fiatPaymentMethods.length > 0 && onSelectFiatMethod) {
|
|
2535
|
+
for (const opt of fiatPaymentMethods) {
|
|
2536
|
+
cashRows.push(
|
|
2537
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2538
|
+
ListRow,
|
|
2539
|
+
{
|
|
2540
|
+
leading: fiatIcon(opt.icon),
|
|
2541
|
+
title: opt.label,
|
|
2542
|
+
subtitle: opt.sublabel,
|
|
2543
|
+
meta: fiatMeta(opt.icon),
|
|
2544
|
+
onClick: () => onSelectFiatMethod(opt.method)
|
|
2545
|
+
},
|
|
2546
|
+
opt.method
|
|
2547
|
+
)
|
|
2548
|
+
);
|
|
2549
|
+
}
|
|
2550
|
+
} else if (onSelectPayWithCard) {
|
|
2551
|
+
cashRows.push(
|
|
2552
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2553
|
+
ListRow,
|
|
2554
|
+
{
|
|
2555
|
+
leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardIcon, {}),
|
|
2556
|
+
title: "Debit/Credit card",
|
|
2557
|
+
subtitle: "Instant - $10,000 limit",
|
|
2558
|
+
meta: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardNetworkIcons, {}),
|
|
2559
|
+
onClick: onSelectPayWithCard
|
|
2560
|
+
},
|
|
2561
|
+
"pay-with-card"
|
|
2562
|
+
)
|
|
2563
|
+
);
|
|
2564
|
+
}
|
|
2565
|
+
const hasCrypto = cryptoRows.length > 0;
|
|
2566
|
+
const hasCash = cashRows.length > 0;
|
|
2567
|
+
const showToggle = hasCrypto && hasCash;
|
|
2568
|
+
const [tab, setTab] = _react.useState.call(void 0, defaultMethodTab);
|
|
2569
|
+
const activeTab = showToggle ? tab : hasCash && !hasCrypto ? "cash" : "crypto";
|
|
2570
|
+
const activeRows = activeTab === "cash" ? cashRows : cryptoRows;
|
|
2571
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2572
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2573
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2574
|
+
BodyHeader,
|
|
2575
|
+
{
|
|
2576
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HandCoinsIcon, {}),
|
|
2577
|
+
title,
|
|
2578
|
+
subtitle: _nullishCoalesce(subtitle, () => ( defaultSubtitle)),
|
|
2579
|
+
aside: showToggle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2580
|
+
SegmentedToggle,
|
|
2581
|
+
{
|
|
2582
|
+
ariaLabel: "Deposit method type",
|
|
2583
|
+
value: activeTab,
|
|
2584
|
+
onChange: setTab,
|
|
2585
|
+
options: [
|
|
2586
|
+
{ value: "crypto", label: "Crypto" },
|
|
2587
|
+
{ value: "cash", label: "Cash" }
|
|
2588
|
+
]
|
|
2589
|
+
}
|
|
2590
|
+
) : void 0
|
|
2591
|
+
}
|
|
2592
|
+
),
|
|
2593
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list", children: activeRows })
|
|
2271
2594
|
] }),
|
|
2272
2595
|
onDisconnect && hasReownWallet && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2273
2596
|
"button",
|
|
@@ -2286,7 +2609,6 @@ ConnectStep.displayName = "ConnectStep";
|
|
|
2286
2609
|
// src/components/steps/ProcessingStep.tsx
|
|
2287
2610
|
|
|
2288
2611
|
|
|
2289
|
-
|
|
2290
2612
|
// src/components/ui/Button.tsx
|
|
2291
2613
|
|
|
2292
2614
|
function Button({
|
|
@@ -2356,8 +2678,8 @@ function Tooltip({ content, children, className }) {
|
|
|
2356
2678
|
function handleOutside(event) {
|
|
2357
2679
|
const target = event.target;
|
|
2358
2680
|
if (!target) return;
|
|
2359
|
-
if (_optionalChain([triggerRef, 'access',
|
|
2360
|
-
if (_optionalChain([bubbleRef, 'access',
|
|
2681
|
+
if (_optionalChain([triggerRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.contains, 'call', _69 => _69(target)])) return;
|
|
2682
|
+
if (_optionalChain([bubbleRef, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.contains, 'call', _72 => _72(target)])) return;
|
|
2361
2683
|
setOpen(false);
|
|
2362
2684
|
}
|
|
2363
2685
|
function handleKey(event) {
|
|
@@ -2424,6 +2746,89 @@ function Tooltip({ content, children, className }) {
|
|
|
2424
2746
|
}
|
|
2425
2747
|
Tooltip.displayName = "Tooltip";
|
|
2426
2748
|
|
|
2749
|
+
// src/components/ui/FeesAccordion.tsx
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
function FeesAccordion({ total, rows }) {
|
|
2753
|
+
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
2754
|
+
const expandable = rows.length > 0;
|
|
2755
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion", children: [
|
|
2756
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2757
|
+
"button",
|
|
2758
|
+
{
|
|
2759
|
+
type: "button",
|
|
2760
|
+
className: "rs-fees-accordion-summary",
|
|
2761
|
+
"aria-expanded": expandable ? open : void 0,
|
|
2762
|
+
disabled: !expandable,
|
|
2763
|
+
onClick: () => expandable && setOpen((o) => !o),
|
|
2764
|
+
children: [
|
|
2765
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
2766
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: total }),
|
|
2768
|
+
expandable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2769
|
+
"span",
|
|
2770
|
+
{
|
|
2771
|
+
className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
|
|
2772
|
+
"aria-hidden": "true",
|
|
2773
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronDownIcon, {})
|
|
2774
|
+
}
|
|
2775
|
+
)
|
|
2776
|
+
] })
|
|
2777
|
+
]
|
|
2778
|
+
}
|
|
2779
|
+
),
|
|
2780
|
+
expandable && open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fees-accordion-rows", children: rows.map((row, i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-row", children: [
|
|
2781
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.label }),
|
|
2782
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: row.value })
|
|
2783
|
+
] }, `${row.label}-${i}`)) })
|
|
2784
|
+
] });
|
|
2785
|
+
}
|
|
2786
|
+
FeesAccordion.displayName = "FeesAccordion";
|
|
2787
|
+
|
|
2788
|
+
// src/components/steps/SwappedReceipt.tsx
|
|
2789
|
+
|
|
2790
|
+
function SwappedReceipt({
|
|
2791
|
+
onrampMethod,
|
|
2792
|
+
amountPaid,
|
|
2793
|
+
depositedAmount,
|
|
2794
|
+
depositedIcon,
|
|
2795
|
+
feesTotal,
|
|
2796
|
+
feeRows,
|
|
2797
|
+
newLabel,
|
|
2798
|
+
onNewDeposit,
|
|
2799
|
+
onClose
|
|
2800
|
+
}) {
|
|
2801
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2802
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2803
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, {}), title: "Deposit successful" }),
|
|
2804
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
2805
|
+
onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2806
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
|
|
2807
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: onrampMethod })
|
|
2808
|
+
] }),
|
|
2809
|
+
amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2810
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Amount paid" }),
|
|
2811
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: amountPaid })
|
|
2812
|
+
] }),
|
|
2813
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2814
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
|
|
2815
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2816
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
|
|
2817
|
+
depositedIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: depositedIcon, alt: "" }) })
|
|
2818
|
+
] })
|
|
2819
|
+
] }),
|
|
2820
|
+
feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FeesAccordion, { total: feesTotal, rows: _nullishCoalesce(feeRows, () => ( [])) })
|
|
2821
|
+
] }),
|
|
2822
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
2823
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
|
|
2824
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
2825
|
+
] })
|
|
2826
|
+
] }),
|
|
2827
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PoweredBy, {})
|
|
2828
|
+
] });
|
|
2829
|
+
}
|
|
2830
|
+
SwappedReceipt.displayName = "SwappedReceipt";
|
|
2831
|
+
|
|
2427
2832
|
// src/core/webhook.ts
|
|
2428
2833
|
function isRecord(value) {
|
|
2429
2834
|
return typeof value === "object" && value !== null;
|
|
@@ -2437,7 +2842,7 @@ function asNumber(value) {
|
|
|
2437
2842
|
const trimmed = value.trim();
|
|
2438
2843
|
if (!trimmed) return void 0;
|
|
2439
2844
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
2440
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
2845
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _73 => _73[1]])) {
|
|
2441
2846
|
const parsed2 = Number(caipMatch[1]);
|
|
2442
2847
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
2443
2848
|
}
|
|
@@ -2456,28 +2861,28 @@ function asAddress(value) {
|
|
|
2456
2861
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
2457
2862
|
}
|
|
2458
2863
|
function getEventTxHash(event) {
|
|
2459
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2864
|
+
if (!_optionalChain([event, 'optionalAccess', _74 => _74.type])) return void 0;
|
|
2460
2865
|
if (event.type === "deposit-received") {
|
|
2461
|
-
return asString(_optionalChain([event, 'access',
|
|
2866
|
+
return asString(_optionalChain([event, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.transactionHash]));
|
|
2462
2867
|
}
|
|
2463
2868
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
2464
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
2465
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
2466
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
2869
|
+
const deposit = isRecord(_optionalChain([event, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.deposit])) ? event.data.deposit : void 0;
|
|
2870
|
+
const source = isRecord(_optionalChain([event, 'access', _79 => _79.data, 'optionalAccess', _80 => _80.source])) ? event.data.source : void 0;
|
|
2871
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _81 => _81.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _82 => _82.transactionHash]))));
|
|
2467
2872
|
}
|
|
2468
2873
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
2469
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
2470
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
2471
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
2874
|
+
const deposit = isRecord(_optionalChain([event, 'access', _83 => _83.data, 'optionalAccess', _84 => _84.deposit])) ? event.data.deposit : void 0;
|
|
2875
|
+
const source = isRecord(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.source])) ? event.data.source : void 0;
|
|
2876
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _87 => _87.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _88 => _88.transactionHash]))));
|
|
2472
2877
|
}
|
|
2473
2878
|
if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
|
|
2474
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
2475
|
-
return asString(_optionalChain([deposit, 'optionalAccess',
|
|
2879
|
+
const deposit = isRecord(_optionalChain([event, 'access', _89 => _89.data, 'optionalAccess', _90 => _90.deposit])) ? event.data.deposit : void 0;
|
|
2880
|
+
return asString(_optionalChain([deposit, 'optionalAccess', _91 => _91.transactionHash]));
|
|
2476
2881
|
}
|
|
2477
2882
|
return void 0;
|
|
2478
2883
|
}
|
|
2479
2884
|
function getEventSourceDetails(event) {
|
|
2480
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2885
|
+
if (!_optionalChain([event, 'optionalAccess', _92 => _92.type]) || !isRecord(event.data)) return {};
|
|
2481
2886
|
if (event.type === "deposit-received") {
|
|
2482
2887
|
return {
|
|
2483
2888
|
chainId: asNumber(event.data.chain),
|
|
@@ -2489,18 +2894,38 @@ function getEventSourceDetails(event) {
|
|
|
2489
2894
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
2490
2895
|
if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
|
|
2491
2896
|
return {
|
|
2492
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
2493
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
2494
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
2897
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _93 => _93.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _94 => _94.chain])))),
|
|
2898
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _95 => _95.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _96 => _96.amount])))),
|
|
2899
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _97 => _97.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _98 => _98.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.token]))))
|
|
2495
2900
|
};
|
|
2496
2901
|
}
|
|
2497
2902
|
return {};
|
|
2498
2903
|
}
|
|
2904
|
+
function asChain(value) {
|
|
2905
|
+
if (typeof value === "string" && value.trim().startsWith("solana")) {
|
|
2906
|
+
return "solana";
|
|
2907
|
+
}
|
|
2908
|
+
return asNumber(value);
|
|
2909
|
+
}
|
|
2910
|
+
function getEventDestinationDetails(event) {
|
|
2911
|
+
if (!_optionalChain([event, 'optionalAccess', _100 => _100.type]) || !isRecord(event.data)) return {};
|
|
2912
|
+
if (event.type !== "bridge-started" && event.type !== "bridge-complete" && event.type !== "post-bridge-swap-complete") {
|
|
2913
|
+
return {};
|
|
2914
|
+
}
|
|
2915
|
+
const destination = isRecord(event.data.destination) ? event.data.destination : void 0;
|
|
2916
|
+
if (!destination) return {};
|
|
2917
|
+
const token = asString(destination.asset);
|
|
2918
|
+
return {
|
|
2919
|
+
chainId: asChain(destination.chain),
|
|
2920
|
+
amount: asAmount(destination.amount),
|
|
2921
|
+
token: _optionalChain([token, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]) || void 0
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2499
2924
|
function isDepositEvent(event) {
|
|
2500
|
-
return _optionalChain([event, 'optionalAccess',
|
|
2925
|
+
return _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "error";
|
|
2501
2926
|
}
|
|
2502
2927
|
function isFailedEvent(event) {
|
|
2503
|
-
return _optionalChain([event, 'optionalAccess',
|
|
2928
|
+
return _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "error";
|
|
2504
2929
|
}
|
|
2505
2930
|
function isHexString(value) {
|
|
2506
2931
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -2512,7 +2937,7 @@ function txRefsMatch(a, b) {
|
|
|
2512
2937
|
return a === b;
|
|
2513
2938
|
}
|
|
2514
2939
|
function formatBridgeFailedMessage(event) {
|
|
2515
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
2940
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _113 => _113.data]), () => ( {}));
|
|
2516
2941
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
2517
2942
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
2518
2943
|
function toUserFacingFailure(raw) {
|
|
@@ -2540,13 +2965,134 @@ function formatBridgeFailedMessage(event) {
|
|
|
2540
2965
|
return { message: "Bridge failed" };
|
|
2541
2966
|
}
|
|
2542
2967
|
function failureMessageForEvent(event) {
|
|
2543
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
2968
|
+
if (_optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error") {
|
|
2544
2969
|
const message = isRecord(event.data) ? asString(event.data.message) : void 0;
|
|
2545
2970
|
return _nullishCoalesce(message, () => ( "Unknown error"));
|
|
2546
2971
|
}
|
|
2547
2972
|
return formatBridgeFailedMessage(event).message;
|
|
2548
2973
|
}
|
|
2549
2974
|
|
|
2975
|
+
// src/core/token-amount.ts
|
|
2976
|
+
|
|
2977
|
+
var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
|
|
2978
|
+
"USDC",
|
|
2979
|
+
"USDT",
|
|
2980
|
+
"USDT0",
|
|
2981
|
+
"DAI",
|
|
2982
|
+
"FRAX",
|
|
2983
|
+
"PYUSD",
|
|
2984
|
+
"USDP",
|
|
2985
|
+
"TUSD",
|
|
2986
|
+
"GUSD",
|
|
2987
|
+
"USDS",
|
|
2988
|
+
"LUSD",
|
|
2989
|
+
"BUSD",
|
|
2990
|
+
"USDE"
|
|
2991
|
+
]);
|
|
2992
|
+
var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
|
|
2993
|
+
function resolveTokenDisplay(token, chain, fallback) {
|
|
2994
|
+
if (token !== void 0) {
|
|
2995
|
+
if (chain === "solana") {
|
|
2996
|
+
const solanaToken = _chunkABVRVW3Pcjs.getSolanaTokenByMint.call(void 0, token);
|
|
2997
|
+
if (solanaToken) {
|
|
2998
|
+
return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
|
|
2999
|
+
}
|
|
3000
|
+
} else if (EVM_ADDRESS_RE.test(token)) {
|
|
3001
|
+
const symbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, token, chain);
|
|
3002
|
+
const decimals = _chunkABVRVW3Pcjs.findTokenDecimals.call(void 0, token, chain);
|
|
3003
|
+
if (symbol !== "Token" || decimals !== void 0) {
|
|
3004
|
+
return {
|
|
3005
|
+
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _115 => _115.symbol]), () => ( symbol)),
|
|
3006
|
+
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _116 => _116.decimals])))
|
|
3007
|
+
};
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
return {
|
|
3012
|
+
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _117 => _117.symbol]), () => ( "Token")),
|
|
3013
|
+
decimals: _optionalChain([fallback, 'optionalAccess', _118 => _118.decimals])
|
|
3014
|
+
};
|
|
3015
|
+
}
|
|
3016
|
+
function maxFractionDigitsFor(symbol) {
|
|
3017
|
+
if (!symbol) return 6;
|
|
3018
|
+
return STABLECOIN_SYMBOLS.has(symbol.toUpperCase()) ? 3 : 6;
|
|
3019
|
+
}
|
|
3020
|
+
function formatTokenAmount(amount, symbol) {
|
|
3021
|
+
if (!Number.isFinite(amount)) return void 0;
|
|
3022
|
+
return amount.toLocaleString("en-US", {
|
|
3023
|
+
minimumFractionDigits: 2,
|
|
3024
|
+
maximumFractionDigits: maxFractionDigitsFor(symbol)
|
|
3025
|
+
});
|
|
3026
|
+
}
|
|
3027
|
+
function tokenAmountToNumber(rawAmount, decimals) {
|
|
3028
|
+
if (decimals === void 0) return void 0;
|
|
3029
|
+
try {
|
|
3030
|
+
const value = Number(_viem.formatUnits.call(void 0, BigInt(rawAmount), decimals));
|
|
3031
|
+
return Number.isFinite(value) ? value : void 0;
|
|
3032
|
+
} catch (e4) {
|
|
3033
|
+
return void 0;
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
function formatRawTokenAmount(rawAmount, token) {
|
|
3037
|
+
const value = tokenAmountToNumber(rawAmount, token.decimals);
|
|
3038
|
+
if (value === void 0) return void 0;
|
|
3039
|
+
return formatTokenAmount(value, token.symbol);
|
|
3040
|
+
}
|
|
3041
|
+
function priceUsdFor(symbol, prices) {
|
|
3042
|
+
if (!symbol) return void 0;
|
|
3043
|
+
const upper = symbol.toUpperCase();
|
|
3044
|
+
const quoted = prices[upper];
|
|
3045
|
+
if (typeof quoted === "number" && quoted > 0) return quoted;
|
|
3046
|
+
return STABLECOIN_SYMBOLS.has(upper) ? 1 : void 0;
|
|
3047
|
+
}
|
|
3048
|
+
function estimateReceiveAmount(params) {
|
|
3049
|
+
const { sourceAmount, sourceSymbol, targetSymbol, sourceAmountUsd, prices } = params;
|
|
3050
|
+
if (sourceSymbol !== void 0 && sourceSymbol.toUpperCase() === targetSymbol.toUpperCase()) {
|
|
3051
|
+
return sourceAmount;
|
|
3052
|
+
}
|
|
3053
|
+
const usdValue = sourceAmountUsd !== void 0 && Number.isFinite(sourceAmountUsd) ? sourceAmountUsd : sourceAmount !== void 0 ? (() => {
|
|
3054
|
+
const sourcePrice = priceUsdFor(sourceSymbol, prices);
|
|
3055
|
+
return sourcePrice !== void 0 ? sourceAmount * sourcePrice : void 0;
|
|
3056
|
+
})() : void 0;
|
|
3057
|
+
if (usdValue === void 0) return void 0;
|
|
3058
|
+
const targetPrice = priceUsdFor(targetSymbol, prices);
|
|
3059
|
+
if (targetPrice === void 0) return void 0;
|
|
3060
|
+
return usdValue / targetPrice;
|
|
3061
|
+
}
|
|
3062
|
+
function formatReceiveEstimate(params) {
|
|
3063
|
+
const estimate = estimateReceiveAmount(params);
|
|
3064
|
+
if (estimate === void 0) return void 0;
|
|
3065
|
+
const formatted = formatTokenAmount(estimate, params.targetSymbol);
|
|
3066
|
+
if (formatted === void 0) return void 0;
|
|
3067
|
+
const sameSymbol = params.sourceSymbol.toUpperCase() === params.targetSymbol.toUpperCase();
|
|
3068
|
+
return sameSymbol ? `${formatted} ${params.targetSymbol}` : `~${formatted} ${params.targetSymbol}`;
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
// src/core/useTokenPrices.ts
|
|
3072
|
+
|
|
3073
|
+
function useTokenPrices(service, symbols) {
|
|
3074
|
+
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
3075
|
+
const symbolsKey = [
|
|
3076
|
+
...new Set(
|
|
3077
|
+
symbols.filter((symbol) => Boolean(symbol)).map((symbol) => symbol.toUpperCase())
|
|
3078
|
+
)
|
|
3079
|
+
].sort().join(",");
|
|
3080
|
+
_react.useEffect.call(void 0, () => {
|
|
3081
|
+
if (!symbolsKey) return;
|
|
3082
|
+
let cancelled = false;
|
|
3083
|
+
service.fetchPrices(symbolsKey.split(",")).then((result) => {
|
|
3084
|
+
if (!cancelled && result && Object.keys(result).length > 0) {
|
|
3085
|
+
setPrices(result);
|
|
3086
|
+
}
|
|
3087
|
+
}).catch(() => {
|
|
3088
|
+
});
|
|
3089
|
+
return () => {
|
|
3090
|
+
cancelled = true;
|
|
3091
|
+
};
|
|
3092
|
+
}, [service, symbolsKey]);
|
|
3093
|
+
return prices;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
2550
3096
|
// src/components/steps/ProcessingStep.tsx
|
|
2551
3097
|
|
|
2552
3098
|
function SuccessBadge() {
|
|
@@ -2619,24 +3165,6 @@ var SOFT_DELAY_MS = {
|
|
|
2619
3165
|
bridging: 4 * 60 * 1e3
|
|
2620
3166
|
};
|
|
2621
3167
|
var PHASE_TIMINGS_PREFIX = "rhinestone:phase-timings";
|
|
2622
|
-
var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
|
|
2623
|
-
"USDC",
|
|
2624
|
-
"USDT",
|
|
2625
|
-
"DAI",
|
|
2626
|
-
"FRAX",
|
|
2627
|
-
"PYUSD",
|
|
2628
|
-
"USDP",
|
|
2629
|
-
"TUSD",
|
|
2630
|
-
"GUSD",
|
|
2631
|
-
"USDS",
|
|
2632
|
-
"LUSD",
|
|
2633
|
-
"BUSD",
|
|
2634
|
-
"USDE"
|
|
2635
|
-
]);
|
|
2636
|
-
function maxFractionDigitsFor(symbol) {
|
|
2637
|
-
if (!symbol) return 6;
|
|
2638
|
-
return STABLECOIN_SYMBOLS.has(symbol.toUpperCase()) ? 3 : 6;
|
|
2639
|
-
}
|
|
2640
3168
|
var PAYMENT_METHOD_LABELS = {
|
|
2641
3169
|
creditcard: "Card",
|
|
2642
3170
|
debitcard: "Card",
|
|
@@ -2668,7 +3196,7 @@ function loadPhaseTimings(txHash) {
|
|
|
2668
3196
|
const parsed = JSON.parse(raw);
|
|
2669
3197
|
if (typeof parsed.startedAt !== "number") return null;
|
|
2670
3198
|
return parsed;
|
|
2671
|
-
} catch (
|
|
3199
|
+
} catch (e5) {
|
|
2672
3200
|
return null;
|
|
2673
3201
|
}
|
|
2674
3202
|
}
|
|
@@ -2679,7 +3207,7 @@ function savePhaseTimings(txHash, timings) {
|
|
|
2679
3207
|
`${PHASE_TIMINGS_PREFIX}:${txHash}`,
|
|
2680
3208
|
JSON.stringify(timings)
|
|
2681
3209
|
);
|
|
2682
|
-
} catch (
|
|
3210
|
+
} catch (e6) {
|
|
2683
3211
|
}
|
|
2684
3212
|
}
|
|
2685
3213
|
function isEventForTx(event, txHash) {
|
|
@@ -2688,12 +3216,12 @@ function isEventForTx(event, txHash) {
|
|
|
2688
3216
|
return txRefsMatch(eventTxHash, txHash);
|
|
2689
3217
|
}
|
|
2690
3218
|
function parseWebhookTimestamp(event) {
|
|
2691
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
3219
|
+
if (typeof _optionalChain([event, 'optionalAccess', _119 => _119.time]) !== "string") return void 0;
|
|
2692
3220
|
const timestamp = Date.parse(event.time);
|
|
2693
3221
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
2694
3222
|
}
|
|
2695
3223
|
function syncPhaseTimings(previous, event) {
|
|
2696
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3224
|
+
if (!_optionalChain([event, 'optionalAccess', _120 => _120.type])) return previous;
|
|
2697
3225
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
2698
3226
|
const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed" || event.type === "error") && previous.receivedAt === void 0;
|
|
2699
3227
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
|
|
@@ -2755,9 +3283,9 @@ function getCurrentPhaseId(state, phaseTimings) {
|
|
|
2755
3283
|
if (state.type === "complete") {
|
|
2756
3284
|
return void 0;
|
|
2757
3285
|
}
|
|
2758
|
-
if (_optionalChain([state, 'access',
|
|
3286
|
+
if (_optionalChain([state, 'access', _121 => _121.lastEvent, 'optionalAccess', _122 => _122.type]) === "bridge-started" || _optionalChain([state, 'access', _123 => _123.lastEvent, 'optionalAccess', _124 => _124.type]) === "bridge-complete")
|
|
2759
3287
|
return "bridging";
|
|
2760
|
-
if (_optionalChain([state, 'access',
|
|
3288
|
+
if (_optionalChain([state, 'access', _125 => _125.lastEvent, 'optionalAccess', _126 => _126.type]) === "deposit-received") return "received";
|
|
2761
3289
|
return "confirming";
|
|
2762
3290
|
}
|
|
2763
3291
|
function ProcessingStep({
|
|
@@ -2842,7 +3370,7 @@ function ProcessingStep({
|
|
|
2842
3370
|
flowLabel
|
|
2843
3371
|
});
|
|
2844
3372
|
const context = processingContextRef.current;
|
|
2845
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3373
|
+
_optionalChain([onDepositCompleteRef, 'access', _127 => _127.current, 'optionalCall', _128 => _128(txHash, void 0, {
|
|
2846
3374
|
amount: context.amount,
|
|
2847
3375
|
sourceChain: context.sourceChain,
|
|
2848
3376
|
sourceToken: context.sourceToken,
|
|
@@ -2884,7 +3412,7 @@ function ProcessingStep({
|
|
|
2884
3412
|
updatePhaseTimings(
|
|
2885
3413
|
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
2886
3414
|
);
|
|
2887
|
-
}, [_optionalChain([state, 'access',
|
|
3415
|
+
}, [_optionalChain([state, 'access', _129 => _129.lastEvent, 'optionalAccess', _130 => _130.time]), _optionalChain([state, 'access', _131 => _131.lastEvent, 'optionalAccess', _132 => _132.type]), updatePhaseTimings]);
|
|
2888
3416
|
const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
|
|
2889
3417
|
_react.useEffect.call(void 0, () => {
|
|
2890
3418
|
let cancelled = false;
|
|
@@ -2931,21 +3459,21 @@ function ProcessingStep({
|
|
|
2931
3459
|
debugLog(debug, "processing", "poll:event", {
|
|
2932
3460
|
type: lastEvent2.type,
|
|
2933
3461
|
matchesTx: eventMatchesTx,
|
|
2934
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
3462
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _133 => _133.intentId])
|
|
2935
3463
|
});
|
|
2936
3464
|
}
|
|
2937
3465
|
if (!isMounted) return;
|
|
2938
3466
|
const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
|
|
2939
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3467
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _134 => _134.type]) === "post-bridge-swap-complete") {
|
|
2940
3468
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2941
|
-
const swapTxHash = _optionalChain([eventForCurrentTx, 'access',
|
|
3469
|
+
const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _135 => _135.data, 'optionalAccess', _136 => _136.swap, 'optionalAccess', _137 => _137.transactionHash]);
|
|
2942
3470
|
debugLog(debug, "processing", "state:complete", {
|
|
2943
3471
|
txHash,
|
|
2944
3472
|
destinationTxHash: swapTxHash,
|
|
2945
3473
|
event: eventForCurrentTx.type
|
|
2946
3474
|
});
|
|
2947
3475
|
const context = processingContextRef.current;
|
|
2948
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3476
|
+
_optionalChain([onDepositCompleteRef, 'access', _138 => _138.current, 'optionalCall', _139 => _139(txHash, swapTxHash, {
|
|
2949
3477
|
amount: context.amount,
|
|
2950
3478
|
sourceChain: context.sourceChain,
|
|
2951
3479
|
sourceToken: context.sourceToken,
|
|
@@ -2956,7 +3484,7 @@ function ProcessingStep({
|
|
|
2956
3484
|
})]);
|
|
2957
3485
|
return;
|
|
2958
3486
|
}
|
|
2959
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3487
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _140 => _140.type]) === "post-bridge-swap-failed") {
|
|
2960
3488
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
2961
3489
|
setState({
|
|
2962
3490
|
type: "failed",
|
|
@@ -2968,19 +3496,19 @@ function ProcessingStep({
|
|
|
2968
3496
|
message: formatted.message,
|
|
2969
3497
|
code: formatted.code
|
|
2970
3498
|
});
|
|
2971
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
3499
|
+
_optionalChain([onDepositFailedRef, 'access', _141 => _141.current, 'optionalCall', _142 => _142(txHash, formatted.message)]);
|
|
2972
3500
|
return;
|
|
2973
3501
|
}
|
|
2974
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3502
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _143 => _143.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
|
|
2975
3503
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2976
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
3504
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _144 => _144.data, 'optionalAccess', _145 => _145.destination, 'optionalAccess', _146 => _146.transactionHash]);
|
|
2977
3505
|
debugLog(debug, "processing", "state:complete", {
|
|
2978
3506
|
txHash,
|
|
2979
3507
|
destinationTxHash: destinationTxHash2,
|
|
2980
3508
|
event: eventForCurrentTx.type
|
|
2981
3509
|
});
|
|
2982
3510
|
const context = processingContextRef.current;
|
|
2983
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3511
|
+
_optionalChain([onDepositCompleteRef, 'access', _147 => _147.current, 'optionalCall', _148 => _148(txHash, destinationTxHash2, {
|
|
2984
3512
|
amount: context.amount,
|
|
2985
3513
|
sourceChain: context.sourceChain,
|
|
2986
3514
|
sourceToken: context.sourceToken,
|
|
@@ -2991,7 +3519,7 @@ function ProcessingStep({
|
|
|
2991
3519
|
})]);
|
|
2992
3520
|
return;
|
|
2993
3521
|
}
|
|
2994
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3522
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _149 => _149.type]) === "bridge-failed") {
|
|
2995
3523
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
2996
3524
|
setState({
|
|
2997
3525
|
type: "failed",
|
|
@@ -3003,11 +3531,11 @@ function ProcessingStep({
|
|
|
3003
3531
|
message: formatted.message,
|
|
3004
3532
|
code: formatted.code
|
|
3005
3533
|
});
|
|
3006
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
3534
|
+
_optionalChain([onDepositFailedRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, formatted.message)]);
|
|
3007
3535
|
return;
|
|
3008
3536
|
}
|
|
3009
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3010
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
3537
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _152 => _152.type]) === "error") {
|
|
3538
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _153 => _153.data, 'optionalAccess', _154 => _154.message]), () => ( "Unknown error"));
|
|
3011
3539
|
setState({
|
|
3012
3540
|
type: "failed",
|
|
3013
3541
|
message: errorMessage,
|
|
@@ -3017,7 +3545,7 @@ function ProcessingStep({
|
|
|
3017
3545
|
txHash,
|
|
3018
3546
|
message: errorMessage
|
|
3019
3547
|
});
|
|
3020
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
3548
|
+
_optionalChain([onDepositFailedRef, 'access', _155 => _155.current, 'optionalCall', _156 => _156(txHash, errorMessage)]);
|
|
3021
3549
|
return;
|
|
3022
3550
|
}
|
|
3023
3551
|
setState((previous) => ({
|
|
@@ -3078,7 +3606,7 @@ function ProcessingStep({
|
|
|
3078
3606
|
txHash,
|
|
3079
3607
|
timeoutMs: ESCALATED_DELAY_MS
|
|
3080
3608
|
});
|
|
3081
|
-
_optionalChain([onErrorRef, 'access',
|
|
3609
|
+
_optionalChain([onErrorRef, 'access', _157 => _157.current, 'optionalCall', _158 => _158(message, "PROCESS_TIMEOUT")]);
|
|
3082
3610
|
}, ESCALATED_DELAY_MS);
|
|
3083
3611
|
return () => clearTimeout(timeoutId);
|
|
3084
3612
|
}, [debug, directTransfer, onErrorRef, state.type, txHash]);
|
|
@@ -3090,99 +3618,88 @@ function ProcessingStep({
|
|
|
3090
3618
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
3091
3619
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
3092
3620
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
3093
|
-
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess',
|
|
3094
|
-
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
3621
|
+
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _159 => _159.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _160 => _160.type]) === "post-bridge-swap-failed";
|
|
3622
|
+
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _161 => _161.data, 'optionalAccess', _162 => _162.swap, 'optionalAccess', _163 => _163.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _164 => _164.data, 'optionalAccess', _165 => _165.destination, 'optionalAccess', _166 => _166.transactionHash]) || null;
|
|
3095
3623
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
3096
3624
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
3097
3625
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
3098
3626
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
3099
|
-
const sourceExplorerUrl =
|
|
3100
|
-
const destExplorerUrl = destinationTxHash ?
|
|
3101
|
-
const
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
const raw = _viem.formatUnits.call(void 0, BigInt(displayAmount), sourceDecimals);
|
|
3111
|
-
const numeric = Number(raw);
|
|
3112
|
-
if (!Number.isFinite(numeric)) return raw;
|
|
3113
|
-
return numeric.toLocaleString("en-US", {
|
|
3114
|
-
minimumFractionDigits: 2,
|
|
3115
|
-
maximumFractionDigits: amountMaxDigits
|
|
3116
|
-
});
|
|
3117
|
-
} catch (e6) {
|
|
3118
|
-
return Number(displayAmount).toLocaleString("en-US", {
|
|
3119
|
-
minimumFractionDigits: 2,
|
|
3120
|
-
maximumFractionDigits: amountMaxDigits
|
|
3121
|
-
});
|
|
3122
|
-
}
|
|
3627
|
+
const sourceExplorerUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
3628
|
+
const destExplorerUrl = destinationTxHash ? _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
3629
|
+
const sourceDisplay = (() => {
|
|
3630
|
+
const resolved = resolveTokenDisplay(displaySourceToken, displaySourceChain, {
|
|
3631
|
+
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
3632
|
+
decimals: providedSourceDecimals
|
|
3633
|
+
});
|
|
3634
|
+
return {
|
|
3635
|
+
symbol: resolved.symbol,
|
|
3636
|
+
decimals: _nullishCoalesce(resolved.decimals, () => ( (displaySourceChain === "solana" ? 9 : 18)))
|
|
3637
|
+
};
|
|
3123
3638
|
})();
|
|
3124
|
-
const
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3639
|
+
const sourceSymbol = sourceDisplay.symbol;
|
|
3640
|
+
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(formatRawTokenAmount(displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
|
|
3641
|
+
formatTokenAmount(Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
|
|
3642
|
+
const isBridgeHopDestination = hasPostBridgeActions && (_optionalChain([lastEvent, 'optionalAccess', _167 => _167.type]) === "bridge-started" || _optionalChain([lastEvent, 'optionalAccess', _168 => _168.type]) === "bridge-complete");
|
|
3643
|
+
const eventDestination = isBridgeHopDestination ? {} : getEventDestinationDetails(lastEvent);
|
|
3644
|
+
const targetDisplay = resolveTokenDisplay(
|
|
3645
|
+
_nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
3646
|
+
_nullishCoalesce(eventDestination.chainId, () => ( targetChain)),
|
|
3647
|
+
// Dapp deposits default to USDC targets; mirror the source symbol last so
|
|
3648
|
+
// unresolvable same-token routes still label sensibly.
|
|
3649
|
+
{ symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
|
|
3650
|
+
);
|
|
3651
|
+
const targetSymbol = targetDisplay.symbol;
|
|
3652
|
+
const formattedDestinationAmount = eventDestination.amount !== void 0 ? formatRawTokenAmount(eventDestination.amount, targetDisplay) : void 0;
|
|
3653
|
+
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
3654
|
+
const prices = useTokenPrices(service, [
|
|
3655
|
+
sourceDisplay.symbol,
|
|
3656
|
+
targetDisplay.symbol
|
|
3657
|
+
]);
|
|
3658
|
+
const estimatedReceiveAmount = (() => {
|
|
3659
|
+
const estimate = estimateReceiveAmount({
|
|
3660
|
+
sourceAmount: tokenAmountToNumber(displayAmount, sourceDisplay.decimals),
|
|
3661
|
+
sourceSymbol: sourceDisplay.symbol,
|
|
3662
|
+
targetSymbol: targetDisplay.symbol,
|
|
3663
|
+
sourceAmountUsd: amountUsdNumber,
|
|
3664
|
+
prices
|
|
3665
|
+
});
|
|
3666
|
+
return estimate !== void 0 ? formatTokenAmount(estimate, targetDisplay.symbol) : void 0;
|
|
3132
3667
|
})();
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3668
|
+
const receiveDisplay = formattedDestinationAmount ? `${formattedDestinationAmount} ${targetSymbol}` : estimatedReceiveAmount !== void 0 ? `~${estimatedReceiveAmount} ${targetSymbol}` : amountUsdNumber !== void 0 ? `~$${amountUsdNumber.toFixed(2)}` : (
|
|
3669
|
+
// Cross-token with no price and no USD context (rare QR case):
|
|
3670
|
+
// an honest dash beats a wrong number.
|
|
3671
|
+
"\u2014"
|
|
3672
|
+
);
|
|
3673
|
+
const formattedBridgingCost = (() => {
|
|
3674
|
+
if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
|
|
3137
3675
|
return void 0;
|
|
3138
3676
|
}
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
try {
|
|
3143
|
-
const raw = _viem.formatUnits.call(void 0, destinationAmountRaw, sourceDecimals);
|
|
3144
|
-
const numeric = Number(raw);
|
|
3145
|
-
if (!Number.isFinite(numeric)) return raw;
|
|
3146
|
-
return numeric.toLocaleString("en-US", {
|
|
3147
|
-
minimumFractionDigits: 2,
|
|
3148
|
-
maximumFractionDigits: amountMaxDigits
|
|
3149
|
-
});
|
|
3150
|
-
} catch (e9) {
|
|
3677
|
+
const sentValue = tokenAmountToNumber(displayAmount, sourceDisplay.decimals);
|
|
3678
|
+
const receivedValue = eventDestination.amount !== void 0 ? tokenAmountToNumber(eventDestination.amount, targetDisplay.decimals) : void 0;
|
|
3679
|
+
if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
|
|
3151
3680
|
return void 0;
|
|
3152
3681
|
}
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
try {
|
|
3156
|
-
const raw = _viem.formatUnits.call(void 0, bridgingCostRaw, sourceDecimals);
|
|
3157
|
-
const numeric = Number(raw);
|
|
3158
|
-
if (!Number.isFinite(numeric)) return raw;
|
|
3159
|
-
return numeric.toLocaleString("en-US", {
|
|
3160
|
-
minimumFractionDigits: 2,
|
|
3161
|
-
maximumFractionDigits: amountMaxDigits
|
|
3162
|
-
});
|
|
3163
|
-
} catch (e10) {
|
|
3682
|
+
const formatted = formatTokenAmount(sentValue - receivedValue, sourceSymbol);
|
|
3683
|
+
if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
|
|
3164
3684
|
return void 0;
|
|
3165
3685
|
}
|
|
3166
|
-
|
|
3686
|
+
return formatted;
|
|
3687
|
+
})();
|
|
3167
3688
|
const currentPhaseId = getCurrentPhaseId(state, phaseTimings);
|
|
3168
3689
|
const activePhaseStartedAt = currentPhaseId ? getPhaseStartTime(currentPhaseId, phaseTimings) : void 0;
|
|
3169
3690
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
3170
3691
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
3171
3692
|
void delayPhaseId;
|
|
3172
3693
|
void hasEscalatedDelay;
|
|
3173
|
-
const
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
const
|
|
3178
|
-
const
|
|
3179
|
-
const targetChainIcon = _chunkMILJQWPTcjs.getChainIcon.call(void 0, targetChain);
|
|
3180
|
-
const sourceTokenIcon = _chunkMILJQWPTcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
3181
|
-
const sourceChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, displaySourceChain);
|
|
3182
|
-
const targetChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, targetChain);
|
|
3694
|
+
const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
3695
|
+
const sourceChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, displaySourceChain);
|
|
3696
|
+
const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
|
|
3697
|
+
const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
3698
|
+
const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, displaySourceChain);
|
|
3699
|
+
const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
|
|
3183
3700
|
const timerText = formatTimer(elapsedSeconds);
|
|
3184
|
-
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
3185
|
-
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
3701
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _169 => _169.feeSponsored]), () => ( false));
|
|
3702
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _170 => _170.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
3186
3703
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
3187
3704
|
const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
|
|
3188
3705
|
const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
@@ -3192,6 +3709,41 @@ function ProcessingStep({
|
|
|
3192
3709
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
3193
3710
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
3194
3711
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
|
|
3712
|
+
if (isComplete && isSwappedOrder) {
|
|
3713
|
+
const onrampMethod = _optionalChain([swappedFiatContext, 'optionalAccess', _171 => _171.paymentMethod]) ? formatPaymentMethod(swappedFiatContext.paymentMethod) : null;
|
|
3714
|
+
const amountPaid = _optionalChain([swappedFiatContext, 'optionalAccess', _172 => _172.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null;
|
|
3715
|
+
const depositedAmount = receiveDisplay;
|
|
3716
|
+
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _173 => _173.onrampFeeUsd]), () => ( null));
|
|
3717
|
+
const networkFeeUsd = quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
|
|
3718
|
+
const feeRows = [];
|
|
3719
|
+
if (onrampFeeUsd != null) {
|
|
3720
|
+
feeRows.push({
|
|
3721
|
+
label: "On-ramp fee",
|
|
3722
|
+
value: `$${onrampFeeUsd.toFixed(2)}`
|
|
3723
|
+
});
|
|
3724
|
+
}
|
|
3725
|
+
if (networkFeeUsd != null) {
|
|
3726
|
+
feeRows.push({
|
|
3727
|
+
label: "Network fee",
|
|
3728
|
+
value: `$${networkFeeUsd.toFixed(2)}`
|
|
3729
|
+
});
|
|
3730
|
+
}
|
|
3731
|
+
const feesTotal = feeRows.length > 0 ? `$${((_nullishCoalesce(onrampFeeUsd, () => ( 0))) + (_nullishCoalesce(networkFeeUsd, () => ( 0)))).toFixed(2)}` : null;
|
|
3732
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3733
|
+
SwappedReceipt,
|
|
3734
|
+
{
|
|
3735
|
+
onrampMethod,
|
|
3736
|
+
amountPaid,
|
|
3737
|
+
depositedAmount,
|
|
3738
|
+
depositedIcon: targetTokenIcon,
|
|
3739
|
+
feesTotal,
|
|
3740
|
+
feeRows,
|
|
3741
|
+
newLabel: `New ${flowNoun}`,
|
|
3742
|
+
onNewDeposit,
|
|
3743
|
+
onClose
|
|
3744
|
+
}
|
|
3745
|
+
);
|
|
3746
|
+
}
|
|
3195
3747
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3196
3748
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3197
3749
|
headerContent,
|
|
@@ -3237,7 +3789,7 @@ function ProcessingStep({
|
|
|
3237
3789
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
|
|
3238
3790
|
] }),
|
|
3239
3791
|
isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3240
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
3792
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _174 => _174.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3241
3793
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
|
|
3242
3794
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
3243
3795
|
"$",
|
|
@@ -3249,7 +3801,7 @@ function ProcessingStep({
|
|
|
3249
3801
|
] })
|
|
3250
3802
|
] })
|
|
3251
3803
|
] }),
|
|
3252
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
3804
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _175 => _175.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3253
3805
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
|
|
3254
3806
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
3255
3807
|
"$",
|
|
@@ -3271,7 +3823,7 @@ function ProcessingStep({
|
|
|
3271
3823
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "You send" : "You sent" }),
|
|
3272
3824
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
3273
3825
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
3274
|
-
|
|
3826
|
+
formattedSentAmount,
|
|
3275
3827
|
" ",
|
|
3276
3828
|
sourceSymbol
|
|
3277
3829
|
] }),
|
|
@@ -3281,7 +3833,7 @@ function ProcessingStep({
|
|
|
3281
3833
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
3282
3834
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
3283
3835
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
3284
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
3836
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
3285
3837
|
targetTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: targetTokenIcon, alt: "" }) })
|
|
3286
3838
|
] })
|
|
3287
3839
|
] }),
|
|
@@ -3393,7 +3945,7 @@ function loadSessionOwnerFromStorage(eoaAddress) {
|
|
|
3393
3945
|
privateKey: parsed.privateKey,
|
|
3394
3946
|
address: account.address
|
|
3395
3947
|
};
|
|
3396
|
-
} catch (
|
|
3948
|
+
} catch (e7) {
|
|
3397
3949
|
return null;
|
|
3398
3950
|
}
|
|
3399
3951
|
}
|
|
@@ -3473,4 +4025,9 @@ function accountFromPrivateKey(privateKey) {
|
|
|
3473
4025
|
|
|
3474
4026
|
|
|
3475
4027
|
|
|
3476
|
-
|
|
4028
|
+
|
|
4029
|
+
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.getExchangeLogo = getExchangeLogo; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.formatTokenAmount = formatTokenAmount; exports.formatReceiveEstimate = formatReceiveEstimate; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
|