@rhinestone/deposit-modal 0.4.0 → 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-PC7EX5VK.mjs → DepositModalReown-EXI7MW65.mjs} +3 -3
- package/dist/{DepositModalReown-KFTMS2WX.cjs → DepositModalReown-FMAPWBQM.cjs} +6 -6
- package/dist/{WithdrawModalReown-Z2YF2FSJ.cjs → WithdrawModalReown-CTT3EXMG.cjs} +6 -6
- package/dist/{WithdrawModalReown-BE23LUMT.mjs → WithdrawModalReown-G7EM6HXO.mjs} +3 -3
- package/dist/{chunk-WCIGOV34.mjs → chunk-3GLQC2KQ.mjs} +56 -8
- package/dist/{chunk-UFKFSGT3.mjs → chunk-43RTPRQY.mjs} +1 -1
- package/dist/{chunk-GKC22JC4.mjs → chunk-A33QFRKD.mjs} +369 -285
- package/dist/{chunk-7MP2UWIQ.cjs → chunk-BTDRUAPJ.cjs} +293 -449
- package/dist/{chunk-AE5LHTPM.cjs → chunk-JHT2MJ42.cjs} +108 -60
- package/dist/{chunk-OQVLEVNR.cjs → chunk-LJJCPDZO.cjs} +175 -91
- package/dist/{chunk-3PVDRSJ7.mjs → chunk-RTAIW3WW.mjs} +334 -490
- package/dist/{chunk-3MXWIYAT.cjs → chunk-ULCCXH2A.cjs} +2 -2
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/styles.css +74 -34
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
getAssetId,
|
|
52
52
|
getEventSourceDetails,
|
|
53
53
|
getEventTxHash,
|
|
54
|
+
getExchangeLogo,
|
|
54
55
|
getHyperEvmReadClient,
|
|
55
56
|
getPublicClient,
|
|
56
57
|
isDepositEvent,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
tokenFormatter,
|
|
63
64
|
txRefsMatch,
|
|
64
65
|
useLatestRef
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-A33QFRKD.mjs";
|
|
66
67
|
import {
|
|
67
68
|
SAFE_ABI
|
|
68
69
|
} from "./chunk-F7P4MV72.mjs";
|
|
@@ -2417,43 +2418,33 @@ function SwappedIframeStep({
|
|
|
2417
2418
|
);
|
|
2418
2419
|
}
|
|
2419
2420
|
return /* @__PURE__ */ jsxs9("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
title: "Deposit",
|
|
2426
|
-
subtitle: "Add money to your balance"
|
|
2427
|
-
}
|
|
2428
|
-
),
|
|
2429
|
-
/* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
2430
|
-
loadError && /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-error", children: [
|
|
2431
|
-
/* @__PURE__ */ jsx9("div", { children: loadError }),
|
|
2432
|
-
/* @__PURE__ */ jsx9(
|
|
2433
|
-
"button",
|
|
2434
|
-
{
|
|
2435
|
-
type: "button",
|
|
2436
|
-
className: "rs-fiat-onramp-retry",
|
|
2437
|
-
onClick: () => setRetryToken((n) => n + 1),
|
|
2438
|
-
children: "Retry"
|
|
2439
|
-
}
|
|
2440
|
-
)
|
|
2441
|
-
] }),
|
|
2442
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ jsx9("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx9(Spinner, {}) }),
|
|
2443
|
-
widgetUrl && !loadError && /* @__PURE__ */ jsx9(
|
|
2444
|
-
"iframe",
|
|
2421
|
+
/* @__PURE__ */ jsx9("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
2422
|
+
loadError && /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-error", children: [
|
|
2423
|
+
/* @__PURE__ */ jsx9("div", { children: loadError }),
|
|
2424
|
+
/* @__PURE__ */ jsx9(
|
|
2425
|
+
"button",
|
|
2445
2426
|
{
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
onLoad: () => setIframeLoaded(true)
|
|
2452
|
-
},
|
|
2453
|
-
retryToken
|
|
2427
|
+
type: "button",
|
|
2428
|
+
className: "rs-fiat-onramp-retry",
|
|
2429
|
+
onClick: () => setRetryToken((n) => n + 1),
|
|
2430
|
+
children: "Retry"
|
|
2431
|
+
}
|
|
2454
2432
|
)
|
|
2455
|
-
] })
|
|
2456
|
-
|
|
2433
|
+
] }),
|
|
2434
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ jsx9("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx9(Spinner, {}) }),
|
|
2435
|
+
widgetUrl && !loadError && /* @__PURE__ */ jsx9(
|
|
2436
|
+
"iframe",
|
|
2437
|
+
{
|
|
2438
|
+
src: widgetUrl,
|
|
2439
|
+
title: iframeTitle,
|
|
2440
|
+
className: "rs-fiat-onramp-iframe",
|
|
2441
|
+
sandbox: "allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation",
|
|
2442
|
+
allow: "payment; camera; microphone; clipboard-write; geolocation",
|
|
2443
|
+
onLoad: () => setIframeLoaded(true)
|
|
2444
|
+
},
|
|
2445
|
+
retryToken
|
|
2446
|
+
)
|
|
2447
|
+
] }) }),
|
|
2457
2448
|
/* @__PURE__ */ jsx9(PoweredBy, {})
|
|
2458
2449
|
] });
|
|
2459
2450
|
}
|
|
@@ -2614,117 +2605,13 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2614
2605
|
|
|
2615
2606
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
2616
2607
|
import { useCallback as useCallback5, useEffect as useEffect7, useState as useState7 } from "react";
|
|
2617
|
-
|
|
2618
|
-
// src/components/ui/ExchangeLogos.tsx
|
|
2619
2608
|
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2620
|
-
var HTX_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXYAAACQCAMAAAAr6rB8AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAACNUExURQAAAAAAPgAAPgAAPgAAQAAAPQAAPgAAPQAAPQAAPgAAOAAAPgAAPQAAPQAAPAAAOgAAPgAAPQAAPQAAQAAAQACK1QCM1QCNzwCL1gCL1gCM1QCM1gCL1gAAPgCL1wCK1ACL1QCL0wCM1gCM1QCM1ACL1AAAPQCM1gAAPgCM1gAAOgCM1gAAPgCM1v///6KyLqIAAAAsdFJOUwCAj88Qn6BQv+8g33CvQDCQT2AgUCBgEN+AkL/eb58wcECw71Cgvs/O7zGgm66ePgAAAAFiS0dELlTTEIcAAAAHdElNRQfoDAUMAwII1OX3AAAI7ElEQVR42u2dbWPaOBCEQ8Ml4UyAg5IQ0ru8kLS9Vv7/f+9CaArYs7sjg/GtrfmKjeXHYjVarcXZGa/ep4iDk46lXjjvN92GDqoXEvcG9IY9/NF0I7qnizfsodd0Kzqnd+zhsulmdE1X79gHfzbdjo5pgz1cNd2OjinbYA/DphvSLf2iHgbJRZ5Q/Q/s4brppnRJo9/Yw6jptnRIl1vsaVQ9nXohdfcGdL2D/bzpxnRHVyF19wY02MWeovuJNA4hdffT63Ife+rup9FkH3tIU9WT6LyAPSXeT6F+gXoYNN2iTuiyiD0NqqfQRQn7pOkmdUFZSFHm9BqHkKLM6TUB2CdNN6r9ygD2lA+rWyjGpBlT7bqA2P9qulktVz+D2CdNt6vlmkLqKR1Ws3BnT869XgmdPYRUl1enMgl7GlNrlNjZw7TpprVZYmdPVqZGyZ09vdtRn/pyZ08Osj71ZOopK1ObZgr1kDXdutYqS9gbkBZiEva6pIaYhL0m9bOEvQF9Cgn76dUzqCffXofGFvX07lgNmmUm9vSG6tFlDadrpUqZo+vcpp5KB44uy8QcPqKOpyUxv56+ddpseiSN1982Qp98pm5wfoOknmKamLUOW+XoVXuOYAa3n38e2Q3n9F7BPxugj5hB7XaRA90dTP3ApVQf2EGFeeB2d1ki6veHUz/QtTvBDss/iZT3DaL+Za6c8TfXrAMXsL1gx5bO2pxxDkOMFtmnXKsOzQx4wS5MG43h/x5R/+dw6uUBVfsBecZ+NkSf6uH9LjbEjAdco0qd/SF/bCn2/ff+mcbOEfX86XDq5c5+Y7gjx9hjXWS0dyQSMRuVI/uz5Ur9YscuMoylNkLv+OUI1IFnX5mzAb/YsYvMhOQI9I65HNh56pPSuS/ELMwv9hgXOY8NMUz6a/Ocy539mbCmfrELLhKmR6B3VKanTPpLutx27H5oJXbeRcZ6R3JyGmDJ6evvKyxI/+4MO3aRX5X+x01PZ3R7wFCya5m+tRM7dpHF8I69ozw9ZVaTfgn8svYG72UrsQsuspAkwN5RDgB8YEc7yew/Y2U65hg75SKf4qanbCYGlwsUnOritkHsiq4OOPdMCgiF8A5G1LvIb4RPF6WAigGNCTP+sAsuspAkKPlHZXrKLWyshWbE5SdMhBmH2AUXuY9kviqwUKanNHUU2MG0TF288osdu8hCeH9hQ4ywp0AgW/ma5xW6u0vslItckh2QHvxh8gdOEBbtxC64yP3/idn17trSBvzpAOEVlW8Iu52b8Ykdu8gCmIcVg4Hu7LAsB6c57ejuFDvlIh8/KGirp2xkhztu4jQnEd2dYhfW3wou8tkOMayNwVBeBepmd/eKHbvIQpLgV3jXuh7Z2eE8CU+GNzKmqm6xUy7yyfCOxjuQW+EChYWM/bGt2LGLLCRNlur0lB5Q8VbKS5m6FWX8YheQlZIE6sIDF2Nw85QQY0YZx9gpFzl/VL+CijE4sM8XKnb9up6xYxf5PeI1Cy7G4MD+qlJXTatv7IKLjPizcCr3iAP7jU49/7e92CkXGdmUknBxrxFi8lwfU3xjx9z4P5Nlah4rhZjcyMvwKX5LjWDHLvIrebb9zq8UYl5M6voik3PsnIuUdBlMCe8PmCEmz5/bjB27SLkeNfbmcYi5s6nrFTPusWMXmVEu8tq6J6Fhc4K6bmXcYz/7Ud1FmkYmqzqertVu7IKLZMK7WeSLx1Oqs+sOsgXYq7tIKzUgjKf3CftaP2B7vtsnWreEX3C35qddwS6kEe3wbtxRdfP4Lq3WvQXYh1KLzCRBpTt6Iqm3vLfPxBm+6SKNO8KjAxnZ245dGRetJIGeksG5qQeWeruxqzdguEjdyeABlfPsa1VutQPsn9U2DfQkge7bYYgiPXve7lmq9TKpHt7V5ACOMax7bHdOxpzeqy5yop2JA9Q3GnvsXkGDjND/AzvRaS6V04faidB+8jEmOt/uZ3WJqaTTkgRqvh2e8chjf2krdu6dI+V2+sppeEMsPsboL2R7xk7WL/bkb1CeG9zCNyLGtLZygH6tUU4SKA9ugo4nllA/pK7pOcY+Y7c6Ulyk8uTgb2TJY4/e4dMJdhggerD/int+K8EdYqfzMUaZjF/s0Dt+FYZZMUkg+36YGuCpt7TiFyYF1kufsIJDdJGy8UdPik+DWS+NOcWOkwLvPXSIPpHqUeUog4IMnWq3YoxX7DCb0hO/X04SiFFmAg7mEzJ6va9X7DA2fKzBYYsjuEix1Bo1ialKojq7T+w4KfA7fkdtfy3ZUDRLpbG38r1U063AzKJwW9Kgiv5inMZubjrgETv05rtfEeMi+1J3Z/d9qxDZXWKHU8v9sjkc3vFSk9TdwQ7tLHZ7ezx/2KkRcwgfDXSRUh5zUj6UdDLE5qf+sOOkQPEo6DDxZYSsO8DAZcLsbU0cYle941Yx4R1790H5t8HlfZmt8bxhp+f+EUkCIZcJnP6KoE7tr+wMu5IUKAq6SFyPOoTYJ+UDiQwkt+2pM+wRITsmSYBLtcvH2Uup5Ca/vrDjwC6kuSKSBPhHVD7UTEGuGt5auRbsRlKgKGzw4UOCr0pOysdZS9jUTrPOsPc577hVRJJgCI4EXsaYMDW+bX4d2OEGyFpVb4yL7FFH3q6OQt0TdiIpUBR8vWZAJwkACWURe8VTd4Qdj5DG/2cO4aPCYzBAUR5U5RnTiv2DCF/YYcCYVLiYuNRUZgFQSNGd/XsIZ9jJpECpofz8Cl2j3N2F6P6T2bXdH3a8+Ea8expVSTAkWKAp0+oxCrob7LO48pddxSw1la8DZlflDMF95P9HusFuLigp+o7OlSoJZoUrARjFreEXakm1Z+w4sJObJEVVErz51Mw6bq9cZhFhG51hx0kBekuwIXxoYj3qfodHNLZuZnUXN5R6wh6dFCgqrh717e52E51oAHmtHNQ/rjAqidl5qF8+bcZechx7LrjYmyJusj9F0l7iG23Bg8zM2e0mJfazIvQkUbOLTPlZve9H+Bz9pUmERhvyqLuv/wohbl6aFKHx9Dob4NexlzE5mKSt/gNCZI6GyUmWNAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0xMi0wNVQxMjowMzowMiswMDowMLpM60QAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMTItMDVUMTI6MDM6MDIrMDA6MDDLEVP4AAAAKHRFWHRkYXRlOnRpbWVzdGFtcAAyMDI0LTEyLTA1VDEyOjAzOjAyKzAwOjAwnARyJwAAAABJRU5ErkJggg==";
|
|
2621
|
-
function Tile({
|
|
2622
|
-
bg,
|
|
2623
|
-
children,
|
|
2624
|
-
fg = "#fff"
|
|
2625
|
-
}) {
|
|
2626
|
-
return /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 40 40", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
2627
|
-
/* @__PURE__ */ jsx12("rect", { width: "40", height: "40", fill: bg }),
|
|
2628
|
-
/* @__PURE__ */ jsx12("g", { color: fg, children })
|
|
2629
|
-
] });
|
|
2630
|
-
}
|
|
2631
|
-
function Icon({
|
|
2632
|
-
children,
|
|
2633
|
-
x = 8,
|
|
2634
|
-
y = 8,
|
|
2635
|
-
size = 24,
|
|
2636
|
-
viewBox = "0 0 24 24"
|
|
2637
|
-
}) {
|
|
2638
|
-
return /* @__PURE__ */ jsx12("svg", { x, y, width: size, height: size, viewBox, children });
|
|
2639
|
-
}
|
|
2640
|
-
var LOGOS = {
|
|
2641
|
-
coinbase: () => /* @__PURE__ */ jsx12(Tile, { bg: "#0052FF", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, viewBox: "0 0 512 512", children: /* @__PURE__ */ jsx12(
|
|
2642
|
-
"path",
|
|
2643
|
-
{
|
|
2644
|
-
fill: "#fff",
|
|
2645
|
-
d: "M256.737 338.138c-45.081 0-81.512-36.531-81.512-81.513 0-44.98 36.53-81.512 81.512-81.512 40.356 0 73.863 29.387 80.306 67.925h82.113C412.212 159.313 342.175 93.5 256.637 93.5c-90.069 0-163.125 73.063-163.125 163.125 0 90.07 73.056 163.125 163.125 163.125 85.538 0 155.575-65.812 162.519-149.537h-82.213c-6.443 38.537-39.85 67.925-80.206 67.925z"
|
|
2646
|
-
}
|
|
2647
|
-
) }) }),
|
|
2648
|
-
binance: () => /* @__PURE__ */ jsx12(Tile, { bg: "#181A20", children: /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12(
|
|
2649
|
-
"path",
|
|
2650
|
-
{
|
|
2651
|
-
fill: "#F0B90B",
|
|
2652
|
-
d: "m16.624 13.920 2.718 2.716-7.353 7.353-7.353-7.353 2.717-2.716 4.636 4.66zm4.637-4.636L24 12l-2.715 2.716L18.568 12zm-9.272.001 2.716 2.691-2.716 2.717L9.272 12zm-9.273-.001L5.409 12l-2.692 2.692L0 12zM11.989.012l7.353 7.329-2.718 2.715-4.635-4.636-4.636 4.66-2.717-2.716z"
|
|
2653
|
-
}
|
|
2654
|
-
) }) }),
|
|
2655
|
-
bitfinex: () => /* @__PURE__ */ jsx12(Tile, { bg: "#101914", children: /* @__PURE__ */ jsxs10(Icon, { x: 5, y: 8, size: 30, viewBox: "780 0 116 100", children: [
|
|
2656
|
-
/* @__PURE__ */ jsx12(
|
|
2657
|
-
"path",
|
|
2658
|
-
{
|
|
2659
|
-
fill: "#97C554",
|
|
2660
|
-
d: "m792.54 88.414c4.795 5.078 31.135 29.418 72.478 1.17C894.913 66.302 894.166 15.827 891.294.584c-1 2.219-35.724 78.26-98.754 87.83Z"
|
|
2661
|
-
}
|
|
2662
|
-
),
|
|
2663
|
-
/* @__PURE__ */ jsx12(
|
|
2664
|
-
"path",
|
|
2665
|
-
{
|
|
2666
|
-
fill: "#709B30",
|
|
2667
|
-
d: "M891.29.572c-.366-.152-38.827-5.395-76.85 19.094-23.61 15.207-26.731 37.464-25.654 52.295 55.273-6.185 101.25-69.646 102.504-71.39Z"
|
|
2668
|
-
}
|
|
2669
|
-
)
|
|
2670
|
-
] }) }),
|
|
2671
|
-
bybit: () => /* @__PURE__ */ jsx12(Tile, { bg: "#16171A", children: /* @__PURE__ */ jsx12(Icon, { x: 4, y: 4, size: 32, children: /* @__PURE__ */ jsxs10("g", { fill: "none", children: [
|
|
2672
|
-
/* @__PURE__ */ jsx12("path", { fill: "#F6A500", d: "M15.829 13.626V9h.93v4.626z" }),
|
|
2673
|
-
/* @__PURE__ */ jsx12(
|
|
2674
|
-
"path",
|
|
2675
|
-
{
|
|
2676
|
-
fill: "#fff",
|
|
2677
|
-
d: "M4.993 15H3v-4.626h1.913c.93 0 1.471.507 1.471 1.3 0 .513-.348.845-.588.955.287.13.655.423.655 1.04 0 .863-.609 1.33-1.458 1.33m-.154-3.82h-.91v1.065h.91c.395 0 .615-.214.615-.533 0-.317-.22-.532-.615-.532m.06 1.877h-.97v1.137h.97c.42 0 .622-.259.622-.571s-.201-.565-.622-.565zm4.388.046V15h-.923v-1.898l-1.431-2.728h1.01l.889 1.864.877-1.864h1.01zM13.355 15h-1.993v-4.626h1.913c.93 0 1.47.507 1.47 1.3 0 .513-.347.845-.588.955.287.13.655.423.655 1.04 0 .863-.608 1.33-1.457 1.33m-.155-3.82h-.91v1.065h.91c.395 0 .616-.214.616-.533 0-.317-.22-.532-.616-.532m.06 1.877h-.97v1.137h.97c.422 0 .622-.259.622-.571s-.2-.565-.622-.565zm6.495-1.876V15h-.929v-3.82h-1.245v-.806H21v.806z"
|
|
2678
|
-
}
|
|
2679
|
-
)
|
|
2680
|
-
] }) }) }),
|
|
2681
|
-
btcturk: () => /* @__PURE__ */ jsx12(Tile, { bg: "#FFFFFF", fg: "#0D0D17", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsx12(
|
|
2682
|
-
"path",
|
|
2683
|
-
{
|
|
2684
|
-
fill: "currentColor",
|
|
2685
|
-
d: "M14.126 18.743c-1.05.742-1.67 1.67-1.38 2.072s1.365.128 2.414-.612 1.667-1.668 1.379-2.072c-.089-.12-.256-.186-.474-.186-.48 0-1.218.29-1.94.798m-5.76-1.584c-2.028.842-3.433 2.088-3.141 2.796.291.709 2.17.607 4.2-.23 2.03-.836 3.428-2.084 3.137-2.797-.13-.317-.576-.47-1.21-.47-.787 0-1.865.24-2.987.701m9.293-.84c-.36.683-.47 1.33-.251 1.44.22.11.685-.345 1.043-1.028s.47-1.33.25-1.44a.15.15 0 0 0-.074-.017c-.24 0-.648.433-.968 1.045m-2.927-1.891c-.695.4-1.058 1.073-.812 1.5s1.008.448 1.703.047c.695-.4 1.057-1.073.811-1.5-.128-.222-.396-.335-.72-.335-.346.01-.684.11-.981.288m2.568-.91c-.202.348-.188.735.03.86.218.127.56-.053.76-.404.202-.35.19-.735-.03-.861a.3.3 0 0 0-.155-.041c-.204 0-.447.17-.6.445m-2.592-1.499c0 .418.384.758.858.758s.858-.34.858-.758c0-.417-.384-.757-.858-.757s-.858.339-.858.757m-5.728 0c0 .938 1.057 1.697 2.361 1.697s2.36-.755 2.36-1.697-1.055-1.698-2.36-1.698-2.361.761-2.361 1.698m8.369-2.4c-.218.12-.232.513-.03.862.201.35.541.531.76.404.22-.127.232-.51.03-.861-.158-.274-.401-.446-.6-.446a.3.3 0 0 0-.155.041m-3.413-1.545c-.24.427.12 1.099.811 1.5.691.4 1.457.38 1.703-.047s-.12-1.098-.811-1.5a2 2 0 0 0-.983-.287c-.325 0-.593.112-.72.334m3.456-1.833c-.218.12-.107.762.25 1.44.358.678.825 1.144 1.045 1.029.22-.116.105-.762-.252-1.44-.32-.612-.73-1.046-.969-1.046a.2.2 0 0 0-.074.017M5.225 4.05c-.292.708 1.115 1.96 3.14 2.797s3.902.94 4.197.233-1.115-1.962-3.14-2.798c-1.123-.464-2.196-.702-2.988-.702-.633 0-1.08.154-1.21.47m7.51-.864c-.284.403.337 1.33 1.386 2.071s2.13 1.016 2.413.612c.283-.403-.336-1.33-1.387-2.071C14.427 3.289 13.692 3 13.21 3c-.219 0-.385.06-.48.186"
|
|
2686
|
-
}
|
|
2687
|
-
) }) }),
|
|
2688
|
-
gate: () => /* @__PURE__ */ jsx12(Tile, { bg: "#FFFFFF", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsxs10("g", { fill: "none", children: [
|
|
2689
|
-
/* @__PURE__ */ jsx12("path", { fill: "#2354E6", d: "M12 16.95a4.95 4.95 0 1 1 0-9.9V3a9 9 0 1 0 9 9h-4.05A4.95 4.95 0 0 1 12 16.95" }),
|
|
2690
|
-
/* @__PURE__ */ jsx12("path", { fill: "#17E6A1", d: "M16.95 7.05H12V12h4.95z" })
|
|
2691
|
-
] }) }) }),
|
|
2692
|
-
gateio: () => LOGOS.gate(),
|
|
2693
|
-
htx: () => /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 40 40", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
2694
|
-
/* @__PURE__ */ jsx12("rect", { width: "40", height: "40", fill: "#fff" }),
|
|
2695
|
-
/* @__PURE__ */ jsx12("image", { href: HTX_LOGO_DATA_URI, x: "3", y: "12", width: "34", height: "13.1", preserveAspectRatio: "xMidYMid meet" })
|
|
2696
|
-
] }),
|
|
2697
|
-
kraken: () => /* @__PURE__ */ jsx12(Tile, { bg: "#7133F5", children: /* @__PURE__ */ jsx12(Icon, { x: 6, y: 6, size: 28, children: /* @__PURE__ */ jsx12(
|
|
2698
|
-
"path",
|
|
2699
|
-
{
|
|
2700
|
-
fill: "#fff",
|
|
2701
|
-
d: "M11.998 4.5C7.028 4.5 3 8.774 3 14.047v4.09c0 .753.575 1.363 1.285 1.363s1.288-.61 1.288-1.362v-4.091c0-.755.573-1.365 1.285-1.365.71 0 1.284.61 1.284 1.365v4.09c0 .753.575 1.363 1.285 1.363.712 0 1.286-.61 1.286-1.362v-4.091c0-.755.575-1.365 1.285-1.365.712 0 1.289.61 1.289 1.365v4.09c0 .753.574 1.363 1.284 1.363s1.285-.61 1.285-1.362v-4.091c0-.755.574-1.365 1.288-1.365.71 0 1.285.61 1.285 1.365v4.09c0 .753.575 1.363 1.287 1.363.71 0 1.284-.61 1.284-1.362v-4.091C21 8.774 16.97 4.5 11.998 4.5"
|
|
2702
|
-
}
|
|
2703
|
-
) }) }),
|
|
2704
|
-
kucoin: () => /* @__PURE__ */ jsx12(Tile, { bg: "#01BC8D", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsx12(
|
|
2705
|
-
"path",
|
|
2706
|
-
{
|
|
2707
|
-
fill: "#fff",
|
|
2708
|
-
d: "m7.928 11.996 7.122 7.122 4.49-4.49a2.004 2.004 0 0 1 2.865 0 2.004 2.004 0 0 1 0 2.865l-5.918 5.918a2.058 2.058 0 0 1-2.883 0l-8.541-8.542v5.07a2.034 2.034 0 1 1-4.07 0V4.043a2.034 2.034 0 1 1 4.07 0v5.088L13.604.589a2.058 2.058 0 0 1 2.883 0l5.918 5.918c.785.803.785 2.088 0 2.865-.804.785-2.089.785-2.865 0l-4.49-4.49zM15.05 9.96a2.038 2.038 0 0 0-2.053 2.035c0 1.133.902 2.052 2.035 2.052a2.038 2.038 0 0 0 2.053-2.035v-.018a2.07 2.07 0 0 0-2.035-2.034z"
|
|
2709
|
-
}
|
|
2710
|
-
) }) })
|
|
2711
|
-
};
|
|
2712
|
-
function normalize(value) {
|
|
2713
|
-
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
2714
|
-
}
|
|
2715
|
-
function getExchangeLogo(name, connection) {
|
|
2716
|
-
const render = LOGOS[normalize(name)] ?? LOGOS[normalize(connection ?? "")];
|
|
2717
|
-
return render ? render() : null;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
// src/components/steps/ExchangeSelectStep.tsx
|
|
2721
|
-
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2722
2609
|
function ExchangeLogo({ exchange }) {
|
|
2723
2610
|
const [failed, setFailed] = useState7(false);
|
|
2724
2611
|
if (!exchange.logoUrl || failed) {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsx12(BankIcon, {});
|
|
2726
2613
|
}
|
|
2727
|
-
return /* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ jsx12(
|
|
2728
2615
|
"img",
|
|
2729
2616
|
{
|
|
2730
2617
|
src: exchange.logoUrl,
|
|
@@ -2765,20 +2652,20 @@ function ExchangeSelectStep({
|
|
|
2765
2652
|
cancelled = true;
|
|
2766
2653
|
};
|
|
2767
2654
|
}, [service, retryToken, onError]);
|
|
2768
|
-
return /* @__PURE__ */
|
|
2769
|
-
/* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen rs-exchange-select", children: [
|
|
2656
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2657
|
+
/* @__PURE__ */ jsx12(
|
|
2771
2658
|
BodyHeader,
|
|
2772
2659
|
{
|
|
2773
|
-
icon: /* @__PURE__ */
|
|
2660
|
+
icon: /* @__PURE__ */ jsx12(UnplugIcon, {}),
|
|
2774
2661
|
title: "Connect exchange",
|
|
2775
2662
|
subtitle: "Select an exchange to connect"
|
|
2776
2663
|
}
|
|
2777
2664
|
),
|
|
2778
|
-
loading && /* @__PURE__ */
|
|
2779
|
-
!loading && error && /* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2665
|
+
loading && /* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx12(Spinner, {}) }),
|
|
2666
|
+
!loading && error && /* @__PURE__ */ jsxs10("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2667
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2668
|
+
/* @__PURE__ */ jsx12(
|
|
2782
2669
|
"button",
|
|
2783
2670
|
{
|
|
2784
2671
|
type: "button",
|
|
@@ -2788,9 +2675,9 @@ function ExchangeSelectStep({
|
|
|
2788
2675
|
}
|
|
2789
2676
|
)
|
|
2790
2677
|
] }),
|
|
2791
|
-
!loading && !error && exchanges.length === 0 && /* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2678
|
+
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs10("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2679
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
2680
|
+
/* @__PURE__ */ jsx12(
|
|
2794
2681
|
"button",
|
|
2795
2682
|
{
|
|
2796
2683
|
type: "button",
|
|
@@ -2800,9 +2687,9 @@ function ExchangeSelectStep({
|
|
|
2800
2687
|
}
|
|
2801
2688
|
)
|
|
2802
2689
|
] }),
|
|
2803
|
-
!loading && !error && exchanges.length > 0 && /* @__PURE__ */
|
|
2690
|
+
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx12("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
2804
2691
|
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
2805
|
-
return /* @__PURE__ */
|
|
2692
|
+
return /* @__PURE__ */ jsxs10(
|
|
2806
2693
|
"button",
|
|
2807
2694
|
{
|
|
2808
2695
|
type: "button",
|
|
@@ -2810,27 +2697,27 @@ function ExchangeSelectStep({
|
|
|
2810
2697
|
onClick: () => onSelectExchange(exchange.connection),
|
|
2811
2698
|
"aria-label": `Select ${exchange.name}`,
|
|
2812
2699
|
children: [
|
|
2813
|
-
/* @__PURE__ */
|
|
2700
|
+
/* @__PURE__ */ jsx12(
|
|
2814
2701
|
"span",
|
|
2815
2702
|
{
|
|
2816
2703
|
className: `rs-exchange-card-logo${brand ? " rs-exchange-card-logo--brand" : ""}`,
|
|
2817
|
-
children: brand ?? /* @__PURE__ */
|
|
2704
|
+
children: brand ?? /* @__PURE__ */ jsx12(ExchangeLogo, { exchange })
|
|
2818
2705
|
}
|
|
2819
2706
|
),
|
|
2820
|
-
/* @__PURE__ */
|
|
2707
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-exchange-card-name", children: exchange.name })
|
|
2821
2708
|
]
|
|
2822
2709
|
},
|
|
2823
2710
|
exchange.connection
|
|
2824
2711
|
);
|
|
2825
2712
|
}) })
|
|
2826
2713
|
] }),
|
|
2827
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ jsx12(PoweredBy, {})
|
|
2828
2715
|
] });
|
|
2829
2716
|
}
|
|
2830
2717
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
2831
2718
|
|
|
2832
2719
|
// src/components/steps/DepositAddressSkeleton.tsx
|
|
2833
|
-
import { jsx as
|
|
2720
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2834
2721
|
var BASE_CHAIN_ID = 8453;
|
|
2835
2722
|
function DepositAddressSkeleton({
|
|
2836
2723
|
uiConfig,
|
|
@@ -2851,15 +2738,15 @@ function DepositAddressSkeleton({
|
|
|
2851
2738
|
const chainName = getChainName(defaultChainId);
|
|
2852
2739
|
const chainIcon = getChainIcon(defaultChainId);
|
|
2853
2740
|
const tokenIcon = getTokenIcon(defaultToken);
|
|
2854
|
-
return /* @__PURE__ */
|
|
2855
|
-
/* @__PURE__ */
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
2861
|
-
/* @__PURE__ */
|
|
2862
|
-
chainIcon && /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2742
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2743
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body", children: [
|
|
2744
|
+
/* @__PURE__ */ jsx13(BodyHeader, { icon: /* @__PURE__ */ jsx13(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2745
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2746
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2747
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2748
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2749
|
+
chainIcon && /* @__PURE__ */ jsx13(
|
|
2863
2750
|
"img",
|
|
2864
2751
|
{
|
|
2865
2752
|
src: chainIcon,
|
|
@@ -2867,17 +2754,17 @@ function DepositAddressSkeleton({
|
|
|
2867
2754
|
className: "rs-deposit-address-dropdown-icon"
|
|
2868
2755
|
}
|
|
2869
2756
|
),
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx13("span", { children: chainName }),
|
|
2758
|
+
/* @__PURE__ */ jsx13(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2872
2759
|
] })
|
|
2873
2760
|
] }),
|
|
2874
|
-
/* @__PURE__ */
|
|
2875
|
-
/* @__PURE__ */
|
|
2876
|
-
/* @__PURE__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2762
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2763
|
+
/* @__PURE__ */ jsx13("span", { children: "Supported token" }),
|
|
2764
|
+
/* @__PURE__ */ jsxs11("span", { className: "rs-deposit-address-min", children: [
|
|
2878
2765
|
"Min.$",
|
|
2879
2766
|
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2880
|
-
/* @__PURE__ */
|
|
2767
|
+
/* @__PURE__ */ jsx13(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx13(
|
|
2881
2768
|
InfoIcon,
|
|
2882
2769
|
{
|
|
2883
2770
|
className: "rs-deposit-address-min-icon",
|
|
@@ -2886,8 +2773,8 @@ function DepositAddressSkeleton({
|
|
|
2886
2773
|
) })
|
|
2887
2774
|
] })
|
|
2888
2775
|
] }),
|
|
2889
|
-
/* @__PURE__ */
|
|
2890
|
-
tokenIcon && /* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2777
|
+
tokenIcon && /* @__PURE__ */ jsx13(
|
|
2891
2778
|
"img",
|
|
2892
2779
|
{
|
|
2893
2780
|
src: tokenIcon,
|
|
@@ -2895,21 +2782,21 @@ function DepositAddressSkeleton({
|
|
|
2895
2782
|
className: "rs-deposit-address-dropdown-icon"
|
|
2896
2783
|
}
|
|
2897
2784
|
),
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ jsx13("span", { children: defaultToken }),
|
|
2786
|
+
/* @__PURE__ */ jsx13(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2900
2787
|
] })
|
|
2901
2788
|
] })
|
|
2902
2789
|
] }),
|
|
2903
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsxs11(
|
|
2904
2791
|
"div",
|
|
2905
2792
|
{
|
|
2906
2793
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2907
2794
|
children: [
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */
|
|
2910
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-well", children: [
|
|
2796
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx13("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
2797
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
2911
2798
|
] }),
|
|
2912
|
-
/* @__PURE__ */
|
|
2799
|
+
/* @__PURE__ */ jsxs11(
|
|
2913
2800
|
"button",
|
|
2914
2801
|
{
|
|
2915
2802
|
type: "button",
|
|
@@ -2917,7 +2804,7 @@ function DepositAddressSkeleton({
|
|
|
2917
2804
|
disabled: true,
|
|
2918
2805
|
"aria-hidden": "true",
|
|
2919
2806
|
children: [
|
|
2920
|
-
/* @__PURE__ */
|
|
2807
|
+
/* @__PURE__ */ jsx13(CopyIcon, {}),
|
|
2921
2808
|
"Copy address"
|
|
2922
2809
|
]
|
|
2923
2810
|
}
|
|
@@ -2925,20 +2812,20 @@ function DepositAddressSkeleton({
|
|
|
2925
2812
|
]
|
|
2926
2813
|
}
|
|
2927
2814
|
),
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
2932
|
-
/* @__PURE__ */
|
|
2815
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs11("div", { className: "rs-price-impact-header", children: [
|
|
2816
|
+
/* @__PURE__ */ jsxs11("span", { className: "rs-price-impact-header-left", children: [
|
|
2817
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2818
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx13("strong", { children: "0.00%" }) }),
|
|
2819
|
+
/* @__PURE__ */ jsx13(
|
|
2933
2820
|
Tooltip,
|
|
2934
2821
|
{
|
|
2935
2822
|
className: "rs-price-impact-info",
|
|
2936
2823
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2824
|
+
children: /* @__PURE__ */ jsx13(InfoIcon, { "aria-hidden": "true" })
|
|
2938
2825
|
}
|
|
2939
2826
|
)
|
|
2940
2827
|
] }),
|
|
2941
|
-
/* @__PURE__ */
|
|
2828
|
+
/* @__PURE__ */ jsx13(
|
|
2942
2829
|
ChevronDownIcon,
|
|
2943
2830
|
{
|
|
2944
2831
|
className: "rs-price-impact-chevron",
|
|
@@ -2947,7 +2834,7 @@ function DepositAddressSkeleton({
|
|
|
2947
2834
|
)
|
|
2948
2835
|
] }) })
|
|
2949
2836
|
] }),
|
|
2950
|
-
/* @__PURE__ */
|
|
2837
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
2951
2838
|
] });
|
|
2952
2839
|
}
|
|
2953
2840
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2955,7 +2842,7 @@ DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
|
2955
2842
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
2956
2843
|
import { useState as useState8, useEffect as useEffect8, useMemo as useMemo5 } from "react";
|
|
2957
2844
|
import { formatUnits as formatUnits4 } from "viem";
|
|
2958
|
-
import { jsx as
|
|
2845
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2959
2846
|
function SolanaTokenSelectStep({
|
|
2960
2847
|
solanaAddress,
|
|
2961
2848
|
service,
|
|
@@ -3061,30 +2948,30 @@ function SolanaTokenSelectStep({
|
|
|
3061
2948
|
};
|
|
3062
2949
|
const chainIcon = getChainIcon("solana");
|
|
3063
2950
|
const chainName = getChainName("solana");
|
|
3064
|
-
return /* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen", children: [
|
|
2952
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-screen-body", children: [
|
|
2953
|
+
/* @__PURE__ */ jsx14(
|
|
3067
2954
|
BodyHeader,
|
|
3068
2955
|
{
|
|
3069
|
-
icon: /* @__PURE__ */
|
|
2956
|
+
icon: /* @__PURE__ */ jsx14(WalletIcon, {}),
|
|
3070
2957
|
title: "Your assets",
|
|
3071
2958
|
subtitle: "Select source assets to transfer"
|
|
3072
2959
|
}
|
|
3073
2960
|
),
|
|
3074
|
-
loading && /* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
2961
|
+
loading && /* @__PURE__ */ jsxs12("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2962
|
+
/* @__PURE__ */ jsx14(Spinner, { className: "rs-text-tertiary" }),
|
|
2963
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
3077
2964
|
] }),
|
|
3078
|
-
error && /* @__PURE__ */
|
|
3079
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
/* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */
|
|
2965
|
+
error && /* @__PURE__ */ jsx14(Callout, { variant: "error", children: error }),
|
|
2966
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs12("div", { className: "rs-empty-state", children: [
|
|
2967
|
+
/* @__PURE__ */ jsx14(WalletIcon, { className: "rs-empty-icon" }),
|
|
2968
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2969
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-empty-address", children: [
|
|
3083
2970
|
solanaAddress.slice(0, 6),
|
|
3084
2971
|
"...",
|
|
3085
2972
|
solanaAddress.slice(-4)
|
|
3086
2973
|
] }),
|
|
3087
|
-
onDisconnect && /* @__PURE__ */
|
|
2974
|
+
onDisconnect && /* @__PURE__ */ jsx14(
|
|
3088
2975
|
"button",
|
|
3089
2976
|
{
|
|
3090
2977
|
type: "button",
|
|
@@ -3094,11 +2981,11 @@ function SolanaTokenSelectStep({
|
|
|
3094
2981
|
}
|
|
3095
2982
|
)
|
|
3096
2983
|
] }),
|
|
3097
|
-
!loading && !error && rows.length > 0 && /* @__PURE__ */
|
|
2984
|
+
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx14("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
3098
2985
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
3099
2986
|
const tokenAmount = formatBalance(entry);
|
|
3100
2987
|
const tokenIcon = getTokenIcon(entry.token.symbol);
|
|
3101
|
-
return /* @__PURE__ */
|
|
2988
|
+
return /* @__PURE__ */ jsxs12(
|
|
3102
2989
|
"button",
|
|
3103
2990
|
{
|
|
3104
2991
|
type: "button",
|
|
@@ -3106,33 +2993,33 @@ function SolanaTokenSelectStep({
|
|
|
3106
2993
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
3107
2994
|
"aria-pressed": isSelected,
|
|
3108
2995
|
children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
3110
|
-
/* @__PURE__ */
|
|
3111
|
-
tokenIcon ? /* @__PURE__ */
|
|
3112
|
-
chainIcon && /* @__PURE__ */
|
|
2996
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-info", children: [
|
|
2997
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-icon-wrapper", children: [
|
|
2998
|
+
tokenIcon ? /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx14("img", { src: tokenIcon, alt: entry.token.symbol }) }) : /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
|
|
2999
|
+
chainIcon && /* @__PURE__ */ jsx14("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx14("img", { src: chainIcon, alt: chainName }) })
|
|
3113
3000
|
] }),
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3117
|
-
/* @__PURE__ */
|
|
3001
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-text", children: [
|
|
3002
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-name-row", children: [
|
|
3003
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
3004
|
+
/* @__PURE__ */ jsxs12("span", { className: "rs-asset-chain", children: [
|
|
3118
3005
|
"on ",
|
|
3119
3006
|
chainName
|
|
3120
3007
|
] })
|
|
3121
3008
|
] }),
|
|
3122
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-balance-small", children: [
|
|
3123
3010
|
tokenAmount,
|
|
3124
3011
|
" ",
|
|
3125
3012
|
entry.token.symbol
|
|
3126
3013
|
] })
|
|
3127
3014
|
] })
|
|
3128
3015
|
] }),
|
|
3129
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3130
3017
|
]
|
|
3131
3018
|
},
|
|
3132
3019
|
entry.token.symbol
|
|
3133
3020
|
);
|
|
3134
3021
|
}) }),
|
|
3135
|
-
/* @__PURE__ */
|
|
3022
|
+
/* @__PURE__ */ jsx14(
|
|
3136
3023
|
Button,
|
|
3137
3024
|
{
|
|
3138
3025
|
onClick: () => selectedEntry && onContinue(
|
|
@@ -3146,14 +3033,14 @@ function SolanaTokenSelectStep({
|
|
|
3146
3033
|
}
|
|
3147
3034
|
)
|
|
3148
3035
|
] }),
|
|
3149
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ jsx14(PoweredBy, {})
|
|
3150
3037
|
] });
|
|
3151
3038
|
}
|
|
3152
3039
|
|
|
3153
3040
|
// src/components/steps/SolanaAmountStep.tsx
|
|
3154
3041
|
import { useCallback as useCallback6, useEffect as useEffect9, useMemo as useMemo6, useRef as useRef7, useState as useState9 } from "react";
|
|
3155
3042
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
3156
|
-
import { Fragment as Fragment2, jsx as
|
|
3043
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3157
3044
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
3158
3045
|
var PRESETS2 = [
|
|
3159
3046
|
{ value: 25, label: "25%" },
|
|
@@ -3354,12 +3241,12 @@ function SolanaAmountStep({
|
|
|
3354
3241
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
3355
3242
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
3356
3243
|
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
3357
|
-
return /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
|
|
3245
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3246
|
+
/* @__PURE__ */ jsx15(BodyHeader, { icon: /* @__PURE__ */ jsx15(WalletIcon, {}), title: "Wallet deposit" }),
|
|
3247
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-section", children: [
|
|
3248
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-display", children: [
|
|
3249
|
+
/* @__PURE__ */ jsx15(
|
|
3363
3250
|
AnimatedAmountInput,
|
|
3364
3251
|
{
|
|
3365
3252
|
value: amount,
|
|
@@ -3368,25 +3255,25 @@ function SolanaAmountStep({
|
|
|
3368
3255
|
autoFocus: true
|
|
3369
3256
|
}
|
|
3370
3257
|
),
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
/* @__PURE__ */
|
|
3258
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-meta", children: [
|
|
3259
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-meta-balance", children: [
|
|
3373
3260
|
formattedBalance,
|
|
3374
3261
|
" ",
|
|
3375
3262
|
token.symbol,
|
|
3376
3263
|
" available",
|
|
3377
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
3264
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
3378
3265
|
" (~",
|
|
3379
3266
|
currencyFormatter.format(computedBalanceUsd),
|
|
3380
3267
|
")"
|
|
3381
3268
|
] })
|
|
3382
3269
|
] }),
|
|
3383
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
3270
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs13("span", { className: "rs-amount-meta-minimum", children: [
|
|
3384
3271
|
"Min. deposit ",
|
|
3385
3272
|
currencyFormatter.format(minDepositUsd)
|
|
3386
3273
|
] })
|
|
3387
3274
|
] })
|
|
3388
3275
|
] }),
|
|
3389
|
-
/* @__PURE__ */
|
|
3276
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-amount-presets", children: PRESETS2.map((preset) => /* @__PURE__ */ jsx15(
|
|
3390
3277
|
"button",
|
|
3391
3278
|
{
|
|
3392
3279
|
type: "button",
|
|
@@ -3397,36 +3284,36 @@ function SolanaAmountStep({
|
|
|
3397
3284
|
preset.value
|
|
3398
3285
|
)) })
|
|
3399
3286
|
] }),
|
|
3400
|
-
/* @__PURE__ */
|
|
3401
|
-
/* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3287
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-details", children: [
|
|
3288
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3289
|
+
/* @__PURE__ */ jsx15("span", { children: "You send" }),
|
|
3290
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
3291
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3405
3292
|
"Solana ",
|
|
3406
3293
|
token.symbol
|
|
3407
3294
|
] }),
|
|
3408
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3295
|
+
sourceTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3409
3296
|
] })
|
|
3410
3297
|
] }),
|
|
3411
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
3412
|
-
/* @__PURE__ */
|
|
3413
|
-
/* @__PURE__ */
|
|
3414
|
-
/* @__PURE__ */
|
|
3298
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3299
|
+
/* @__PURE__ */ jsx15("span", { children: "Receive" }),
|
|
3300
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
3301
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3415
3302
|
targetChainName,
|
|
3416
3303
|
" ",
|
|
3417
3304
|
targetTokenSymbol
|
|
3418
3305
|
] }),
|
|
3419
|
-
targetTokenIcon && /* @__PURE__ */
|
|
3306
|
+
targetTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: targetTokenIcon, alt: "" }) })
|
|
3420
3307
|
] })
|
|
3421
3308
|
] }),
|
|
3422
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
/* @__PURE__ */
|
|
3309
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3310
|
+
/* @__PURE__ */ jsx15("span", { children: "Balance after deposit" }),
|
|
3311
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
3425
3312
|
] })
|
|
3426
3313
|
] }),
|
|
3427
|
-
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */
|
|
3428
|
-
error && /* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3314
|
+
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */ jsx15(Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
3315
|
+
error && /* @__PURE__ */ jsx15(Callout, { variant: "error", children: error }),
|
|
3316
|
+
/* @__PURE__ */ jsx15(
|
|
3430
3317
|
Button,
|
|
3431
3318
|
{
|
|
3432
3319
|
onClick: handleContinue,
|
|
@@ -3436,7 +3323,7 @@ function SolanaAmountStep({
|
|
|
3436
3323
|
}
|
|
3437
3324
|
)
|
|
3438
3325
|
] }),
|
|
3439
|
-
/* @__PURE__ */
|
|
3326
|
+
/* @__PURE__ */ jsx15(PoweredBy, {})
|
|
3440
3327
|
] });
|
|
3441
3328
|
}
|
|
3442
3329
|
|
|
@@ -3549,7 +3436,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
3549
3436
|
}
|
|
3550
3437
|
|
|
3551
3438
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
3552
|
-
import { jsx as
|
|
3439
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3553
3440
|
function SolanaConfirmStep({
|
|
3554
3441
|
smartAccount,
|
|
3555
3442
|
solanaAddress,
|
|
@@ -3684,62 +3571,62 @@ function SolanaConfirmStep({
|
|
|
3684
3571
|
setIsSubmitting(false);
|
|
3685
3572
|
}
|
|
3686
3573
|
};
|
|
3687
|
-
return /* @__PURE__ */
|
|
3688
|
-
/* @__PURE__ */
|
|
3689
|
-
/* @__PURE__ */
|
|
3690
|
-
/* @__PURE__ */
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
sourceChainIcon && /* @__PURE__ */
|
|
3574
|
+
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen", children: [
|
|
3575
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3576
|
+
/* @__PURE__ */ jsx16(BodyHeader, { icon: /* @__PURE__ */ jsx16(WalletIcon, {}), title: "Review deposit" }),
|
|
3577
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-details", children: [
|
|
3578
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3579
|
+
/* @__PURE__ */ jsx16("span", { children: "Source chain" }),
|
|
3580
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3581
|
+
/* @__PURE__ */ jsx16("span", { children: sourceChainName }),
|
|
3582
|
+
sourceChainIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceChainIcon, alt: "" }) })
|
|
3696
3583
|
] })
|
|
3697
3584
|
] }),
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3702
|
-
targetChainIcon && /* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3586
|
+
/* @__PURE__ */ jsx16("span", { children: "Destination chain" }),
|
|
3587
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3588
|
+
/* @__PURE__ */ jsx16("span", { children: targetChainName }),
|
|
3589
|
+
targetChainIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetChainIcon, alt: "" }) })
|
|
3703
3590
|
] })
|
|
3704
3591
|
] }),
|
|
3705
|
-
/* @__PURE__ */
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3593
|
+
/* @__PURE__ */ jsx16("span", { children: "Estimated time" }),
|
|
3594
|
+
/* @__PURE__ */ jsx16("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
3708
3595
|
] }),
|
|
3709
|
-
/* @__PURE__ */
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3712
|
-
/* @__PURE__ */
|
|
3596
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3597
|
+
/* @__PURE__ */ jsx16("span", { children: "You send" }),
|
|
3598
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3599
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
3713
3600
|
formattedAmount,
|
|
3714
3601
|
" ",
|
|
3715
3602
|
token.symbol
|
|
3716
3603
|
] }),
|
|
3717
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3604
|
+
sourceTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3718
3605
|
] })
|
|
3719
3606
|
] }),
|
|
3720
|
-
/* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
targetTokenIcon && /* @__PURE__ */
|
|
3607
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3608
|
+
/* @__PURE__ */ jsx16("span", { children: "Receive" }),
|
|
3609
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3610
|
+
/* @__PURE__ */ jsx16("span", { children: receiveDisplay }),
|
|
3611
|
+
targetTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetTokenIcon, alt: "" }) })
|
|
3725
3612
|
] })
|
|
3726
3613
|
] }),
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
/* @__PURE__ */
|
|
3730
|
-
/* @__PURE__ */
|
|
3614
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3615
|
+
/* @__PURE__ */ jsx16("span", { children: "Fees" }),
|
|
3616
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3617
|
+
/* @__PURE__ */ jsx16(
|
|
3731
3618
|
"span",
|
|
3732
3619
|
{
|
|
3733
3620
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
3734
3621
|
children: "$0.04"
|
|
3735
3622
|
}
|
|
3736
3623
|
),
|
|
3737
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ jsx16(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx16(InfoIcon, {}) }) })
|
|
3738
3625
|
] })
|
|
3739
3626
|
] })
|
|
3740
3627
|
] }),
|
|
3741
|
-
error && /* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3628
|
+
error && /* @__PURE__ */ jsx16(Callout, { variant: "error", children: error }),
|
|
3629
|
+
/* @__PURE__ */ jsx16(
|
|
3743
3630
|
Button,
|
|
3744
3631
|
{
|
|
3745
3632
|
onClick: handleConfirm,
|
|
@@ -3751,28 +3638,28 @@ function SolanaConfirmStep({
|
|
|
3751
3638
|
}
|
|
3752
3639
|
)
|
|
3753
3640
|
] }),
|
|
3754
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ jsx16(PoweredBy, {})
|
|
3755
3642
|
] });
|
|
3756
3643
|
}
|
|
3757
3644
|
|
|
3758
3645
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
3759
|
-
import { jsx as
|
|
3646
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3760
3647
|
function DappImportAssetSelectStep({
|
|
3761
3648
|
sourceLabel,
|
|
3762
3649
|
assets,
|
|
3763
3650
|
onSelect
|
|
3764
3651
|
}) {
|
|
3765
|
-
return /* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
3767
|
-
/* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", children: [
|
|
3653
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3654
|
+
/* @__PURE__ */ jsx17(
|
|
3768
3655
|
BodyHeader,
|
|
3769
3656
|
{
|
|
3770
|
-
icon: /* @__PURE__ */
|
|
3657
|
+
icon: /* @__PURE__ */ jsx17(WalletIcon, {}),
|
|
3771
3658
|
title: `Transfer from ${sourceLabel}`,
|
|
3772
3659
|
subtitle: "Pick the balance to import"
|
|
3773
3660
|
}
|
|
3774
3661
|
),
|
|
3775
|
-
/* @__PURE__ */
|
|
3662
|
+
/* @__PURE__ */ jsx17("div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3776
3663
|
const tokenAmount = asset.balance ? tokenFormatter.format(
|
|
3777
3664
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3778
3665
|
) : "0";
|
|
@@ -3780,23 +3667,23 @@ function DappImportAssetSelectStep({
|
|
|
3780
3667
|
const tokenIcon = asset.icon ?? getTokenIcon(asset.symbol);
|
|
3781
3668
|
const chainIcon = getChainIcon(asset.chainId);
|
|
3782
3669
|
const badge = getChainBadge(asset.chainId);
|
|
3783
|
-
return /* @__PURE__ */
|
|
3670
|
+
return /* @__PURE__ */ jsxs15(
|
|
3784
3671
|
"button",
|
|
3785
3672
|
{
|
|
3786
3673
|
type: "button",
|
|
3787
3674
|
className: "rs-asset-row",
|
|
3788
3675
|
onClick: () => onSelect(asset),
|
|
3789
3676
|
children: [
|
|
3790
|
-
/* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
3793
|
-
chainIcon ? /* @__PURE__ */
|
|
3677
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
|
|
3678
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3679
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children: tokenIcon ? /* @__PURE__ */ jsx17("img", { src: tokenIcon, alt: asset.symbol }) : asset.symbol.slice(0, 4) }),
|
|
3680
|
+
chainIcon ? /* @__PURE__ */ jsx17("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx17(
|
|
3794
3681
|
"img",
|
|
3795
3682
|
{
|
|
3796
3683
|
src: chainIcon,
|
|
3797
3684
|
alt: getChainName(asset.chainId)
|
|
3798
3685
|
}
|
|
3799
|
-
) }) : /* @__PURE__ */
|
|
3686
|
+
) }) : /* @__PURE__ */ jsx17(
|
|
3800
3687
|
"span",
|
|
3801
3688
|
{
|
|
3802
3689
|
className: "rs-asset-chain-badge",
|
|
@@ -3805,86 +3692,86 @@ function DappImportAssetSelectStep({
|
|
|
3805
3692
|
}
|
|
3806
3693
|
)
|
|
3807
3694
|
] }),
|
|
3808
|
-
/* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-text", children: [
|
|
3696
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-name-row", children: [
|
|
3697
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
3698
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-asset-chain", children: [
|
|
3812
3699
|
"on ",
|
|
3813
3700
|
asset.sourceLabel
|
|
3814
3701
|
] })
|
|
3815
3702
|
] }),
|
|
3816
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-balance-small", children: [
|
|
3817
3704
|
tokenAmount,
|
|
3818
3705
|
" ",
|
|
3819
3706
|
asset.symbol
|
|
3820
3707
|
] })
|
|
3821
3708
|
] })
|
|
3822
3709
|
] }),
|
|
3823
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ jsx17("div", { className: "rs-asset-balance", children: balanceUsd })
|
|
3824
3711
|
]
|
|
3825
3712
|
},
|
|
3826
3713
|
asset.id
|
|
3827
3714
|
);
|
|
3828
3715
|
}) })
|
|
3829
3716
|
] }),
|
|
3830
|
-
/* @__PURE__ */
|
|
3717
|
+
/* @__PURE__ */ jsx17(PoweredBy, {})
|
|
3831
3718
|
] });
|
|
3832
3719
|
}
|
|
3833
3720
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
3834
3721
|
|
|
3835
3722
|
// src/components/steps/DappImportAssetSelectSkeleton.tsx
|
|
3836
|
-
import { jsx as
|
|
3723
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3837
3724
|
function DappImportAssetSelectSkeleton({
|
|
3838
3725
|
sourceLabel,
|
|
3839
3726
|
rowCount = 3,
|
|
3840
3727
|
error = false,
|
|
3841
3728
|
onRetry
|
|
3842
3729
|
}) {
|
|
3843
|
-
return /* @__PURE__ */
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3730
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", "aria-busy": error ? "false" : "true", children: [
|
|
3731
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
3732
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3733
|
+
/* @__PURE__ */ jsx18(
|
|
3847
3734
|
BodyHeader,
|
|
3848
3735
|
{
|
|
3849
|
-
icon: /* @__PURE__ */
|
|
3736
|
+
icon: /* @__PURE__ */ jsx18(WalletIcon, {}),
|
|
3850
3737
|
title: `Transfer from ${sourceLabel}`,
|
|
3851
3738
|
subtitle: "Pick the balance to import"
|
|
3852
3739
|
}
|
|
3853
3740
|
),
|
|
3854
|
-
error ? /* @__PURE__ */
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
3857
|
-
] }) }) : /* @__PURE__ */
|
|
3741
|
+
error ? /* @__PURE__ */ jsx18("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsxs16("div", { className: "rs-loading-text", children: [
|
|
3742
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t load your balances" }),
|
|
3743
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-loading-subtitle", children: "Check your connection and try again." })
|
|
3744
|
+
] }) }) : /* @__PURE__ */ jsx18("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs16(
|
|
3858
3745
|
"div",
|
|
3859
3746
|
{
|
|
3860
3747
|
className: "rs-asset-row rs-asset-row--skeleton",
|
|
3861
3748
|
children: [
|
|
3862
|
-
/* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
3864
|
-
/* @__PURE__ */
|
|
3865
|
-
/* @__PURE__ */
|
|
3749
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-info", children: [
|
|
3750
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3751
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-fill" }) }),
|
|
3752
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-fill" }) })
|
|
3866
3753
|
] }),
|
|
3867
|
-
/* @__PURE__ */
|
|
3868
|
-
/* @__PURE__ */
|
|
3869
|
-
/* @__PURE__ */
|
|
3754
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-text", children: [
|
|
3755
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-name-row", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--name" }) }),
|
|
3756
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-balance-small", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--balance" }) })
|
|
3870
3757
|
] })
|
|
3871
3758
|
] }),
|
|
3872
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-balance", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--usd" }) })
|
|
3873
3760
|
]
|
|
3874
3761
|
},
|
|
3875
3762
|
index
|
|
3876
3763
|
)) })
|
|
3877
3764
|
] }),
|
|
3878
|
-
error && onRetry && /* @__PURE__ */
|
|
3765
|
+
error && onRetry && /* @__PURE__ */ jsx18("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx18(
|
|
3879
3766
|
"button",
|
|
3880
3767
|
{
|
|
3881
3768
|
type: "button",
|
|
3882
3769
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
3883
3770
|
onClick: onRetry,
|
|
3884
|
-
children: /* @__PURE__ */
|
|
3771
|
+
children: /* @__PURE__ */ jsx18("span", { children: "Try again" })
|
|
3885
3772
|
}
|
|
3886
3773
|
) }),
|
|
3887
|
-
/* @__PURE__ */
|
|
3774
|
+
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
3888
3775
|
] });
|
|
3889
3776
|
}
|
|
3890
3777
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -5244,28 +5131,27 @@ function mapError(error) {
|
|
|
5244
5131
|
}
|
|
5245
5132
|
|
|
5246
5133
|
// src/DepositFlow.tsx
|
|
5247
|
-
import { Fragment as Fragment3, jsx as
|
|
5134
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5248
5135
|
function AccountPreparingSkeleton({
|
|
5249
5136
|
errorMessage,
|
|
5250
5137
|
onRetry
|
|
5251
5138
|
}) {
|
|
5252
|
-
return /* @__PURE__ */
|
|
5253
|
-
/* @__PURE__ */
|
|
5254
|
-
/* @__PURE__ */
|
|
5255
|
-
/* @__PURE__ */
|
|
5256
|
-
] }) : /* @__PURE__ */
|
|
5257
|
-
errorMessage && onRetry && /* @__PURE__ */
|
|
5139
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-step", children: [
|
|
5140
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
5141
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
5142
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
5143
|
+
] }) : /* @__PURE__ */ jsx19("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
5144
|
+
errorMessage && onRetry && /* @__PURE__ */ jsx19("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx19(
|
|
5258
5145
|
"button",
|
|
5259
5146
|
{
|
|
5260
5147
|
type: "button",
|
|
5261
5148
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
5262
5149
|
onClick: onRetry,
|
|
5263
|
-
children: /* @__PURE__ */
|
|
5150
|
+
children: /* @__PURE__ */ jsx19("span", { children: "Try again" })
|
|
5264
5151
|
}
|
|
5265
5152
|
) })
|
|
5266
5153
|
] });
|
|
5267
5154
|
}
|
|
5268
|
-
var QR_AUTO_ADVANCE_HYDRATION_GRACE_MS = 1e3;
|
|
5269
5155
|
var DAPP_IMPORT_RESOLVE_TIMEOUT_MS = 1e4;
|
|
5270
5156
|
function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
|
|
5271
5157
|
return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
|
|
@@ -5473,12 +5359,6 @@ function DepositFlow({
|
|
|
5473
5359
|
const onEventRef = useLatestRef(onEvent);
|
|
5474
5360
|
const onLifecycleRef = useLatestRef(onLifecycle);
|
|
5475
5361
|
const onErrorRef = useLatestRef(onError);
|
|
5476
|
-
const hasInitialReownSession = Boolean(
|
|
5477
|
-
enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
|
|
5478
|
-
);
|
|
5479
|
-
const hasInitialWalletHydrationPending = Boolean(
|
|
5480
|
-
dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
|
|
5481
|
-
);
|
|
5482
5362
|
const storeApi = useDepositStoreApi();
|
|
5483
5363
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
5484
5364
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -5488,10 +5368,8 @@ function DepositFlow({
|
|
|
5488
5368
|
const exchangeSlice = useDepositStore((s) => s.exchange);
|
|
5489
5369
|
const flowMode = flowSlice.mode;
|
|
5490
5370
|
const isConnectSelectionConfirmed = flowSlice.isConnectSelectionConfirmed;
|
|
5491
|
-
const hasNavigatedBack = flowSlice.hasNavigatedBack;
|
|
5492
5371
|
const selectedWalletId = useDepositStore(selectedWalletIdSelector);
|
|
5493
5372
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState11(0);
|
|
5494
|
-
const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = useState11(() => !hasInitialWalletHydrationPending);
|
|
5495
5373
|
const portfolioAssetsRef = useRef8([]);
|
|
5496
5374
|
const stableWalletSignerRef = useRef8(null);
|
|
5497
5375
|
const stableWalletSelectionKeyRef = useRef8(null);
|
|
@@ -5589,24 +5467,10 @@ function DepositFlow({
|
|
|
5589
5467
|
const hasReownSession = Boolean(
|
|
5590
5468
|
enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
|
|
5591
5469
|
);
|
|
5592
|
-
const isWalletHydrationPending = Boolean(
|
|
5593
|
-
dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
|
|
5594
|
-
);
|
|
5595
5470
|
const isDappImportWalletHydrating = Boolean(
|
|
5596
5471
|
hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady
|
|
5597
5472
|
);
|
|
5598
5473
|
const showConnectStep = flowMode === null && !isConnectSelectionConfirmed;
|
|
5599
|
-
useEffect10(() => {
|
|
5600
|
-
if (!isWalletHydrationPending) {
|
|
5601
|
-
setHasQrAutoAdvanceGraceElapsed(true);
|
|
5602
|
-
return;
|
|
5603
|
-
}
|
|
5604
|
-
setHasQrAutoAdvanceGraceElapsed(false);
|
|
5605
|
-
const timeout = window.setTimeout(() => {
|
|
5606
|
-
setHasQrAutoAdvanceGraceElapsed(true);
|
|
5607
|
-
}, QR_AUTO_ADVANCE_HYDRATION_GRACE_MS);
|
|
5608
|
-
return () => window.clearTimeout(timeout);
|
|
5609
|
-
}, [isWalletHydrationPending]);
|
|
5610
5474
|
const walletSelectionKey = useMemo7(() => {
|
|
5611
5475
|
if (flowMode !== "wallet" && flowMode !== "dapp-import") return null;
|
|
5612
5476
|
if (canAutoLock) {
|
|
@@ -6648,26 +6512,6 @@ function DepositFlow({
|
|
|
6648
6512
|
storeApi.dispatch({ type: "flow/step-set", step: "connect" });
|
|
6649
6513
|
}
|
|
6650
6514
|
}, [enableSolana, flowMode, storeApi]);
|
|
6651
|
-
useEffect10(() => {
|
|
6652
|
-
if (hasNavigatedBack || isConnectSelectionConfirmed || flowMode || enableFiatOnramp || enableExchangeConnect || initialDappImportProvider) {
|
|
6653
|
-
return;
|
|
6654
|
-
}
|
|
6655
|
-
if (enableQrTransfer && !hasWalletOptions && dappAddress && !hasReownSession && !dappWalletClient && hasQrAutoAdvanceGraceElapsed) {
|
|
6656
|
-
handleSelectTransferCrypto();
|
|
6657
|
-
}
|
|
6658
|
-
}, [
|
|
6659
|
-
enableQrTransfer,
|
|
6660
|
-
hasWalletOptions,
|
|
6661
|
-
hasReownSession,
|
|
6662
|
-
hasQrAutoAdvanceGraceElapsed,
|
|
6663
|
-
isConnectSelectionConfirmed,
|
|
6664
|
-
flowMode,
|
|
6665
|
-
hasNavigatedBack,
|
|
6666
|
-
dappAddress,
|
|
6667
|
-
dappWalletClient,
|
|
6668
|
-
initialDappImportProvider,
|
|
6669
|
-
handleSelectTransferCrypto
|
|
6670
|
-
]);
|
|
6671
6515
|
const walletRows = useMemo7(() => {
|
|
6672
6516
|
return walletOptions.map((option) => {
|
|
6673
6517
|
const ownerForRow = option.kind === "solana" ? dappAddress : option.address ?? null;
|
|
@@ -6696,7 +6540,7 @@ function DepositFlow({
|
|
|
6696
6540
|
[storeApi]
|
|
6697
6541
|
);
|
|
6698
6542
|
if (showConnectStep) {
|
|
6699
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsx19("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx19(
|
|
6700
6544
|
ConnectStep,
|
|
6701
6545
|
{
|
|
6702
6546
|
walletRows,
|
|
@@ -6752,21 +6596,21 @@ function DepositFlow({
|
|
|
6752
6596
|
}
|
|
6753
6597
|
if (isDepositAddressMode) {
|
|
6754
6598
|
if (!dappAddress) return null;
|
|
6755
|
-
return /* @__PURE__ */
|
|
6756
|
-
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */
|
|
6599
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6600
|
+
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx19(
|
|
6757
6601
|
AccountPreparingSkeleton,
|
|
6758
6602
|
{
|
|
6759
6603
|
errorMessage: activeEntry.message ?? void 0,
|
|
6760
6604
|
onRetry: () => handleRetrySetup(dappAddress)
|
|
6761
6605
|
}
|
|
6762
|
-
) : /* @__PURE__ */
|
|
6606
|
+
) : /* @__PURE__ */ jsx19(
|
|
6763
6607
|
DepositAddressSkeleton,
|
|
6764
6608
|
{
|
|
6765
6609
|
uiConfig,
|
|
6766
6610
|
allowedRoutes
|
|
6767
6611
|
}
|
|
6768
6612
|
)),
|
|
6769
|
-
effectiveStep.type === "deposit-address" && /* @__PURE__ */
|
|
6613
|
+
effectiveStep.type === "deposit-address" && /* @__PURE__ */ jsx19(
|
|
6770
6614
|
DepositAddressStep,
|
|
6771
6615
|
{
|
|
6772
6616
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6799,21 +6643,21 @@ function DepositFlow({
|
|
|
6799
6643
|
}
|
|
6800
6644
|
if (isFiatOnrampMode) {
|
|
6801
6645
|
if (!dappAddress) return null;
|
|
6802
|
-
return /* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ jsxs17(
|
|
6803
6647
|
"div",
|
|
6804
6648
|
{
|
|
6805
6649
|
className: "rs-modal-body",
|
|
6806
6650
|
"data-flow-mode": "fiat-onramp",
|
|
6807
6651
|
"data-step-type": step.type,
|
|
6808
6652
|
children: [
|
|
6809
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6653
|
+
step.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6810
6654
|
AccountPreparingSkeleton,
|
|
6811
6655
|
{
|
|
6812
6656
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6813
6657
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6814
6658
|
}
|
|
6815
6659
|
),
|
|
6816
|
-
step.type === "fiat-onramp" && /* @__PURE__ */
|
|
6660
|
+
step.type === "fiat-onramp" && /* @__PURE__ */ jsx19(
|
|
6817
6661
|
FiatOnrampStep,
|
|
6818
6662
|
{
|
|
6819
6663
|
smartAccount: step.smartAccount,
|
|
@@ -6826,7 +6670,7 @@ function DepositFlow({
|
|
|
6826
6670
|
onError: handleError
|
|
6827
6671
|
}
|
|
6828
6672
|
),
|
|
6829
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6673
|
+
step.type === "processing" && /* @__PURE__ */ jsx19(
|
|
6830
6674
|
ProcessingStep,
|
|
6831
6675
|
{
|
|
6832
6676
|
smartAccount: step.smartAccount,
|
|
@@ -6858,21 +6702,21 @@ function DepositFlow({
|
|
|
6858
6702
|
}
|
|
6859
6703
|
if (isExchangeConnectMode) {
|
|
6860
6704
|
if (!dappAddress) return null;
|
|
6861
|
-
return /* @__PURE__ */
|
|
6705
|
+
return /* @__PURE__ */ jsxs17(
|
|
6862
6706
|
"div",
|
|
6863
6707
|
{
|
|
6864
6708
|
className: "rs-modal-body",
|
|
6865
6709
|
"data-flow-mode": "exchange-connect",
|
|
6866
6710
|
"data-step-type": step.type,
|
|
6867
6711
|
children: [
|
|
6868
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6712
|
+
step.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6869
6713
|
AccountPreparingSkeleton,
|
|
6870
6714
|
{
|
|
6871
6715
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6872
6716
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6873
6717
|
}
|
|
6874
6718
|
),
|
|
6875
|
-
step.type === "exchange-select" && /* @__PURE__ */
|
|
6719
|
+
step.type === "exchange-select" && /* @__PURE__ */ jsx19(
|
|
6876
6720
|
ExchangeSelectStep,
|
|
6877
6721
|
{
|
|
6878
6722
|
service,
|
|
@@ -6880,7 +6724,7 @@ function DepositFlow({
|
|
|
6880
6724
|
onError: handleError
|
|
6881
6725
|
}
|
|
6882
6726
|
),
|
|
6883
|
-
step.type === "exchange-connect" && /* @__PURE__ */
|
|
6727
|
+
step.type === "exchange-connect" && /* @__PURE__ */ jsx19(
|
|
6884
6728
|
ExchangeConnectStep,
|
|
6885
6729
|
{
|
|
6886
6730
|
smartAccount: step.smartAccount,
|
|
@@ -6893,7 +6737,7 @@ function DepositFlow({
|
|
|
6893
6737
|
onError: handleError
|
|
6894
6738
|
}
|
|
6895
6739
|
),
|
|
6896
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6740
|
+
step.type === "processing" && /* @__PURE__ */ jsx19(
|
|
6897
6741
|
ProcessingStep,
|
|
6898
6742
|
{
|
|
6899
6743
|
smartAccount: step.smartAccount,
|
|
@@ -6927,15 +6771,15 @@ function DepositFlow({
|
|
|
6927
6771
|
if (!dappAddress) return null;
|
|
6928
6772
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
6929
6773
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
6930
|
-
return /* @__PURE__ */
|
|
6931
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
6774
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6775
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6932
6776
|
AccountPreparingSkeleton,
|
|
6933
6777
|
{
|
|
6934
6778
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6935
6779
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6936
6780
|
}
|
|
6937
6781
|
),
|
|
6938
|
-
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */
|
|
6782
|
+
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx19(
|
|
6939
6783
|
SolanaTokenSelectStep,
|
|
6940
6784
|
{
|
|
6941
6785
|
solanaAddress: solanaAddr,
|
|
@@ -6949,7 +6793,7 @@ function DepositFlow({
|
|
|
6949
6793
|
debug
|
|
6950
6794
|
}
|
|
6951
6795
|
),
|
|
6952
|
-
effectiveStep.type === "solana-amount" && /* @__PURE__ */
|
|
6796
|
+
effectiveStep.type === "solana-amount" && /* @__PURE__ */ jsx19(
|
|
6953
6797
|
SolanaAmountStep,
|
|
6954
6798
|
{
|
|
6955
6799
|
token: effectiveStep.token,
|
|
@@ -6968,7 +6812,7 @@ function DepositFlow({
|
|
|
6968
6812
|
debug
|
|
6969
6813
|
}
|
|
6970
6814
|
),
|
|
6971
|
-
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */
|
|
6815
|
+
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx19(
|
|
6972
6816
|
SolanaConfirmStep,
|
|
6973
6817
|
{
|
|
6974
6818
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6989,16 +6833,16 @@ function DepositFlow({
|
|
|
6989
6833
|
onError: handleError,
|
|
6990
6834
|
debug
|
|
6991
6835
|
}
|
|
6992
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
6993
|
-
/* @__PURE__ */
|
|
6994
|
-
/* @__PURE__ */
|
|
6836
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs17("div", { className: "rs-step", children: [
|
|
6837
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-loading-state", children: [
|
|
6838
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx19(
|
|
6995
6839
|
"svg",
|
|
6996
6840
|
{
|
|
6997
6841
|
viewBox: "0 0 24 24",
|
|
6998
6842
|
fill: "none",
|
|
6999
6843
|
stroke: "currentColor",
|
|
7000
6844
|
strokeWidth: "2",
|
|
7001
|
-
children: /* @__PURE__ */
|
|
6845
|
+
children: /* @__PURE__ */ jsx19(
|
|
7002
6846
|
"path",
|
|
7003
6847
|
{
|
|
7004
6848
|
strokeLinecap: "round",
|
|
@@ -7008,22 +6852,22 @@ function DepositFlow({
|
|
|
7008
6852
|
)
|
|
7009
6853
|
}
|
|
7010
6854
|
) }),
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
6855
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-loading-text", children: [
|
|
6856
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
6857
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
7014
6858
|
] })
|
|
7015
6859
|
] }),
|
|
7016
|
-
/* @__PURE__ */
|
|
6860
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx19(
|
|
7017
6861
|
"button",
|
|
7018
6862
|
{
|
|
7019
6863
|
type: "button",
|
|
7020
6864
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
7021
6865
|
onClick: handleBack,
|
|
7022
|
-
children: /* @__PURE__ */
|
|
6866
|
+
children: /* @__PURE__ */ jsx19("span", { children: "Go Back" })
|
|
7023
6867
|
}
|
|
7024
6868
|
) })
|
|
7025
6869
|
] }) : null,
|
|
7026
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
6870
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx19(
|
|
7027
6871
|
ProcessingStep,
|
|
7028
6872
|
{
|
|
7029
6873
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -7051,13 +6895,13 @@ function DepositFlow({
|
|
|
7051
6895
|
] });
|
|
7052
6896
|
}
|
|
7053
6897
|
if (isDappImportMode && effectiveStep.type === "dapp-import-resolving") {
|
|
7054
|
-
return /* @__PURE__ */
|
|
6898
|
+
return /* @__PURE__ */ jsx19(
|
|
7055
6899
|
"div",
|
|
7056
6900
|
{
|
|
7057
6901
|
className: "rs-modal-body",
|
|
7058
6902
|
"data-flow-mode": "dapp-import",
|
|
7059
6903
|
"data-step-type": effectiveStep.type,
|
|
7060
|
-
children: /* @__PURE__ */
|
|
6904
|
+
children: /* @__PURE__ */ jsx19(
|
|
7061
6905
|
DappImportAssetSelectSkeleton,
|
|
7062
6906
|
{
|
|
7063
6907
|
sourceLabel: activeDappImportProvider?.sourceLabel ?? "",
|
|
@@ -7069,7 +6913,7 @@ function DepositFlow({
|
|
|
7069
6913
|
);
|
|
7070
6914
|
}
|
|
7071
6915
|
if (!signerContext?.walletClient || !signerContext?.publicClient) {
|
|
7072
|
-
return /* @__PURE__ */
|
|
6916
|
+
return /* @__PURE__ */ jsx19("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx19("div", { className: "rs-step", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-title", children: "Connecting wallet\u2026" }) }) }) }) });
|
|
7073
6917
|
}
|
|
7074
6918
|
const ownerAddress = signerContext.ownerAddress;
|
|
7075
6919
|
const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? setupChainId;
|
|
@@ -7079,15 +6923,15 @@ function DepositFlow({
|
|
|
7079
6923
|
}
|
|
7080
6924
|
return getPublicClient(chainId);
|
|
7081
6925
|
};
|
|
7082
|
-
return /* @__PURE__ */
|
|
7083
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
6926
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6927
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx19(
|
|
7084
6928
|
AccountPreparingSkeleton,
|
|
7085
6929
|
{
|
|
7086
6930
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
7087
6931
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(ownerAddress) : void 0
|
|
7088
6932
|
}
|
|
7089
6933
|
),
|
|
7090
|
-
effectiveStep.type === "select-asset" && /* @__PURE__ */
|
|
6934
|
+
effectiveStep.type === "select-asset" && /* @__PURE__ */ jsx19(
|
|
7091
6935
|
AssetSelectStep,
|
|
7092
6936
|
{
|
|
7093
6937
|
address: ownerAddress,
|
|
@@ -7105,7 +6949,7 @@ function DepositFlow({
|
|
|
7105
6949
|
} : void 0
|
|
7106
6950
|
}
|
|
7107
6951
|
),
|
|
7108
|
-
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */
|
|
6952
|
+
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ jsx19(
|
|
7109
6953
|
DappImportAssetSelectStep,
|
|
7110
6954
|
{
|
|
7111
6955
|
sourceLabel: activeDappImportAvailability.assets[0]?.sourceLabel ?? activeDappImportProvider.sourceLabel,
|
|
@@ -7113,7 +6957,7 @@ function DepositFlow({
|
|
|
7113
6957
|
onSelect: handleDappImportAssetSelected
|
|
7114
6958
|
}
|
|
7115
6959
|
),
|
|
7116
|
-
effectiveStep.type === "amount" && /* @__PURE__ */
|
|
6960
|
+
effectiveStep.type === "amount" && /* @__PURE__ */ jsx19(
|
|
7117
6961
|
AmountStep,
|
|
7118
6962
|
{
|
|
7119
6963
|
walletClient: signerContext.walletClient,
|
|
@@ -7145,7 +6989,7 @@ function DepositFlow({
|
|
|
7145
6989
|
}
|
|
7146
6990
|
}
|
|
7147
6991
|
),
|
|
7148
|
-
effectiveStep.type === "confirm" && /* @__PURE__ */
|
|
6992
|
+
effectiveStep.type === "confirm" && /* @__PURE__ */ jsx19(
|
|
7149
6993
|
ConfirmStep,
|
|
7150
6994
|
{
|
|
7151
6995
|
walletClient: signerContext.walletClient,
|
|
@@ -7186,7 +7030,7 @@ function DepositFlow({
|
|
|
7186
7030
|
onError: handleError
|
|
7187
7031
|
}
|
|
7188
7032
|
),
|
|
7189
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
7033
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx19(
|
|
7190
7034
|
ProcessingStep,
|
|
7191
7035
|
{
|
|
7192
7036
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -7218,7 +7062,7 @@ function DepositFlow({
|
|
|
7218
7062
|
|
|
7219
7063
|
// src/components/history/DepositHistoryPanel.tsx
|
|
7220
7064
|
import { useCallback as useCallback8, useMemo as useMemo8, useState as useState12 } from "react";
|
|
7221
|
-
import { jsx as
|
|
7065
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7222
7066
|
function shortenHash(hash) {
|
|
7223
7067
|
if (hash.length <= 14) return hash;
|
|
7224
7068
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -7345,7 +7189,7 @@ function DepositHistoryPanel({
|
|
|
7345
7189
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
7346
7190
|
);
|
|
7347
7191
|
}, [deposits]);
|
|
7348
|
-
return /* @__PURE__ */
|
|
7192
|
+
return /* @__PURE__ */ jsxs18(
|
|
7349
7193
|
"div",
|
|
7350
7194
|
{
|
|
7351
7195
|
className: "rs-history-panel",
|
|
@@ -7353,55 +7197,55 @@ function DepositHistoryPanel({
|
|
|
7353
7197
|
"aria-label": "Deposit history",
|
|
7354
7198
|
onKeyDown: handleKeyDown,
|
|
7355
7199
|
children: [
|
|
7356
|
-
/* @__PURE__ */
|
|
7357
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-modal-header--redesigned", children: [
|
|
7201
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx20(
|
|
7358
7202
|
"button",
|
|
7359
7203
|
{
|
|
7360
7204
|
type: "button",
|
|
7361
7205
|
className: "rs-modal-header-back",
|
|
7362
7206
|
"aria-label": "Back",
|
|
7363
7207
|
onClick: onClose,
|
|
7364
|
-
children: /* @__PURE__ */
|
|
7208
|
+
children: /* @__PURE__ */ jsx20(ChevronLeftIcon, {})
|
|
7365
7209
|
}
|
|
7366
7210
|
) }),
|
|
7367
|
-
/* @__PURE__ */
|
|
7211
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ jsx20(
|
|
7368
7212
|
"button",
|
|
7369
7213
|
{
|
|
7370
7214
|
type: "button",
|
|
7371
7215
|
className: "rs-modal-close",
|
|
7372
7216
|
"aria-label": "Close",
|
|
7373
7217
|
onClick: onCloseModal,
|
|
7374
|
-
children: /* @__PURE__ */
|
|
7218
|
+
children: /* @__PURE__ */ jsx20(CloseIcon, {})
|
|
7375
7219
|
}
|
|
7376
7220
|
) })
|
|
7377
7221
|
] }),
|
|
7378
|
-
/* @__PURE__ */
|
|
7379
|
-
/* @__PURE__ */
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7222
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-screen", children: [
|
|
7223
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-screen-body", children: [
|
|
7224
|
+
/* @__PURE__ */ jsx20(BodyHeader, { icon: /* @__PURE__ */ jsx20(HistoryIcon, {}), title: "History" }),
|
|
7225
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7226
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(HistoryIcon, {}) }),
|
|
7227
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7228
|
+
/* @__PURE__ */ jsx20(Spinner, { className: "rs-spinner--sm" }),
|
|
7229
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7386
7230
|
] })
|
|
7387
7231
|
] }),
|
|
7388
|
-
error && !isLoading && /* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7391
|
-
/* @__PURE__ */
|
|
7392
|
-
/* @__PURE__ */
|
|
7232
|
+
error && !isLoading && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7233
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(AlertTriangleIcon, {}) }),
|
|
7234
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7235
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7236
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: error })
|
|
7393
7237
|
] })
|
|
7394
7238
|
] }),
|
|
7395
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
/* @__PURE__ */
|
|
7398
|
-
/* @__PURE__ */
|
|
7399
|
-
/* @__PURE__ */
|
|
7239
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7240
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(HistoryIcon, {}) }),
|
|
7241
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7242
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7243
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
7400
7244
|
] })
|
|
7401
7245
|
] }),
|
|
7402
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
7403
|
-
visibleDeposits.map((deposit, i) => /* @__PURE__ */
|
|
7404
|
-
hasMore && /* @__PURE__ */
|
|
7246
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-list", children: [
|
|
7247
|
+
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx20(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
7248
|
+
hasMore && /* @__PURE__ */ jsx20(
|
|
7405
7249
|
"button",
|
|
7406
7250
|
{
|
|
7407
7251
|
type: "button",
|
|
@@ -7413,7 +7257,7 @@ function DepositHistoryPanel({
|
|
|
7413
7257
|
)
|
|
7414
7258
|
] })
|
|
7415
7259
|
] }),
|
|
7416
|
-
/* @__PURE__ */
|
|
7260
|
+
/* @__PURE__ */ jsx20(PoweredBy, {})
|
|
7417
7261
|
] })
|
|
7418
7262
|
]
|
|
7419
7263
|
}
|
|
@@ -7439,7 +7283,7 @@ function HistoryCard({ deposit }) {
|
|
|
7439
7283
|
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
7440
7284
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
7441
7285
|
const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
|
|
7442
|
-
return /* @__PURE__ */
|
|
7286
|
+
return /* @__PURE__ */ jsxs18(
|
|
7443
7287
|
"button",
|
|
7444
7288
|
{
|
|
7445
7289
|
type: "button",
|
|
@@ -7447,38 +7291,38 @@ function HistoryCard({ deposit }) {
|
|
|
7447
7291
|
onClick: () => setExpanded((v) => !v),
|
|
7448
7292
|
"aria-expanded": expanded,
|
|
7449
7293
|
children: [
|
|
7450
|
-
/* @__PURE__ */
|
|
7451
|
-
/* @__PURE__ */
|
|
7452
|
-
/* @__PURE__ */
|
|
7453
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7294
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-row", children: [
|
|
7295
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-icons", children: [
|
|
7296
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children: sourceTokenIcon ? /* @__PURE__ */ jsx20("img", { src: sourceTokenIcon, alt: "" }) : sourceSymbol.slice(0, 2) }),
|
|
7297
|
+
sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
|
|
7454
7298
|
] }),
|
|
7455
|
-
/* @__PURE__ */
|
|
7456
|
-
/* @__PURE__ */
|
|
7457
|
-
date && /* @__PURE__ */
|
|
7299
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-text", children: [
|
|
7300
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
7301
|
+
date && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-date", children: date })
|
|
7458
7302
|
] }),
|
|
7459
|
-
/* @__PURE__ */
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
/* @__PURE__ */
|
|
7303
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-side", children: [
|
|
7304
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
7305
|
+
/* @__PURE__ */ jsx20("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
7462
7306
|
] })
|
|
7463
7307
|
] }),
|
|
7464
|
-
/* @__PURE__ */
|
|
7465
|
-
sourceChainName && /* @__PURE__ */
|
|
7466
|
-
/* @__PURE__ */
|
|
7467
|
-
/* @__PURE__ */
|
|
7468
|
-
/* @__PURE__ */
|
|
7469
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7308
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx20("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ jsxs18("div", { className: "rs-history-card-details", children: [
|
|
7309
|
+
sourceChainName && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7310
|
+
/* @__PURE__ */ jsx20("span", { children: "Source chain" }),
|
|
7311
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-amount-detail-value", children: [
|
|
7312
|
+
/* @__PURE__ */ jsx20("span", { children: sourceChainName }),
|
|
7313
|
+
sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
|
|
7470
7314
|
] })
|
|
7471
7315
|
] }),
|
|
7472
|
-
targetChainName && /* @__PURE__ */
|
|
7473
|
-
/* @__PURE__ */
|
|
7474
|
-
/* @__PURE__ */
|
|
7475
|
-
/* @__PURE__ */
|
|
7476
|
-
targetChainIcon && /* @__PURE__ */
|
|
7316
|
+
targetChainName && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7317
|
+
/* @__PURE__ */ jsx20("span", { children: "Destination chain" }),
|
|
7318
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-amount-detail-value", children: [
|
|
7319
|
+
/* @__PURE__ */ jsx20("span", { children: targetChainName }),
|
|
7320
|
+
targetChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: targetChainIcon, alt: "" }) })
|
|
7477
7321
|
] })
|
|
7478
7322
|
] }),
|
|
7479
|
-
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */
|
|
7480
|
-
/* @__PURE__ */
|
|
7481
|
-
/* @__PURE__ */
|
|
7323
|
+
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7324
|
+
/* @__PURE__ */ jsx20("span", { children: "Transaction details" }),
|
|
7325
|
+
/* @__PURE__ */ jsxs18(
|
|
7482
7326
|
"a",
|
|
7483
7327
|
{
|
|
7484
7328
|
href: srcTxUrl,
|
|
@@ -7487,8 +7331,8 @@ function HistoryCard({ deposit }) {
|
|
|
7487
7331
|
className: "rs-history-card-link",
|
|
7488
7332
|
onClick: (e) => e.stopPropagation(),
|
|
7489
7333
|
children: [
|
|
7490
|
-
/* @__PURE__ */
|
|
7491
|
-
/* @__PURE__ */
|
|
7334
|
+
/* @__PURE__ */ jsx20("span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7335
|
+
/* @__PURE__ */ jsx20(ArrowUpRightIcon, {})
|
|
7492
7336
|
]
|
|
7493
7337
|
}
|
|
7494
7338
|
)
|
|
@@ -7501,9 +7345,9 @@ function HistoryCard({ deposit }) {
|
|
|
7501
7345
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
7502
7346
|
|
|
7503
7347
|
// src/DepositModal.tsx
|
|
7504
|
-
import { jsx as
|
|
7348
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7505
7349
|
var ReownDepositInner = lazy2(
|
|
7506
|
-
() => import("./DepositModalReown-
|
|
7350
|
+
() => import("./DepositModalReown-EXI7MW65.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7507
7351
|
);
|
|
7508
7352
|
function sortByCreatedAtDesc(items) {
|
|
7509
7353
|
return [...items].sort((a, b) => {
|
|
@@ -7519,7 +7363,7 @@ function DepositModal(props) {
|
|
|
7519
7363
|
"dappWalletClient"
|
|
7520
7364
|
);
|
|
7521
7365
|
if (needsReown) {
|
|
7522
|
-
return /* @__PURE__ */
|
|
7366
|
+
return /* @__PURE__ */ jsx21(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx21(
|
|
7523
7367
|
ReownDepositInner,
|
|
7524
7368
|
{
|
|
7525
7369
|
...props,
|
|
@@ -7527,7 +7371,7 @@ function DepositModal(props) {
|
|
|
7527
7371
|
}
|
|
7528
7372
|
) });
|
|
7529
7373
|
}
|
|
7530
|
-
return /* @__PURE__ */
|
|
7374
|
+
return /* @__PURE__ */ jsx21(
|
|
7531
7375
|
DepositModalInner,
|
|
7532
7376
|
{
|
|
7533
7377
|
...props,
|
|
@@ -7757,7 +7601,7 @@ function DepositModalInner({
|
|
|
7757
7601
|
}, [isOpen, store]);
|
|
7758
7602
|
const showBackButton = uiConfig?.showBackButton ?? true;
|
|
7759
7603
|
const canGoBack = backHandler !== void 0;
|
|
7760
|
-
return /* @__PURE__ */
|
|
7604
|
+
return /* @__PURE__ */ jsx21(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx21(
|
|
7761
7605
|
Modal,
|
|
7762
7606
|
{
|
|
7763
7607
|
isOpen,
|
|
@@ -7765,20 +7609,20 @@ function DepositModalInner({
|
|
|
7765
7609
|
className,
|
|
7766
7610
|
inline,
|
|
7767
7611
|
closeOnOverlayClick,
|
|
7768
|
-
children: /* @__PURE__ */
|
|
7769
|
-
/* @__PURE__ */
|
|
7770
|
-
/* @__PURE__ */
|
|
7612
|
+
children: /* @__PURE__ */ jsxs19("div", { ref: modalRef, className: "rs-modal", children: [
|
|
7613
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-modal-header--redesigned", children: [
|
|
7614
|
+
/* @__PURE__ */ jsx21("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx21(
|
|
7771
7615
|
"button",
|
|
7772
7616
|
{
|
|
7773
7617
|
type: "button",
|
|
7774
7618
|
className: "rs-modal-header-back",
|
|
7775
7619
|
"aria-label": "Go back",
|
|
7776
7620
|
onClick: backHandler,
|
|
7777
|
-
children: /* @__PURE__ */
|
|
7621
|
+
children: /* @__PURE__ */ jsx21(ChevronLeftIcon, {})
|
|
7778
7622
|
}
|
|
7779
7623
|
) }),
|
|
7780
|
-
/* @__PURE__ */
|
|
7781
|
-
historyButtonVisible && /* @__PURE__ */
|
|
7624
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-modal-header-nav-right", children: [
|
|
7625
|
+
historyButtonVisible && /* @__PURE__ */ jsx21(
|
|
7782
7626
|
"button",
|
|
7783
7627
|
{
|
|
7784
7628
|
type: "button",
|
|
@@ -7786,22 +7630,22 @@ function DepositModalInner({
|
|
|
7786
7630
|
"aria-label": "Deposit history",
|
|
7787
7631
|
onClick: handleHistoryOpen,
|
|
7788
7632
|
disabled: !recipient,
|
|
7789
|
-
children: /* @__PURE__ */
|
|
7633
|
+
children: /* @__PURE__ */ jsx21(HistoryIcon, {})
|
|
7790
7634
|
}
|
|
7791
7635
|
),
|
|
7792
|
-
/* @__PURE__ */
|
|
7636
|
+
/* @__PURE__ */ jsx21(
|
|
7793
7637
|
"button",
|
|
7794
7638
|
{
|
|
7795
7639
|
type: "button",
|
|
7796
7640
|
onClick: onClose,
|
|
7797
7641
|
className: "rs-modal-close",
|
|
7798
7642
|
"aria-label": "Close",
|
|
7799
|
-
children: /* @__PURE__ */
|
|
7643
|
+
children: /* @__PURE__ */ jsx21(CloseIcon, {})
|
|
7800
7644
|
}
|
|
7801
7645
|
)
|
|
7802
7646
|
] })
|
|
7803
7647
|
] }),
|
|
7804
|
-
recipientIsContract ? /* @__PURE__ */
|
|
7648
|
+
recipientIsContract ? /* @__PURE__ */ jsx21("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx21(Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ jsx21(
|
|
7805
7649
|
DepositFlow,
|
|
7806
7650
|
{
|
|
7807
7651
|
dappWalletClient,
|
|
@@ -7843,7 +7687,7 @@ function DepositModalInner({
|
|
|
7843
7687
|
debug
|
|
7844
7688
|
}
|
|
7845
7689
|
),
|
|
7846
|
-
showHistoryButton && historyOpen && /* @__PURE__ */
|
|
7690
|
+
showHistoryButton && historyOpen && /* @__PURE__ */ jsx21(
|
|
7847
7691
|
DepositHistoryPanel,
|
|
7848
7692
|
{
|
|
7849
7693
|
deposits: historyDeposits,
|