@trustware/sdk-staging 1.1.9-staging.3 → 1.1.9-staging.5

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/widget.mjs CHANGED
@@ -563,7 +563,7 @@ var init_constants = __esm({
563
563
  "src/constants.ts"() {
564
564
  "use strict";
565
565
  SDK_NAME = "@trustware/sdk";
566
- SDK_VERSION = "1.1.9-staging.3";
566
+ SDK_VERSION = "1.1.9-staging.5";
567
567
  API_ROOT = "https://bv-staging-api.trustware.io";
568
568
  GTM_ID = "GTM-TZDGNCXB";
569
569
  API_PREFIX = "/api";
@@ -16131,7 +16131,7 @@ function MobileWalletDropdownContent({
16131
16131
  const mobileWallets = useMemo17(
16132
16132
  () => WALLETS.filter((w) => {
16133
16133
  if (w.id === "walletconnect") return true;
16134
- const hasMobileLink = Boolean(w.deepLink || w.ios || w.android);
16134
+ const hasMobileLink = Boolean(w.deepLink);
16135
16135
  if (!hasMobileLink) return false;
16136
16136
  return w.ecosystem.trim().toLowerCase() === "multi" || w.ecosystem.trim().toLowerCase() === selectedNamespace.trim().toLowerCase();
16137
16137
  }),
@@ -33426,10 +33426,83 @@ var init_SwapTokenSelect = __esm({
33426
33426
  }
33427
33427
  });
33428
33428
 
33429
- // src/modes/swap/components/SwapWalletSelector.tsx
33429
+ // src/modes/swap/currency.ts
33430
+ function getCurrencyMeta(code) {
33431
+ return BY_CODE.get(code.toUpperCase()) ?? SUPPORTED_CURRENCIES[0];
33432
+ }
33433
+ function fmtCurrency(usdAmount, code, rate) {
33434
+ const meta = getCurrencyMeta(code);
33435
+ const local = usdAmount * rate;
33436
+ return meta.symbol + local.toFixed(meta.decimals);
33437
+ }
33438
+ var SUPPORTED_CURRENCIES, BY_CODE;
33439
+ var init_currency = __esm({
33440
+ "src/modes/swap/currency.ts"() {
33441
+ "use strict";
33442
+ SUPPORTED_CURRENCIES = [
33443
+ { code: "USD", symbol: "$", name: "US Dollar", decimals: 2 },
33444
+ { code: "EUR", symbol: "\u20AC", name: "Euro", decimals: 2 },
33445
+ { code: "GBP", symbol: "\xA3", name: "British Pound", decimals: 2 },
33446
+ { code: "CAD", symbol: "CA$", name: "Canadian Dollar", decimals: 2 },
33447
+ { code: "AUD", symbol: "A$", name: "Australian Dollar", decimals: 2 },
33448
+ { code: "JPY", symbol: "\xA5", name: "Japanese Yen", decimals: 0 },
33449
+ { code: "CHF", symbol: "Fr", name: "Swiss Franc", decimals: 2 },
33450
+ { code: "KRW", symbol: "\u20A9", name: "South Korean Won", decimals: 0 },
33451
+ { code: "INR", symbol: "\u20B9", name: "Indian Rupee", decimals: 2 },
33452
+ { code: "BRL", symbol: "R$", name: "Brazilian Real", decimals: 2 },
33453
+ { code: "SGD", symbol: "S$", name: "Singapore Dollar", decimals: 2 },
33454
+ { code: "MXN", symbol: "MX$", name: "Mexican Peso", decimals: 2 },
33455
+ { code: "HKD", symbol: "HK$", name: "Hong Kong Dollar", decimals: 2 },
33456
+ { code: "CNY", symbol: "\xA5", name: "Chinese Yuan", decimals: 2 },
33457
+ { code: "ZAR", symbol: "R", name: "South African Rand", decimals: 2 },
33458
+ { code: "TRY", symbol: "\u20BA", name: "Turkish Lira", decimals: 2 },
33459
+ { code: "RUB", symbol: "\u20BD", name: "Russian Ruble", decimals: 2 },
33460
+ {
33461
+ code: "AED",
33462
+ symbol: "\u062F.\u0625",
33463
+ name: "United Arab Emirates Dirham",
33464
+ decimals: 2
33465
+ },
33466
+ { code: "SAR", symbol: "\uFDFC", name: "Saudi Riyal", decimals: 2 },
33467
+ { code: "QAR", symbol: "\uFDFC", name: "Qatari Riyal", decimals: 2 },
33468
+ { code: "KWD", symbol: "\u062F.\u0643", name: "Kuwaiti Dinar", decimals: 3 },
33469
+ { code: "OMR", symbol: "\u0631.\u0639.", name: "Omani Rial", decimals: 3 },
33470
+ { code: "BHD", symbol: "\u0628.\u062F", name: "Bahraini Dinar", decimals: 3 },
33471
+ { code: "JOD", symbol: "\u062F.\u0627", name: "Jordanian Dinar", decimals: 3 },
33472
+ { code: "LYD", symbol: "\u0644.\u062F", name: "Libyan Dinar", decimals: 3 },
33473
+ { code: "TND", symbol: "\u062F.\u062A", name: "Tunisian Dinar", decimals: 3 },
33474
+ { code: "MAD", symbol: "\u062F.\u0645.", name: "Moroccan Dirham", decimals: 2 },
33475
+ { code: "EGP", symbol: "\xA3", name: "Egyptian Pound", decimals: 2 },
33476
+ { code: "NGN", symbol: "\u20A6", name: "Nigerian Naira", decimals: 2 },
33477
+ { code: "GHS", symbol: "\u20B5", name: "Ghanaian Cedi", decimals: 2 },
33478
+ { code: "KES", symbol: "KSh", name: "Kenyan Shilling", decimals: 2 },
33479
+ { code: "TZS", symbol: "TSh", name: "Tanzanian Shilling", decimals: 2 },
33480
+ { code: "UGX", symbol: "USh", name: "Ugandan Shilling", decimals: 2 },
33481
+ { code: "RWF", symbol: "FRw", name: "Rwandan Franc", decimals: 2 },
33482
+ { code: "MUR", symbol: "Rs", name: "Mauritian Rupee", decimals: 2 },
33483
+ { code: "SCR", symbol: "SR", name: "Seychellois Rupee", decimals: 2 },
33484
+ { code: "MGA", symbol: "Ar", name: "Malagasy Ariary", decimals: 2 },
33485
+ {
33486
+ code: "XAF",
33487
+ symbol: "FCFA",
33488
+ name: "Central African CFA Franc",
33489
+ decimals: 2
33490
+ },
33491
+ { code: "XOF", symbol: "CFA", name: "West African CFA Franc", decimals: 2 },
33492
+ { code: "XPF", symbol: "CFP", name: "CFP Franc", decimals: 2 },
33493
+ { code: "XCD", symbol: "EC$", name: "East Caribbean Dollar", decimals: 2 },
33494
+ { code: "XDR", symbol: "SDR", name: "Special Drawing Rights", decimals: 2 },
33495
+ { code: "XAU", symbol: "Au", name: "Gold (troy ounce)", decimals: 2 },
33496
+ { code: "XAG", symbol: "Ag", name: "Silver (troy ounce)", decimals: 2 }
33497
+ ];
33498
+ BY_CODE = new Map(SUPPORTED_CURRENCIES.map((c) => [c.code, c]));
33499
+ }
33500
+ });
33501
+
33502
+ // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx
33430
33503
  import { useEffect as useEffect31, useMemo as useMemo27, useRef as useRef17, useState as useState31 } from "react";
33431
33504
  import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs44 } from "react/jsx-runtime";
33432
- function SwapWalletSelector({
33505
+ function SwapWalletSelectorMobile({
33433
33506
  walletStatus,
33434
33507
  walletAddress,
33435
33508
  connectWallet,
@@ -33441,19 +33514,625 @@ function SwapWalletSelector({
33441
33514
  walletMetaId,
33442
33515
  connectedVia,
33443
33516
  disconnect
33517
+ // status,
33444
33518
  } = useWalletInfo();
33445
33519
  const walletConnectCfg = TrustwareConfigStore.peek()?.walletConnect;
33446
33520
  const connectWC = useWalletConnectConnect(walletConnectCfg);
33447
33521
  const [wcConnecting, setWcConnecting] = useState31(false);
33448
33522
  const [connectingId, setConnectingId] = useState31(null);
33449
- const [timerExpired, setTimerExpired] = useState31(false);
33450
33523
  const [selectedNamespace, setSelectedNamespace] = useState31("evm");
33451
33524
  const prevStatusRef = useRef17(walletStatus);
33525
+ const storeFallbackTimeoutRef = useRef17(
33526
+ null
33527
+ );
33528
+ useEffect31(() => {
33529
+ const prev = prevStatusRef.current;
33530
+ if (prev !== walletStatus) {
33531
+ if (prev === "connecting" && (walletStatus === "connected" || walletStatus === "error")) {
33532
+ setConnectingId(null);
33533
+ }
33534
+ prevStatusRef.current = walletStatus;
33535
+ }
33536
+ }, [walletStatus]);
33452
33537
  useEffect31(() => {
33538
+ return () => {
33539
+ if (storeFallbackTimeoutRef.current !== null) {
33540
+ clearTimeout(storeFallbackTimeoutRef.current);
33541
+ }
33542
+ };
33543
+ }, []);
33544
+ const currentUrl = typeof window !== "undefined" ? window.location.href : "";
33545
+ const mobileWalletEntries = useMemo27(() => {
33546
+ return WALLETS.filter((w) => {
33547
+ if (w.id === "walletconnect") return false;
33548
+ const hasMobileLink = Boolean(w.deepLink);
33549
+ if (!hasMobileLink) return false;
33550
+ const ecosystem = w.ecosystem.trim().toLowerCase();
33551
+ return ecosystem === "multi" || ecosystem === selectedNamespace;
33552
+ }).map((meta) => ({
33553
+ meta,
33554
+ detectedWallet: detected.find((d) => d.meta.id === meta.id) ?? null
33555
+ }));
33556
+ }, [detected, selectedNamespace]);
33557
+ const handleDisconnect = () => {
33558
+ void disconnect();
33559
+ };
33560
+ const handleWalletConnect = async () => {
33561
+ if (wcConnecting) return;
33562
+ if (connectedVia === "walletconnect" && managerConnected) {
33563
+ return;
33564
+ }
33565
+ setWcConnecting(true);
33566
+ try {
33567
+ const { error } = await connectWC();
33568
+ if (error) {
33569
+ toast.error("WalletConnect Failed", error);
33570
+ }
33571
+ } catch (err) {
33572
+ const msg = err instanceof Error ? err.message : "WalletConnect failed";
33573
+ toast.error("WalletConnect Failed", msg);
33574
+ } finally {
33575
+ setWcConnecting(false);
33576
+ }
33577
+ };
33578
+ const goToAppStore = (meta) => {
33579
+ const isIos = /iPhone|iPad/i.test(navigator.userAgent);
33580
+ const storeUrl = isIos ? meta.ios : meta.android;
33581
+ if (storeUrl) window.location.assign(storeUrl);
33582
+ };
33583
+ const handleClick = async (entry) => {
33584
+ const { meta, detectedWallet } = entry;
33585
+ if (walletStatus === "connecting") return;
33586
+ if (managerConnected && walletMetaId === meta.id) {
33587
+ return;
33588
+ }
33589
+ if (detectedWallet) {
33590
+ setConnectingId(meta.id);
33591
+ try {
33592
+ await connectWallet(detectedWallet);
33593
+ } catch (err) {
33594
+ setConnectingId(null);
33595
+ const msg = err instanceof Error ? err.message : "Failed to connect wallet";
33596
+ if (msg.toLowerCase().includes("rejected") || msg.toLowerCase().includes("denied")) {
33597
+ toast.error(
33598
+ "Connection Declined",
33599
+ "You declined the connection request."
33600
+ );
33601
+ } else {
33602
+ toast.error("Connection Failed", msg);
33603
+ }
33604
+ }
33605
+ return;
33606
+ }
33607
+ if (meta.deepLink) {
33608
+ const deepLinkUrl = meta.deepLink(currentUrl);
33609
+ if (deepLinkUrl) {
33610
+ window.location.assign(deepLinkUrl);
33611
+ if (storeFallbackTimeoutRef.current !== null) {
33612
+ clearTimeout(storeFallbackTimeoutRef.current);
33613
+ }
33614
+ storeFallbackTimeoutRef.current = setTimeout(() => {
33615
+ storeFallbackTimeoutRef.current = null;
33616
+ goToAppStore(meta);
33617
+ }, 1500);
33618
+ return;
33619
+ }
33620
+ }
33621
+ goToAppStore(meta);
33622
+ };
33623
+ const tabs = [
33624
+ { id: "evm", label: "EVM" },
33625
+ { id: "solana", label: "Solana" }
33626
+ ];
33627
+ return /* @__PURE__ */ jsxs44(
33628
+ "div",
33629
+ {
33630
+ style: {
33631
+ display: "flex",
33632
+ flexDirection: "column",
33633
+ height: "100%"
33634
+ },
33635
+ children: [
33636
+ /* @__PURE__ */ jsxs44(
33637
+ "div",
33638
+ {
33639
+ style: {
33640
+ display: "flex",
33641
+ alignItems: "center",
33642
+ padding: `${spacing[4]} ${spacing[4]}`,
33643
+ borderBottom: `1px solid ${colors.border}`
33644
+ },
33645
+ children: [
33646
+ /* @__PURE__ */ jsx56(
33647
+ "button",
33648
+ {
33649
+ type: "button",
33650
+ onClick: onBack,
33651
+ style: {
33652
+ padding: spacing[1],
33653
+ marginRight: spacing[2],
33654
+ borderRadius: borderRadius.lg,
33655
+ backgroundColor: "transparent",
33656
+ border: 0,
33657
+ cursor: "pointer"
33658
+ },
33659
+ children: /* @__PURE__ */ jsx56(
33660
+ "svg",
33661
+ {
33662
+ style: {
33663
+ width: "1.25rem",
33664
+ height: "1.25rem",
33665
+ color: colors.foreground
33666
+ },
33667
+ viewBox: "0 0 24 24",
33668
+ fill: "none",
33669
+ stroke: "currentColor",
33670
+ strokeWidth: 2,
33671
+ children: /* @__PURE__ */ jsx56(
33672
+ "path",
33673
+ {
33674
+ strokeLinecap: "round",
33675
+ strokeLinejoin: "round",
33676
+ d: "M15 19l-7-7 7-7"
33677
+ }
33678
+ )
33679
+ }
33680
+ )
33681
+ }
33682
+ ),
33683
+ /* @__PURE__ */ jsx56(
33684
+ "h1",
33685
+ {
33686
+ style: {
33687
+ flex: 1,
33688
+ fontSize: fontSize.lg,
33689
+ fontWeight: fontWeight.semibold,
33690
+ color: colors.foreground,
33691
+ textAlign: "center"
33692
+ },
33693
+ children: "Connect Wallet"
33694
+ }
33695
+ ),
33696
+ /* @__PURE__ */ jsx56("div", { style: { width: "1.25rem", marginLeft: spacing[2] }, "aria-hidden": true })
33697
+ ]
33698
+ }
33699
+ ),
33700
+ /* @__PURE__ */ jsx56("div", { style: { padding: `${spacing[3]} ${spacing[4]} 0` }, children: /* @__PURE__ */ jsx56(
33701
+ "div",
33702
+ {
33703
+ style: {
33704
+ display: "flex",
33705
+ alignItems: "center",
33706
+ borderRadius: borderRadius.lg,
33707
+ backgroundColor: colors.muted,
33708
+ padding: "3px",
33709
+ gap: "2px"
33710
+ },
33711
+ children: tabs.map((t) => /* @__PURE__ */ jsx56(
33712
+ "button",
33713
+ {
33714
+ onClick: () => setSelectedNamespace(t.id),
33715
+ style: {
33716
+ flex: 1,
33717
+ padding: `${spacing[1.5]} ${spacing[3]}`,
33718
+ fontSize: fontSize.sm,
33719
+ fontWeight: fontWeight.medium,
33720
+ borderRadius: borderRadius.md,
33721
+ background: selectedNamespace === t.id ? colors.card : "transparent",
33722
+ border: selectedNamespace === t.id ? `1px solid ${colors.border}` : "1px solid transparent",
33723
+ cursor: "pointer",
33724
+ transition: "all 0.15s",
33725
+ color: selectedNamespace === t.id ? colors.foreground : colors.mutedForeground,
33726
+ boxShadow: selectedNamespace === t.id ? "0 1px 3px rgba(0,0,0,0.08)" : "none",
33727
+ outline: "none"
33728
+ },
33729
+ children: t.label
33730
+ },
33731
+ t.id
33732
+ ))
33733
+ }
33734
+ ) }),
33735
+ /* @__PURE__ */ jsxs44(
33736
+ "div",
33737
+ {
33738
+ style: {
33739
+ overflowY: "auto",
33740
+ padding: spacing[4],
33741
+ maxHeight: "31.25rem"
33742
+ },
33743
+ children: [
33744
+ mobileWalletEntries.length === 0 ? /* @__PURE__ */ jsxs44("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
33745
+ /* @__PURE__ */ jsx56("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
33746
+ /* @__PURE__ */ jsx56(
33747
+ "h3",
33748
+ {
33749
+ style: {
33750
+ fontSize: fontSize.lg,
33751
+ fontWeight: fontWeight.semibold,
33752
+ color: colors.foreground,
33753
+ marginBottom: spacing[2]
33754
+ },
33755
+ children: "No Wallets Found"
33756
+ }
33757
+ ),
33758
+ /* @__PURE__ */ jsx56(
33759
+ "p",
33760
+ {
33761
+ style: {
33762
+ fontSize: fontSize.sm,
33763
+ color: colors.mutedForeground,
33764
+ marginBottom: spacing[4]
33765
+ },
33766
+ children: "Please install a web3 wallet to continue."
33767
+ }
33768
+ ),
33769
+ /* @__PURE__ */ jsx56(
33770
+ "a",
33771
+ {
33772
+ href: "https://metamask.io/download/",
33773
+ target: "_blank",
33774
+ rel: "noopener noreferrer",
33775
+ style: {
33776
+ display: "inline-flex",
33777
+ alignItems: "center",
33778
+ justifyContent: "center",
33779
+ padding: `${spacing[2]} ${spacing[4]}`,
33780
+ borderRadius: borderRadius.lg,
33781
+ backgroundColor: colors.primary,
33782
+ color: colors.primaryForeground,
33783
+ fontSize: fontSize.sm,
33784
+ fontWeight: fontWeight.medium,
33785
+ textDecoration: "none"
33786
+ },
33787
+ children: "Install MetaMask"
33788
+ }
33789
+ )
33790
+ ] }) : /* @__PURE__ */ jsx56(
33791
+ "div",
33792
+ {
33793
+ style: {
33794
+ display: "flex",
33795
+ flexDirection: "column",
33796
+ gap: spacing[3]
33797
+ },
33798
+ children: mobileWalletEntries.map((entry) => {
33799
+ const { meta } = entry;
33800
+ const isWalletConnected = managerConnected && walletMetaId === meta.id;
33801
+ const isConnecting = connectingId === meta.id && walletStatus === "connecting";
33802
+ return /* @__PURE__ */ jsxs44(
33803
+ "div",
33804
+ {
33805
+ style: mergeStyles(
33806
+ {
33807
+ width: "100%",
33808
+ display: "flex",
33809
+ alignItems: "center",
33810
+ gap: spacing[4],
33811
+ padding: spacing[4],
33812
+ borderRadius: borderRadius["2xl"],
33813
+ backgroundColor: colors.card,
33814
+ border: `1px solid ${colors.border}`
33815
+ },
33816
+ isWalletConnected && {
33817
+ boxShadow: `0 0 0 2px ${colors.primary}`,
33818
+ border: `1px solid ${colors.primary}`
33819
+ }
33820
+ ),
33821
+ children: [
33822
+ /* @__PURE__ */ jsx56(
33823
+ "div",
33824
+ {
33825
+ style: {
33826
+ width: "3rem",
33827
+ height: "3rem",
33828
+ borderRadius: borderRadius.xl,
33829
+ backgroundColor: colors.muted,
33830
+ display: "flex",
33831
+ alignItems: "center",
33832
+ justifyContent: "center",
33833
+ overflow: "hidden",
33834
+ flexShrink: 0
33835
+ },
33836
+ children: meta.logo ? /* @__PURE__ */ jsx56(
33837
+ "img",
33838
+ {
33839
+ src: meta.logo,
33840
+ alt: meta.name,
33841
+ style: {
33842
+ width: "2rem",
33843
+ height: "2rem",
33844
+ objectFit: "contain"
33845
+ }
33846
+ }
33847
+ ) : /* @__PURE__ */ jsx56("span", { style: { fontSize: "1.5rem" }, children: meta.emoji || "\u{1F45B}" })
33848
+ }
33849
+ ),
33850
+ /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
33851
+ /* @__PURE__ */ jsx56(
33852
+ "p",
33853
+ {
33854
+ style: {
33855
+ fontWeight: fontWeight.semibold,
33856
+ color: colors.foreground
33857
+ },
33858
+ children: meta.name
33859
+ }
33860
+ ),
33861
+ isWalletConnected && walletAddress && /* @__PURE__ */ jsxs44(
33862
+ "p",
33863
+ {
33864
+ style: {
33865
+ fontSize: fontSize.xs,
33866
+ color: colors.mutedForeground
33867
+ },
33868
+ children: [
33869
+ walletAddress.slice(0, 6),
33870
+ "...",
33871
+ walletAddress.slice(-4)
33872
+ ]
33873
+ }
33874
+ )
33875
+ ] }),
33876
+ isConnecting ? /* @__PURE__ */ jsx56(
33877
+ "div",
33878
+ {
33879
+ style: {
33880
+ width: "1.25rem",
33881
+ height: "1.25rem",
33882
+ border: `2px solid ${colors.mutedForeground}`,
33883
+ borderTopColor: "transparent",
33884
+ borderRadius: "9999px",
33885
+ animation: "tw-spin 1s linear infinite",
33886
+ flexShrink: 0
33887
+ }
33888
+ }
33889
+ ) : isWalletConnected ? /* @__PURE__ */ jsx56(
33890
+ "button",
33891
+ {
33892
+ onClick: handleDisconnect,
33893
+ style: {
33894
+ padding: `${spacing[1.5]} ${spacing[3]}`,
33895
+ borderRadius: "9999px",
33896
+ backgroundColor: "rgba(239,68,68,0.1)",
33897
+ color: "#ef4444",
33898
+ fontSize: fontSize.xs,
33899
+ fontWeight: fontWeight.medium,
33900
+ border: 0,
33901
+ cursor: "pointer",
33902
+ flexShrink: 0
33903
+ },
33904
+ children: "Disconnect"
33905
+ }
33906
+ ) : /* @__PURE__ */ jsx56(
33907
+ "button",
33908
+ {
33909
+ onClick: () => void handleClick(entry),
33910
+ disabled: walletStatus === "connecting",
33911
+ style: mergeStyles(
33912
+ {
33913
+ padding: `${spacing[1.5]} ${spacing[3]}`,
33914
+ borderRadius: "9999px",
33915
+ backgroundColor: "rgba(59,130,246,0.1)",
33916
+ color: colors.primary,
33917
+ fontSize: fontSize.xs,
33918
+ fontWeight: fontWeight.medium,
33919
+ border: 0,
33920
+ cursor: "pointer",
33921
+ flexShrink: 0
33922
+ },
33923
+ walletStatus === "connecting" && {
33924
+ opacity: 0.5,
33925
+ cursor: "not-allowed"
33926
+ }
33927
+ ),
33928
+ children: "Connect"
33929
+ }
33930
+ )
33931
+ ]
33932
+ },
33933
+ meta.id
33934
+ );
33935
+ })
33936
+ }
33937
+ ),
33938
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment9, { children: [
33939
+ /* @__PURE__ */ jsx56(
33940
+ "div",
33941
+ {
33942
+ style: {
33943
+ height: 1,
33944
+ backgroundColor: colors.border,
33945
+ margin: `${spacing[3]} 0`
33946
+ }
33947
+ }
33948
+ ),
33949
+ (() => {
33950
+ const wcConnected = managerConnected && connectedVia === "walletconnect";
33951
+ return /* @__PURE__ */ jsxs44(
33952
+ "div",
33953
+ {
33954
+ style: mergeStyles(
33955
+ {
33956
+ width: "100%",
33957
+ display: "flex",
33958
+ alignItems: "center",
33959
+ gap: spacing[4],
33960
+ padding: spacing[4],
33961
+ borderRadius: borderRadius["2xl"],
33962
+ backgroundColor: colors.card,
33963
+ border: `1px solid ${colors.border}`,
33964
+ cursor: "pointer"
33965
+ },
33966
+ wcConnected && {
33967
+ boxShadow: `0 0 0 2px ${colors.primary}`,
33968
+ border: `1px solid ${colors.primary}`
33969
+ }
33970
+ ),
33971
+ onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
33972
+ children: [
33973
+ /* @__PURE__ */ jsx56(
33974
+ "div",
33975
+ {
33976
+ style: {
33977
+ width: "3rem",
33978
+ height: "3rem",
33979
+ borderRadius: borderRadius.xl,
33980
+ backgroundColor: colors.muted,
33981
+ display: "flex",
33982
+ alignItems: "center",
33983
+ justifyContent: "center",
33984
+ flexShrink: 0
33985
+ },
33986
+ children: /* @__PURE__ */ jsx56(
33987
+ "svg",
33988
+ {
33989
+ style: {
33990
+ width: "1.5rem",
33991
+ height: "1.5rem",
33992
+ color: colors.blue[500]
33993
+ },
33994
+ viewBox: "0 0 24 24",
33995
+ fill: "currentColor",
33996
+ children: /* @__PURE__ */ jsx56("path", { d: "M6.09 10.56c3.26-3.2 8.56-3.2 11.82 0l.39.39a.4.4 0 010 .58l-1.34 1.31a.21.21 0 01-.3 0l-.54-.53c-2.28-2.23-5.97-2.23-8.24 0l-.58.56a.21.21 0 01-.3 0L5.66 11.6a.4.4 0 010-.58l.43-.46zm14.6 2.72l1.2 1.17a.4.4 0 010 .58l-5.38 5.27a.43.43 0 01-.6 0l-3.82-3.74a.11.11 0 00-.15 0l-3.82 3.74a.43.43 0 01-.6 0L2.15 15.03a.4.4 0 010-.58l1.2-1.17a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0z" })
33997
+ }
33998
+ )
33999
+ }
34000
+ ),
34001
+ /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
34002
+ /* @__PURE__ */ jsx56(
34003
+ "p",
34004
+ {
34005
+ style: {
34006
+ fontWeight: fontWeight.semibold,
34007
+ color: colors.foreground
34008
+ },
34009
+ children: "WalletConnect"
34010
+ }
34011
+ ),
34012
+ wcConnected && walletAddress && /* @__PURE__ */ jsxs44(
34013
+ "p",
34014
+ {
34015
+ style: {
34016
+ fontSize: fontSize.xs,
34017
+ color: colors.mutedForeground
34018
+ },
34019
+ children: [
34020
+ walletAddress.slice(0, 6),
34021
+ "...",
34022
+ walletAddress.slice(-4)
34023
+ ]
34024
+ }
34025
+ )
34026
+ ] }),
34027
+ wcConnecting ? /* @__PURE__ */ jsx56(
34028
+ "div",
34029
+ {
34030
+ style: {
34031
+ width: "1.25rem",
34032
+ height: "1.25rem",
34033
+ border: `2px solid ${colors.mutedForeground}`,
34034
+ borderTopColor: "transparent",
34035
+ borderRadius: "9999px",
34036
+ animation: "tw-spin 1s linear infinite",
34037
+ flexShrink: 0
34038
+ }
34039
+ }
34040
+ ) : wcConnected ? /* @__PURE__ */ jsx56(
34041
+ "button",
34042
+ {
34043
+ onClick: (e2) => {
34044
+ e2.stopPropagation();
34045
+ handleDisconnect();
34046
+ },
34047
+ style: {
34048
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34049
+ borderRadius: "9999px",
34050
+ backgroundColor: "rgba(239,68,68,0.1)",
34051
+ color: "#ef4444",
34052
+ fontSize: fontSize.xs,
34053
+ fontWeight: fontWeight.medium,
34054
+ border: 0,
34055
+ cursor: "pointer",
34056
+ flexShrink: 0
34057
+ },
34058
+ children: "Disconnect"
34059
+ }
34060
+ ) : /* @__PURE__ */ jsx56(
34061
+ "button",
34062
+ {
34063
+ onClick: (e2) => {
34064
+ e2.stopPropagation();
34065
+ void handleWalletConnect();
34066
+ },
34067
+ disabled: wcConnecting,
34068
+ style: {
34069
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34070
+ borderRadius: "9999px",
34071
+ backgroundColor: "rgba(59,130,246,0.1)",
34072
+ color: colors.primary,
34073
+ fontSize: fontSize.xs,
34074
+ fontWeight: fontWeight.medium,
34075
+ border: 0,
34076
+ cursor: "pointer",
34077
+ flexShrink: 0
34078
+ },
34079
+ children: "Connect"
34080
+ }
34081
+ )
34082
+ ]
34083
+ }
34084
+ );
34085
+ })()
34086
+ ] })
34087
+ ]
34088
+ }
34089
+ )
34090
+ ]
34091
+ }
34092
+ );
34093
+ }
34094
+ var SwapWalletSelectorMobile_default;
34095
+ var init_SwapWalletSelectorMobile = __esm({
34096
+ "src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx"() {
34097
+ "use strict";
34098
+ init_styles();
34099
+ init_utils();
34100
+ init_wallets();
34101
+ init_wallets();
34102
+ init_config2();
34103
+ init_Toast();
34104
+ SwapWalletSelectorMobile_default = SwapWalletSelectorMobile;
34105
+ }
34106
+ });
34107
+
34108
+ // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx
34109
+ import { useEffect as useEffect32, useMemo as useMemo28, useRef as useRef18, useState as useState32 } from "react";
34110
+ import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs45 } from "react/jsx-runtime";
34111
+ function SwapWalletSelectorDesktop({
34112
+ walletStatus,
34113
+ walletAddress,
34114
+ connectWallet,
34115
+ onBack
34116
+ }) {
34117
+ const { detected } = useWalletDetection();
34118
+ const {
34119
+ isConnected: managerConnected,
34120
+ walletMetaId,
34121
+ connectedVia,
34122
+ disconnect
34123
+ } = useWalletInfo();
34124
+ const walletConnectCfg = TrustwareConfigStore.peek()?.walletConnect;
34125
+ const connectWC = useWalletConnectConnect(walletConnectCfg);
34126
+ const [wcConnecting, setWcConnecting] = useState32(false);
34127
+ const [connectingId, setConnectingId] = useState32(null);
34128
+ const [timerExpired, setTimerExpired] = useState32(false);
34129
+ const [selectedNamespace, setSelectedNamespace] = useState32("evm");
34130
+ const prevStatusRef = useRef18(walletStatus);
34131
+ useEffect32(() => {
33453
34132
  const t = setTimeout(() => setTimerExpired(true), 450);
33454
34133
  return () => clearTimeout(t);
33455
34134
  }, []);
33456
- useEffect31(() => {
34135
+ useEffect32(() => {
33457
34136
  const prev = prevStatusRef.current;
33458
34137
  if (prev !== walletStatus) {
33459
34138
  if (prev === "connecting" && (walletStatus === "connected" || walletStatus === "error")) {
@@ -33462,7 +34141,7 @@ function SwapWalletSelector({
33462
34141
  prevStatusRef.current = walletStatus;
33463
34142
  }
33464
34143
  }, [walletStatus]);
33465
- const filteredWallets = useMemo27(
34144
+ const filteredWallets = useMemo28(
33466
34145
  () => detected.filter(
33467
34146
  (w) => (w.meta?.ecosystem ?? "").toLowerCase() === selectedNamespace
33468
34147
  ),
@@ -33521,8 +34200,8 @@ function SwapWalletSelector({
33521
34200
  { id: "evm", label: "EVM" },
33522
34201
  { id: "solana", label: "Solana" }
33523
34202
  ];
33524
- return /* @__PURE__ */ jsxs44("div", { style: { display: "flex", flexDirection: "column" }, children: [
33525
- /* @__PURE__ */ jsxs44(
34203
+ return /* @__PURE__ */ jsxs45("div", { style: { display: "flex", flexDirection: "column" }, children: [
34204
+ /* @__PURE__ */ jsxs45(
33526
34205
  "div",
33527
34206
  {
33528
34207
  style: {
@@ -33532,7 +34211,7 @@ function SwapWalletSelector({
33532
34211
  borderBottom: `1px solid ${colors.border}`
33533
34212
  },
33534
34213
  children: [
33535
- /* @__PURE__ */ jsx56(
34214
+ /* @__PURE__ */ jsx57(
33536
34215
  "button",
33537
34216
  {
33538
34217
  type: "button",
@@ -33545,7 +34224,7 @@ function SwapWalletSelector({
33545
34224
  border: 0,
33546
34225
  cursor: "pointer"
33547
34226
  },
33548
- children: /* @__PURE__ */ jsx56(
34227
+ children: /* @__PURE__ */ jsx57(
33549
34228
  "svg",
33550
34229
  {
33551
34230
  style: {
@@ -33557,7 +34236,7 @@ function SwapWalletSelector({
33557
34236
  fill: "none",
33558
34237
  stroke: "currentColor",
33559
34238
  strokeWidth: 2,
33560
- children: /* @__PURE__ */ jsx56(
34239
+ children: /* @__PURE__ */ jsx57(
33561
34240
  "path",
33562
34241
  {
33563
34242
  strokeLinecap: "round",
@@ -33569,7 +34248,7 @@ function SwapWalletSelector({
33569
34248
  )
33570
34249
  }
33571
34250
  ),
33572
- /* @__PURE__ */ jsx56(
34251
+ /* @__PURE__ */ jsx57(
33573
34252
  "h1",
33574
34253
  {
33575
34254
  style: {
@@ -33582,7 +34261,7 @@ function SwapWalletSelector({
33582
34261
  children: "Connect Wallet"
33583
34262
  }
33584
34263
  ),
33585
- /* @__PURE__ */ jsx56(
34264
+ /* @__PURE__ */ jsx57(
33586
34265
  "div",
33587
34266
  {
33588
34267
  style: {
@@ -33593,7 +34272,7 @@ function SwapWalletSelector({
33593
34272
  padding: "3px",
33594
34273
  gap: "2px"
33595
34274
  },
33596
- children: tabs.map((t) => /* @__PURE__ */ jsx56(
34275
+ children: tabs.map((t) => /* @__PURE__ */ jsx57(
33597
34276
  "button",
33598
34277
  {
33599
34278
  onClick: () => setSelectedNamespace(t.id),
@@ -33619,8 +34298,8 @@ function SwapWalletSelector({
33619
34298
  ]
33620
34299
  }
33621
34300
  ),
33622
- /* @__PURE__ */ jsxs44("div", { style: { padding: spacing[4] }, children: [
33623
- isDetecting ? /* @__PURE__ */ jsxs44(
34301
+ /* @__PURE__ */ jsxs45("div", { style: { padding: spacing[4] }, children: [
34302
+ isDetecting ? /* @__PURE__ */ jsxs45(
33624
34303
  "div",
33625
34304
  {
33626
34305
  style: {
@@ -33629,7 +34308,7 @@ function SwapWalletSelector({
33629
34308
  gap: spacing[3]
33630
34309
  },
33631
34310
  children: [
33632
- [1, 2].map((i) => /* @__PURE__ */ jsxs44(
34311
+ [1, 2].map((i) => /* @__PURE__ */ jsxs45(
33633
34312
  "div",
33634
34313
  {
33635
34314
  style: {
@@ -33642,7 +34321,7 @@ function SwapWalletSelector({
33642
34321
  animation: "tw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
33643
34322
  },
33644
34323
  children: [
33645
- /* @__PURE__ */ jsx56(
34324
+ /* @__PURE__ */ jsx57(
33646
34325
  "div",
33647
34326
  {
33648
34327
  style: {
@@ -33653,7 +34332,7 @@ function SwapWalletSelector({
33653
34332
  }
33654
34333
  }
33655
34334
  ),
33656
- /* @__PURE__ */ jsx56(
34335
+ /* @__PURE__ */ jsx57(
33657
34336
  "div",
33658
34337
  {
33659
34338
  style: {
@@ -33668,7 +34347,7 @@ function SwapWalletSelector({
33668
34347
  },
33669
34348
  i
33670
34349
  )),
33671
- /* @__PURE__ */ jsx56(
34350
+ /* @__PURE__ */ jsx57(
33672
34351
  "p",
33673
34352
  {
33674
34353
  style: {
@@ -33682,9 +34361,9 @@ function SwapWalletSelector({
33682
34361
  )
33683
34362
  ]
33684
34363
  }
33685
- ) : filteredWallets.length === 0 ? /* @__PURE__ */ jsxs44("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
33686
- /* @__PURE__ */ jsx56("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
33687
- /* @__PURE__ */ jsx56(
34364
+ ) : filteredWallets.length === 0 ? /* @__PURE__ */ jsxs45("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
34365
+ /* @__PURE__ */ jsx57("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
34366
+ /* @__PURE__ */ jsx57(
33688
34367
  "h3",
33689
34368
  {
33690
34369
  style: {
@@ -33696,7 +34375,7 @@ function SwapWalletSelector({
33696
34375
  children: "No Wallets Found"
33697
34376
  }
33698
34377
  ),
33699
- /* @__PURE__ */ jsx56(
34378
+ /* @__PURE__ */ jsx57(
33700
34379
  "p",
33701
34380
  {
33702
34381
  style: {
@@ -33707,7 +34386,7 @@ function SwapWalletSelector({
33707
34386
  children: "Please install a web3 wallet to continue."
33708
34387
  }
33709
34388
  ),
33710
- /* @__PURE__ */ jsx56(
34389
+ /* @__PURE__ */ jsx57(
33711
34390
  "a",
33712
34391
  {
33713
34392
  href: "https://metamask.io/download/",
@@ -33728,7 +34407,7 @@ function SwapWalletSelector({
33728
34407
  children: "Install MetaMask"
33729
34408
  }
33730
34409
  )
33731
- ] }) : /* @__PURE__ */ jsx56(
34410
+ ] }) : /* @__PURE__ */ jsx57(
33732
34411
  "div",
33733
34412
  {
33734
34413
  style: {
@@ -33739,7 +34418,7 @@ function SwapWalletSelector({
33739
34418
  children: filteredWallets.map((wallet) => {
33740
34419
  const isWalletConnected = managerConnected && walletMetaId === wallet.meta.id;
33741
34420
  const isConnecting = connectingId === wallet.meta.id && walletStatus === "connecting";
33742
- return /* @__PURE__ */ jsxs44(
34421
+ return /* @__PURE__ */ jsxs45(
33743
34422
  "div",
33744
34423
  {
33745
34424
  style: mergeStyles(
@@ -33759,7 +34438,7 @@ function SwapWalletSelector({
33759
34438
  }
33760
34439
  ),
33761
34440
  children: [
33762
- /* @__PURE__ */ jsx56(
34441
+ /* @__PURE__ */ jsx57(
33763
34442
  "div",
33764
34443
  {
33765
34444
  style: {
@@ -33773,7 +34452,7 @@ function SwapWalletSelector({
33773
34452
  overflow: "hidden",
33774
34453
  flexShrink: 0
33775
34454
  },
33776
- children: wallet.meta.logo ? /* @__PURE__ */ jsx56(
34455
+ children: wallet.meta.logo ? /* @__PURE__ */ jsx57(
33777
34456
  "img",
33778
34457
  {
33779
34458
  src: wallet.meta.logo,
@@ -33784,7 +34463,7 @@ function SwapWalletSelector({
33784
34463
  objectFit: "contain"
33785
34464
  }
33786
34465
  }
33787
- ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx56(
34466
+ ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx57(
33788
34467
  "img",
33789
34468
  {
33790
34469
  src: wallet.detail.info.icon,
@@ -33795,11 +34474,11 @@ function SwapWalletSelector({
33795
34474
  objectFit: "contain"
33796
34475
  }
33797
34476
  }
33798
- ) : /* @__PURE__ */ jsx56("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
34477
+ ) : /* @__PURE__ */ jsx57("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
33799
34478
  }
33800
34479
  ),
33801
- /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
33802
- /* @__PURE__ */ jsx56(
34480
+ /* @__PURE__ */ jsxs45("div", { style: { flex: 1, minWidth: 0 }, children: [
34481
+ /* @__PURE__ */ jsx57(
33803
34482
  "p",
33804
34483
  {
33805
34484
  style: {
@@ -33809,7 +34488,7 @@ function SwapWalletSelector({
33809
34488
  children: wallet.meta.name
33810
34489
  }
33811
34490
  ),
33812
- isWalletConnected && walletAddress && /* @__PURE__ */ jsxs44(
34491
+ isWalletConnected && walletAddress && /* @__PURE__ */ jsxs45(
33813
34492
  "p",
33814
34493
  {
33815
34494
  style: {
@@ -33824,7 +34503,7 @@ function SwapWalletSelector({
33824
34503
  }
33825
34504
  )
33826
34505
  ] }),
33827
- isConnecting ? /* @__PURE__ */ jsx56(
34506
+ isConnecting ? /* @__PURE__ */ jsx57(
33828
34507
  "div",
33829
34508
  {
33830
34509
  style: {
@@ -33837,7 +34516,7 @@ function SwapWalletSelector({
33837
34516
  flexShrink: 0
33838
34517
  }
33839
34518
  }
33840
- ) : isWalletConnected ? /* @__PURE__ */ jsx56(
34519
+ ) : isWalletConnected ? /* @__PURE__ */ jsx57(
33841
34520
  "button",
33842
34521
  {
33843
34522
  onClick: handleDisconnect,
@@ -33854,7 +34533,7 @@ function SwapWalletSelector({
33854
34533
  },
33855
34534
  children: "Disconnect"
33856
34535
  }
33857
- ) : /* @__PURE__ */ jsx56(
34536
+ ) : /* @__PURE__ */ jsx57(
33858
34537
  "button",
33859
34538
  {
33860
34539
  onClick: () => void handleClick(wallet),
@@ -33886,8 +34565,8 @@ function SwapWalletSelector({
33886
34565
  })
33887
34566
  }
33888
34567
  ),
33889
- selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment9, { children: [
33890
- /* @__PURE__ */ jsx56(
34568
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs45(Fragment10, { children: [
34569
+ /* @__PURE__ */ jsx57(
33891
34570
  "div",
33892
34571
  {
33893
34572
  style: {
@@ -33899,7 +34578,7 @@ function SwapWalletSelector({
33899
34578
  ),
33900
34579
  (() => {
33901
34580
  const wcConnected = managerConnected && connectedVia === "walletconnect";
33902
- return /* @__PURE__ */ jsxs44(
34581
+ return /* @__PURE__ */ jsxs45(
33903
34582
  "div",
33904
34583
  {
33905
34584
  style: mergeStyles(
@@ -33921,7 +34600,7 @@ function SwapWalletSelector({
33921
34600
  ),
33922
34601
  onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
33923
34602
  children: [
33924
- /* @__PURE__ */ jsx56(
34603
+ /* @__PURE__ */ jsx57(
33925
34604
  "div",
33926
34605
  {
33927
34606
  style: {
@@ -33934,7 +34613,7 @@ function SwapWalletSelector({
33934
34613
  justifyContent: "center",
33935
34614
  flexShrink: 0
33936
34615
  },
33937
- children: /* @__PURE__ */ jsx56(
34616
+ children: /* @__PURE__ */ jsx57(
33938
34617
  "svg",
33939
34618
  {
33940
34619
  style: {
@@ -33944,13 +34623,13 @@ function SwapWalletSelector({
33944
34623
  },
33945
34624
  viewBox: "0 0 24 24",
33946
34625
  fill: "currentColor",
33947
- children: /* @__PURE__ */ jsx56("path", { d: "M6.09 10.56c3.26-3.2 8.56-3.2 11.82 0l.39.39a.4.4 0 010 .58l-1.34 1.31a.21.21 0 01-.3 0l-.54-.53c-2.28-2.23-5.97-2.23-8.24 0l-.58.56a.21.21 0 01-.3 0L5.66 11.6a.4.4 0 010-.58l.43-.46zm14.6 2.72l1.2 1.17a.4.4 0 010 .58l-5.38 5.27a.43.43 0 01-.6 0l-3.82-3.74a.11.11 0 00-.15 0l-3.82 3.74a.43.43 0 01-.6 0L2.15 15.03a.4.4 0 010-.58l1.2-1.17a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0z" })
34626
+ children: /* @__PURE__ */ jsx57("path", { d: "M6.09 10.56c3.26-3.2 8.56-3.2 11.82 0l.39.39a.4.4 0 010 .58l-1.34 1.31a.21.21 0 01-.3 0l-.54-.53c-2.28-2.23-5.97-2.23-8.24 0l-.58.56a.21.21 0 01-.3 0L5.66 11.6a.4.4 0 010-.58l.43-.46zm14.6 2.72l1.2 1.17a.4.4 0 010 .58l-5.38 5.27a.43.43 0 01-.6 0l-3.82-3.74a.11.11 0 00-.15 0l-3.82 3.74a.43.43 0 01-.6 0L2.15 15.03a.4.4 0 010-.58l1.2-1.17a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0z" })
33948
34627
  }
33949
34628
  )
33950
34629
  }
33951
34630
  ),
33952
- /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
33953
- /* @__PURE__ */ jsx56(
34631
+ /* @__PURE__ */ jsxs45("div", { style: { flex: 1, minWidth: 0 }, children: [
34632
+ /* @__PURE__ */ jsx57(
33954
34633
  "p",
33955
34634
  {
33956
34635
  style: {
@@ -33960,7 +34639,7 @@ function SwapWalletSelector({
33960
34639
  children: "WalletConnect"
33961
34640
  }
33962
34641
  ),
33963
- wcConnected && walletAddress && /* @__PURE__ */ jsxs44(
34642
+ wcConnected && walletAddress && /* @__PURE__ */ jsxs45(
33964
34643
  "p",
33965
34644
  {
33966
34645
  style: {
@@ -33975,7 +34654,7 @@ function SwapWalletSelector({
33975
34654
  }
33976
34655
  )
33977
34656
  ] }),
33978
- wcConnecting ? /* @__PURE__ */ jsx56(
34657
+ wcConnecting ? /* @__PURE__ */ jsx57(
33979
34658
  "div",
33980
34659
  {
33981
34660
  style: {
@@ -33988,7 +34667,7 @@ function SwapWalletSelector({
33988
34667
  flexShrink: 0
33989
34668
  }
33990
34669
  }
33991
- ) : wcConnected ? /* @__PURE__ */ jsx56(
34670
+ ) : wcConnected ? /* @__PURE__ */ jsx57(
33992
34671
  "button",
33993
34672
  {
33994
34673
  onClick: (e2) => {
@@ -34008,7 +34687,7 @@ function SwapWalletSelector({
34008
34687
  },
34009
34688
  children: "Disconnect"
34010
34689
  }
34011
- ) : /* @__PURE__ */ jsx56(
34690
+ ) : /* @__PURE__ */ jsx57(
34012
34691
  "button",
34013
34692
  {
34014
34693
  onClick: (e2) => {
@@ -34038,8 +34717,8 @@ function SwapWalletSelector({
34038
34717
  ] })
34039
34718
  ] });
34040
34719
  }
34041
- var init_SwapWalletSelector = __esm({
34042
- "src/modes/swap/components/SwapWalletSelector.tsx"() {
34720
+ var init_SwapWalletSelectorDesktop = __esm({
34721
+ "src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx"() {
34043
34722
  "use strict";
34044
34723
  init_styles();
34045
34724
  init_utils();
@@ -34049,76 +34728,52 @@ var init_SwapWalletSelector = __esm({
34049
34728
  }
34050
34729
  });
34051
34730
 
34052
- // src/modes/swap/currency.ts
34053
- function getCurrencyMeta(code) {
34054
- return BY_CODE.get(code.toUpperCase()) ?? SUPPORTED_CURRENCIES[0];
34055
- }
34056
- function fmtCurrency(usdAmount, code, rate) {
34057
- const meta = getCurrencyMeta(code);
34058
- const local = usdAmount * rate;
34059
- return meta.symbol + local.toFixed(meta.decimals);
34060
- }
34061
- var SUPPORTED_CURRENCIES, BY_CODE;
34062
- var init_currency = __esm({
34063
- "src/modes/swap/currency.ts"() {
34064
- "use strict";
34065
- SUPPORTED_CURRENCIES = [
34066
- { code: "USD", symbol: "$", name: "US Dollar", decimals: 2 },
34067
- { code: "EUR", symbol: "\u20AC", name: "Euro", decimals: 2 },
34068
- { code: "GBP", symbol: "\xA3", name: "British Pound", decimals: 2 },
34069
- { code: "CAD", symbol: "CA$", name: "Canadian Dollar", decimals: 2 },
34070
- { code: "AUD", symbol: "A$", name: "Australian Dollar", decimals: 2 },
34071
- { code: "JPY", symbol: "\xA5", name: "Japanese Yen", decimals: 0 },
34072
- { code: "CHF", symbol: "Fr", name: "Swiss Franc", decimals: 2 },
34073
- { code: "KRW", symbol: "\u20A9", name: "South Korean Won", decimals: 0 },
34074
- { code: "INR", symbol: "\u20B9", name: "Indian Rupee", decimals: 2 },
34075
- { code: "BRL", symbol: "R$", name: "Brazilian Real", decimals: 2 },
34076
- { code: "SGD", symbol: "S$", name: "Singapore Dollar", decimals: 2 },
34077
- { code: "MXN", symbol: "MX$", name: "Mexican Peso", decimals: 2 },
34078
- { code: "HKD", symbol: "HK$", name: "Hong Kong Dollar", decimals: 2 },
34079
- { code: "CNY", symbol: "\xA5", name: "Chinese Yuan", decimals: 2 },
34080
- { code: "ZAR", symbol: "R", name: "South African Rand", decimals: 2 },
34081
- { code: "TRY", symbol: "\u20BA", name: "Turkish Lira", decimals: 2 },
34082
- { code: "RUB", symbol: "\u20BD", name: "Russian Ruble", decimals: 2 },
34731
+ // src/modes/swap/components/SwapWalletSelector/index.tsx
34732
+ import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
34733
+ function SwapWalletSelector({
34734
+ walletStatus,
34735
+ walletAddress,
34736
+ connectWallet,
34737
+ onBack
34738
+ }) {
34739
+ const isMobile = useIsMobile();
34740
+ return /* @__PURE__ */ jsxs46(Fragment11, { children: [
34741
+ isMobile && /* @__PURE__ */ jsx58(
34742
+ SwapWalletSelectorMobile_default,
34083
34743
  {
34084
- code: "AED",
34085
- symbol: "\u062F.\u0625",
34086
- name: "United Arab Emirates Dirham",
34087
- decimals: 2
34088
- },
34089
- { code: "SAR", symbol: "\uFDFC", name: "Saudi Riyal", decimals: 2 },
34090
- { code: "QAR", symbol: "\uFDFC", name: "Qatari Riyal", decimals: 2 },
34091
- { code: "KWD", symbol: "\u062F.\u0643", name: "Kuwaiti Dinar", decimals: 3 },
34092
- { code: "OMR", symbol: "\u0631.\u0639.", name: "Omani Rial", decimals: 3 },
34093
- { code: "BHD", symbol: "\u0628.\u062F", name: "Bahraini Dinar", decimals: 3 },
34094
- { code: "JOD", symbol: "\u062F.\u0627", name: "Jordanian Dinar", decimals: 3 },
34095
- { code: "LYD", symbol: "\u0644.\u062F", name: "Libyan Dinar", decimals: 3 },
34096
- { code: "TND", symbol: "\u062F.\u062A", name: "Tunisian Dinar", decimals: 3 },
34097
- { code: "MAD", symbol: "\u062F.\u0645.", name: "Moroccan Dirham", decimals: 2 },
34098
- { code: "EGP", symbol: "\xA3", name: "Egyptian Pound", decimals: 2 },
34099
- { code: "NGN", symbol: "\u20A6", name: "Nigerian Naira", decimals: 2 },
34100
- { code: "GHS", symbol: "\u20B5", name: "Ghanaian Cedi", decimals: 2 },
34101
- { code: "KES", symbol: "KSh", name: "Kenyan Shilling", decimals: 2 },
34102
- { code: "TZS", symbol: "TSh", name: "Tanzanian Shilling", decimals: 2 },
34103
- { code: "UGX", symbol: "USh", name: "Ugandan Shilling", decimals: 2 },
34104
- { code: "RWF", symbol: "FRw", name: "Rwandan Franc", decimals: 2 },
34105
- { code: "MUR", symbol: "Rs", name: "Mauritian Rupee", decimals: 2 },
34106
- { code: "SCR", symbol: "SR", name: "Seychellois Rupee", decimals: 2 },
34107
- { code: "MGA", symbol: "Ar", name: "Malagasy Ariary", decimals: 2 },
34744
+ walletStatus,
34745
+ walletAddress,
34746
+ connectWallet,
34747
+ onBack
34748
+ }
34749
+ ),
34750
+ !isMobile && /* @__PURE__ */ jsx58(
34751
+ SwapWalletSelectorDesktop,
34108
34752
  {
34109
- code: "XAF",
34110
- symbol: "FCFA",
34111
- name: "Central African CFA Franc",
34112
- decimals: 2
34113
- },
34114
- { code: "XOF", symbol: "CFA", name: "West African CFA Franc", decimals: 2 },
34115
- { code: "XPF", symbol: "CFP", name: "CFP Franc", decimals: 2 },
34116
- { code: "XCD", symbol: "EC$", name: "East Caribbean Dollar", decimals: 2 },
34117
- { code: "XDR", symbol: "SDR", name: "Special Drawing Rights", decimals: 2 },
34118
- { code: "XAU", symbol: "Au", name: "Gold (troy ounce)", decimals: 2 },
34119
- { code: "XAG", symbol: "Ag", name: "Silver (troy ounce)", decimals: 2 }
34120
- ];
34121
- BY_CODE = new Map(SUPPORTED_CURRENCIES.map((c) => [c.code, c]));
34753
+ walletStatus,
34754
+ walletAddress,
34755
+ connectWallet,
34756
+ onBack
34757
+ }
34758
+ )
34759
+ ] });
34760
+ }
34761
+ var SwapWalletSelector_default;
34762
+ var init_SwapWalletSelector = __esm({
34763
+ "src/modes/swap/components/SwapWalletSelector/index.tsx"() {
34764
+ "use strict";
34765
+ init_detect();
34766
+ init_SwapWalletSelectorMobile();
34767
+ init_SwapWalletSelectorDesktop();
34768
+ SwapWalletSelector_default = SwapWalletSelector;
34769
+ }
34770
+ });
34771
+
34772
+ // src/modes/swap/components/index.ts
34773
+ var init_components2 = __esm({
34774
+ "src/modes/swap/components/index.ts"() {
34775
+ "use strict";
34776
+ init_SwapWalletSelector();
34122
34777
  }
34123
34778
  });
34124
34779
 
@@ -34127,13 +34782,13 @@ import {
34127
34782
  lazy as lazy2,
34128
34783
  Suspense as Suspense2,
34129
34784
  useCallback as useCallback22,
34130
- useEffect as useEffect32,
34131
- useMemo as useMemo28,
34132
- useRef as useRef18,
34133
- useState as useState32
34785
+ useEffect as useEffect33,
34786
+ useMemo as useMemo29,
34787
+ useRef as useRef19,
34788
+ useState as useState33
34134
34789
  } from "react";
34135
34790
  import ReactDOM from "react-dom";
34136
- import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs45 } from "react/jsx-runtime";
34791
+ import { Fragment as Fragment12, jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
34137
34792
  function fmtAmount(n, max = 6) {
34138
34793
  if (!isFinite(n) || n === 0) return "0";
34139
34794
  return n.toLocaleString(void 0, { maximumFractionDigits: max });
@@ -34206,7 +34861,7 @@ function getActiveStep(status) {
34206
34861
  }
34207
34862
  }
34208
34863
  function RateRow({ label, value }) {
34209
- return /* @__PURE__ */ jsxs45(
34864
+ return /* @__PURE__ */ jsxs47(
34210
34865
  "div",
34211
34866
  {
34212
34867
  style: {
@@ -34215,8 +34870,8 @@ function RateRow({ label, value }) {
34215
34870
  justifyContent: "space-between"
34216
34871
  },
34217
34872
  children: [
34218
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: label }),
34219
- /* @__PURE__ */ jsx57("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
34873
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: label }),
34874
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
34220
34875
  ]
34221
34876
  }
34222
34877
  );
@@ -34225,36 +34880,36 @@ function SwapMode({
34225
34880
  theme: themeProp,
34226
34881
  style
34227
34882
  }) {
34228
- const [stage, setStage] = useState32("home");
34229
- const [fromToken, setFromToken] = useState32(
34883
+ const [stage, setStage] = useState33("home");
34884
+ const [fromToken, setFromToken] = useState33(
34230
34885
  null
34231
34886
  );
34232
- const [fromChain, setFromChain] = useState32(null);
34233
- const [toToken, setToToken] = useState32(null);
34234
- const [toChain, setToChain] = useState32(null);
34235
- const [amount, setAmount] = useState32("");
34236
- const [amountInputMode, setAmountInputMode] = useState32(
34887
+ const [fromChain, setFromChain] = useState33(null);
34888
+ const [toToken, setToToken] = useState33(null);
34889
+ const [toChain, setToChain] = useState33(null);
34890
+ const [amount, setAmount] = useState33("");
34891
+ const [amountInputMode, setAmountInputMode] = useState33(
34237
34892
  "usd"
34238
34893
  );
34239
- const [hoverSell, setHoverSell] = useState32(false);
34240
- const [showRateDetails, setShowRateDetails] = useState32(false);
34241
- const [showReviewDetails, setShowReviewDetails] = useState32(false);
34242
- const [showSettings, setShowSettings] = useState32(false);
34243
- const [maxApproval, setMaxApproval] = useState32(false);
34244
- const [slippage, setSlippage] = useState32(0.5);
34245
- const [slippageInput, setSlippageInput] = useState32("");
34246
- const [selectedCurrency, setSelectedCurrency] = useState32("USD");
34247
- const [showCurrencyDropdown, setShowCurrencyDropdown] = useState32(false);
34248
- const [completedAt, setCompletedAt] = useState32(null);
34249
- const [copiedHash, setCopiedHash] = useState32(null);
34250
- const [rateUpdated, setRateUpdated] = useState32(false);
34251
- const prevToAmountRef = useRef18(null);
34252
- const [destAddress, setDestAddress] = useState32("");
34253
- const [quoteAge, setQuoteAge] = useState32(0);
34254
- const quoteTimestampRef = useRef18(null);
34255
- const [quoteLoadingMsgIdx, setQuoteLoadingMsgIdx] = useState32(0);
34256
- const [quoteLoadingMsgVisible, setQuoteLoadingMsgVisible] = useState32(true);
34257
- const latestFetchParamsRef = useRef18(null);
34894
+ const [hoverSell, setHoverSell] = useState33(false);
34895
+ const [showRateDetails, setShowRateDetails] = useState33(false);
34896
+ const [showReviewDetails, setShowReviewDetails] = useState33(false);
34897
+ const [showSettings, setShowSettings] = useState33(false);
34898
+ const [maxApproval, setMaxApproval] = useState33(false);
34899
+ const [slippage, setSlippage] = useState33(0.5);
34900
+ const [slippageInput, setSlippageInput] = useState33("");
34901
+ const [selectedCurrency, setSelectedCurrency] = useState33("USD");
34902
+ const [showCurrencyDropdown, setShowCurrencyDropdown] = useState33(false);
34903
+ const [completedAt, setCompletedAt] = useState33(null);
34904
+ const [copiedHash, setCopiedHash] = useState33(null);
34905
+ const [rateUpdated, setRateUpdated] = useState33(false);
34906
+ const prevToAmountRef = useRef19(null);
34907
+ const [destAddress, setDestAddress] = useState33("");
34908
+ const [quoteAge, setQuoteAge] = useState33(0);
34909
+ const quoteTimestampRef = useRef19(null);
34910
+ const [quoteLoadingMsgIdx, setQuoteLoadingMsgIdx] = useState33(0);
34911
+ const [quoteLoadingMsgVisible, setQuoteLoadingMsgVisible] = useState33(true);
34912
+ const latestFetchParamsRef = useRef19(null);
34258
34913
  const { rates: forexRates } = useForex();
34259
34914
  const currencyMeta = getCurrencyMeta(selectedCurrency);
34260
34915
  const currencyRate = forexRates[selectedCurrency] ?? 1;
@@ -34270,8 +34925,8 @@ function SwapMode({
34270
34925
  },
34271
34926
  [currencyRate, selectedCurrency]
34272
34927
  );
34273
- const settingsRef = useRef18(null);
34274
- const currencyDropdownRef = useRef18(null);
34928
+ const settingsRef = useRef19(null);
34929
+ const currencyDropdownRef = useRef19(null);
34275
34930
  const { emitEvent } = useTrustware();
34276
34931
  const { features, theme: configTheme } = useTrustwareConfig();
34277
34932
  const effectiveThemeSetting = themeProp ?? configTheme ?? "system";
@@ -34287,26 +34942,26 @@ function SwapMode({
34287
34942
  isLoading: chainsLoading,
34288
34943
  error: chainsError
34289
34944
  } = useChains();
34290
- const allowedDestChainIds = useMemo28(() => {
34945
+ const allowedDestChainIds = useMemo29(() => {
34291
34946
  if (!allowedDestTokens || allowedDestTokens.length === 0) return null;
34292
34947
  return new Set(allowedDestTokens.map((t) => t.chainId));
34293
34948
  }, [allowedDestTokens]);
34294
- const toPopularChains = useMemo28(
34949
+ const toPopularChains = useMemo29(
34295
34950
  () => allowedDestChainIds ? popularChains.filter(
34296
34951
  (c) => allowedDestChainIds.has(Number(c.chainId))
34297
34952
  ) : popularChains,
34298
34953
  [popularChains, allowedDestChainIds]
34299
34954
  );
34300
- const toOtherChains = useMemo28(
34955
+ const toOtherChains = useMemo29(
34301
34956
  () => allowedDestChainIds ? otherChains.filter((c) => allowedDestChainIds.has(Number(c.chainId))) : otherChains,
34302
34957
  [otherChains, allowedDestChainIds]
34303
34958
  );
34304
- const allChains = useMemo28(
34959
+ const allChains = useMemo29(
34305
34960
  () => [...popularChains, ...otherChains],
34306
34961
  [popularChains, otherChains]
34307
34962
  );
34308
- const destInitialized = useRef18(false);
34309
- useEffect32(() => {
34963
+ const destInitialized = useRef19(false);
34964
+ useEffect33(() => {
34310
34965
  if (!defaultDestRef || destInitialized.current || allChains.length === 0)
34311
34966
  return;
34312
34967
  const chain = allChains.find(
@@ -34354,18 +35009,18 @@ function SwapMode({
34354
35009
  });
34355
35010
  const route = useSwapRoute();
34356
35011
  const execution = useSwapExecution(fromChain);
34357
- const fromTokenPriceUSD = useMemo28(() => {
35012
+ const fromTokenPriceUSD = useMemo29(() => {
34358
35013
  const p = fromToken?.usdPrice;
34359
35014
  return typeof p === "number" && Number.isFinite(p) && p > 0 ? p : 0;
34360
35015
  }, [fromToken]);
34361
35016
  const hasFromUsdPrice = fromTokenPriceUSD > 0;
34362
- const toTokenPriceUSD = useMemo28(() => {
35017
+ const toTokenPriceUSD = useMemo29(() => {
34363
35018
  const p = toToken?.usdPrice;
34364
35019
  return typeof p === "number" && Number.isFinite(p) && p > 0 ? p : 0;
34365
35020
  }, [toToken]);
34366
35021
  const hasToUsdPrice = toTokenPriceUSD > 0;
34367
35022
  const rawSellNum = parseFloat(amount) || 0;
34368
- const usdSellNum = useMemo28(() => {
35023
+ const usdSellNum = useMemo29(() => {
34369
35024
  if (amountInputMode === "usd") return rawSellNum / currencyRate;
34370
35025
  return hasFromUsdPrice ? rawSellNum * fromTokenPriceUSD : 0;
34371
35026
  }, [
@@ -34375,7 +35030,7 @@ function SwapMode({
34375
35030
  hasFromUsdPrice,
34376
35031
  fromTokenPriceUSD
34377
35032
  ]);
34378
- const tokenSellNum = useMemo28(() => {
35033
+ const tokenSellNum = useMemo29(() => {
34379
35034
  if (amountInputMode === "usd") {
34380
35035
  return hasFromUsdPrice && fromTokenPriceUSD > 0 ? usdSellNum / fromTokenPriceUSD : 0;
34381
35036
  }
@@ -34387,7 +35042,7 @@ function SwapMode({
34387
35042
  hasFromUsdPrice,
34388
35043
  fromTokenPriceUSD
34389
35044
  ]);
34390
- const tokenAmountStr = useMemo28(() => {
35045
+ const tokenAmountStr = useMemo29(() => {
34391
35046
  if (tokenSellNum <= 0) return "";
34392
35047
  const decimals = fromToken?.decimals ?? 18;
34393
35048
  return truncateDecimal(tokenSellNum, Math.min(decimals, 18));
@@ -34598,7 +35253,7 @@ function SwapMode({
34598
35253
  fromToken?.decimals,
34599
35254
  route
34600
35255
  ]);
34601
- const fromBalance = useMemo28(() => {
35256
+ const fromBalance = useMemo29(() => {
34602
35257
  const walletToken = fromToken;
34603
35258
  if (!walletToken || !("balance" in walletToken)) return null;
34604
35259
  const raw = walletToken.balance;
@@ -34608,7 +35263,7 @@ function SwapMode({
34608
35263
  return Number.isFinite(n) ? n : null;
34609
35264
  }, [fromToken]);
34610
35265
  const balanceUsd = fromBalance !== null && hasFromUsdPrice ? fromBalance * fromTokenPriceUSD : null;
34611
- const estimatedToAmount = useMemo28(() => {
35266
+ const estimatedToAmount = useMemo29(() => {
34612
35267
  if (tokenSellNum <= 0 || !hasFromUsdPrice || !hasToUsdPrice) return null;
34613
35268
  return tokenSellNum * (fromTokenPriceUSD / toTokenPriceUSD);
34614
35269
  }, [
@@ -34618,10 +35273,10 @@ function SwapMode({
34618
35273
  hasFromUsdPrice,
34619
35274
  hasToUsdPrice
34620
35275
  ]);
34621
- const backendToUsdStr = useMemo28(() => {
35276
+ const backendToUsdStr = useMemo29(() => {
34622
35277
  return route.data?.finalExchangeRate?.toAmountMinUSD ?? route.data?.route?.estimate?.toAmountMinUsd ?? route.data?.route?.estimate?.toAmountUsd ?? null;
34623
35278
  }, [route.data]);
34624
- const toAmount = useMemo28(() => {
35279
+ const toAmount = useMemo29(() => {
34625
35280
  if (backendToUsdStr && toTokenPriceUSD > 0) {
34626
35281
  const usd = parseFloat(backendToUsdStr);
34627
35282
  if (Number.isFinite(usd) && usd > 0) return usd / toTokenPriceUSD;
@@ -34647,7 +35302,7 @@ function SwapMode({
34647
35302
  estimatedToAmount
34648
35303
  ]);
34649
35304
  const fromUsd = usdSellNum;
34650
- const toUsd = useMemo28(() => {
35305
+ const toUsd = useMemo29(() => {
34651
35306
  if (backendToUsdStr) {
34652
35307
  const n = parseFloat(backendToUsdStr);
34653
35308
  if (Number.isFinite(n) && n > 0) return n;
@@ -34658,12 +35313,12 @@ function SwapMode({
34658
35313
  const isEstimate = !route.data;
34659
35314
  const USD_EPSILON = 1e-3;
34660
35315
  const displayToUsd = toUsd > USD_EPSILON ? toUsd : estimatedToAmount !== null && hasToUsdPrice ? estimatedToAmount * toTokenPriceUSD : 0;
34661
- const priceImpact = useMemo28(() => {
35316
+ const priceImpact = useMemo29(() => {
34662
35317
  if (!route.data || fromUsd < 0.01 || displayToUsd < 0.01) return null;
34663
35318
  const impact = 1 - displayToUsd / fromUsd;
34664
35319
  return impact > 1e-3 ? impact : null;
34665
35320
  }, [route.data, fromUsd, displayToUsd]);
34666
- const routePath = useMemo28(() => {
35321
+ const routePath = useMemo29(() => {
34667
35322
  if (!route.data) return null;
34668
35323
  const provider = route.data.route?.provider;
34669
35324
  const steps = route.data.route?.steps;
@@ -34690,19 +35345,19 @@ function SwapMode({
34690
35345
  return null;
34691
35346
  }, [route.data, fromToken?.symbol, toToken?.symbol]);
34692
35347
  const isGasSponsored = !!route.data?.sponsorship;
34693
- const networkCostUsd = useMemo28(() => {
35348
+ const networkCostUsd = useMemo29(() => {
34694
35349
  const fees = route.data?.route?.estimate?.fees;
34695
35350
  if (!fees?.length) return null;
34696
35351
  const gasTotal = fees.filter((f) => f.type?.toLowerCase().includes("gas")).reduce((sum, f) => sum + (Number(f.amountUsd) || 0), 0);
34697
35352
  return gasTotal > 0 ? gasTotal : null;
34698
35353
  }, [route.data]);
34699
- const protocolFeeUsd = useMemo28(() => {
35354
+ const protocolFeeUsd = useMemo29(() => {
34700
35355
  const fees = route.data?.route?.estimate?.fees;
34701
35356
  if (!fees?.length) return null;
34702
35357
  const total = fees.filter((f) => !f.type?.toLowerCase().includes("gas")).reduce((sum, f) => sum + (Number(f.amountUsd) || 0), 0);
34703
35358
  return total > 0 ? total : null;
34704
35359
  }, [route.data]);
34705
- const exchangeRate = useMemo28(() => {
35360
+ const exchangeRate = useMemo29(() => {
34706
35361
  if (!hasFromUsdPrice || !hasToUsdPrice) return null;
34707
35362
  return toTokenPriceUSD / fromTokenPriceUSD;
34708
35363
  }, [fromTokenPriceUSD, toTokenPriceUSD, hasFromUsdPrice, hasToUsdPrice]);
@@ -34711,13 +35366,13 @@ function SwapMode({
34711
35366
  const hasAmount = rawSellNum > 0 && (amountInputMode === "token" || hasFromUsdPrice);
34712
35367
  const isConnected = walletStatus === "connected" && !!walletAddress;
34713
35368
  const canGetQuote = hasTokens && hasAmount && !insufficient && isConnected && (!needsDestAddress || isValidDestAddress);
34714
- useEffect32(() => {
35369
+ useEffect33(() => {
34715
35370
  if (!fromToken) return;
34716
35371
  if (!hasFromUsdPrice && amountInputMode === "usd") {
34717
35372
  setAmountInputMode("token");
34718
35373
  }
34719
35374
  }, [fromToken, hasFromUsdPrice, amountInputMode]);
34720
- useEffect32(() => {
35375
+ useEffect33(() => {
34721
35376
  if (displayToAmount === null) {
34722
35377
  prevToAmountRef.current = null;
34723
35378
  return;
@@ -34731,14 +35386,14 @@ function SwapMode({
34731
35386
  const t = setTimeout(() => setRateUpdated(false), 700);
34732
35387
  return () => clearTimeout(t);
34733
35388
  }, [displayToAmount]);
34734
- useEffect32(() => {
35389
+ useEffect33(() => {
34735
35390
  setDestAddress("");
34736
35391
  }, [toChainType]);
34737
- const fetchRef = useRef18(route.fetch);
34738
- useEffect32(() => {
35392
+ const fetchRef = useRef19(route.fetch);
35393
+ useEffect33(() => {
34739
35394
  fetchRef.current = route.fetch;
34740
35395
  });
34741
- useEffect32(() => {
35396
+ useEffect33(() => {
34742
35397
  if (!canGetQuote || stage !== "home") return;
34743
35398
  if (!fromToken || !fromChain || !toToken || !toChain || !walletAddress)
34744
35399
  return;
@@ -34767,7 +35422,7 @@ function SwapMode({
34767
35422
  destAddress,
34768
35423
  slippage
34769
35424
  ]);
34770
- useEffect32(() => {
35425
+ useEffect33(() => {
34771
35426
  if (!canGetQuote || !fromToken || !fromChain || !toToken || !toChain || !walletAddress) {
34772
35427
  latestFetchParamsRef.current = null;
34773
35428
  return;
@@ -34794,12 +35449,12 @@ function SwapMode({
34794
35449
  destAddress,
34795
35450
  slippage
34796
35451
  ]);
34797
- useEffect32(() => {
35452
+ useEffect33(() => {
34798
35453
  quoteTimestampRef.current = route.data ? Date.now() : null;
34799
35454
  setQuoteAge(0);
34800
35455
  }, [route.data]);
34801
- const msgTimeoutRef = useRef18(null);
34802
- useEffect32(() => {
35456
+ const msgTimeoutRef = useRef19(null);
35457
+ useEffect33(() => {
34803
35458
  if (!route.loading) {
34804
35459
  setQuoteLoadingMsgIdx(0);
34805
35460
  setQuoteLoadingMsgVisible(true);
@@ -34817,7 +35472,7 @@ function SwapMode({
34817
35472
  if (msgTimeoutRef.current !== null) clearTimeout(msgTimeoutRef.current);
34818
35473
  };
34819
35474
  }, [route.loading]);
34820
- useEffect32(() => {
35475
+ useEffect33(() => {
34821
35476
  if (!route.data) return;
34822
35477
  const id = setInterval(() => {
34823
35478
  const ts = quoteTimestampRef.current;
@@ -34831,7 +35486,7 @@ function SwapMode({
34831
35486
  }, 1e3);
34832
35487
  return () => clearInterval(id);
34833
35488
  }, [route.data]);
34834
- useEffect32(() => {
35489
+ useEffect33(() => {
34835
35490
  if (stage !== "review") return;
34836
35491
  if (!route.data || !walletAddress) return;
34837
35492
  const fromTokenAddress = fromToken?.address;
@@ -34842,7 +35497,7 @@ function SwapMode({
34842
35497
  routeResult: route.data
34843
35498
  });
34844
35499
  }, [stage, route.data, walletAddress, fromToken]);
34845
- useEffect32(() => {
35500
+ useEffect33(() => {
34846
35501
  if (!showSettings) {
34847
35502
  setShowCurrencyDropdown(false);
34848
35503
  return;
@@ -34855,7 +35510,7 @@ function SwapMode({
34855
35510
  document.addEventListener("mousedown", handler);
34856
35511
  return () => document.removeEventListener("mousedown", handler);
34857
35512
  }, [showSettings]);
34858
- useEffect32(() => {
35513
+ useEffect33(() => {
34859
35514
  if (!showCurrencyDropdown) return;
34860
35515
  const handler = (e2) => {
34861
35516
  if (currencyDropdownRef.current && !currencyDropdownRef.current.contains(e2.target)) {
@@ -34866,7 +35521,7 @@ function SwapMode({
34866
35521
  return () => document.removeEventListener("mousedown", handler);
34867
35522
  }, [showCurrencyDropdown]);
34868
35523
  if (stage === "select-from") {
34869
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
35524
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
34870
35525
  SwapTokenSelect,
34871
35526
  {
34872
35527
  side: "from",
@@ -34884,7 +35539,7 @@ function SwapMode({
34884
35539
  ) });
34885
35540
  }
34886
35541
  if (stage === "select-to" && !lockDestToken) {
34887
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
35542
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
34888
35543
  SwapTokenSelect,
34889
35544
  {
34890
35545
  side: "to",
@@ -34903,9 +35558,9 @@ function SwapMode({
34903
35558
  ) });
34904
35559
  }
34905
35560
  if (stage === "connect-wallet") {
34906
- return /* @__PURE__ */ jsxs45(WidgetContainer, { theme: resolvedTheme, style, children: [
34907
- /* @__PURE__ */ jsx57(
34908
- SwapWalletSelector,
35561
+ return /* @__PURE__ */ jsxs47(WidgetContainer, { theme: resolvedTheme, style, children: [
35562
+ /* @__PURE__ */ jsx59(
35563
+ SwapWalletSelector_default,
34909
35564
  {
34910
35565
  walletStatus,
34911
35566
  walletAddress,
@@ -34913,7 +35568,7 @@ function SwapMode({
34913
35568
  onBack: handleWalletConnected
34914
35569
  }
34915
35570
  ),
34916
- isConnected && /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx57(
35571
+ isConnected && /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx59(
34917
35572
  "button",
34918
35573
  {
34919
35574
  onClick: () => setStage("home"),
@@ -34946,8 +35601,8 @@ function SwapMode({
34946
35601
  const offset = circ - progress / 100 * circ;
34947
35602
  const isApproving = txStatus === "approving";
34948
35603
  const title = isApproving ? "Approving..." : "Order Submitted";
34949
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
34950
- /* @__PURE__ */ jsxs45(
35604
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
35605
+ /* @__PURE__ */ jsxs47(
34951
35606
  "div",
34952
35607
  {
34953
35608
  style: {
@@ -34957,7 +35612,7 @@ function SwapMode({
34957
35612
  marginBottom: spacing[5]
34958
35613
  },
34959
35614
  children: [
34960
- /* @__PURE__ */ jsx57(
35615
+ /* @__PURE__ */ jsx59(
34961
35616
  "button",
34962
35617
  {
34963
35618
  onClick: handleReset,
@@ -34972,7 +35627,7 @@ function SwapMode({
34972
35627
  border: 0,
34973
35628
  cursor: "pointer"
34974
35629
  },
34975
- children: /* @__PURE__ */ jsx57(
35630
+ children: /* @__PURE__ */ jsx59(
34976
35631
  "svg",
34977
35632
  {
34978
35633
  style: {
@@ -34986,12 +35641,12 @@ function SwapMode({
34986
35641
  strokeWidth: 2,
34987
35642
  strokeLinecap: "round",
34988
35643
  strokeLinejoin: "round",
34989
- children: /* @__PURE__ */ jsx57("path", { d: "M19 12H5m7-7-7 7 7 7" })
35644
+ children: /* @__PURE__ */ jsx59("path", { d: "M19 12H5m7-7-7 7 7 7" })
34990
35645
  }
34991
35646
  )
34992
35647
  }
34993
35648
  ),
34994
- /* @__PURE__ */ jsx57(
35649
+ /* @__PURE__ */ jsx59(
34995
35650
  "button",
34996
35651
  {
34997
35652
  onClick: handleReset,
@@ -35008,7 +35663,7 @@ function SwapMode({
35008
35663
  ]
35009
35664
  }
35010
35665
  ),
35011
- /* @__PURE__ */ jsx57(
35666
+ /* @__PURE__ */ jsx59(
35012
35667
  "h1",
35013
35668
  {
35014
35669
  style: {
@@ -35020,7 +35675,7 @@ function SwapMode({
35020
35675
  children: title
35021
35676
  }
35022
35677
  ),
35023
- /* @__PURE__ */ jsxs45(
35678
+ /* @__PURE__ */ jsxs47(
35024
35679
  "div",
35025
35680
  {
35026
35681
  style: {
@@ -35034,7 +35689,7 @@ function SwapMode({
35034
35689
  gap: spacing[5]
35035
35690
  },
35036
35691
  children: [
35037
- /* @__PURE__ */ jsxs45(
35692
+ /* @__PURE__ */ jsxs47(
35038
35693
  "div",
35039
35694
  {
35040
35695
  style: {
@@ -35046,14 +35701,14 @@ function SwapMode({
35046
35701
  justifyContent: "center"
35047
35702
  },
35048
35703
  children: [
35049
- /* @__PURE__ */ jsxs45(
35704
+ /* @__PURE__ */ jsxs47(
35050
35705
  "svg",
35051
35706
  {
35052
35707
  width: ringSize,
35053
35708
  height: ringSize,
35054
35709
  style: { position: "absolute", inset: 0 },
35055
35710
  children: [
35056
- /* @__PURE__ */ jsx57(
35711
+ /* @__PURE__ */ jsx59(
35057
35712
  "circle",
35058
35713
  {
35059
35714
  cx: ringSize / 2,
@@ -35064,7 +35719,7 @@ function SwapMode({
35064
35719
  strokeWidth: ringStroke
35065
35720
  }
35066
35721
  ),
35067
- /* @__PURE__ */ jsx57(
35722
+ /* @__PURE__ */ jsx59(
35068
35723
  "circle",
35069
35724
  {
35070
35725
  cx: ringSize / 2,
@@ -35083,7 +35738,7 @@ function SwapMode({
35083
35738
  ]
35084
35739
  }
35085
35740
  ),
35086
- /* @__PURE__ */ jsxs45(
35741
+ /* @__PURE__ */ jsxs47(
35087
35742
  "div",
35088
35743
  {
35089
35744
  style: {
@@ -35094,7 +35749,7 @@ function SwapMode({
35094
35749
  textAlign: "center"
35095
35750
  },
35096
35751
  children: [
35097
- /* @__PURE__ */ jsx57(
35752
+ /* @__PURE__ */ jsx59(
35098
35753
  "span",
35099
35754
  {
35100
35755
  style: {
@@ -35107,7 +35762,7 @@ function SwapMode({
35107
35762
  children: isApproving ? "Approving" : "Swapping"
35108
35763
  }
35109
35764
  ),
35110
- /* @__PURE__ */ jsxs45(
35765
+ /* @__PURE__ */ jsxs47(
35111
35766
  "div",
35112
35767
  {
35113
35768
  style: {
@@ -35117,7 +35772,7 @@ function SwapMode({
35117
35772
  gap: spacing[1.5]
35118
35773
  },
35119
35774
  children: [
35120
- fromToken?.iconUrl ? /* @__PURE__ */ jsx57(
35775
+ fromToken?.iconUrl ? /* @__PURE__ */ jsx59(
35121
35776
  "img",
35122
35777
  {
35123
35778
  src: fromToken.iconUrl,
@@ -35128,7 +35783,7 @@ function SwapMode({
35128
35783
  },
35129
35784
  alt: ""
35130
35785
  }
35131
- ) : /* @__PURE__ */ jsx57(
35786
+ ) : /* @__PURE__ */ jsx59(
35132
35787
  "div",
35133
35788
  {
35134
35789
  style: {
@@ -35139,7 +35794,7 @@ function SwapMode({
35139
35794
  }
35140
35795
  }
35141
35796
  ),
35142
- /* @__PURE__ */ jsx57(
35797
+ /* @__PURE__ */ jsx59(
35143
35798
  "svg",
35144
35799
  {
35145
35800
  style: {
@@ -35153,10 +35808,10 @@ function SwapMode({
35153
35808
  strokeWidth: 2,
35154
35809
  strokeLinecap: "round",
35155
35810
  strokeLinejoin: "round",
35156
- children: /* @__PURE__ */ jsx57("path", { d: "M5 12h14m-7-7 7 7-7 7" })
35811
+ children: /* @__PURE__ */ jsx59("path", { d: "M5 12h14m-7-7 7 7-7 7" })
35157
35812
  }
35158
35813
  ),
35159
- toToken?.iconUrl ? /* @__PURE__ */ jsx57(
35814
+ toToken?.iconUrl ? /* @__PURE__ */ jsx59(
35160
35815
  "img",
35161
35816
  {
35162
35817
  src: toToken.iconUrl,
@@ -35167,7 +35822,7 @@ function SwapMode({
35167
35822
  },
35168
35823
  alt: ""
35169
35824
  }
35170
- ) : /* @__PURE__ */ jsx57(
35825
+ ) : /* @__PURE__ */ jsx59(
35171
35826
  "div",
35172
35827
  {
35173
35828
  style: {
@@ -35181,7 +35836,7 @@ function SwapMode({
35181
35836
  ]
35182
35837
  }
35183
35838
  ),
35184
- /* @__PURE__ */ jsxs45(
35839
+ /* @__PURE__ */ jsxs47(
35185
35840
  "span",
35186
35841
  {
35187
35842
  style: {
@@ -35193,7 +35848,7 @@ function SwapMode({
35193
35848
  children: [
35194
35849
  fromToken?.symbol,
35195
35850
  " ",
35196
- /* @__PURE__ */ jsx57(
35851
+ /* @__PURE__ */ jsx59(
35197
35852
  "span",
35198
35853
  {
35199
35854
  style: {
@@ -35208,7 +35863,7 @@ function SwapMode({
35208
35863
  ]
35209
35864
  }
35210
35865
  ),
35211
- /* @__PURE__ */ jsxs45(
35866
+ /* @__PURE__ */ jsxs47(
35212
35867
  "span",
35213
35868
  {
35214
35869
  style: {
@@ -35228,7 +35883,7 @@ function SwapMode({
35228
35883
  ]
35229
35884
  }
35230
35885
  ),
35231
- /* @__PURE__ */ jsxs45(
35886
+ /* @__PURE__ */ jsxs47(
35232
35887
  "div",
35233
35888
  {
35234
35889
  style: {
@@ -35238,7 +35893,7 @@ function SwapMode({
35238
35893
  justifyContent: "space-between"
35239
35894
  },
35240
35895
  children: [
35241
- /* @__PURE__ */ jsx57(
35896
+ /* @__PURE__ */ jsx59(
35242
35897
  ProcessingStepNode,
35243
35898
  {
35244
35899
  active: activeStep >= 0,
@@ -35247,8 +35902,8 @@ function SwapMode({
35247
35902
  label: `Sending ${fromToken?.symbol ?? ""}`
35248
35903
  }
35249
35904
  ),
35250
- /* @__PURE__ */ jsx57(ProcessingStepLine, { done: activeStep > 0 }),
35251
- /* @__PURE__ */ jsx57(
35905
+ /* @__PURE__ */ jsx59(ProcessingStepLine, { done: activeStep > 0 }),
35906
+ /* @__PURE__ */ jsx59(
35252
35907
  ProcessingStepNode,
35253
35908
  {
35254
35909
  active: activeStep >= 1,
@@ -35257,8 +35912,8 @@ function SwapMode({
35257
35912
  label: "Create Order"
35258
35913
  }
35259
35914
  ),
35260
- /* @__PURE__ */ jsx57(ProcessingStepLine, { done: activeStep > 1 }),
35261
- /* @__PURE__ */ jsx57(
35915
+ /* @__PURE__ */ jsx59(ProcessingStepLine, { done: activeStep > 1 }),
35916
+ /* @__PURE__ */ jsx59(
35262
35917
  ProcessingStepNode,
35263
35918
  {
35264
35919
  active: activeStep >= 2,
@@ -35277,7 +35932,7 @@ function SwapMode({
35277
35932
  fromChainTxUrl
35278
35933
  );
35279
35934
  const isCopied = copiedHash === txHash;
35280
- return /* @__PURE__ */ jsxs45(
35935
+ return /* @__PURE__ */ jsxs47(
35281
35936
  "div",
35282
35937
  {
35283
35938
  style: {
@@ -35286,7 +35941,7 @@ function SwapMode({
35286
35941
  gap: spacing[3]
35287
35942
  },
35288
35943
  children: [
35289
- explorerUrl && /* @__PURE__ */ jsxs45(
35944
+ explorerUrl && /* @__PURE__ */ jsxs47(
35290
35945
  "a",
35291
35946
  {
35292
35947
  href: explorerUrl,
@@ -35305,7 +35960,7 @@ function SwapMode({
35305
35960
  },
35306
35961
  children: [
35307
35962
  "View transaction",
35308
- /* @__PURE__ */ jsxs45(
35963
+ /* @__PURE__ */ jsxs47(
35309
35964
  "svg",
35310
35965
  {
35311
35966
  style: { width: "0.875rem", height: "0.875rem" },
@@ -35316,16 +35971,16 @@ function SwapMode({
35316
35971
  strokeLinecap: "round",
35317
35972
  strokeLinejoin: "round",
35318
35973
  children: [
35319
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35320
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35321
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35974
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35975
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
35976
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35322
35977
  ]
35323
35978
  }
35324
35979
  )
35325
35980
  ]
35326
35981
  }
35327
35982
  ),
35328
- /* @__PURE__ */ jsx57(
35983
+ /* @__PURE__ */ jsx59(
35329
35984
  "button",
35330
35985
  {
35331
35986
  onClick: () => handleCopyHash(txHash),
@@ -35342,11 +35997,11 @@ function SwapMode({
35342
35997
  padding: 0,
35343
35998
  transition: "color 0.15s"
35344
35999
  },
35345
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(Fragment10, { children: [
36000
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(Fragment12, { children: [
35346
36001
  txHash.slice(0, 6),
35347
36002
  "\u2026",
35348
36003
  txHash.slice(-4),
35349
- /* @__PURE__ */ jsxs45(
36004
+ /* @__PURE__ */ jsxs47(
35350
36005
  "svg",
35351
36006
  {
35352
36007
  style: { width: "0.875rem", height: "0.875rem" },
@@ -35357,7 +36012,7 @@ function SwapMode({
35357
36012
  strokeLinecap: "round",
35358
36013
  strokeLinejoin: "round",
35359
36014
  children: [
35360
- /* @__PURE__ */ jsx57(
36015
+ /* @__PURE__ */ jsx59(
35361
36016
  "rect",
35362
36017
  {
35363
36018
  x: "9",
@@ -35368,7 +36023,7 @@ function SwapMode({
35368
36023
  ry: "2"
35369
36024
  }
35370
36025
  ),
35371
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36026
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
35372
36027
  ]
35373
36028
  }
35374
36029
  )
@@ -35396,10 +36051,10 @@ function SwapMode({
35396
36051
  dateStyle: "medium",
35397
36052
  timeStyle: "short"
35398
36053
  }) ?? null;
35399
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45("div", { style: { position: "relative", overflow: "hidden" }, children: [
35400
- /* @__PURE__ */ jsx57(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx57(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
35401
- /* @__PURE__ */ jsxs45("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
35402
- /* @__PURE__ */ jsxs45(
36054
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47("div", { style: { position: "relative", overflow: "hidden" }, children: [
36055
+ /* @__PURE__ */ jsx59(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx59(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
36056
+ /* @__PURE__ */ jsxs47("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
36057
+ /* @__PURE__ */ jsxs47(
35403
36058
  "div",
35404
36059
  {
35405
36060
  style: {
@@ -35409,7 +36064,7 @@ function SwapMode({
35409
36064
  marginBottom: spacing[5]
35410
36065
  },
35411
36066
  children: [
35412
- /* @__PURE__ */ jsx57(
36067
+ /* @__PURE__ */ jsx59(
35413
36068
  "div",
35414
36069
  {
35415
36070
  style: {
@@ -35422,7 +36077,7 @@ function SwapMode({
35422
36077
  justifyContent: "center",
35423
36078
  flexShrink: 0
35424
36079
  },
35425
- children: /* @__PURE__ */ jsx57(
36080
+ children: /* @__PURE__ */ jsx59(
35426
36081
  "svg",
35427
36082
  {
35428
36083
  style: {
@@ -35436,12 +36091,12 @@ function SwapMode({
35436
36091
  strokeWidth: 3,
35437
36092
  strokeLinecap: "round",
35438
36093
  strokeLinejoin: "round",
35439
- children: /* @__PURE__ */ jsx57("path", { d: "M20 6L9 17l-5-5" })
36094
+ children: /* @__PURE__ */ jsx59("path", { d: "M20 6L9 17l-5-5" })
35440
36095
  }
35441
36096
  )
35442
36097
  }
35443
36098
  ),
35444
- /* @__PURE__ */ jsx57(
36099
+ /* @__PURE__ */ jsx59(
35445
36100
  "h2",
35446
36101
  {
35447
36102
  style: {
@@ -35455,7 +36110,7 @@ function SwapMode({
35455
36110
  ]
35456
36111
  }
35457
36112
  ),
35458
- /* @__PURE__ */ jsxs45(
36113
+ /* @__PURE__ */ jsxs47(
35459
36114
  "div",
35460
36115
  {
35461
36116
  style: {
@@ -35465,7 +36120,7 @@ function SwapMode({
35465
36120
  padding: spacing[5]
35466
36121
  },
35467
36122
  children: [
35468
- /* @__PURE__ */ jsxs45(
36123
+ /* @__PURE__ */ jsxs47(
35469
36124
  "div",
35470
36125
  {
35471
36126
  style: {
@@ -35475,7 +36130,7 @@ function SwapMode({
35475
36130
  fontSize: fontSize.sm
35476
36131
  },
35477
36132
  children: [
35478
- /* @__PURE__ */ jsxs45(
36133
+ /* @__PURE__ */ jsxs47(
35479
36134
  "div",
35480
36135
  {
35481
36136
  style: {
@@ -35484,8 +36139,8 @@ function SwapMode({
35484
36139
  gap: spacing[2]
35485
36140
  },
35486
36141
  children: [
35487
- fromToken?.iconUrl && /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
35488
- /* @__PURE__ */ jsx57(
36142
+ fromToken?.iconUrl && /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
36143
+ /* @__PURE__ */ jsx59(
35489
36144
  "img",
35490
36145
  {
35491
36146
  src: fromToken.iconUrl,
@@ -35497,7 +36152,7 @@ function SwapMode({
35497
36152
  }
35498
36153
  }
35499
36154
  ),
35500
- fromChain?.chainIconURI && /* @__PURE__ */ jsx57(
36155
+ fromChain?.chainIconURI && /* @__PURE__ */ jsx59(
35501
36156
  "img",
35502
36157
  {
35503
36158
  src: fromChain.chainIconURI,
@@ -35515,11 +36170,11 @@ function SwapMode({
35515
36170
  }
35516
36171
  )
35517
36172
  ] }),
35518
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "You sold" })
36173
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "You sold" })
35519
36174
  ]
35520
36175
  }
35521
36176
  ),
35522
- /* @__PURE__ */ jsxs45(
36177
+ /* @__PURE__ */ jsxs47(
35523
36178
  "span",
35524
36179
  {
35525
36180
  style: {
@@ -35536,7 +36191,7 @@ function SwapMode({
35536
36191
  ]
35537
36192
  }
35538
36193
  ),
35539
- /* @__PURE__ */ jsxs45(
36194
+ /* @__PURE__ */ jsxs47(
35540
36195
  "div",
35541
36196
  {
35542
36197
  style: {
@@ -35547,7 +36202,7 @@ function SwapMode({
35547
36202
  marginTop: spacing[3]
35548
36203
  },
35549
36204
  children: [
35550
- /* @__PURE__ */ jsxs45(
36205
+ /* @__PURE__ */ jsxs47(
35551
36206
  "div",
35552
36207
  {
35553
36208
  style: {
@@ -35556,8 +36211,8 @@ function SwapMode({
35556
36211
  gap: spacing[2]
35557
36212
  },
35558
36213
  children: [
35559
- toToken?.iconUrl && /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
35560
- /* @__PURE__ */ jsx57(
36214
+ toToken?.iconUrl && /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
36215
+ /* @__PURE__ */ jsx59(
35561
36216
  "img",
35562
36217
  {
35563
36218
  src: toToken.iconUrl,
@@ -35569,7 +36224,7 @@ function SwapMode({
35569
36224
  }
35570
36225
  }
35571
36226
  ),
35572
- toChain?.chainIconURI && /* @__PURE__ */ jsx57(
36227
+ toChain?.chainIconURI && /* @__PURE__ */ jsx59(
35573
36228
  "img",
35574
36229
  {
35575
36230
  src: toChain.chainIconURI,
@@ -35587,11 +36242,11 @@ function SwapMode({
35587
36242
  }
35588
36243
  )
35589
36244
  ] }),
35590
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Received" })
36245
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Received" })
35591
36246
  ]
35592
36247
  }
35593
36248
  ),
35594
- /* @__PURE__ */ jsxs45(
36249
+ /* @__PURE__ */ jsxs47(
35595
36250
  "span",
35596
36251
  {
35597
36252
  style: {
@@ -35608,7 +36263,7 @@ function SwapMode({
35608
36263
  ]
35609
36264
  }
35610
36265
  ),
35611
- /* @__PURE__ */ jsx57(
36266
+ /* @__PURE__ */ jsx59(
35612
36267
  "div",
35613
36268
  {
35614
36269
  style: {
@@ -35618,7 +36273,7 @@ function SwapMode({
35618
36273
  }
35619
36274
  }
35620
36275
  ),
35621
- /* @__PURE__ */ jsxs45(
36276
+ /* @__PURE__ */ jsxs47(
35622
36277
  "div",
35623
36278
  {
35624
36279
  style: {
@@ -35628,28 +36283,28 @@ function SwapMode({
35628
36283
  fontSize: fontSize.sm
35629
36284
  },
35630
36285
  children: [
35631
- fromUsd > 0 && /* @__PURE__ */ jsx57(
36286
+ fromUsd > 0 && /* @__PURE__ */ jsx59(
35632
36287
  SuccessReceiptRow,
35633
36288
  {
35634
36289
  label: "Value sold",
35635
36290
  value: fmtLocal(fromUsd)
35636
36291
  }
35637
36292
  ),
35638
- toUsd > 0 && /* @__PURE__ */ jsx57(
36293
+ toUsd > 0 && /* @__PURE__ */ jsx59(
35639
36294
  SuccessReceiptRow,
35640
36295
  {
35641
36296
  label: "Value received",
35642
36297
  value: fmtLocal(toUsd)
35643
36298
  }
35644
36299
  ),
35645
- effectiveRate && /* @__PURE__ */ jsx57(
36300
+ effectiveRate && /* @__PURE__ */ jsx59(
35646
36301
  SuccessReceiptRow,
35647
36302
  {
35648
36303
  label: "Effective rate",
35649
36304
  value: effectiveRate
35650
36305
  }
35651
36306
  ),
35652
- completedStr && /* @__PURE__ */ jsx57(SuccessReceiptRow, { label: "Completed", value: completedStr }),
36307
+ completedStr && /* @__PURE__ */ jsx59(SuccessReceiptRow, { label: "Completed", value: completedStr }),
35653
36308
  txHash && (() => {
35654
36309
  const srcUrl = buildExplorerUrl(
35655
36310
  txHash,
@@ -35657,7 +36312,7 @@ function SwapMode({
35657
36312
  fromChainTxUrl
35658
36313
  );
35659
36314
  const isCopied = copiedHash === txHash;
35660
- return /* @__PURE__ */ jsxs45(
36315
+ return /* @__PURE__ */ jsxs47(
35661
36316
  "div",
35662
36317
  {
35663
36318
  style: {
@@ -35666,8 +36321,8 @@ function SwapMode({
35666
36321
  justifyContent: "space-between"
35667
36322
  },
35668
36323
  children: [
35669
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
35670
- /* @__PURE__ */ jsxs45(
36324
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
36325
+ /* @__PURE__ */ jsxs47(
35671
36326
  "div",
35672
36327
  {
35673
36328
  style: {
@@ -35676,7 +36331,7 @@ function SwapMode({
35676
36331
  gap: spacing[2]
35677
36332
  },
35678
36333
  children: [
35679
- srcUrl && /* @__PURE__ */ jsxs45(
36334
+ srcUrl && /* @__PURE__ */ jsxs47(
35680
36335
  "a",
35681
36336
  {
35682
36337
  href: srcUrl,
@@ -35696,7 +36351,7 @@ function SwapMode({
35696
36351
  txHash.slice(0, 6),
35697
36352
  "\u2026",
35698
36353
  txHash.slice(-4),
35699
- /* @__PURE__ */ jsxs45(
36354
+ /* @__PURE__ */ jsxs47(
35700
36355
  "svg",
35701
36356
  {
35702
36357
  style: { width: "0.75rem", height: "0.75rem" },
@@ -35707,16 +36362,16 @@ function SwapMode({
35707
36362
  strokeLinecap: "round",
35708
36363
  strokeLinejoin: "round",
35709
36364
  children: [
35710
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35711
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35712
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
36365
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
36366
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
36367
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35713
36368
  ]
35714
36369
  }
35715
36370
  )
35716
36371
  ]
35717
36372
  }
35718
36373
  ),
35719
- /* @__PURE__ */ jsx57(
36374
+ /* @__PURE__ */ jsx59(
35720
36375
  "button",
35721
36376
  {
35722
36377
  onClick: () => handleCopyHash(txHash),
@@ -35734,7 +36389,7 @@ function SwapMode({
35734
36389
  padding: 0,
35735
36390
  transition: "color 0.15s"
35736
36391
  },
35737
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(
36392
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(
35738
36393
  "svg",
35739
36394
  {
35740
36395
  style: {
@@ -35748,7 +36403,7 @@ function SwapMode({
35748
36403
  strokeLinecap: "round",
35749
36404
  strokeLinejoin: "round",
35750
36405
  children: [
35751
- /* @__PURE__ */ jsx57(
36406
+ /* @__PURE__ */ jsx59(
35752
36407
  "rect",
35753
36408
  {
35754
36409
  x: "9",
@@ -35759,7 +36414,7 @@ function SwapMode({
35759
36414
  ry: "2"
35760
36415
  }
35761
36416
  ),
35762
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36417
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
35763
36418
  ]
35764
36419
  }
35765
36420
  )
@@ -35779,7 +36434,7 @@ function SwapMode({
35779
36434
  toChainTxUrl
35780
36435
  );
35781
36436
  const isCopied = copiedHash === destTxHash;
35782
- return /* @__PURE__ */ jsxs45(
36437
+ return /* @__PURE__ */ jsxs47(
35783
36438
  "div",
35784
36439
  {
35785
36440
  style: {
@@ -35788,8 +36443,8 @@ function SwapMode({
35788
36443
  justifyContent: "space-between"
35789
36444
  },
35790
36445
  children: [
35791
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
35792
- /* @__PURE__ */ jsxs45(
36446
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
36447
+ /* @__PURE__ */ jsxs47(
35793
36448
  "div",
35794
36449
  {
35795
36450
  style: {
@@ -35798,7 +36453,7 @@ function SwapMode({
35798
36453
  gap: spacing[2]
35799
36454
  },
35800
36455
  children: [
35801
- destUrl && /* @__PURE__ */ jsxs45(
36456
+ destUrl && /* @__PURE__ */ jsxs47(
35802
36457
  "a",
35803
36458
  {
35804
36459
  href: destUrl,
@@ -35818,7 +36473,7 @@ function SwapMode({
35818
36473
  destTxHash.slice(0, 6),
35819
36474
  "\u2026",
35820
36475
  destTxHash.slice(-4),
35821
- /* @__PURE__ */ jsxs45(
36476
+ /* @__PURE__ */ jsxs47(
35822
36477
  "svg",
35823
36478
  {
35824
36479
  style: { width: "0.75rem", height: "0.75rem" },
@@ -35829,16 +36484,16 @@ function SwapMode({
35829
36484
  strokeLinecap: "round",
35830
36485
  strokeLinejoin: "round",
35831
36486
  children: [
35832
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35833
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35834
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
36487
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
36488
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
36489
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35835
36490
  ]
35836
36491
  }
35837
36492
  )
35838
36493
  ]
35839
36494
  }
35840
36495
  ),
35841
- /* @__PURE__ */ jsx57(
36496
+ /* @__PURE__ */ jsx59(
35842
36497
  "button",
35843
36498
  {
35844
36499
  onClick: () => handleCopyHash(destTxHash),
@@ -35855,7 +36510,7 @@ function SwapMode({
35855
36510
  padding: 0,
35856
36511
  transition: "color 0.15s"
35857
36512
  },
35858
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(
36513
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(
35859
36514
  "svg",
35860
36515
  {
35861
36516
  style: {
@@ -35869,7 +36524,7 @@ function SwapMode({
35869
36524
  strokeLinecap: "round",
35870
36525
  strokeLinejoin: "round",
35871
36526
  children: [
35872
- /* @__PURE__ */ jsx57(
36527
+ /* @__PURE__ */ jsx59(
35873
36528
  "rect",
35874
36529
  {
35875
36530
  x: "9",
@@ -35880,7 +36535,7 @@ function SwapMode({
35880
36535
  ry: "2"
35881
36536
  }
35882
36537
  ),
35883
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36538
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
35884
36539
  ]
35885
36540
  }
35886
36541
  )
@@ -35900,7 +36555,7 @@ function SwapMode({
35900
36555
  }
35901
36556
  )
35902
36557
  ] }),
35903
- /* @__PURE__ */ jsxs45(
36558
+ /* @__PURE__ */ jsxs47(
35904
36559
  "div",
35905
36560
  {
35906
36561
  style: {
@@ -35910,7 +36565,7 @@ function SwapMode({
35910
36565
  gap: spacing[2]
35911
36566
  },
35912
36567
  children: [
35913
- /* @__PURE__ */ jsx57(
36568
+ /* @__PURE__ */ jsx59(
35914
36569
  "button",
35915
36570
  {
35916
36571
  onClick: handleReset,
@@ -35928,7 +36583,7 @@ function SwapMode({
35928
36583
  children: "Done"
35929
36584
  }
35930
36585
  ),
35931
- fromToken && toToken && /* @__PURE__ */ jsxs45(
36586
+ fromToken && toToken && /* @__PURE__ */ jsxs47(
35932
36587
  "button",
35933
36588
  {
35934
36589
  onClick: handleSwapBack,
@@ -35957,7 +36612,7 @@ function SwapMode({
35957
36612
  ] }) });
35958
36613
  }
35959
36614
  if (stage === "error") {
35960
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
36615
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
35961
36616
  ErrorPage,
35962
36617
  {
35963
36618
  error: mapError(execution.errorMessage),
@@ -35969,7 +36624,7 @@ function SwapMode({
35969
36624
  if (stage === "review") {
35970
36625
  const reviewToAmount = toAmount ?? displayToAmount;
35971
36626
  const reviewToUsd = toUsd > 0 ? toUsd : displayToUsd;
35972
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45(
36627
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47(
35973
36628
  "div",
35974
36629
  {
35975
36630
  style: {
@@ -35978,7 +36633,7 @@ function SwapMode({
35978
36633
  overflowY: "auto"
35979
36634
  },
35980
36635
  children: [
35981
- /* @__PURE__ */ jsxs45(
36636
+ /* @__PURE__ */ jsxs47(
35982
36637
  "div",
35983
36638
  {
35984
36639
  style: {
@@ -35988,7 +36643,7 @@ function SwapMode({
35988
36643
  marginBottom: spacing[5]
35989
36644
  },
35990
36645
  children: [
35991
- /* @__PURE__ */ jsx57(
36646
+ /* @__PURE__ */ jsx59(
35992
36647
  "span",
35993
36648
  {
35994
36649
  style: {
@@ -35999,7 +36654,7 @@ function SwapMode({
35999
36654
  children: "You're swapping"
36000
36655
  }
36001
36656
  ),
36002
- /* @__PURE__ */ jsx57(
36657
+ /* @__PURE__ */ jsx59(
36003
36658
  "button",
36004
36659
  {
36005
36660
  onClick: () => setStage("home"),
@@ -36014,7 +36669,7 @@ function SwapMode({
36014
36669
  border: 0,
36015
36670
  cursor: "pointer"
36016
36671
  },
36017
- children: /* @__PURE__ */ jsx57(
36672
+ children: /* @__PURE__ */ jsx59(
36018
36673
  "svg",
36019
36674
  {
36020
36675
  style: {
@@ -36028,7 +36683,7 @@ function SwapMode({
36028
36683
  strokeWidth: 2,
36029
36684
  strokeLinecap: "round",
36030
36685
  strokeLinejoin: "round",
36031
- children: /* @__PURE__ */ jsx57("path", { d: "M18 6L6 18M6 6l12 12" })
36686
+ children: /* @__PURE__ */ jsx59("path", { d: "M18 6L6 18M6 6l12 12" })
36032
36687
  }
36033
36688
  )
36034
36689
  }
@@ -36036,7 +36691,7 @@ function SwapMode({
36036
36691
  ]
36037
36692
  }
36038
36693
  ),
36039
- /* @__PURE__ */ jsxs45(
36694
+ /* @__PURE__ */ jsxs47(
36040
36695
  "div",
36041
36696
  {
36042
36697
  style: {
@@ -36045,8 +36700,8 @@ function SwapMode({
36045
36700
  justifyContent: "space-between"
36046
36701
  },
36047
36702
  children: [
36048
- /* @__PURE__ */ jsxs45("div", { children: [
36049
- /* @__PURE__ */ jsxs45(
36703
+ /* @__PURE__ */ jsxs47("div", { children: [
36704
+ /* @__PURE__ */ jsxs47(
36050
36705
  "p",
36051
36706
  {
36052
36707
  style: {
@@ -36062,7 +36717,7 @@ function SwapMode({
36062
36717
  ]
36063
36718
  }
36064
36719
  ),
36065
- /* @__PURE__ */ jsx57(
36720
+ /* @__PURE__ */ jsx59(
36066
36721
  "p",
36067
36722
  {
36068
36723
  style: {
@@ -36074,7 +36729,7 @@ function SwapMode({
36074
36729
  }
36075
36730
  )
36076
36731
  ] }),
36077
- fromToken?.iconUrl && /* @__PURE__ */ jsx57(
36732
+ fromToken?.iconUrl && /* @__PURE__ */ jsx59(
36078
36733
  TokenIcon,
36079
36734
  {
36080
36735
  icon: fromToken.iconUrl,
@@ -36085,7 +36740,7 @@ function SwapMode({
36085
36740
  ]
36086
36741
  }
36087
36742
  ),
36088
- /* @__PURE__ */ jsx57(
36743
+ /* @__PURE__ */ jsx59(
36089
36744
  "div",
36090
36745
  {
36091
36746
  style: {
@@ -36093,7 +36748,7 @@ function SwapMode({
36093
36748
  justifyContent: "center",
36094
36749
  margin: `${spacing[3]} 0`
36095
36750
  },
36096
- children: /* @__PURE__ */ jsx57(
36751
+ children: /* @__PURE__ */ jsx59(
36097
36752
  "svg",
36098
36753
  {
36099
36754
  style: {
@@ -36107,12 +36762,12 @@ function SwapMode({
36107
36762
  strokeWidth: 2,
36108
36763
  strokeLinecap: "round",
36109
36764
  strokeLinejoin: "round",
36110
- children: /* @__PURE__ */ jsx57("path", { d: "M12 5v14m-7-7l7 7 7-7" })
36765
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 5v14m-7-7l7 7 7-7" })
36111
36766
  }
36112
36767
  )
36113
36768
  }
36114
36769
  ),
36115
- /* @__PURE__ */ jsxs45(
36770
+ /* @__PURE__ */ jsxs47(
36116
36771
  "div",
36117
36772
  {
36118
36773
  style: {
@@ -36121,8 +36776,8 @@ function SwapMode({
36121
36776
  justifyContent: "space-between"
36122
36777
  },
36123
36778
  children: [
36124
- /* @__PURE__ */ jsxs45("div", { children: [
36125
- /* @__PURE__ */ jsxs45(
36779
+ /* @__PURE__ */ jsxs47("div", { children: [
36780
+ /* @__PURE__ */ jsxs47(
36126
36781
  "p",
36127
36782
  {
36128
36783
  style: {
@@ -36138,7 +36793,7 @@ function SwapMode({
36138
36793
  ]
36139
36794
  }
36140
36795
  ),
36141
- /* @__PURE__ */ jsx57(
36796
+ /* @__PURE__ */ jsx59(
36142
36797
  "p",
36143
36798
  {
36144
36799
  style: {
@@ -36150,7 +36805,7 @@ function SwapMode({
36150
36805
  }
36151
36806
  )
36152
36807
  ] }),
36153
- toToken?.iconUrl && /* @__PURE__ */ jsx57(
36808
+ toToken?.iconUrl && /* @__PURE__ */ jsx59(
36154
36809
  TokenIcon,
36155
36810
  {
36156
36811
  icon: toToken.iconUrl,
@@ -36161,7 +36816,7 @@ function SwapMode({
36161
36816
  ]
36162
36817
  }
36163
36818
  ),
36164
- /* @__PURE__ */ jsxs45(
36819
+ /* @__PURE__ */ jsxs47(
36165
36820
  "button",
36166
36821
  {
36167
36822
  onClick: () => setShowReviewDetails((v) => !v),
@@ -36180,13 +36835,13 @@ function SwapMode({
36180
36835
  padding: 0
36181
36836
  },
36182
36837
  children: [
36183
- /* @__PURE__ */ jsx57(
36838
+ /* @__PURE__ */ jsx59(
36184
36839
  "div",
36185
36840
  {
36186
36841
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
36187
36842
  }
36188
36843
  ),
36189
- /* @__PURE__ */ jsxs45(
36844
+ /* @__PURE__ */ jsxs47(
36190
36845
  "span",
36191
36846
  {
36192
36847
  style: {
@@ -36198,7 +36853,7 @@ function SwapMode({
36198
36853
  },
36199
36854
  children: [
36200
36855
  showReviewDetails ? "Hide details" : "View details",
36201
- /* @__PURE__ */ jsx57(
36856
+ /* @__PURE__ */ jsx59(
36202
36857
  "svg",
36203
36858
  {
36204
36859
  style: {
@@ -36213,10 +36868,10 @@ function SwapMode({
36213
36868
  strokeWidth: 2,
36214
36869
  strokeLinecap: "round",
36215
36870
  strokeLinejoin: "round",
36216
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
36871
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
36217
36872
  }
36218
36873
  ),
36219
- route.data && /* @__PURE__ */ jsxs45(
36874
+ route.data && /* @__PURE__ */ jsxs47(
36220
36875
  "svg",
36221
36876
  {
36222
36877
  width: "14",
@@ -36229,7 +36884,7 @@ function SwapMode({
36229
36884
  marginLeft: "0.125rem"
36230
36885
  },
36231
36886
  children: [
36232
- /* @__PURE__ */ jsx57(
36887
+ /* @__PURE__ */ jsx59(
36233
36888
  "circle",
36234
36889
  {
36235
36890
  cx: "7",
@@ -36240,7 +36895,7 @@ function SwapMode({
36240
36895
  strokeWidth: "1.5"
36241
36896
  }
36242
36897
  ),
36243
- /* @__PURE__ */ jsx57(
36898
+ /* @__PURE__ */ jsx59(
36244
36899
  "circle",
36245
36900
  {
36246
36901
  cx: "7",
@@ -36261,7 +36916,7 @@ function SwapMode({
36261
36916
  ]
36262
36917
  }
36263
36918
  ),
36264
- /* @__PURE__ */ jsx57(
36919
+ /* @__PURE__ */ jsx59(
36265
36920
  "div",
36266
36921
  {
36267
36922
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
@@ -36270,7 +36925,7 @@ function SwapMode({
36270
36925
  ]
36271
36926
  }
36272
36927
  ),
36273
- showReviewDetails && /* @__PURE__ */ jsxs45(
36928
+ showReviewDetails && /* @__PURE__ */ jsxs47(
36274
36929
  "div",
36275
36930
  {
36276
36931
  style: {
@@ -36281,7 +36936,7 @@ function SwapMode({
36281
36936
  marginBottom: spacing[2]
36282
36937
  },
36283
36938
  children: [
36284
- exchangeRate !== null && /* @__PURE__ */ jsx57(
36939
+ exchangeRate !== null && /* @__PURE__ */ jsx59(
36285
36940
  ReviewDetailRow,
36286
36941
  {
36287
36942
  label: "Rate",
@@ -36289,7 +36944,7 @@ function SwapMode({
36289
36944
  value: `1 ${fromToken?.symbol} = ${fmtAmount(1 / (exchangeRate ?? 1), 4)} ${toToken?.symbol} ($${fmtAmount(fromTokenPriceUSD, 2)})`
36290
36945
  }
36291
36946
  ),
36292
- /* @__PURE__ */ jsx57(
36947
+ /* @__PURE__ */ jsx59(
36293
36948
  ReviewDetailRow,
36294
36949
  {
36295
36950
  label: "Fee",
@@ -36297,12 +36952,12 @@ function SwapMode({
36297
36952
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
36298
36953
  }
36299
36954
  ),
36300
- /* @__PURE__ */ jsx57(
36955
+ /* @__PURE__ */ jsx59(
36301
36956
  ReviewDetailRow,
36302
36957
  {
36303
36958
  label: "Network cost",
36304
36959
  tooltip: "Estimated gas fee paid to the blockchain network",
36305
- value: isGasSponsored ? /* @__PURE__ */ jsx57(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs45(
36960
+ value: isGasSponsored ? /* @__PURE__ */ jsx59(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs47(
36306
36961
  "span",
36307
36962
  {
36308
36963
  style: {
@@ -36311,14 +36966,14 @@ function SwapMode({
36311
36966
  gap: "0.25rem"
36312
36967
  },
36313
36968
  children: [
36314
- /* @__PURE__ */ jsx57(GasIcon, { size: "0.875rem" }),
36969
+ /* @__PURE__ */ jsx59(GasIcon, { size: "0.875rem" }),
36315
36970
  fmtLocal(networkCostUsd)
36316
36971
  ]
36317
36972
  }
36318
36973
  ) : "\u2014"
36319
36974
  }
36320
36975
  ),
36321
- /* @__PURE__ */ jsx57(
36976
+ /* @__PURE__ */ jsx59(
36322
36977
  ReviewDetailRow,
36323
36978
  {
36324
36979
  label: "Max slippage",
@@ -36326,12 +36981,12 @@ function SwapMode({
36326
36981
  value: `${slippage}%`
36327
36982
  }
36328
36983
  ),
36329
- (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx57(
36984
+ (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx59(
36330
36985
  ReviewDetailRow,
36331
36986
  {
36332
36987
  label: "Route",
36333
36988
  tooltip: "Protocol or bridge used to execute your swap",
36334
- value: /* @__PURE__ */ jsx57(
36989
+ value: /* @__PURE__ */ jsx59(
36335
36990
  "span",
36336
36991
  {
36337
36992
  style: {
@@ -36351,7 +37006,7 @@ function SwapMode({
36351
37006
  ]
36352
37007
  }
36353
37008
  ),
36354
- /* @__PURE__ */ jsx57(
37009
+ /* @__PURE__ */ jsx59(
36355
37010
  SwapActionArea,
36356
37011
  {
36357
37012
  fromTokenSymbol: fromToken?.symbol ?? "",
@@ -36370,12 +37025,12 @@ function SwapMode({
36370
37025
  const ctaDisabled = !hasTokens || !hasAmount || insufficient || isConnected && needsDestAddress && !isValidDestAddress || route.loading;
36371
37026
  const ctaAction = !isConnected ? handleConnectAndReview : () => void handleReview();
36372
37027
  const showRateRow = hasTokens && exchangeRate !== null;
36373
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45(
37028
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47(
36374
37029
  "div",
36375
37030
  {
36376
37031
  style: { display: "flex", flexDirection: "column", minHeight: "500px" },
36377
37032
  children: [
36378
- /* @__PURE__ */ jsxs45(
37033
+ /* @__PURE__ */ jsxs47(
36379
37034
  "div",
36380
37035
  {
36381
37036
  style: {
@@ -36386,7 +37041,7 @@ function SwapMode({
36386
37041
  marginBottom: spacing[1]
36387
37042
  },
36388
37043
  children: [
36389
- /* @__PURE__ */ jsx57(
37044
+ /* @__PURE__ */ jsx59(
36390
37045
  "span",
36391
37046
  {
36392
37047
  style: {
@@ -36400,7 +37055,7 @@ function SwapMode({
36400
37055
  children: "Swap"
36401
37056
  }
36402
37057
  ),
36403
- /* @__PURE__ */ jsxs45(
37058
+ /* @__PURE__ */ jsxs47(
36404
37059
  "div",
36405
37060
  {
36406
37061
  ref: settingsRef,
@@ -36411,7 +37066,7 @@ function SwapMode({
36411
37066
  position: "relative"
36412
37067
  },
36413
37068
  children: [
36414
- walletAddress ? /* @__PURE__ */ jsxs45(
37069
+ walletAddress ? /* @__PURE__ */ jsxs47(
36415
37070
  "button",
36416
37071
  {
36417
37072
  onClick: () => void disconnectWallet(),
@@ -36429,7 +37084,7 @@ function SwapMode({
36429
37084
  " \xD7"
36430
37085
  ]
36431
37086
  }
36432
- ) : /* @__PURE__ */ jsx57(
37087
+ ) : /* @__PURE__ */ jsx59(
36433
37088
  "button",
36434
37089
  {
36435
37090
  onClick: handleConnectAndReview,
@@ -36444,7 +37099,7 @@ function SwapMode({
36444
37099
  children: "Connect wallet"
36445
37100
  }
36446
37101
  ),
36447
- /* @__PURE__ */ jsx57(
37102
+ /* @__PURE__ */ jsx59(
36448
37103
  "button",
36449
37104
  {
36450
37105
  onClick: () => setShowSettings((v) => !v),
@@ -36462,7 +37117,7 @@ function SwapMode({
36462
37117
  color: colors.mutedForeground,
36463
37118
  padding: 0
36464
37119
  },
36465
- children: /* @__PURE__ */ jsxs45(
37120
+ children: /* @__PURE__ */ jsxs47(
36466
37121
  "svg",
36467
37122
  {
36468
37123
  style: { width: "1rem", height: "1rem" },
@@ -36473,14 +37128,14 @@ function SwapMode({
36473
37128
  strokeLinecap: "round",
36474
37129
  strokeLinejoin: "round",
36475
37130
  children: [
36476
- /* @__PURE__ */ jsx57("circle", { cx: "12", cy: "12", r: "3" }),
36477
- /* @__PURE__ */ jsx57("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
37131
+ /* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "3" }),
37132
+ /* @__PURE__ */ jsx59("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
36478
37133
  ]
36479
37134
  }
36480
37135
  )
36481
37136
  }
36482
37137
  ),
36483
- showSettings && /* @__PURE__ */ jsxs45(
37138
+ showSettings && /* @__PURE__ */ jsxs47(
36484
37139
  "div",
36485
37140
  {
36486
37141
  style: {
@@ -36496,7 +37151,7 @@ function SwapMode({
36496
37151
  zIndex: 100
36497
37152
  },
36498
37153
  children: [
36499
- /* @__PURE__ */ jsx57(
37154
+ /* @__PURE__ */ jsx59(
36500
37155
  "p",
36501
37156
  {
36502
37157
  style: {
@@ -36510,7 +37165,7 @@ function SwapMode({
36510
37165
  children: "Appearance"
36511
37166
  }
36512
37167
  ),
36513
- /* @__PURE__ */ jsx57("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs45(
37168
+ /* @__PURE__ */ jsx59("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs47(
36514
37169
  "div",
36515
37170
  {
36516
37171
  style: {
@@ -36519,8 +37174,8 @@ function SwapMode({
36519
37174
  justifyContent: "space-between"
36520
37175
  },
36521
37176
  children: [
36522
- /* @__PURE__ */ jsxs45("div", { children: [
36523
- /* @__PURE__ */ jsx57(
37177
+ /* @__PURE__ */ jsxs47("div", { children: [
37178
+ /* @__PURE__ */ jsx59(
36524
37179
  "p",
36525
37180
  {
36526
37181
  style: {
@@ -36531,7 +37186,7 @@ function SwapMode({
36531
37186
  children: "Dark mode"
36532
37187
  }
36533
37188
  ),
36534
- /* @__PURE__ */ jsx57(
37189
+ /* @__PURE__ */ jsx59(
36535
37190
  "p",
36536
37191
  {
36537
37192
  style: {
@@ -36543,7 +37198,7 @@ function SwapMode({
36543
37198
  }
36544
37199
  )
36545
37200
  ] }),
36546
- /* @__PURE__ */ jsx57(
37201
+ /* @__PURE__ */ jsx59(
36547
37202
  "button",
36548
37203
  {
36549
37204
  role: "switch",
@@ -36560,7 +37215,7 @@ function SwapMode({
36560
37215
  transition: "background-color 0.2s",
36561
37216
  flexShrink: 0
36562
37217
  },
36563
- children: /* @__PURE__ */ jsx57(
37218
+ children: /* @__PURE__ */ jsx59(
36564
37219
  "span",
36565
37220
  {
36566
37221
  style: {
@@ -36581,7 +37236,7 @@ function SwapMode({
36581
37236
  ]
36582
37237
  }
36583
37238
  ) }),
36584
- /* @__PURE__ */ jsx57(
37239
+ /* @__PURE__ */ jsx59(
36585
37240
  "p",
36586
37241
  {
36587
37242
  style: {
@@ -36595,8 +37250,8 @@ function SwapMode({
36595
37250
  children: "Transaction Settings"
36596
37251
  }
36597
37252
  ),
36598
- /* @__PURE__ */ jsxs45("div", { style: { marginBottom: spacing[4] }, children: [
36599
- /* @__PURE__ */ jsx57(
37253
+ /* @__PURE__ */ jsxs47("div", { style: { marginBottom: spacing[4] }, children: [
37254
+ /* @__PURE__ */ jsx59(
36600
37255
  "p",
36601
37256
  {
36602
37257
  style: {
@@ -36608,8 +37263,8 @@ function SwapMode({
36608
37263
  children: "Max slippage"
36609
37264
  }
36610
37265
  ),
36611
- /* @__PURE__ */ jsxs45("div", { style: { display: "flex", gap: spacing[1.5] }, children: [
36612
- [0.1, 0.5, 1].map((v) => /* @__PURE__ */ jsxs45(
37266
+ /* @__PURE__ */ jsxs47("div", { style: { display: "flex", gap: spacing[1.5] }, children: [
37267
+ [0.1, 0.5, 1].map((v) => /* @__PURE__ */ jsxs47(
36613
37268
  "button",
36614
37269
  {
36615
37270
  onClick: () => {
@@ -36634,7 +37289,7 @@ function SwapMode({
36634
37289
  },
36635
37290
  v
36636
37291
  )),
36637
- /* @__PURE__ */ jsx57("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx57(
37292
+ /* @__PURE__ */ jsx59("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx59(
36638
37293
  "input",
36639
37294
  {
36640
37295
  type: "number",
@@ -36665,7 +37320,7 @@ function SwapMode({
36665
37320
  }
36666
37321
  ) })
36667
37322
  ] }),
36668
- slippage > 5 && /* @__PURE__ */ jsx57(
37323
+ slippage > 5 && /* @__PURE__ */ jsx59(
36669
37324
  "p",
36670
37325
  {
36671
37326
  style: {
@@ -36677,7 +37332,7 @@ function SwapMode({
36677
37332
  }
36678
37333
  )
36679
37334
  ] }),
36680
- /* @__PURE__ */ jsx57("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs45(
37335
+ /* @__PURE__ */ jsx59("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs47(
36681
37336
  "div",
36682
37337
  {
36683
37338
  style: {
@@ -36686,8 +37341,8 @@ function SwapMode({
36686
37341
  justifyContent: "space-between"
36687
37342
  },
36688
37343
  children: [
36689
- /* @__PURE__ */ jsxs45("div", { children: [
36690
- /* @__PURE__ */ jsx57(
37344
+ /* @__PURE__ */ jsxs47("div", { children: [
37345
+ /* @__PURE__ */ jsx59(
36691
37346
  "p",
36692
37347
  {
36693
37348
  style: {
@@ -36698,7 +37353,7 @@ function SwapMode({
36698
37353
  children: "Max approval"
36699
37354
  }
36700
37355
  ),
36701
- /* @__PURE__ */ jsx57(
37356
+ /* @__PURE__ */ jsx59(
36702
37357
  "p",
36703
37358
  {
36704
37359
  style: {
@@ -36710,7 +37365,7 @@ function SwapMode({
36710
37365
  }
36711
37366
  )
36712
37367
  ] }),
36713
- /* @__PURE__ */ jsx57(
37368
+ /* @__PURE__ */ jsx59(
36714
37369
  "button",
36715
37370
  {
36716
37371
  role: "switch",
@@ -36727,7 +37382,7 @@ function SwapMode({
36727
37382
  transition: "background-color 0.2s",
36728
37383
  flexShrink: 0
36729
37384
  },
36730
- children: /* @__PURE__ */ jsx57(
37385
+ children: /* @__PURE__ */ jsx59(
36731
37386
  "span",
36732
37387
  {
36733
37388
  style: {
@@ -36748,7 +37403,7 @@ function SwapMode({
36748
37403
  ]
36749
37404
  }
36750
37405
  ) }),
36751
- /* @__PURE__ */ jsxs45(
37406
+ /* @__PURE__ */ jsxs47(
36752
37407
  "div",
36753
37408
  {
36754
37409
  style: {
@@ -36758,7 +37413,7 @@ function SwapMode({
36758
37413
  gap: spacing[3]
36759
37414
  },
36760
37415
  children: [
36761
- /* @__PURE__ */ jsx57(
37416
+ /* @__PURE__ */ jsx59(
36762
37417
  "p",
36763
37418
  {
36764
37419
  style: {
@@ -36770,13 +37425,13 @@ function SwapMode({
36770
37425
  children: "Display currency"
36771
37426
  }
36772
37427
  ),
36773
- /* @__PURE__ */ jsxs45(
37428
+ /* @__PURE__ */ jsxs47(
36774
37429
  "div",
36775
37430
  {
36776
37431
  ref: currencyDropdownRef,
36777
37432
  style: { position: "relative", flexShrink: 0 },
36778
37433
  children: [
36779
- /* @__PURE__ */ jsxs45(
37434
+ /* @__PURE__ */ jsxs47(
36780
37435
  "button",
36781
37436
  {
36782
37437
  onClick: () => setShowCurrencyDropdown((v) => !v),
@@ -36796,9 +37451,9 @@ function SwapMode({
36796
37451
  whiteSpace: "nowrap"
36797
37452
  },
36798
37453
  children: [
36799
- /* @__PURE__ */ jsx57("span", { children: currencySymbol }),
36800
- /* @__PURE__ */ jsx57("span", { children: selectedCurrency }),
36801
- /* @__PURE__ */ jsx57(
37454
+ /* @__PURE__ */ jsx59("span", { children: currencySymbol }),
37455
+ /* @__PURE__ */ jsx59("span", { children: selectedCurrency }),
37456
+ /* @__PURE__ */ jsx59(
36802
37457
  "svg",
36803
37458
  {
36804
37459
  style: {
@@ -36814,13 +37469,13 @@ function SwapMode({
36814
37469
  strokeWidth: 2.5,
36815
37470
  strokeLinecap: "round",
36816
37471
  strokeLinejoin: "round",
36817
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
37472
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
36818
37473
  }
36819
37474
  )
36820
37475
  ]
36821
37476
  }
36822
37477
  ),
36823
- showCurrencyDropdown && /* @__PURE__ */ jsx57(
37478
+ showCurrencyDropdown && /* @__PURE__ */ jsx59(
36824
37479
  "div",
36825
37480
  {
36826
37481
  style: {
@@ -36839,7 +37494,7 @@ function SwapMode({
36839
37494
  },
36840
37495
  children: SUPPORTED_CURRENCIES.map((c) => {
36841
37496
  const isSelected = selectedCurrency === c.code;
36842
- return /* @__PURE__ */ jsxs45(
37497
+ return /* @__PURE__ */ jsxs47(
36843
37498
  "button",
36844
37499
  {
36845
37500
  onClick: () => {
@@ -36862,7 +37517,7 @@ function SwapMode({
36862
37517
  fontFamily: "inherit"
36863
37518
  },
36864
37519
  children: [
36865
- /* @__PURE__ */ jsx57(
37520
+ /* @__PURE__ */ jsx59(
36866
37521
  "span",
36867
37522
  {
36868
37523
  style: {
@@ -36873,8 +37528,8 @@ function SwapMode({
36873
37528
  children: c.symbol
36874
37529
  }
36875
37530
  ),
36876
- /* @__PURE__ */ jsx57("span", { style: { flexShrink: 0 }, children: c.code }),
36877
- /* @__PURE__ */ jsx57(
37531
+ /* @__PURE__ */ jsx59("span", { style: { flexShrink: 0 }, children: c.code }),
37532
+ /* @__PURE__ */ jsx59(
36878
37533
  "span",
36879
37534
  {
36880
37535
  style: {
@@ -36909,7 +37564,7 @@ function SwapMode({
36909
37564
  ]
36910
37565
  }
36911
37566
  ),
36912
- /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs45(
37567
+ /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs47(
36913
37568
  "div",
36914
37569
  {
36915
37570
  onMouseEnter: () => setHoverSell(true),
@@ -36921,7 +37576,7 @@ function SwapMode({
36921
37576
  padding: `${spacing[4]} ${spacing[5]} ${spacing[5]}`
36922
37577
  },
36923
37578
  children: [
36924
- /* @__PURE__ */ jsxs45(
37579
+ /* @__PURE__ */ jsxs47(
36925
37580
  "div",
36926
37581
  {
36927
37582
  style: {
@@ -36931,7 +37586,7 @@ function SwapMode({
36931
37586
  marginBottom: spacing[1]
36932
37587
  },
36933
37588
  children: [
36934
- /* @__PURE__ */ jsx57(
37589
+ /* @__PURE__ */ jsx59(
36935
37590
  "span",
36936
37591
  {
36937
37592
  style: {
@@ -36942,7 +37597,7 @@ function SwapMode({
36942
37597
  children: "Sell"
36943
37598
  }
36944
37599
  ),
36945
- /* @__PURE__ */ jsx57(
37600
+ /* @__PURE__ */ jsx59(
36946
37601
  "div",
36947
37602
  {
36948
37603
  style: {
@@ -36953,7 +37608,7 @@ function SwapMode({
36953
37608
  transition: "opacity 0.2s",
36954
37609
  pointerEvents: hoverSell && fromBalance !== null ? "auto" : "none"
36955
37610
  },
36956
- children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx57(
37611
+ children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx59(
36957
37612
  "button",
36958
37613
  {
36959
37614
  onClick: () => {
@@ -37009,12 +37664,12 @@ function SwapMode({
37009
37664
  ]
37010
37665
  }
37011
37666
  ),
37012
- /* @__PURE__ */ jsxs45(
37667
+ /* @__PURE__ */ jsxs47(
37013
37668
  "div",
37014
37669
  {
37015
37670
  style: { display: "flex", alignItems: "center", gap: spacing[3] },
37016
37671
  children: [
37017
- amountInputMode === "usd" && /* @__PURE__ */ jsx57(
37672
+ amountInputMode === "usd" && /* @__PURE__ */ jsx59(
37018
37673
  "span",
37019
37674
  {
37020
37675
  style: {
@@ -37029,7 +37684,7 @@ function SwapMode({
37029
37684
  children: currencySymbol
37030
37685
  }
37031
37686
  ),
37032
- /* @__PURE__ */ jsx57(
37687
+ /* @__PURE__ */ jsx59(
37033
37688
  "input",
37034
37689
  {
37035
37690
  inputMode: "decimal",
@@ -37055,7 +37710,7 @@ function SwapMode({
37055
37710
  }
37056
37711
  }
37057
37712
  ),
37058
- amountInputMode === "token" && fromToken && /* @__PURE__ */ jsx57(
37713
+ amountInputMode === "token" && fromToken && /* @__PURE__ */ jsx59(
37059
37714
  "span",
37060
37715
  {
37061
37716
  style: {
@@ -37070,7 +37725,7 @@ function SwapMode({
37070
37725
  children: fromToken.symbol
37071
37726
  }
37072
37727
  ),
37073
- /* @__PURE__ */ jsx57(
37728
+ /* @__PURE__ */ jsx59(
37074
37729
  TokenPillButton,
37075
37730
  {
37076
37731
  token: fromToken,
@@ -37082,7 +37737,7 @@ function SwapMode({
37082
37737
  ]
37083
37738
  }
37084
37739
  ),
37085
- /* @__PURE__ */ jsxs45(
37740
+ /* @__PURE__ */ jsxs47(
37086
37741
  "div",
37087
37742
  {
37088
37743
  style: {
@@ -37094,7 +37749,7 @@ function SwapMode({
37094
37749
  color: colors.mutedForeground
37095
37750
  },
37096
37751
  children: [
37097
- /* @__PURE__ */ jsxs45(
37752
+ /* @__PURE__ */ jsxs47(
37098
37753
  "button",
37099
37754
  {
37100
37755
  type: "button",
@@ -37112,8 +37767,8 @@ function SwapMode({
37112
37767
  fontFamily: "inherit"
37113
37768
  },
37114
37769
  children: [
37115
- /* @__PURE__ */ jsx57("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
37116
- hasFromUsdPrice && /* @__PURE__ */ jsx57(
37770
+ /* @__PURE__ */ jsx59("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
37771
+ hasFromUsdPrice && /* @__PURE__ */ jsx59(
37117
37772
  "svg",
37118
37773
  {
37119
37774
  style: { width: "0.75rem", height: "0.75rem" },
@@ -37123,17 +37778,17 @@ function SwapMode({
37123
37778
  strokeWidth: 2,
37124
37779
  strokeLinecap: "round",
37125
37780
  strokeLinejoin: "round",
37126
- children: /* @__PURE__ */ jsx57("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
37781
+ children: /* @__PURE__ */ jsx59("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
37127
37782
  }
37128
37783
  )
37129
37784
  ]
37130
37785
  }
37131
37786
  ),
37132
- fromBalance !== null && fromToken && /* @__PURE__ */ jsxs45("span", { children: [
37787
+ fromBalance !== null && fromToken && /* @__PURE__ */ jsxs47("span", { children: [
37133
37788
  fmtAmount(fromBalance, 6),
37134
37789
  " ",
37135
37790
  fromToken.symbol,
37136
- balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ jsxs45("span", { children: [
37791
+ balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ jsxs47("span", { children: [
37137
37792
  " \u2248 ",
37138
37793
  fmtLocal(balanceUsd)
37139
37794
  ] })
@@ -37144,7 +37799,7 @@ function SwapMode({
37144
37799
  ]
37145
37800
  }
37146
37801
  ) }),
37147
- /* @__PURE__ */ jsx57("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx57(
37802
+ /* @__PURE__ */ jsx59("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx59(
37148
37803
  "button",
37149
37804
  {
37150
37805
  onClick: handleFlip,
@@ -37165,7 +37820,7 @@ function SwapMode({
37165
37820
  cursor: lockDestToken ? "default" : "pointer",
37166
37821
  opacity: lockDestToken ? 0.4 : 1
37167
37822
  },
37168
- children: /* @__PURE__ */ jsx57(
37823
+ children: /* @__PURE__ */ jsx59(
37169
37824
  "svg",
37170
37825
  {
37171
37826
  style: {
@@ -37177,7 +37832,7 @@ function SwapMode({
37177
37832
  fill: "none",
37178
37833
  stroke: "currentColor",
37179
37834
  strokeWidth: 2,
37180
- children: /* @__PURE__ */ jsx57(
37835
+ children: /* @__PURE__ */ jsx59(
37181
37836
  "path",
37182
37837
  {
37183
37838
  strokeLinecap: "round",
@@ -37189,7 +37844,7 @@ function SwapMode({
37189
37844
  )
37190
37845
  }
37191
37846
  ) }),
37192
- /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs45(
37847
+ /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs47(
37193
37848
  "div",
37194
37849
  {
37195
37850
  style: {
@@ -37198,7 +37853,7 @@ function SwapMode({
37198
37853
  padding: `${spacing[5]} ${spacing[5]} ${spacing[5]}`
37199
37854
  },
37200
37855
  children: [
37201
- /* @__PURE__ */ jsx57(
37856
+ /* @__PURE__ */ jsx59(
37202
37857
  "span",
37203
37858
  {
37204
37859
  style: {
@@ -37209,7 +37864,7 @@ function SwapMode({
37209
37864
  children: "Buy"
37210
37865
  }
37211
37866
  ),
37212
- /* @__PURE__ */ jsxs45(
37867
+ /* @__PURE__ */ jsxs47(
37213
37868
  "div",
37214
37869
  {
37215
37870
  style: {
@@ -37219,7 +37874,7 @@ function SwapMode({
37219
37874
  marginTop: spacing[1]
37220
37875
  },
37221
37876
  children: [
37222
- /* @__PURE__ */ jsx57(
37877
+ /* @__PURE__ */ jsx59(
37223
37878
  "div",
37224
37879
  {
37225
37880
  style: {
@@ -37232,7 +37887,7 @@ function SwapMode({
37232
37887
  },
37233
37888
  children: displayToAmount !== null ? (() => {
37234
37889
  const s = `${isEstimate ? "~" : ""}${fmtAmount(displayToAmount, 5)}`;
37235
- return /* @__PURE__ */ jsx57(
37890
+ return /* @__PURE__ */ jsx59(
37236
37891
  "span",
37237
37892
  {
37238
37893
  style: {
@@ -37243,7 +37898,7 @@ function SwapMode({
37243
37898
  children: s
37244
37899
  }
37245
37900
  );
37246
- })() : route.loading ? /* @__PURE__ */ jsx57(
37901
+ })() : route.loading ? /* @__PURE__ */ jsx59(
37247
37902
  "span",
37248
37903
  {
37249
37904
  style: {
@@ -37253,7 +37908,7 @@ function SwapMode({
37253
37908
  },
37254
37909
  children: "\u2026"
37255
37910
  }
37256
- ) : /* @__PURE__ */ jsx57(
37911
+ ) : /* @__PURE__ */ jsx59(
37257
37912
  "span",
37258
37913
  {
37259
37914
  style: {
@@ -37266,7 +37921,7 @@ function SwapMode({
37266
37921
  },
37267
37922
  rateUpdated ? "flash" : "stable"
37268
37923
  ),
37269
- /* @__PURE__ */ jsx57(
37924
+ /* @__PURE__ */ jsx59(
37270
37925
  TokenPillButton,
37271
37926
  {
37272
37927
  token: toToken,
@@ -37280,7 +37935,7 @@ function SwapMode({
37280
37935
  ]
37281
37936
  }
37282
37937
  ),
37283
- /* @__PURE__ */ jsxs45(
37938
+ /* @__PURE__ */ jsxs47(
37284
37939
  "div",
37285
37940
  {
37286
37941
  style: {
@@ -37292,8 +37947,8 @@ function SwapMode({
37292
37947
  color: colors.mutedForeground
37293
37948
  },
37294
37949
  children: [
37295
- /* @__PURE__ */ jsx57("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
37296
- priceImpact !== null && /* @__PURE__ */ jsxs45(
37950
+ /* @__PURE__ */ jsx59("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
37951
+ priceImpact !== null && /* @__PURE__ */ jsxs47(
37297
37952
  "span",
37298
37953
  {
37299
37954
  style: {
@@ -37314,7 +37969,7 @@ function SwapMode({
37314
37969
  ]
37315
37970
  }
37316
37971
  ),
37317
- needsDestAddress && toChain && /* @__PURE__ */ jsxs45(
37972
+ needsDestAddress && toChain && /* @__PURE__ */ jsxs47(
37318
37973
  "div",
37319
37974
  {
37320
37975
  style: {
@@ -37323,7 +37978,7 @@ function SwapMode({
37323
37978
  borderTop: "1px solid hsl(var(--tw-border))"
37324
37979
  },
37325
37980
  children: [
37326
- /* @__PURE__ */ jsxs45(
37981
+ /* @__PURE__ */ jsxs47(
37327
37982
  "p",
37328
37983
  {
37329
37984
  style: {
@@ -37338,8 +37993,8 @@ function SwapMode({
37338
37993
  ]
37339
37994
  }
37340
37995
  ),
37341
- /* @__PURE__ */ jsxs45("div", { style: { position: "relative" }, children: [
37342
- /* @__PURE__ */ jsx57(
37996
+ /* @__PURE__ */ jsxs47("div", { style: { position: "relative" }, children: [
37997
+ /* @__PURE__ */ jsx59(
37343
37998
  "input",
37344
37999
  {
37345
38000
  type: "text",
@@ -37362,7 +38017,7 @@ function SwapMode({
37362
38017
  }
37363
38018
  }
37364
38019
  ),
37365
- /* @__PURE__ */ jsx57(
38020
+ /* @__PURE__ */ jsx59(
37366
38021
  "button",
37367
38022
  {
37368
38023
  type: "button",
@@ -37388,7 +38043,7 @@ function SwapMode({
37388
38043
  }
37389
38044
  )
37390
38045
  ] }),
37391
- destAddress && !isValidDestAddress && /* @__PURE__ */ jsxs45(
38046
+ destAddress && !isValidDestAddress && /* @__PURE__ */ jsxs47(
37392
38047
  "p",
37393
38048
  {
37394
38049
  style: {
@@ -37409,7 +38064,7 @@ function SwapMode({
37409
38064
  ]
37410
38065
  }
37411
38066
  ) }),
37412
- route.error && !route.loading && /* @__PURE__ */ jsx57(
38067
+ route.error && !route.loading && /* @__PURE__ */ jsx59(
37413
38068
  "p",
37414
38069
  {
37415
38070
  style: {
@@ -37422,7 +38077,7 @@ function SwapMode({
37422
38077
  children: mapError(route.error).message
37423
38078
  }
37424
38079
  ),
37425
- route.loading && /* @__PURE__ */ jsxs45(
38080
+ route.loading && /* @__PURE__ */ jsxs47(
37426
38081
  "div",
37427
38082
  {
37428
38083
  style: {
@@ -37434,13 +38089,13 @@ function SwapMode({
37434
38089
  padding: `0 ${spacing[3]}`
37435
38090
  },
37436
38091
  children: [
37437
- /* @__PURE__ */ jsx57(
38092
+ /* @__PURE__ */ jsx59(
37438
38093
  "svg",
37439
38094
  {
37440
38095
  className: "tw-animate-spin",
37441
38096
  style: { width: "0.875rem", height: "0.875rem", flexShrink: 0 },
37442
38097
  viewBox: "0 0 88 88",
37443
- children: /* @__PURE__ */ jsx57(
38098
+ children: /* @__PURE__ */ jsx59(
37444
38099
  "circle",
37445
38100
  {
37446
38101
  cx: "44",
@@ -37455,7 +38110,7 @@ function SwapMode({
37455
38110
  )
37456
38111
  }
37457
38112
  ),
37458
- /* @__PURE__ */ jsx57(
38113
+ /* @__PURE__ */ jsx59(
37459
38114
  "span",
37460
38115
  {
37461
38116
  style: {
@@ -37470,7 +38125,7 @@ function SwapMode({
37470
38125
  ]
37471
38126
  }
37472
38127
  ),
37473
- /* @__PURE__ */ jsx57("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx57(
38128
+ /* @__PURE__ */ jsx59("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx59(
37474
38129
  "button",
37475
38130
  {
37476
38131
  disabled: ctaDisabled,
@@ -37499,7 +38154,7 @@ function SwapMode({
37499
38154
  children: ctaLabel
37500
38155
  }
37501
38156
  ) }),
37502
- showRateRow && /* @__PURE__ */ jsxs45(
38157
+ showRateRow && /* @__PURE__ */ jsxs47(
37503
38158
  "div",
37504
38159
  {
37505
38160
  style: {
@@ -37509,7 +38164,7 @@ function SwapMode({
37509
38164
  color: colors.mutedForeground
37510
38165
  },
37511
38166
  children: [
37512
- /* @__PURE__ */ jsxs45(
38167
+ /* @__PURE__ */ jsxs47(
37513
38168
  "button",
37514
38169
  {
37515
38170
  onClick: () => setShowRateDetails((v) => !v),
@@ -37527,7 +38182,7 @@ function SwapMode({
37527
38182
  padding: `${spacing[1]} 0`
37528
38183
  },
37529
38184
  children: [
37530
- /* @__PURE__ */ jsxs45("span", { style: { flex: 1, textAlign: "left" }, children: [
38185
+ /* @__PURE__ */ jsxs47("span", { style: { flex: 1, textAlign: "left" }, children: [
37531
38186
  "1 ",
37532
38187
  toToken?.symbol,
37533
38188
  " = ",
@@ -37535,7 +38190,7 @@ function SwapMode({
37535
38190
  " ",
37536
38191
  fromToken?.symbol
37537
38192
  ] }),
37538
- /* @__PURE__ */ jsxs45(
38193
+ /* @__PURE__ */ jsxs47(
37539
38194
  "span",
37540
38195
  {
37541
38196
  style: {
@@ -37545,15 +38200,15 @@ function SwapMode({
37545
38200
  flexShrink: 0
37546
38201
  },
37547
38202
  children: [
37548
- !isGasSponsored && /* @__PURE__ */ jsx57(GasIcon, {}),
37549
- /* @__PURE__ */ jsx57(
38203
+ !isGasSponsored && /* @__PURE__ */ jsx59(GasIcon, {}),
38204
+ /* @__PURE__ */ jsx59(
37550
38205
  "span",
37551
38206
  {
37552
38207
  style: isGasSponsored ? { color: colors.green[500] } : void 0,
37553
38208
  children: isGasSponsored ? "\u2726 Sponsored" : networkCostUsd !== null ? fmtLocal(networkCostUsd) : "\u2014"
37554
38209
  }
37555
38210
  ),
37556
- route.data && /* @__PURE__ */ jsxs45(
38211
+ route.data && /* @__PURE__ */ jsxs47(
37557
38212
  "svg",
37558
38213
  {
37559
38214
  width: "14",
@@ -37565,7 +38220,7 @@ function SwapMode({
37565
38220
  opacity: 0.75
37566
38221
  },
37567
38222
  children: [
37568
- /* @__PURE__ */ jsx57(
38223
+ /* @__PURE__ */ jsx59(
37569
38224
  "circle",
37570
38225
  {
37571
38226
  cx: "7",
@@ -37576,7 +38231,7 @@ function SwapMode({
37576
38231
  strokeWidth: "1.5"
37577
38232
  }
37578
38233
  ),
37579
- /* @__PURE__ */ jsx57(
38234
+ /* @__PURE__ */ jsx59(
37580
38235
  "circle",
37581
38236
  {
37582
38237
  cx: "7",
@@ -37594,7 +38249,7 @@ function SwapMode({
37594
38249
  ]
37595
38250
  }
37596
38251
  ),
37597
- /* @__PURE__ */ jsx57(
38252
+ /* @__PURE__ */ jsx59(
37598
38253
  "svg",
37599
38254
  {
37600
38255
  style: {
@@ -37609,7 +38264,7 @@ function SwapMode({
37609
38264
  strokeWidth: 2,
37610
38265
  strokeLinecap: "round",
37611
38266
  strokeLinejoin: "round",
37612
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
38267
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
37613
38268
  }
37614
38269
  )
37615
38270
  ]
@@ -37618,7 +38273,7 @@ function SwapMode({
37618
38273
  ]
37619
38274
  }
37620
38275
  ),
37621
- showRateDetails && /* @__PURE__ */ jsxs45(
38276
+ showRateDetails && /* @__PURE__ */ jsxs47(
37622
38277
  "div",
37623
38278
  {
37624
38279
  style: {
@@ -37630,18 +38285,18 @@ function SwapMode({
37630
38285
  gap: spacing[2.5]
37631
38286
  },
37632
38287
  children: [
37633
- /* @__PURE__ */ jsx57(
38288
+ /* @__PURE__ */ jsx59(
37634
38289
  RateRow,
37635
38290
  {
37636
38291
  label: "Fee",
37637
38292
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
37638
38293
  }
37639
38294
  ),
37640
- /* @__PURE__ */ jsx57(
38295
+ /* @__PURE__ */ jsx59(
37641
38296
  RateRow,
37642
38297
  {
37643
38298
  label: "Network cost",
37644
- value: isGasSponsored ? /* @__PURE__ */ jsx57(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs45(
38299
+ value: isGasSponsored ? /* @__PURE__ */ jsx59(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs47(
37645
38300
  "span",
37646
38301
  {
37647
38302
  style: {
@@ -37650,19 +38305,19 @@ function SwapMode({
37650
38305
  gap: "0.25rem"
37651
38306
  },
37652
38307
  children: [
37653
- /* @__PURE__ */ jsx57(GasIcon, { size: "0.75rem" }),
38308
+ /* @__PURE__ */ jsx59(GasIcon, { size: "0.75rem" }),
37654
38309
  fmtLocal(networkCostUsd)
37655
38310
  ]
37656
38311
  }
37657
- ) : /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
38312
+ ) : /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
37658
38313
  }
37659
38314
  ),
37660
- /* @__PURE__ */ jsx57(RateRow, { label: "Max slippage", value: `${slippage}%` }),
37661
- /* @__PURE__ */ jsx57(
38315
+ /* @__PURE__ */ jsx59(RateRow, { label: "Max slippage", value: `${slippage}%` }),
38316
+ /* @__PURE__ */ jsx59(
37662
38317
  RateRow,
37663
38318
  {
37664
38319
  label: "Route",
37665
- value: routePath ? /* @__PURE__ */ jsx57(
38320
+ value: routePath ? /* @__PURE__ */ jsx59(
37666
38321
  "span",
37667
38322
  {
37668
38323
  style: {
@@ -37676,7 +38331,7 @@ function SwapMode({
37676
38331
  title: routePath,
37677
38332
  children: routePath
37678
38333
  }
37679
- ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
38334
+ ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
37680
38335
  }
37681
38336
  )
37682
38337
  ]
@@ -37685,7 +38340,7 @@ function SwapMode({
37685
38340
  ]
37686
38341
  }
37687
38342
  ),
37688
- /* @__PURE__ */ jsx57(WidgetSecurityFooter, {})
38343
+ /* @__PURE__ */ jsx59(WidgetSecurityFooter, {})
37689
38344
  ]
37690
38345
  }
37691
38346
  ) });
@@ -37713,8 +38368,8 @@ function SwapActionArea({
37713
38368
  label = "Swap";
37714
38369
  }
37715
38370
  const isDisabled = isSubmitting || isChecking;
37716
- return /* @__PURE__ */ jsxs45("div", { style: { marginTop: spacing[6] }, children: [
37717
- isGasSponsored && !isSubmitting && /* @__PURE__ */ jsxs45(
38371
+ return /* @__PURE__ */ jsxs47("div", { style: { marginTop: spacing[6] }, children: [
38372
+ isGasSponsored && !isSubmitting && /* @__PURE__ */ jsxs47(
37718
38373
  "div",
37719
38374
  {
37720
38375
  style: {
@@ -37725,7 +38380,7 @@ function SwapActionArea({
37725
38380
  marginBottom: spacing[3]
37726
38381
  },
37727
38382
  children: [
37728
- /* @__PURE__ */ jsx57(
38383
+ /* @__PURE__ */ jsx59(
37729
38384
  "svg",
37730
38385
  {
37731
38386
  style: {
@@ -37735,10 +38390,10 @@ function SwapActionArea({
37735
38390
  },
37736
38391
  viewBox: "0 0 24 24",
37737
38392
  fill: "currentColor",
37738
- children: /* @__PURE__ */ jsx57("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38393
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
37739
38394
  }
37740
38395
  ),
37741
- /* @__PURE__ */ jsx57(
38396
+ /* @__PURE__ */ jsx59(
37742
38397
  "span",
37743
38398
  {
37744
38399
  style: {
@@ -37752,7 +38407,7 @@ function SwapActionArea({
37752
38407
  ]
37753
38408
  }
37754
38409
  ),
37755
- /* @__PURE__ */ jsx57(
38410
+ /* @__PURE__ */ jsx59(
37756
38411
  "button",
37757
38412
  {
37758
38413
  onClick: onExecute,
@@ -37775,7 +38430,7 @@ function SwapActionArea({
37775
38430
  children: label
37776
38431
  }
37777
38432
  ),
37778
- needsApproval && !isSubmitting && /* @__PURE__ */ jsxs45(
38433
+ needsApproval && !isSubmitting && /* @__PURE__ */ jsxs47(
37779
38434
  "p",
37780
38435
  {
37781
38436
  style: {
@@ -37807,7 +38462,7 @@ function TokenPillButton({
37807
38462
  const iconUrl = token?.iconUrl ?? token?.logoURI;
37808
38463
  const chainIcon = chain?.chainIconURI;
37809
38464
  if (!token) {
37810
- return /* @__PURE__ */ jsxs45(
38465
+ return /* @__PURE__ */ jsxs47(
37811
38466
  "button",
37812
38467
  {
37813
38468
  onClick: disabled ? void 0 : onClick,
@@ -37830,7 +38485,7 @@ function TokenPillButton({
37830
38485
  },
37831
38486
  children: [
37832
38487
  placeholder,
37833
- /* @__PURE__ */ jsx57(
38488
+ /* @__PURE__ */ jsx59(
37834
38489
  "svg",
37835
38490
  {
37836
38491
  style: { width: "1rem", height: "1rem" },
@@ -37838,7 +38493,7 @@ function TokenPillButton({
37838
38493
  fill: "none",
37839
38494
  stroke: "currentColor",
37840
38495
  strokeWidth: 2,
37841
- children: /* @__PURE__ */ jsx57(
38496
+ children: /* @__PURE__ */ jsx59(
37842
38497
  "path",
37843
38498
  {
37844
38499
  strokeLinecap: "round",
@@ -37852,7 +38507,7 @@ function TokenPillButton({
37852
38507
  }
37853
38508
  );
37854
38509
  }
37855
- return /* @__PURE__ */ jsxs45(
38510
+ return /* @__PURE__ */ jsxs47(
37856
38511
  "button",
37857
38512
  {
37858
38513
  onClick: disabled ? void 0 : onClick,
@@ -37872,8 +38527,8 @@ function TokenPillButton({
37872
38527
  opacity: disabled ? 0.85 : 1
37873
38528
  },
37874
38529
  children: [
37875
- /* @__PURE__ */ jsxs45("div", { style: { position: "relative" }, children: [
37876
- iconUrl ? /* @__PURE__ */ jsx57(
38530
+ /* @__PURE__ */ jsxs47("div", { style: { position: "relative" }, children: [
38531
+ iconUrl ? /* @__PURE__ */ jsx59(
37877
38532
  "img",
37878
38533
  {
37879
38534
  src: iconUrl,
@@ -37885,7 +38540,7 @@ function TokenPillButton({
37885
38540
  objectFit: "cover"
37886
38541
  }
37887
38542
  }
37888
- ) : /* @__PURE__ */ jsx57(
38543
+ ) : /* @__PURE__ */ jsx59(
37889
38544
  "div",
37890
38545
  {
37891
38546
  style: {
@@ -37897,7 +38552,7 @@ function TokenPillButton({
37897
38552
  alignItems: "center",
37898
38553
  justifyContent: "center"
37899
38554
  },
37900
- children: /* @__PURE__ */ jsx57(
38555
+ children: /* @__PURE__ */ jsx59(
37901
38556
  "span",
37902
38557
  {
37903
38558
  style: {
@@ -37910,7 +38565,7 @@ function TokenPillButton({
37910
38565
  )
37911
38566
  }
37912
38567
  ),
37913
- chainIcon && /* @__PURE__ */ jsx57(
38568
+ chainIcon && /* @__PURE__ */ jsx59(
37914
38569
  "img",
37915
38570
  {
37916
38571
  src: chainIcon,
@@ -37928,7 +38583,7 @@ function TokenPillButton({
37928
38583
  }
37929
38584
  )
37930
38585
  ] }),
37931
- /* @__PURE__ */ jsx57(
38586
+ /* @__PURE__ */ jsx59(
37932
38587
  "span",
37933
38588
  {
37934
38589
  style: {
@@ -37939,7 +38594,7 @@ function TokenPillButton({
37939
38594
  children: token.symbol
37940
38595
  }
37941
38596
  ),
37942
- !disabled && /* @__PURE__ */ jsx57(
38597
+ !disabled && /* @__PURE__ */ jsx59(
37943
38598
  "svg",
37944
38599
  {
37945
38600
  style: {
@@ -37951,7 +38606,7 @@ function TokenPillButton({
37951
38606
  fill: "none",
37952
38607
  stroke: "currentColor",
37953
38608
  strokeWidth: 2,
37954
- children: /* @__PURE__ */ jsx57(
38609
+ children: /* @__PURE__ */ jsx59(
37955
38610
  "path",
37956
38611
  {
37957
38612
  strokeLinecap: "round",
@@ -37972,8 +38627,8 @@ function TokenIcon({
37972
38627
  }) {
37973
38628
  const imgSize = size === "lg" ? "2.75rem" : "2.5rem";
37974
38629
  const badgeSize = size === "lg" ? "1.125rem" : "1rem";
37975
- return /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
37976
- /* @__PURE__ */ jsx57(
38630
+ return /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
38631
+ /* @__PURE__ */ jsx59(
37977
38632
  "img",
37978
38633
  {
37979
38634
  src: icon,
@@ -37981,7 +38636,7 @@ function TokenIcon({
37981
38636
  style: { width: imgSize, height: imgSize, borderRadius: "9999px" }
37982
38637
  }
37983
38638
  ),
37984
- chainIcon && /* @__PURE__ */ jsx57(
38639
+ chainIcon && /* @__PURE__ */ jsx59(
37985
38640
  "img",
37986
38641
  {
37987
38642
  src: chainIcon,
@@ -38005,15 +38660,15 @@ function ReviewDetailRow({
38005
38660
  value,
38006
38661
  tooltip
38007
38662
  }) {
38008
- const iconRef = useRef18(null);
38009
- const [tipPos, setTipPos] = useState32(null);
38663
+ const iconRef = useRef19(null);
38664
+ const [tipPos, setTipPos] = useState33(null);
38010
38665
  const handleMouseEnter = () => {
38011
38666
  if (!tooltip || !iconRef.current) return;
38012
38667
  const r = iconRef.current.getBoundingClientRect();
38013
38668
  setTipPos({ x: r.left + r.width / 2, y: r.top - 8 });
38014
38669
  };
38015
38670
  const handleMouseLeave = () => setTipPos(null);
38016
- return /* @__PURE__ */ jsxs45(
38671
+ return /* @__PURE__ */ jsxs47(
38017
38672
  "div",
38018
38673
  {
38019
38674
  style: {
@@ -38022,7 +38677,7 @@ function ReviewDetailRow({
38022
38677
  justifyContent: "space-between"
38023
38678
  },
38024
38679
  children: [
38025
- /* @__PURE__ */ jsxs45(
38680
+ /* @__PURE__ */ jsxs47(
38026
38681
  "span",
38027
38682
  {
38028
38683
  style: {
@@ -38033,14 +38688,14 @@ function ReviewDetailRow({
38033
38688
  },
38034
38689
  children: [
38035
38690
  label,
38036
- /* @__PURE__ */ jsx57(
38691
+ /* @__PURE__ */ jsx59(
38037
38692
  "span",
38038
38693
  {
38039
38694
  ref: iconRef,
38040
38695
  style: { display: "inline-flex", alignItems: "center" },
38041
38696
  onMouseEnter: handleMouseEnter,
38042
38697
  onMouseLeave: handleMouseLeave,
38043
- children: /* @__PURE__ */ jsxs45(
38698
+ children: /* @__PURE__ */ jsxs47(
38044
38699
  "svg",
38045
38700
  {
38046
38701
  style: {
@@ -38056,8 +38711,8 @@ function ReviewDetailRow({
38056
38711
  strokeLinecap: "round",
38057
38712
  strokeLinejoin: "round",
38058
38713
  children: [
38059
- /* @__PURE__ */ jsx57("circle", { cx: "12", cy: "12", r: "10" }),
38060
- /* @__PURE__ */ jsx57("path", { d: "M12 16v-4M12 8h.01" })
38714
+ /* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "10" }),
38715
+ /* @__PURE__ */ jsx59("path", { d: "M12 16v-4M12 8h.01" })
38061
38716
  ]
38062
38717
  }
38063
38718
  )
@@ -38066,9 +38721,9 @@ function ReviewDetailRow({
38066
38721
  ]
38067
38722
  }
38068
38723
  ),
38069
- /* @__PURE__ */ jsx57("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
38724
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
38070
38725
  tooltip && tipPos && typeof document !== "undefined" && ReactDOM.createPortal(
38071
- /* @__PURE__ */ jsx57(
38726
+ /* @__PURE__ */ jsx59(
38072
38727
  "span",
38073
38728
  {
38074
38729
  style: {
@@ -38097,7 +38752,7 @@ function ReviewDetailRow({
38097
38752
  );
38098
38753
  }
38099
38754
  function GasIcon({ size = "0.875rem" }) {
38100
- return /* @__PURE__ */ jsxs45(
38755
+ return /* @__PURE__ */ jsxs47(
38101
38756
  "svg",
38102
38757
  {
38103
38758
  style: { width: size, height: size, flexShrink: 0 },
@@ -38108,16 +38763,16 @@ function GasIcon({ size = "0.875rem" }) {
38108
38763
  strokeLinecap: "round",
38109
38764
  strokeLinejoin: "round",
38110
38765
  children: [
38111
- /* @__PURE__ */ jsx57("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
38112
- /* @__PURE__ */ jsx57("path", { d: "M3 11h11" }),
38113
- /* @__PURE__ */ jsx57("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
38114
- /* @__PURE__ */ jsx57("path", { d: "M19 22V12" })
38766
+ /* @__PURE__ */ jsx59("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
38767
+ /* @__PURE__ */ jsx59("path", { d: "M3 11h11" }),
38768
+ /* @__PURE__ */ jsx59("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
38769
+ /* @__PURE__ */ jsx59("path", { d: "M19 22V12" })
38115
38770
  ]
38116
38771
  }
38117
38772
  );
38118
38773
  }
38119
38774
  function SponsoredBadge() {
38120
- return /* @__PURE__ */ jsxs45(
38775
+ return /* @__PURE__ */ jsxs47(
38121
38776
  "span",
38122
38777
  {
38123
38778
  style: {
@@ -38128,13 +38783,13 @@ function SponsoredBadge() {
38128
38783
  fontWeight: fontWeight.medium
38129
38784
  },
38130
38785
  children: [
38131
- /* @__PURE__ */ jsx57(
38786
+ /* @__PURE__ */ jsx59(
38132
38787
  "svg",
38133
38788
  {
38134
38789
  style: { width: "0.75rem", height: "0.75rem" },
38135
38790
  viewBox: "0 0 24 24",
38136
38791
  fill: "currentColor",
38137
- children: /* @__PURE__ */ jsx57("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38792
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38138
38793
  }
38139
38794
  ),
38140
38795
  "Sponsored"
@@ -38146,7 +38801,7 @@ function SuccessReceiptRow({
38146
38801
  label,
38147
38802
  value
38148
38803
  }) {
38149
- return /* @__PURE__ */ jsxs45(
38804
+ return /* @__PURE__ */ jsxs47(
38150
38805
  "div",
38151
38806
  {
38152
38807
  style: {
@@ -38155,8 +38810,8 @@ function SuccessReceiptRow({
38155
38810
  justifyContent: "space-between"
38156
38811
  },
38157
38812
  children: [
38158
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: label }),
38159
- /* @__PURE__ */ jsx57("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
38813
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: label }),
38814
+ /* @__PURE__ */ jsx59("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
38160
38815
  ]
38161
38816
  }
38162
38817
  );
@@ -38170,7 +38825,7 @@ function ProcessingStepNode({
38170
38825
  const nodeColor = done ? colors.green[500] : active ? `hsl(var(--tw-primary))` : colors.border;
38171
38826
  const iconColor = done ? "#fff" : active ? `hsl(var(--tw-primary))` : colors.mutedForeground;
38172
38827
  const nodeBg = done ? colors.green[500] : "transparent";
38173
- const iconEl = icon === "send" ? /* @__PURE__ */ jsx57(
38828
+ const iconEl = icon === "send" ? /* @__PURE__ */ jsx59(
38174
38829
  "svg",
38175
38830
  {
38176
38831
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38180,9 +38835,9 @@ function ProcessingStepNode({
38180
38835
  strokeWidth: 2,
38181
38836
  strokeLinecap: "round",
38182
38837
  strokeLinejoin: "round",
38183
- children: /* @__PURE__ */ jsx57("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
38838
+ children: /* @__PURE__ */ jsx59("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
38184
38839
  }
38185
- ) : icon === "plus" ? /* @__PURE__ */ jsx57(
38840
+ ) : icon === "plus" ? /* @__PURE__ */ jsx59(
38186
38841
  "svg",
38187
38842
  {
38188
38843
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38192,9 +38847,9 @@ function ProcessingStepNode({
38192
38847
  strokeWidth: 2,
38193
38848
  strokeLinecap: "round",
38194
38849
  strokeLinejoin: "round",
38195
- children: /* @__PURE__ */ jsx57("path", { d: "M12 5v14M5 12h14" })
38850
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 5v14M5 12h14" })
38196
38851
  }
38197
- ) : /* @__PURE__ */ jsxs45(
38852
+ ) : /* @__PURE__ */ jsxs47(
38198
38853
  "svg",
38199
38854
  {
38200
38855
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38205,12 +38860,12 @@ function ProcessingStepNode({
38205
38860
  strokeLinecap: "round",
38206
38861
  strokeLinejoin: "round",
38207
38862
  children: [
38208
- /* @__PURE__ */ jsx57("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),
38209
- /* @__PURE__ */ jsx57("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
38863
+ /* @__PURE__ */ jsx59("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),
38864
+ /* @__PURE__ */ jsx59("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
38210
38865
  ]
38211
38866
  }
38212
38867
  );
38213
- const doneIcon = /* @__PURE__ */ jsx57(
38868
+ const doneIcon = /* @__PURE__ */ jsx59(
38214
38869
  "svg",
38215
38870
  {
38216
38871
  style: { width: "0.875rem", height: "0.875rem", color: "#fff" },
@@ -38220,10 +38875,10 @@ function ProcessingStepNode({
38220
38875
  strokeWidth: 3,
38221
38876
  strokeLinecap: "round",
38222
38877
  strokeLinejoin: "round",
38223
- children: /* @__PURE__ */ jsx57("path", { d: "M20 6L9 17l-5-5" })
38878
+ children: /* @__PURE__ */ jsx59("path", { d: "M20 6L9 17l-5-5" })
38224
38879
  }
38225
38880
  );
38226
- return /* @__PURE__ */ jsxs45(
38881
+ return /* @__PURE__ */ jsxs47(
38227
38882
  "div",
38228
38883
  {
38229
38884
  style: {
@@ -38234,7 +38889,7 @@ function ProcessingStepNode({
38234
38889
  maxWidth: "5rem"
38235
38890
  },
38236
38891
  children: [
38237
- /* @__PURE__ */ jsx57(
38892
+ /* @__PURE__ */ jsx59(
38238
38893
  "div",
38239
38894
  {
38240
38895
  style: {
@@ -38252,7 +38907,7 @@ function ProcessingStepNode({
38252
38907
  children: done ? doneIcon : iconEl
38253
38908
  }
38254
38909
  ),
38255
- /* @__PURE__ */ jsx57(
38910
+ /* @__PURE__ */ jsx59(
38256
38911
  "span",
38257
38912
  {
38258
38913
  style: {
@@ -38271,7 +38926,7 @@ function ProcessingStepNode({
38271
38926
  );
38272
38927
  }
38273
38928
  function ProcessingStepLine({ done }) {
38274
- return /* @__PURE__ */ jsx57(
38929
+ return /* @__PURE__ */ jsx59(
38275
38930
  "div",
38276
38931
  {
38277
38932
  style: {
@@ -38307,8 +38962,8 @@ var init_SwapMode = __esm({
38307
38962
  init_useSwapExecution();
38308
38963
  init_useForex();
38309
38964
  init_SwapTokenSelect();
38310
- init_SwapWalletSelector();
38311
38965
  init_currency();
38966
+ init_components2();
38312
38967
  ConfettiEffect3 = lazy2(
38313
38968
  () => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports))
38314
38969
  );
@@ -38341,14 +38996,14 @@ var init_swap = __esm({
38341
38996
 
38342
38997
  // src/widget/TrustwareWidgetV2.tsx
38343
38998
  import {
38344
- useState as useState33,
38345
- useEffect as useEffect33,
38346
- useRef as useRef19,
38999
+ useState as useState34,
39000
+ useEffect as useEffect34,
39001
+ useRef as useRef20,
38347
39002
  useCallback as useCallback23,
38348
39003
  useImperativeHandle,
38349
39004
  forwardRef
38350
39005
  } from "react";
38351
- import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
39006
+ import { Fragment as Fragment13, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
38352
39007
  function WidgetContent({
38353
39008
  style,
38354
39009
  onStateChange,
@@ -38359,7 +39014,7 @@ function WidgetContent({
38359
39014
  const { transactionHash, transactionStatus } = useDepositTransaction();
38360
39015
  const { resolvedTheme, toggleTheme } = useDepositUi();
38361
39016
  useWalletExternalDisconnect(() => setCurrentStep("home"));
38362
- useEffect33(() => {
39017
+ useEffect34(() => {
38363
39018
  const state = {
38364
39019
  currentStep,
38365
39020
  amount,
@@ -38379,9 +39034,9 @@ function WidgetContent({
38379
39034
  transactionStatus,
38380
39035
  onStateChange
38381
39036
  ]);
38382
- return /* @__PURE__ */ jsxs46("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
38383
- showThemeToggle && /* @__PURE__ */ jsx58("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx58(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
38384
- /* @__PURE__ */ jsx58(
39037
+ return /* @__PURE__ */ jsxs48("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
39038
+ showThemeToggle && /* @__PURE__ */ jsx60("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx60(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
39039
+ /* @__PURE__ */ jsx60(
38385
39040
  WidgetRouter,
38386
39041
  {
38387
39042
  currentStep,
@@ -38402,7 +39057,7 @@ function WidgetInner({
38402
39057
  const { transactionStatus } = useDepositTransaction();
38403
39058
  const { resolvedTheme } = useDepositUi();
38404
39059
  const { status, revalidate, errors } = useTrustware();
38405
- const [showConfirmDialog, setShowConfirmDialog] = useState33(false);
39060
+ const [showConfirmDialog, setShowConfirmDialog] = useState34(false);
38406
39061
  const handleCloseRequest = useCallback23(() => {
38407
39062
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
38408
39063
  setShowConfirmDialog(true);
@@ -38414,7 +39069,7 @@ function WidgetInner({
38414
39069
  onClose?.();
38415
39070
  }
38416
39071
  }, [transactionStatus, onClose, resetState]);
38417
- useEffect33(() => {
39072
+ useEffect34(() => {
38418
39073
  closeRequestRef.current = handleCloseRequest;
38419
39074
  }, [handleCloseRequest, closeRequestRef]);
38420
39075
  const handleConfirmClose = useCallback23(() => {
@@ -38430,16 +39085,16 @@ function WidgetInner({
38430
39085
  const handleRefresh = useCallback23(() => {
38431
39086
  revalidate?.();
38432
39087
  }, [revalidate]);
38433
- return /* @__PURE__ */ jsxs46(Fragment11, { children: [
38434
- /* @__PURE__ */ jsxs46(WidgetContainer, { theme: effectiveTheme, style, children: [
38435
- /* @__PURE__ */ jsx58(
39088
+ return /* @__PURE__ */ jsxs48(Fragment13, { children: [
39089
+ /* @__PURE__ */ jsxs48(WidgetContainer, { theme: effectiveTheme, style, children: [
39090
+ /* @__PURE__ */ jsx60(
38436
39091
  WidgetContent,
38437
39092
  {
38438
39093
  onStateChange,
38439
39094
  showThemeToggle
38440
39095
  }
38441
39096
  ),
38442
- /* @__PURE__ */ jsx58(
39097
+ /* @__PURE__ */ jsx60(
38443
39098
  InitErrorOverlay,
38444
39099
  {
38445
39100
  open: initBlocked,
@@ -38450,7 +39105,7 @@ function WidgetInner({
38450
39105
  }
38451
39106
  )
38452
39107
  ] }),
38453
- /* @__PURE__ */ jsx58(
39108
+ /* @__PURE__ */ jsx60(
38454
39109
  ConfirmCloseDialog,
38455
39110
  {
38456
39111
  open: showConfirmDialog,
@@ -38498,8 +39153,8 @@ var init_TrustwareWidgetV2 = __esm({
38498
39153
  onOpen,
38499
39154
  showThemeToggle = true
38500
39155
  }, ref) {
38501
- const [isOpen, setIsOpen] = useState33(defaultOpen);
38502
- const closeRequestRef = useRef19(null);
39156
+ const [isOpen, setIsOpen] = useState34(defaultOpen);
39157
+ const closeRequestRef = useRef20(null);
38503
39158
  const config = useTrustwareConfig();
38504
39159
  const effectiveInitialStep = initialStep;
38505
39160
  const open = useCallback23(() => {
@@ -38531,9 +39186,9 @@ var init_TrustwareWidgetV2 = __esm({
38531
39186
  return null;
38532
39187
  }
38533
39188
  if (config.features.swapMode) {
38534
- return /* @__PURE__ */ jsx58(SwapMode, { theme, style });
39189
+ return /* @__PURE__ */ jsx60(SwapMode, { theme, style });
38535
39190
  }
38536
- return /* @__PURE__ */ jsx58(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx58(
39191
+ return /* @__PURE__ */ jsx60(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx60(
38537
39192
  WidgetInner,
38538
39193
  {
38539
39194
  theme,