@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/index.mjs CHANGED
@@ -408,7 +408,7 @@ var init_constants = __esm({
408
408
  "src/constants.ts"() {
409
409
  "use strict";
410
410
  SDK_NAME = "@trustware/sdk";
411
- SDK_VERSION = "1.1.9-staging.3";
411
+ SDK_VERSION = "1.1.9-staging.5";
412
412
  API_ROOT = "https://bv-staging-api.trustware.io";
413
413
  GTM_ID = "GTM-TZDGNCXB";
414
414
  API_PREFIX = "/api";
@@ -16260,7 +16260,7 @@ function MobileWalletDropdownContent({
16260
16260
  const mobileWallets = useMemo17(
16261
16261
  () => WALLETS.filter((w) => {
16262
16262
  if (w.id === "walletconnect") return true;
16263
- const hasMobileLink = Boolean(w.deepLink || w.ios || w.android);
16263
+ const hasMobileLink = Boolean(w.deepLink);
16264
16264
  if (!hasMobileLink) return false;
16265
16265
  return w.ecosystem.trim().toLowerCase() === "multi" || w.ecosystem.trim().toLowerCase() === selectedNamespace.trim().toLowerCase();
16266
16266
  }),
@@ -33555,10 +33555,83 @@ var init_SwapTokenSelect = __esm({
33555
33555
  }
33556
33556
  });
33557
33557
 
33558
- // src/modes/swap/components/SwapWalletSelector.tsx
33558
+ // src/modes/swap/currency.ts
33559
+ function getCurrencyMeta(code) {
33560
+ return BY_CODE.get(code.toUpperCase()) ?? SUPPORTED_CURRENCIES[0];
33561
+ }
33562
+ function fmtCurrency(usdAmount, code, rate) {
33563
+ const meta = getCurrencyMeta(code);
33564
+ const local = usdAmount * rate;
33565
+ return meta.symbol + local.toFixed(meta.decimals);
33566
+ }
33567
+ var SUPPORTED_CURRENCIES, BY_CODE;
33568
+ var init_currency = __esm({
33569
+ "src/modes/swap/currency.ts"() {
33570
+ "use strict";
33571
+ SUPPORTED_CURRENCIES = [
33572
+ { code: "USD", symbol: "$", name: "US Dollar", decimals: 2 },
33573
+ { code: "EUR", symbol: "\u20AC", name: "Euro", decimals: 2 },
33574
+ { code: "GBP", symbol: "\xA3", name: "British Pound", decimals: 2 },
33575
+ { code: "CAD", symbol: "CA$", name: "Canadian Dollar", decimals: 2 },
33576
+ { code: "AUD", symbol: "A$", name: "Australian Dollar", decimals: 2 },
33577
+ { code: "JPY", symbol: "\xA5", name: "Japanese Yen", decimals: 0 },
33578
+ { code: "CHF", symbol: "Fr", name: "Swiss Franc", decimals: 2 },
33579
+ { code: "KRW", symbol: "\u20A9", name: "South Korean Won", decimals: 0 },
33580
+ { code: "INR", symbol: "\u20B9", name: "Indian Rupee", decimals: 2 },
33581
+ { code: "BRL", symbol: "R$", name: "Brazilian Real", decimals: 2 },
33582
+ { code: "SGD", symbol: "S$", name: "Singapore Dollar", decimals: 2 },
33583
+ { code: "MXN", symbol: "MX$", name: "Mexican Peso", decimals: 2 },
33584
+ { code: "HKD", symbol: "HK$", name: "Hong Kong Dollar", decimals: 2 },
33585
+ { code: "CNY", symbol: "\xA5", name: "Chinese Yuan", decimals: 2 },
33586
+ { code: "ZAR", symbol: "R", name: "South African Rand", decimals: 2 },
33587
+ { code: "TRY", symbol: "\u20BA", name: "Turkish Lira", decimals: 2 },
33588
+ { code: "RUB", symbol: "\u20BD", name: "Russian Ruble", decimals: 2 },
33589
+ {
33590
+ code: "AED",
33591
+ symbol: "\u062F.\u0625",
33592
+ name: "United Arab Emirates Dirham",
33593
+ decimals: 2
33594
+ },
33595
+ { code: "SAR", symbol: "\uFDFC", name: "Saudi Riyal", decimals: 2 },
33596
+ { code: "QAR", symbol: "\uFDFC", name: "Qatari Riyal", decimals: 2 },
33597
+ { code: "KWD", symbol: "\u062F.\u0643", name: "Kuwaiti Dinar", decimals: 3 },
33598
+ { code: "OMR", symbol: "\u0631.\u0639.", name: "Omani Rial", decimals: 3 },
33599
+ { code: "BHD", symbol: "\u0628.\u062F", name: "Bahraini Dinar", decimals: 3 },
33600
+ { code: "JOD", symbol: "\u062F.\u0627", name: "Jordanian Dinar", decimals: 3 },
33601
+ { code: "LYD", symbol: "\u0644.\u062F", name: "Libyan Dinar", decimals: 3 },
33602
+ { code: "TND", symbol: "\u062F.\u062A", name: "Tunisian Dinar", decimals: 3 },
33603
+ { code: "MAD", symbol: "\u062F.\u0645.", name: "Moroccan Dirham", decimals: 2 },
33604
+ { code: "EGP", symbol: "\xA3", name: "Egyptian Pound", decimals: 2 },
33605
+ { code: "NGN", symbol: "\u20A6", name: "Nigerian Naira", decimals: 2 },
33606
+ { code: "GHS", symbol: "\u20B5", name: "Ghanaian Cedi", decimals: 2 },
33607
+ { code: "KES", symbol: "KSh", name: "Kenyan Shilling", decimals: 2 },
33608
+ { code: "TZS", symbol: "TSh", name: "Tanzanian Shilling", decimals: 2 },
33609
+ { code: "UGX", symbol: "USh", name: "Ugandan Shilling", decimals: 2 },
33610
+ { code: "RWF", symbol: "FRw", name: "Rwandan Franc", decimals: 2 },
33611
+ { code: "MUR", symbol: "Rs", name: "Mauritian Rupee", decimals: 2 },
33612
+ { code: "SCR", symbol: "SR", name: "Seychellois Rupee", decimals: 2 },
33613
+ { code: "MGA", symbol: "Ar", name: "Malagasy Ariary", decimals: 2 },
33614
+ {
33615
+ code: "XAF",
33616
+ symbol: "FCFA",
33617
+ name: "Central African CFA Franc",
33618
+ decimals: 2
33619
+ },
33620
+ { code: "XOF", symbol: "CFA", name: "West African CFA Franc", decimals: 2 },
33621
+ { code: "XPF", symbol: "CFP", name: "CFP Franc", decimals: 2 },
33622
+ { code: "XCD", symbol: "EC$", name: "East Caribbean Dollar", decimals: 2 },
33623
+ { code: "XDR", symbol: "SDR", name: "Special Drawing Rights", decimals: 2 },
33624
+ { code: "XAU", symbol: "Au", name: "Gold (troy ounce)", decimals: 2 },
33625
+ { code: "XAG", symbol: "Ag", name: "Silver (troy ounce)", decimals: 2 }
33626
+ ];
33627
+ BY_CODE = new Map(SUPPORTED_CURRENCIES.map((c) => [c.code, c]));
33628
+ }
33629
+ });
33630
+
33631
+ // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx
33559
33632
  import { useEffect as useEffect31, useMemo as useMemo27, useRef as useRef17, useState as useState31 } from "react";
33560
33633
  import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs44 } from "react/jsx-runtime";
33561
- function SwapWalletSelector({
33634
+ function SwapWalletSelectorMobile({
33562
33635
  walletStatus,
33563
33636
  walletAddress,
33564
33637
  connectWallet,
@@ -33570,19 +33643,625 @@ function SwapWalletSelector({
33570
33643
  walletMetaId,
33571
33644
  connectedVia,
33572
33645
  disconnect
33646
+ // status,
33573
33647
  } = useWalletInfo();
33574
33648
  const walletConnectCfg = TrustwareConfigStore.peek()?.walletConnect;
33575
33649
  const connectWC = useWalletConnectConnect(walletConnectCfg);
33576
33650
  const [wcConnecting, setWcConnecting] = useState31(false);
33577
33651
  const [connectingId, setConnectingId] = useState31(null);
33578
- const [timerExpired, setTimerExpired] = useState31(false);
33579
33652
  const [selectedNamespace, setSelectedNamespace] = useState31("evm");
33580
33653
  const prevStatusRef = useRef17(walletStatus);
33654
+ const storeFallbackTimeoutRef = useRef17(
33655
+ null
33656
+ );
33657
+ useEffect31(() => {
33658
+ const prev = prevStatusRef.current;
33659
+ if (prev !== walletStatus) {
33660
+ if (prev === "connecting" && (walletStatus === "connected" || walletStatus === "error")) {
33661
+ setConnectingId(null);
33662
+ }
33663
+ prevStatusRef.current = walletStatus;
33664
+ }
33665
+ }, [walletStatus]);
33581
33666
  useEffect31(() => {
33667
+ return () => {
33668
+ if (storeFallbackTimeoutRef.current !== null) {
33669
+ clearTimeout(storeFallbackTimeoutRef.current);
33670
+ }
33671
+ };
33672
+ }, []);
33673
+ const currentUrl = typeof window !== "undefined" ? window.location.href : "";
33674
+ const mobileWalletEntries = useMemo27(() => {
33675
+ return WALLETS.filter((w) => {
33676
+ if (w.id === "walletconnect") return false;
33677
+ const hasMobileLink = Boolean(w.deepLink);
33678
+ if (!hasMobileLink) return false;
33679
+ const ecosystem = w.ecosystem.trim().toLowerCase();
33680
+ return ecosystem === "multi" || ecosystem === selectedNamespace;
33681
+ }).map((meta) => ({
33682
+ meta,
33683
+ detectedWallet: detected.find((d) => d.meta.id === meta.id) ?? null
33684
+ }));
33685
+ }, [detected, selectedNamespace]);
33686
+ const handleDisconnect = () => {
33687
+ void disconnect();
33688
+ };
33689
+ const handleWalletConnect = async () => {
33690
+ if (wcConnecting) return;
33691
+ if (connectedVia === "walletconnect" && managerConnected) {
33692
+ return;
33693
+ }
33694
+ setWcConnecting(true);
33695
+ try {
33696
+ const { error } = await connectWC();
33697
+ if (error) {
33698
+ toast.error("WalletConnect Failed", error);
33699
+ }
33700
+ } catch (err) {
33701
+ const msg = err instanceof Error ? err.message : "WalletConnect failed";
33702
+ toast.error("WalletConnect Failed", msg);
33703
+ } finally {
33704
+ setWcConnecting(false);
33705
+ }
33706
+ };
33707
+ const goToAppStore = (meta) => {
33708
+ const isIos = /iPhone|iPad/i.test(navigator.userAgent);
33709
+ const storeUrl = isIos ? meta.ios : meta.android;
33710
+ if (storeUrl) window.location.assign(storeUrl);
33711
+ };
33712
+ const handleClick = async (entry) => {
33713
+ const { meta, detectedWallet } = entry;
33714
+ if (walletStatus === "connecting") return;
33715
+ if (managerConnected && walletMetaId === meta.id) {
33716
+ return;
33717
+ }
33718
+ if (detectedWallet) {
33719
+ setConnectingId(meta.id);
33720
+ try {
33721
+ await connectWallet(detectedWallet);
33722
+ } catch (err) {
33723
+ setConnectingId(null);
33724
+ const msg = err instanceof Error ? err.message : "Failed to connect wallet";
33725
+ if (msg.toLowerCase().includes("rejected") || msg.toLowerCase().includes("denied")) {
33726
+ toast.error(
33727
+ "Connection Declined",
33728
+ "You declined the connection request."
33729
+ );
33730
+ } else {
33731
+ toast.error("Connection Failed", msg);
33732
+ }
33733
+ }
33734
+ return;
33735
+ }
33736
+ if (meta.deepLink) {
33737
+ const deepLinkUrl = meta.deepLink(currentUrl);
33738
+ if (deepLinkUrl) {
33739
+ window.location.assign(deepLinkUrl);
33740
+ if (storeFallbackTimeoutRef.current !== null) {
33741
+ clearTimeout(storeFallbackTimeoutRef.current);
33742
+ }
33743
+ storeFallbackTimeoutRef.current = setTimeout(() => {
33744
+ storeFallbackTimeoutRef.current = null;
33745
+ goToAppStore(meta);
33746
+ }, 1500);
33747
+ return;
33748
+ }
33749
+ }
33750
+ goToAppStore(meta);
33751
+ };
33752
+ const tabs = [
33753
+ { id: "evm", label: "EVM" },
33754
+ { id: "solana", label: "Solana" }
33755
+ ];
33756
+ return /* @__PURE__ */ jsxs44(
33757
+ "div",
33758
+ {
33759
+ style: {
33760
+ display: "flex",
33761
+ flexDirection: "column",
33762
+ height: "100%"
33763
+ },
33764
+ children: [
33765
+ /* @__PURE__ */ jsxs44(
33766
+ "div",
33767
+ {
33768
+ style: {
33769
+ display: "flex",
33770
+ alignItems: "center",
33771
+ padding: `${spacing[4]} ${spacing[4]}`,
33772
+ borderBottom: `1px solid ${colors.border}`
33773
+ },
33774
+ children: [
33775
+ /* @__PURE__ */ jsx56(
33776
+ "button",
33777
+ {
33778
+ type: "button",
33779
+ onClick: onBack,
33780
+ style: {
33781
+ padding: spacing[1],
33782
+ marginRight: spacing[2],
33783
+ borderRadius: borderRadius.lg,
33784
+ backgroundColor: "transparent",
33785
+ border: 0,
33786
+ cursor: "pointer"
33787
+ },
33788
+ children: /* @__PURE__ */ jsx56(
33789
+ "svg",
33790
+ {
33791
+ style: {
33792
+ width: "1.25rem",
33793
+ height: "1.25rem",
33794
+ color: colors.foreground
33795
+ },
33796
+ viewBox: "0 0 24 24",
33797
+ fill: "none",
33798
+ stroke: "currentColor",
33799
+ strokeWidth: 2,
33800
+ children: /* @__PURE__ */ jsx56(
33801
+ "path",
33802
+ {
33803
+ strokeLinecap: "round",
33804
+ strokeLinejoin: "round",
33805
+ d: "M15 19l-7-7 7-7"
33806
+ }
33807
+ )
33808
+ }
33809
+ )
33810
+ }
33811
+ ),
33812
+ /* @__PURE__ */ jsx56(
33813
+ "h1",
33814
+ {
33815
+ style: {
33816
+ flex: 1,
33817
+ fontSize: fontSize.lg,
33818
+ fontWeight: fontWeight.semibold,
33819
+ color: colors.foreground,
33820
+ textAlign: "center"
33821
+ },
33822
+ children: "Connect Wallet"
33823
+ }
33824
+ ),
33825
+ /* @__PURE__ */ jsx56("div", { style: { width: "1.25rem", marginLeft: spacing[2] }, "aria-hidden": true })
33826
+ ]
33827
+ }
33828
+ ),
33829
+ /* @__PURE__ */ jsx56("div", { style: { padding: `${spacing[3]} ${spacing[4]} 0` }, children: /* @__PURE__ */ jsx56(
33830
+ "div",
33831
+ {
33832
+ style: {
33833
+ display: "flex",
33834
+ alignItems: "center",
33835
+ borderRadius: borderRadius.lg,
33836
+ backgroundColor: colors.muted,
33837
+ padding: "3px",
33838
+ gap: "2px"
33839
+ },
33840
+ children: tabs.map((t) => /* @__PURE__ */ jsx56(
33841
+ "button",
33842
+ {
33843
+ onClick: () => setSelectedNamespace(t.id),
33844
+ style: {
33845
+ flex: 1,
33846
+ padding: `${spacing[1.5]} ${spacing[3]}`,
33847
+ fontSize: fontSize.sm,
33848
+ fontWeight: fontWeight.medium,
33849
+ borderRadius: borderRadius.md,
33850
+ background: selectedNamespace === t.id ? colors.card : "transparent",
33851
+ border: selectedNamespace === t.id ? `1px solid ${colors.border}` : "1px solid transparent",
33852
+ cursor: "pointer",
33853
+ transition: "all 0.15s",
33854
+ color: selectedNamespace === t.id ? colors.foreground : colors.mutedForeground,
33855
+ boxShadow: selectedNamespace === t.id ? "0 1px 3px rgba(0,0,0,0.08)" : "none",
33856
+ outline: "none"
33857
+ },
33858
+ children: t.label
33859
+ },
33860
+ t.id
33861
+ ))
33862
+ }
33863
+ ) }),
33864
+ /* @__PURE__ */ jsxs44(
33865
+ "div",
33866
+ {
33867
+ style: {
33868
+ overflowY: "auto",
33869
+ padding: spacing[4],
33870
+ maxHeight: "31.25rem"
33871
+ },
33872
+ children: [
33873
+ mobileWalletEntries.length === 0 ? /* @__PURE__ */ jsxs44("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
33874
+ /* @__PURE__ */ jsx56("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
33875
+ /* @__PURE__ */ jsx56(
33876
+ "h3",
33877
+ {
33878
+ style: {
33879
+ fontSize: fontSize.lg,
33880
+ fontWeight: fontWeight.semibold,
33881
+ color: colors.foreground,
33882
+ marginBottom: spacing[2]
33883
+ },
33884
+ children: "No Wallets Found"
33885
+ }
33886
+ ),
33887
+ /* @__PURE__ */ jsx56(
33888
+ "p",
33889
+ {
33890
+ style: {
33891
+ fontSize: fontSize.sm,
33892
+ color: colors.mutedForeground,
33893
+ marginBottom: spacing[4]
33894
+ },
33895
+ children: "Please install a web3 wallet to continue."
33896
+ }
33897
+ ),
33898
+ /* @__PURE__ */ jsx56(
33899
+ "a",
33900
+ {
33901
+ href: "https://metamask.io/download/",
33902
+ target: "_blank",
33903
+ rel: "noopener noreferrer",
33904
+ style: {
33905
+ display: "inline-flex",
33906
+ alignItems: "center",
33907
+ justifyContent: "center",
33908
+ padding: `${spacing[2]} ${spacing[4]}`,
33909
+ borderRadius: borderRadius.lg,
33910
+ backgroundColor: colors.primary,
33911
+ color: colors.primaryForeground,
33912
+ fontSize: fontSize.sm,
33913
+ fontWeight: fontWeight.medium,
33914
+ textDecoration: "none"
33915
+ },
33916
+ children: "Install MetaMask"
33917
+ }
33918
+ )
33919
+ ] }) : /* @__PURE__ */ jsx56(
33920
+ "div",
33921
+ {
33922
+ style: {
33923
+ display: "flex",
33924
+ flexDirection: "column",
33925
+ gap: spacing[3]
33926
+ },
33927
+ children: mobileWalletEntries.map((entry) => {
33928
+ const { meta } = entry;
33929
+ const isWalletConnected = managerConnected && walletMetaId === meta.id;
33930
+ const isConnecting = connectingId === meta.id && walletStatus === "connecting";
33931
+ return /* @__PURE__ */ jsxs44(
33932
+ "div",
33933
+ {
33934
+ style: mergeStyles(
33935
+ {
33936
+ width: "100%",
33937
+ display: "flex",
33938
+ alignItems: "center",
33939
+ gap: spacing[4],
33940
+ padding: spacing[4],
33941
+ borderRadius: borderRadius["2xl"],
33942
+ backgroundColor: colors.card,
33943
+ border: `1px solid ${colors.border}`
33944
+ },
33945
+ isWalletConnected && {
33946
+ boxShadow: `0 0 0 2px ${colors.primary}`,
33947
+ border: `1px solid ${colors.primary}`
33948
+ }
33949
+ ),
33950
+ children: [
33951
+ /* @__PURE__ */ jsx56(
33952
+ "div",
33953
+ {
33954
+ style: {
33955
+ width: "3rem",
33956
+ height: "3rem",
33957
+ borderRadius: borderRadius.xl,
33958
+ backgroundColor: colors.muted,
33959
+ display: "flex",
33960
+ alignItems: "center",
33961
+ justifyContent: "center",
33962
+ overflow: "hidden",
33963
+ flexShrink: 0
33964
+ },
33965
+ children: meta.logo ? /* @__PURE__ */ jsx56(
33966
+ "img",
33967
+ {
33968
+ src: meta.logo,
33969
+ alt: meta.name,
33970
+ style: {
33971
+ width: "2rem",
33972
+ height: "2rem",
33973
+ objectFit: "contain"
33974
+ }
33975
+ }
33976
+ ) : /* @__PURE__ */ jsx56("span", { style: { fontSize: "1.5rem" }, children: meta.emoji || "\u{1F45B}" })
33977
+ }
33978
+ ),
33979
+ /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
33980
+ /* @__PURE__ */ jsx56(
33981
+ "p",
33982
+ {
33983
+ style: {
33984
+ fontWeight: fontWeight.semibold,
33985
+ color: colors.foreground
33986
+ },
33987
+ children: meta.name
33988
+ }
33989
+ ),
33990
+ isWalletConnected && walletAddress && /* @__PURE__ */ jsxs44(
33991
+ "p",
33992
+ {
33993
+ style: {
33994
+ fontSize: fontSize.xs,
33995
+ color: colors.mutedForeground
33996
+ },
33997
+ children: [
33998
+ walletAddress.slice(0, 6),
33999
+ "...",
34000
+ walletAddress.slice(-4)
34001
+ ]
34002
+ }
34003
+ )
34004
+ ] }),
34005
+ isConnecting ? /* @__PURE__ */ jsx56(
34006
+ "div",
34007
+ {
34008
+ style: {
34009
+ width: "1.25rem",
34010
+ height: "1.25rem",
34011
+ border: `2px solid ${colors.mutedForeground}`,
34012
+ borderTopColor: "transparent",
34013
+ borderRadius: "9999px",
34014
+ animation: "tw-spin 1s linear infinite",
34015
+ flexShrink: 0
34016
+ }
34017
+ }
34018
+ ) : isWalletConnected ? /* @__PURE__ */ jsx56(
34019
+ "button",
34020
+ {
34021
+ onClick: handleDisconnect,
34022
+ style: {
34023
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34024
+ borderRadius: "9999px",
34025
+ backgroundColor: "rgba(239,68,68,0.1)",
34026
+ color: "#ef4444",
34027
+ fontSize: fontSize.xs,
34028
+ fontWeight: fontWeight.medium,
34029
+ border: 0,
34030
+ cursor: "pointer",
34031
+ flexShrink: 0
34032
+ },
34033
+ children: "Disconnect"
34034
+ }
34035
+ ) : /* @__PURE__ */ jsx56(
34036
+ "button",
34037
+ {
34038
+ onClick: () => void handleClick(entry),
34039
+ disabled: walletStatus === "connecting",
34040
+ style: mergeStyles(
34041
+ {
34042
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34043
+ borderRadius: "9999px",
34044
+ backgroundColor: "rgba(59,130,246,0.1)",
34045
+ color: colors.primary,
34046
+ fontSize: fontSize.xs,
34047
+ fontWeight: fontWeight.medium,
34048
+ border: 0,
34049
+ cursor: "pointer",
34050
+ flexShrink: 0
34051
+ },
34052
+ walletStatus === "connecting" && {
34053
+ opacity: 0.5,
34054
+ cursor: "not-allowed"
34055
+ }
34056
+ ),
34057
+ children: "Connect"
34058
+ }
34059
+ )
34060
+ ]
34061
+ },
34062
+ meta.id
34063
+ );
34064
+ })
34065
+ }
34066
+ ),
34067
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment9, { children: [
34068
+ /* @__PURE__ */ jsx56(
34069
+ "div",
34070
+ {
34071
+ style: {
34072
+ height: 1,
34073
+ backgroundColor: colors.border,
34074
+ margin: `${spacing[3]} 0`
34075
+ }
34076
+ }
34077
+ ),
34078
+ (() => {
34079
+ const wcConnected = managerConnected && connectedVia === "walletconnect";
34080
+ return /* @__PURE__ */ jsxs44(
34081
+ "div",
34082
+ {
34083
+ style: mergeStyles(
34084
+ {
34085
+ width: "100%",
34086
+ display: "flex",
34087
+ alignItems: "center",
34088
+ gap: spacing[4],
34089
+ padding: spacing[4],
34090
+ borderRadius: borderRadius["2xl"],
34091
+ backgroundColor: colors.card,
34092
+ border: `1px solid ${colors.border}`,
34093
+ cursor: "pointer"
34094
+ },
34095
+ wcConnected && {
34096
+ boxShadow: `0 0 0 2px ${colors.primary}`,
34097
+ border: `1px solid ${colors.primary}`
34098
+ }
34099
+ ),
34100
+ onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
34101
+ children: [
34102
+ /* @__PURE__ */ jsx56(
34103
+ "div",
34104
+ {
34105
+ style: {
34106
+ width: "3rem",
34107
+ height: "3rem",
34108
+ borderRadius: borderRadius.xl,
34109
+ backgroundColor: colors.muted,
34110
+ display: "flex",
34111
+ alignItems: "center",
34112
+ justifyContent: "center",
34113
+ flexShrink: 0
34114
+ },
34115
+ children: /* @__PURE__ */ jsx56(
34116
+ "svg",
34117
+ {
34118
+ style: {
34119
+ width: "1.5rem",
34120
+ height: "1.5rem",
34121
+ color: colors.blue[500]
34122
+ },
34123
+ viewBox: "0 0 24 24",
34124
+ fill: "currentColor",
34125
+ 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" })
34126
+ }
34127
+ )
34128
+ }
34129
+ ),
34130
+ /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
34131
+ /* @__PURE__ */ jsx56(
34132
+ "p",
34133
+ {
34134
+ style: {
34135
+ fontWeight: fontWeight.semibold,
34136
+ color: colors.foreground
34137
+ },
34138
+ children: "WalletConnect"
34139
+ }
34140
+ ),
34141
+ wcConnected && walletAddress && /* @__PURE__ */ jsxs44(
34142
+ "p",
34143
+ {
34144
+ style: {
34145
+ fontSize: fontSize.xs,
34146
+ color: colors.mutedForeground
34147
+ },
34148
+ children: [
34149
+ walletAddress.slice(0, 6),
34150
+ "...",
34151
+ walletAddress.slice(-4)
34152
+ ]
34153
+ }
34154
+ )
34155
+ ] }),
34156
+ wcConnecting ? /* @__PURE__ */ jsx56(
34157
+ "div",
34158
+ {
34159
+ style: {
34160
+ width: "1.25rem",
34161
+ height: "1.25rem",
34162
+ border: `2px solid ${colors.mutedForeground}`,
34163
+ borderTopColor: "transparent",
34164
+ borderRadius: "9999px",
34165
+ animation: "tw-spin 1s linear infinite",
34166
+ flexShrink: 0
34167
+ }
34168
+ }
34169
+ ) : wcConnected ? /* @__PURE__ */ jsx56(
34170
+ "button",
34171
+ {
34172
+ onClick: (e2) => {
34173
+ e2.stopPropagation();
34174
+ handleDisconnect();
34175
+ },
34176
+ style: {
34177
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34178
+ borderRadius: "9999px",
34179
+ backgroundColor: "rgba(239,68,68,0.1)",
34180
+ color: "#ef4444",
34181
+ fontSize: fontSize.xs,
34182
+ fontWeight: fontWeight.medium,
34183
+ border: 0,
34184
+ cursor: "pointer",
34185
+ flexShrink: 0
34186
+ },
34187
+ children: "Disconnect"
34188
+ }
34189
+ ) : /* @__PURE__ */ jsx56(
34190
+ "button",
34191
+ {
34192
+ onClick: (e2) => {
34193
+ e2.stopPropagation();
34194
+ void handleWalletConnect();
34195
+ },
34196
+ disabled: wcConnecting,
34197
+ style: {
34198
+ padding: `${spacing[1.5]} ${spacing[3]}`,
34199
+ borderRadius: "9999px",
34200
+ backgroundColor: "rgba(59,130,246,0.1)",
34201
+ color: colors.primary,
34202
+ fontSize: fontSize.xs,
34203
+ fontWeight: fontWeight.medium,
34204
+ border: 0,
34205
+ cursor: "pointer",
34206
+ flexShrink: 0
34207
+ },
34208
+ children: "Connect"
34209
+ }
34210
+ )
34211
+ ]
34212
+ }
34213
+ );
34214
+ })()
34215
+ ] })
34216
+ ]
34217
+ }
34218
+ )
34219
+ ]
34220
+ }
34221
+ );
34222
+ }
34223
+ var SwapWalletSelectorMobile_default;
34224
+ var init_SwapWalletSelectorMobile = __esm({
34225
+ "src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx"() {
34226
+ "use strict";
34227
+ init_styles();
34228
+ init_utils2();
34229
+ init_wallets();
34230
+ init_wallets();
34231
+ init_config2();
34232
+ init_Toast();
34233
+ SwapWalletSelectorMobile_default = SwapWalletSelectorMobile;
34234
+ }
34235
+ });
34236
+
34237
+ // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx
34238
+ import { useEffect as useEffect32, useMemo as useMemo28, useRef as useRef18, useState as useState32 } from "react";
34239
+ import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs45 } from "react/jsx-runtime";
34240
+ function SwapWalletSelectorDesktop({
34241
+ walletStatus,
34242
+ walletAddress,
34243
+ connectWallet,
34244
+ onBack
34245
+ }) {
34246
+ const { detected } = useWalletDetection();
34247
+ const {
34248
+ isConnected: managerConnected,
34249
+ walletMetaId,
34250
+ connectedVia,
34251
+ disconnect
34252
+ } = useWalletInfo();
34253
+ const walletConnectCfg = TrustwareConfigStore.peek()?.walletConnect;
34254
+ const connectWC = useWalletConnectConnect(walletConnectCfg);
34255
+ const [wcConnecting, setWcConnecting] = useState32(false);
34256
+ const [connectingId, setConnectingId] = useState32(null);
34257
+ const [timerExpired, setTimerExpired] = useState32(false);
34258
+ const [selectedNamespace, setSelectedNamespace] = useState32("evm");
34259
+ const prevStatusRef = useRef18(walletStatus);
34260
+ useEffect32(() => {
33582
34261
  const t = setTimeout(() => setTimerExpired(true), 450);
33583
34262
  return () => clearTimeout(t);
33584
34263
  }, []);
33585
- useEffect31(() => {
34264
+ useEffect32(() => {
33586
34265
  const prev = prevStatusRef.current;
33587
34266
  if (prev !== walletStatus) {
33588
34267
  if (prev === "connecting" && (walletStatus === "connected" || walletStatus === "error")) {
@@ -33591,7 +34270,7 @@ function SwapWalletSelector({
33591
34270
  prevStatusRef.current = walletStatus;
33592
34271
  }
33593
34272
  }, [walletStatus]);
33594
- const filteredWallets = useMemo27(
34273
+ const filteredWallets = useMemo28(
33595
34274
  () => detected.filter(
33596
34275
  (w) => (w.meta?.ecosystem ?? "").toLowerCase() === selectedNamespace
33597
34276
  ),
@@ -33650,8 +34329,8 @@ function SwapWalletSelector({
33650
34329
  { id: "evm", label: "EVM" },
33651
34330
  { id: "solana", label: "Solana" }
33652
34331
  ];
33653
- return /* @__PURE__ */ jsxs44("div", { style: { display: "flex", flexDirection: "column" }, children: [
33654
- /* @__PURE__ */ jsxs44(
34332
+ return /* @__PURE__ */ jsxs45("div", { style: { display: "flex", flexDirection: "column" }, children: [
34333
+ /* @__PURE__ */ jsxs45(
33655
34334
  "div",
33656
34335
  {
33657
34336
  style: {
@@ -33661,7 +34340,7 @@ function SwapWalletSelector({
33661
34340
  borderBottom: `1px solid ${colors.border}`
33662
34341
  },
33663
34342
  children: [
33664
- /* @__PURE__ */ jsx56(
34343
+ /* @__PURE__ */ jsx57(
33665
34344
  "button",
33666
34345
  {
33667
34346
  type: "button",
@@ -33674,7 +34353,7 @@ function SwapWalletSelector({
33674
34353
  border: 0,
33675
34354
  cursor: "pointer"
33676
34355
  },
33677
- children: /* @__PURE__ */ jsx56(
34356
+ children: /* @__PURE__ */ jsx57(
33678
34357
  "svg",
33679
34358
  {
33680
34359
  style: {
@@ -33686,7 +34365,7 @@ function SwapWalletSelector({
33686
34365
  fill: "none",
33687
34366
  stroke: "currentColor",
33688
34367
  strokeWidth: 2,
33689
- children: /* @__PURE__ */ jsx56(
34368
+ children: /* @__PURE__ */ jsx57(
33690
34369
  "path",
33691
34370
  {
33692
34371
  strokeLinecap: "round",
@@ -33698,7 +34377,7 @@ function SwapWalletSelector({
33698
34377
  )
33699
34378
  }
33700
34379
  ),
33701
- /* @__PURE__ */ jsx56(
34380
+ /* @__PURE__ */ jsx57(
33702
34381
  "h1",
33703
34382
  {
33704
34383
  style: {
@@ -33711,7 +34390,7 @@ function SwapWalletSelector({
33711
34390
  children: "Connect Wallet"
33712
34391
  }
33713
34392
  ),
33714
- /* @__PURE__ */ jsx56(
34393
+ /* @__PURE__ */ jsx57(
33715
34394
  "div",
33716
34395
  {
33717
34396
  style: {
@@ -33722,7 +34401,7 @@ function SwapWalletSelector({
33722
34401
  padding: "3px",
33723
34402
  gap: "2px"
33724
34403
  },
33725
- children: tabs.map((t) => /* @__PURE__ */ jsx56(
34404
+ children: tabs.map((t) => /* @__PURE__ */ jsx57(
33726
34405
  "button",
33727
34406
  {
33728
34407
  onClick: () => setSelectedNamespace(t.id),
@@ -33748,8 +34427,8 @@ function SwapWalletSelector({
33748
34427
  ]
33749
34428
  }
33750
34429
  ),
33751
- /* @__PURE__ */ jsxs44("div", { style: { padding: spacing[4] }, children: [
33752
- isDetecting ? /* @__PURE__ */ jsxs44(
34430
+ /* @__PURE__ */ jsxs45("div", { style: { padding: spacing[4] }, children: [
34431
+ isDetecting ? /* @__PURE__ */ jsxs45(
33753
34432
  "div",
33754
34433
  {
33755
34434
  style: {
@@ -33758,7 +34437,7 @@ function SwapWalletSelector({
33758
34437
  gap: spacing[3]
33759
34438
  },
33760
34439
  children: [
33761
- [1, 2].map((i) => /* @__PURE__ */ jsxs44(
34440
+ [1, 2].map((i) => /* @__PURE__ */ jsxs45(
33762
34441
  "div",
33763
34442
  {
33764
34443
  style: {
@@ -33771,7 +34450,7 @@ function SwapWalletSelector({
33771
34450
  animation: "tw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
33772
34451
  },
33773
34452
  children: [
33774
- /* @__PURE__ */ jsx56(
34453
+ /* @__PURE__ */ jsx57(
33775
34454
  "div",
33776
34455
  {
33777
34456
  style: {
@@ -33782,7 +34461,7 @@ function SwapWalletSelector({
33782
34461
  }
33783
34462
  }
33784
34463
  ),
33785
- /* @__PURE__ */ jsx56(
34464
+ /* @__PURE__ */ jsx57(
33786
34465
  "div",
33787
34466
  {
33788
34467
  style: {
@@ -33797,7 +34476,7 @@ function SwapWalletSelector({
33797
34476
  },
33798
34477
  i
33799
34478
  )),
33800
- /* @__PURE__ */ jsx56(
34479
+ /* @__PURE__ */ jsx57(
33801
34480
  "p",
33802
34481
  {
33803
34482
  style: {
@@ -33811,9 +34490,9 @@ function SwapWalletSelector({
33811
34490
  )
33812
34491
  ]
33813
34492
  }
33814
- ) : filteredWallets.length === 0 ? /* @__PURE__ */ jsxs44("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
33815
- /* @__PURE__ */ jsx56("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
33816
- /* @__PURE__ */ jsx56(
34493
+ ) : filteredWallets.length === 0 ? /* @__PURE__ */ jsxs45("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
34494
+ /* @__PURE__ */ jsx57("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
34495
+ /* @__PURE__ */ jsx57(
33817
34496
  "h3",
33818
34497
  {
33819
34498
  style: {
@@ -33825,7 +34504,7 @@ function SwapWalletSelector({
33825
34504
  children: "No Wallets Found"
33826
34505
  }
33827
34506
  ),
33828
- /* @__PURE__ */ jsx56(
34507
+ /* @__PURE__ */ jsx57(
33829
34508
  "p",
33830
34509
  {
33831
34510
  style: {
@@ -33836,7 +34515,7 @@ function SwapWalletSelector({
33836
34515
  children: "Please install a web3 wallet to continue."
33837
34516
  }
33838
34517
  ),
33839
- /* @__PURE__ */ jsx56(
34518
+ /* @__PURE__ */ jsx57(
33840
34519
  "a",
33841
34520
  {
33842
34521
  href: "https://metamask.io/download/",
@@ -33857,7 +34536,7 @@ function SwapWalletSelector({
33857
34536
  children: "Install MetaMask"
33858
34537
  }
33859
34538
  )
33860
- ] }) : /* @__PURE__ */ jsx56(
34539
+ ] }) : /* @__PURE__ */ jsx57(
33861
34540
  "div",
33862
34541
  {
33863
34542
  style: {
@@ -33868,7 +34547,7 @@ function SwapWalletSelector({
33868
34547
  children: filteredWallets.map((wallet) => {
33869
34548
  const isWalletConnected = managerConnected && walletMetaId === wallet.meta.id;
33870
34549
  const isConnecting = connectingId === wallet.meta.id && walletStatus === "connecting";
33871
- return /* @__PURE__ */ jsxs44(
34550
+ return /* @__PURE__ */ jsxs45(
33872
34551
  "div",
33873
34552
  {
33874
34553
  style: mergeStyles(
@@ -33888,7 +34567,7 @@ function SwapWalletSelector({
33888
34567
  }
33889
34568
  ),
33890
34569
  children: [
33891
- /* @__PURE__ */ jsx56(
34570
+ /* @__PURE__ */ jsx57(
33892
34571
  "div",
33893
34572
  {
33894
34573
  style: {
@@ -33902,7 +34581,7 @@ function SwapWalletSelector({
33902
34581
  overflow: "hidden",
33903
34582
  flexShrink: 0
33904
34583
  },
33905
- children: wallet.meta.logo ? /* @__PURE__ */ jsx56(
34584
+ children: wallet.meta.logo ? /* @__PURE__ */ jsx57(
33906
34585
  "img",
33907
34586
  {
33908
34587
  src: wallet.meta.logo,
@@ -33913,7 +34592,7 @@ function SwapWalletSelector({
33913
34592
  objectFit: "contain"
33914
34593
  }
33915
34594
  }
33916
- ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx56(
34595
+ ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx57(
33917
34596
  "img",
33918
34597
  {
33919
34598
  src: wallet.detail.info.icon,
@@ -33924,11 +34603,11 @@ function SwapWalletSelector({
33924
34603
  objectFit: "contain"
33925
34604
  }
33926
34605
  }
33927
- ) : /* @__PURE__ */ jsx56("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
34606
+ ) : /* @__PURE__ */ jsx57("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
33928
34607
  }
33929
34608
  ),
33930
- /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
33931
- /* @__PURE__ */ jsx56(
34609
+ /* @__PURE__ */ jsxs45("div", { style: { flex: 1, minWidth: 0 }, children: [
34610
+ /* @__PURE__ */ jsx57(
33932
34611
  "p",
33933
34612
  {
33934
34613
  style: {
@@ -33938,7 +34617,7 @@ function SwapWalletSelector({
33938
34617
  children: wallet.meta.name
33939
34618
  }
33940
34619
  ),
33941
- isWalletConnected && walletAddress && /* @__PURE__ */ jsxs44(
34620
+ isWalletConnected && walletAddress && /* @__PURE__ */ jsxs45(
33942
34621
  "p",
33943
34622
  {
33944
34623
  style: {
@@ -33953,7 +34632,7 @@ function SwapWalletSelector({
33953
34632
  }
33954
34633
  )
33955
34634
  ] }),
33956
- isConnecting ? /* @__PURE__ */ jsx56(
34635
+ isConnecting ? /* @__PURE__ */ jsx57(
33957
34636
  "div",
33958
34637
  {
33959
34638
  style: {
@@ -33966,7 +34645,7 @@ function SwapWalletSelector({
33966
34645
  flexShrink: 0
33967
34646
  }
33968
34647
  }
33969
- ) : isWalletConnected ? /* @__PURE__ */ jsx56(
34648
+ ) : isWalletConnected ? /* @__PURE__ */ jsx57(
33970
34649
  "button",
33971
34650
  {
33972
34651
  onClick: handleDisconnect,
@@ -33983,7 +34662,7 @@ function SwapWalletSelector({
33983
34662
  },
33984
34663
  children: "Disconnect"
33985
34664
  }
33986
- ) : /* @__PURE__ */ jsx56(
34665
+ ) : /* @__PURE__ */ jsx57(
33987
34666
  "button",
33988
34667
  {
33989
34668
  onClick: () => void handleClick(wallet),
@@ -34015,8 +34694,8 @@ function SwapWalletSelector({
34015
34694
  })
34016
34695
  }
34017
34696
  ),
34018
- selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment9, { children: [
34019
- /* @__PURE__ */ jsx56(
34697
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs45(Fragment10, { children: [
34698
+ /* @__PURE__ */ jsx57(
34020
34699
  "div",
34021
34700
  {
34022
34701
  style: {
@@ -34028,7 +34707,7 @@ function SwapWalletSelector({
34028
34707
  ),
34029
34708
  (() => {
34030
34709
  const wcConnected = managerConnected && connectedVia === "walletconnect";
34031
- return /* @__PURE__ */ jsxs44(
34710
+ return /* @__PURE__ */ jsxs45(
34032
34711
  "div",
34033
34712
  {
34034
34713
  style: mergeStyles(
@@ -34050,7 +34729,7 @@ function SwapWalletSelector({
34050
34729
  ),
34051
34730
  onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
34052
34731
  children: [
34053
- /* @__PURE__ */ jsx56(
34732
+ /* @__PURE__ */ jsx57(
34054
34733
  "div",
34055
34734
  {
34056
34735
  style: {
@@ -34063,7 +34742,7 @@ function SwapWalletSelector({
34063
34742
  justifyContent: "center",
34064
34743
  flexShrink: 0
34065
34744
  },
34066
- children: /* @__PURE__ */ jsx56(
34745
+ children: /* @__PURE__ */ jsx57(
34067
34746
  "svg",
34068
34747
  {
34069
34748
  style: {
@@ -34073,13 +34752,13 @@ function SwapWalletSelector({
34073
34752
  },
34074
34753
  viewBox: "0 0 24 24",
34075
34754
  fill: "currentColor",
34076
- 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" })
34755
+ 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" })
34077
34756
  }
34078
34757
  )
34079
34758
  }
34080
34759
  ),
34081
- /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
34082
- /* @__PURE__ */ jsx56(
34760
+ /* @__PURE__ */ jsxs45("div", { style: { flex: 1, minWidth: 0 }, children: [
34761
+ /* @__PURE__ */ jsx57(
34083
34762
  "p",
34084
34763
  {
34085
34764
  style: {
@@ -34089,7 +34768,7 @@ function SwapWalletSelector({
34089
34768
  children: "WalletConnect"
34090
34769
  }
34091
34770
  ),
34092
- wcConnected && walletAddress && /* @__PURE__ */ jsxs44(
34771
+ wcConnected && walletAddress && /* @__PURE__ */ jsxs45(
34093
34772
  "p",
34094
34773
  {
34095
34774
  style: {
@@ -34104,7 +34783,7 @@ function SwapWalletSelector({
34104
34783
  }
34105
34784
  )
34106
34785
  ] }),
34107
- wcConnecting ? /* @__PURE__ */ jsx56(
34786
+ wcConnecting ? /* @__PURE__ */ jsx57(
34108
34787
  "div",
34109
34788
  {
34110
34789
  style: {
@@ -34117,7 +34796,7 @@ function SwapWalletSelector({
34117
34796
  flexShrink: 0
34118
34797
  }
34119
34798
  }
34120
- ) : wcConnected ? /* @__PURE__ */ jsx56(
34799
+ ) : wcConnected ? /* @__PURE__ */ jsx57(
34121
34800
  "button",
34122
34801
  {
34123
34802
  onClick: (e2) => {
@@ -34137,7 +34816,7 @@ function SwapWalletSelector({
34137
34816
  },
34138
34817
  children: "Disconnect"
34139
34818
  }
34140
- ) : /* @__PURE__ */ jsx56(
34819
+ ) : /* @__PURE__ */ jsx57(
34141
34820
  "button",
34142
34821
  {
34143
34822
  onClick: (e2) => {
@@ -34167,8 +34846,8 @@ function SwapWalletSelector({
34167
34846
  ] })
34168
34847
  ] });
34169
34848
  }
34170
- var init_SwapWalletSelector = __esm({
34171
- "src/modes/swap/components/SwapWalletSelector.tsx"() {
34849
+ var init_SwapWalletSelectorDesktop = __esm({
34850
+ "src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx"() {
34172
34851
  "use strict";
34173
34852
  init_styles();
34174
34853
  init_utils2();
@@ -34178,76 +34857,52 @@ var init_SwapWalletSelector = __esm({
34178
34857
  }
34179
34858
  });
34180
34859
 
34181
- // src/modes/swap/currency.ts
34182
- function getCurrencyMeta(code) {
34183
- return BY_CODE.get(code.toUpperCase()) ?? SUPPORTED_CURRENCIES[0];
34184
- }
34185
- function fmtCurrency(usdAmount, code, rate) {
34186
- const meta = getCurrencyMeta(code);
34187
- const local = usdAmount * rate;
34188
- return meta.symbol + local.toFixed(meta.decimals);
34189
- }
34190
- var SUPPORTED_CURRENCIES, BY_CODE;
34191
- var init_currency = __esm({
34192
- "src/modes/swap/currency.ts"() {
34193
- "use strict";
34194
- SUPPORTED_CURRENCIES = [
34195
- { code: "USD", symbol: "$", name: "US Dollar", decimals: 2 },
34196
- { code: "EUR", symbol: "\u20AC", name: "Euro", decimals: 2 },
34197
- { code: "GBP", symbol: "\xA3", name: "British Pound", decimals: 2 },
34198
- { code: "CAD", symbol: "CA$", name: "Canadian Dollar", decimals: 2 },
34199
- { code: "AUD", symbol: "A$", name: "Australian Dollar", decimals: 2 },
34200
- { code: "JPY", symbol: "\xA5", name: "Japanese Yen", decimals: 0 },
34201
- { code: "CHF", symbol: "Fr", name: "Swiss Franc", decimals: 2 },
34202
- { code: "KRW", symbol: "\u20A9", name: "South Korean Won", decimals: 0 },
34203
- { code: "INR", symbol: "\u20B9", name: "Indian Rupee", decimals: 2 },
34204
- { code: "BRL", symbol: "R$", name: "Brazilian Real", decimals: 2 },
34205
- { code: "SGD", symbol: "S$", name: "Singapore Dollar", decimals: 2 },
34206
- { code: "MXN", symbol: "MX$", name: "Mexican Peso", decimals: 2 },
34207
- { code: "HKD", symbol: "HK$", name: "Hong Kong Dollar", decimals: 2 },
34208
- { code: "CNY", symbol: "\xA5", name: "Chinese Yuan", decimals: 2 },
34209
- { code: "ZAR", symbol: "R", name: "South African Rand", decimals: 2 },
34210
- { code: "TRY", symbol: "\u20BA", name: "Turkish Lira", decimals: 2 },
34211
- { code: "RUB", symbol: "\u20BD", name: "Russian Ruble", decimals: 2 },
34860
+ // src/modes/swap/components/SwapWalletSelector/index.tsx
34861
+ import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
34862
+ function SwapWalletSelector({
34863
+ walletStatus,
34864
+ walletAddress,
34865
+ connectWallet,
34866
+ onBack
34867
+ }) {
34868
+ const isMobile = useIsMobile();
34869
+ return /* @__PURE__ */ jsxs46(Fragment11, { children: [
34870
+ isMobile && /* @__PURE__ */ jsx58(
34871
+ SwapWalletSelectorMobile_default,
34212
34872
  {
34213
- code: "AED",
34214
- symbol: "\u062F.\u0625",
34215
- name: "United Arab Emirates Dirham",
34216
- decimals: 2
34217
- },
34218
- { code: "SAR", symbol: "\uFDFC", name: "Saudi Riyal", decimals: 2 },
34219
- { code: "QAR", symbol: "\uFDFC", name: "Qatari Riyal", decimals: 2 },
34220
- { code: "KWD", symbol: "\u062F.\u0643", name: "Kuwaiti Dinar", decimals: 3 },
34221
- { code: "OMR", symbol: "\u0631.\u0639.", name: "Omani Rial", decimals: 3 },
34222
- { code: "BHD", symbol: "\u0628.\u062F", name: "Bahraini Dinar", decimals: 3 },
34223
- { code: "JOD", symbol: "\u062F.\u0627", name: "Jordanian Dinar", decimals: 3 },
34224
- { code: "LYD", symbol: "\u0644.\u062F", name: "Libyan Dinar", decimals: 3 },
34225
- { code: "TND", symbol: "\u062F.\u062A", name: "Tunisian Dinar", decimals: 3 },
34226
- { code: "MAD", symbol: "\u062F.\u0645.", name: "Moroccan Dirham", decimals: 2 },
34227
- { code: "EGP", symbol: "\xA3", name: "Egyptian Pound", decimals: 2 },
34228
- { code: "NGN", symbol: "\u20A6", name: "Nigerian Naira", decimals: 2 },
34229
- { code: "GHS", symbol: "\u20B5", name: "Ghanaian Cedi", decimals: 2 },
34230
- { code: "KES", symbol: "KSh", name: "Kenyan Shilling", decimals: 2 },
34231
- { code: "TZS", symbol: "TSh", name: "Tanzanian Shilling", decimals: 2 },
34232
- { code: "UGX", symbol: "USh", name: "Ugandan Shilling", decimals: 2 },
34233
- { code: "RWF", symbol: "FRw", name: "Rwandan Franc", decimals: 2 },
34234
- { code: "MUR", symbol: "Rs", name: "Mauritian Rupee", decimals: 2 },
34235
- { code: "SCR", symbol: "SR", name: "Seychellois Rupee", decimals: 2 },
34236
- { code: "MGA", symbol: "Ar", name: "Malagasy Ariary", decimals: 2 },
34873
+ walletStatus,
34874
+ walletAddress,
34875
+ connectWallet,
34876
+ onBack
34877
+ }
34878
+ ),
34879
+ !isMobile && /* @__PURE__ */ jsx58(
34880
+ SwapWalletSelectorDesktop,
34237
34881
  {
34238
- code: "XAF",
34239
- symbol: "FCFA",
34240
- name: "Central African CFA Franc",
34241
- decimals: 2
34242
- },
34243
- { code: "XOF", symbol: "CFA", name: "West African CFA Franc", decimals: 2 },
34244
- { code: "XPF", symbol: "CFP", name: "CFP Franc", decimals: 2 },
34245
- { code: "XCD", symbol: "EC$", name: "East Caribbean Dollar", decimals: 2 },
34246
- { code: "XDR", symbol: "SDR", name: "Special Drawing Rights", decimals: 2 },
34247
- { code: "XAU", symbol: "Au", name: "Gold (troy ounce)", decimals: 2 },
34248
- { code: "XAG", symbol: "Ag", name: "Silver (troy ounce)", decimals: 2 }
34249
- ];
34250
- BY_CODE = new Map(SUPPORTED_CURRENCIES.map((c) => [c.code, c]));
34882
+ walletStatus,
34883
+ walletAddress,
34884
+ connectWallet,
34885
+ onBack
34886
+ }
34887
+ )
34888
+ ] });
34889
+ }
34890
+ var SwapWalletSelector_default;
34891
+ var init_SwapWalletSelector = __esm({
34892
+ "src/modes/swap/components/SwapWalletSelector/index.tsx"() {
34893
+ "use strict";
34894
+ init_detect();
34895
+ init_SwapWalletSelectorMobile();
34896
+ init_SwapWalletSelectorDesktop();
34897
+ SwapWalletSelector_default = SwapWalletSelector;
34898
+ }
34899
+ });
34900
+
34901
+ // src/modes/swap/components/index.ts
34902
+ var init_components2 = __esm({
34903
+ "src/modes/swap/components/index.ts"() {
34904
+ "use strict";
34905
+ init_SwapWalletSelector();
34251
34906
  }
34252
34907
  });
34253
34908
 
@@ -34256,13 +34911,13 @@ import {
34256
34911
  lazy as lazy2,
34257
34912
  Suspense as Suspense2,
34258
34913
  useCallback as useCallback22,
34259
- useEffect as useEffect32,
34260
- useMemo as useMemo28,
34261
- useRef as useRef18,
34262
- useState as useState32
34914
+ useEffect as useEffect33,
34915
+ useMemo as useMemo29,
34916
+ useRef as useRef19,
34917
+ useState as useState33
34263
34918
  } from "react";
34264
34919
  import ReactDOM from "react-dom";
34265
- import { Fragment as Fragment10, jsx as jsx57, jsxs as jsxs45 } from "react/jsx-runtime";
34920
+ import { Fragment as Fragment12, jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
34266
34921
  function fmtAmount(n, max = 6) {
34267
34922
  if (!isFinite(n) || n === 0) return "0";
34268
34923
  return n.toLocaleString(void 0, { maximumFractionDigits: max });
@@ -34335,7 +34990,7 @@ function getActiveStep(status) {
34335
34990
  }
34336
34991
  }
34337
34992
  function RateRow({ label, value }) {
34338
- return /* @__PURE__ */ jsxs45(
34993
+ return /* @__PURE__ */ jsxs47(
34339
34994
  "div",
34340
34995
  {
34341
34996
  style: {
@@ -34344,8 +34999,8 @@ function RateRow({ label, value }) {
34344
34999
  justifyContent: "space-between"
34345
35000
  },
34346
35001
  children: [
34347
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: label }),
34348
- /* @__PURE__ */ jsx57("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
35002
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: label }),
35003
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
34349
35004
  ]
34350
35005
  }
34351
35006
  );
@@ -34354,36 +35009,36 @@ function SwapMode({
34354
35009
  theme: themeProp,
34355
35010
  style
34356
35011
  }) {
34357
- const [stage, setStage] = useState32("home");
34358
- const [fromToken, setFromToken] = useState32(
35012
+ const [stage, setStage] = useState33("home");
35013
+ const [fromToken, setFromToken] = useState33(
34359
35014
  null
34360
35015
  );
34361
- const [fromChain, setFromChain] = useState32(null);
34362
- const [toToken, setToToken] = useState32(null);
34363
- const [toChain, setToChain] = useState32(null);
34364
- const [amount, setAmount] = useState32("");
34365
- const [amountInputMode, setAmountInputMode] = useState32(
35016
+ const [fromChain, setFromChain] = useState33(null);
35017
+ const [toToken, setToToken] = useState33(null);
35018
+ const [toChain, setToChain] = useState33(null);
35019
+ const [amount, setAmount] = useState33("");
35020
+ const [amountInputMode, setAmountInputMode] = useState33(
34366
35021
  "usd"
34367
35022
  );
34368
- const [hoverSell, setHoverSell] = useState32(false);
34369
- const [showRateDetails, setShowRateDetails] = useState32(false);
34370
- const [showReviewDetails, setShowReviewDetails] = useState32(false);
34371
- const [showSettings, setShowSettings] = useState32(false);
34372
- const [maxApproval, setMaxApproval] = useState32(false);
34373
- const [slippage, setSlippage] = useState32(0.5);
34374
- const [slippageInput, setSlippageInput] = useState32("");
34375
- const [selectedCurrency, setSelectedCurrency] = useState32("USD");
34376
- const [showCurrencyDropdown, setShowCurrencyDropdown] = useState32(false);
34377
- const [completedAt, setCompletedAt] = useState32(null);
34378
- const [copiedHash, setCopiedHash] = useState32(null);
34379
- const [rateUpdated, setRateUpdated] = useState32(false);
34380
- const prevToAmountRef = useRef18(null);
34381
- const [destAddress, setDestAddress] = useState32("");
34382
- const [quoteAge, setQuoteAge] = useState32(0);
34383
- const quoteTimestampRef = useRef18(null);
34384
- const [quoteLoadingMsgIdx, setQuoteLoadingMsgIdx] = useState32(0);
34385
- const [quoteLoadingMsgVisible, setQuoteLoadingMsgVisible] = useState32(true);
34386
- const latestFetchParamsRef = useRef18(null);
35023
+ const [hoverSell, setHoverSell] = useState33(false);
35024
+ const [showRateDetails, setShowRateDetails] = useState33(false);
35025
+ const [showReviewDetails, setShowReviewDetails] = useState33(false);
35026
+ const [showSettings, setShowSettings] = useState33(false);
35027
+ const [maxApproval, setMaxApproval] = useState33(false);
35028
+ const [slippage, setSlippage] = useState33(0.5);
35029
+ const [slippageInput, setSlippageInput] = useState33("");
35030
+ const [selectedCurrency, setSelectedCurrency] = useState33("USD");
35031
+ const [showCurrencyDropdown, setShowCurrencyDropdown] = useState33(false);
35032
+ const [completedAt, setCompletedAt] = useState33(null);
35033
+ const [copiedHash, setCopiedHash] = useState33(null);
35034
+ const [rateUpdated, setRateUpdated] = useState33(false);
35035
+ const prevToAmountRef = useRef19(null);
35036
+ const [destAddress, setDestAddress] = useState33("");
35037
+ const [quoteAge, setQuoteAge] = useState33(0);
35038
+ const quoteTimestampRef = useRef19(null);
35039
+ const [quoteLoadingMsgIdx, setQuoteLoadingMsgIdx] = useState33(0);
35040
+ const [quoteLoadingMsgVisible, setQuoteLoadingMsgVisible] = useState33(true);
35041
+ const latestFetchParamsRef = useRef19(null);
34387
35042
  const { rates: forexRates } = useForex();
34388
35043
  const currencyMeta = getCurrencyMeta(selectedCurrency);
34389
35044
  const currencyRate = forexRates[selectedCurrency] ?? 1;
@@ -34399,8 +35054,8 @@ function SwapMode({
34399
35054
  },
34400
35055
  [currencyRate, selectedCurrency]
34401
35056
  );
34402
- const settingsRef = useRef18(null);
34403
- const currencyDropdownRef = useRef18(null);
35057
+ const settingsRef = useRef19(null);
35058
+ const currencyDropdownRef = useRef19(null);
34404
35059
  const { emitEvent } = useTrustware();
34405
35060
  const { features, theme: configTheme } = useTrustwareConfig();
34406
35061
  const effectiveThemeSetting = themeProp ?? configTheme ?? "system";
@@ -34416,26 +35071,26 @@ function SwapMode({
34416
35071
  isLoading: chainsLoading,
34417
35072
  error: chainsError
34418
35073
  } = useChains();
34419
- const allowedDestChainIds = useMemo28(() => {
35074
+ const allowedDestChainIds = useMemo29(() => {
34420
35075
  if (!allowedDestTokens || allowedDestTokens.length === 0) return null;
34421
35076
  return new Set(allowedDestTokens.map((t) => t.chainId));
34422
35077
  }, [allowedDestTokens]);
34423
- const toPopularChains = useMemo28(
35078
+ const toPopularChains = useMemo29(
34424
35079
  () => allowedDestChainIds ? popularChains.filter(
34425
35080
  (c) => allowedDestChainIds.has(Number(c.chainId))
34426
35081
  ) : popularChains,
34427
35082
  [popularChains, allowedDestChainIds]
34428
35083
  );
34429
- const toOtherChains = useMemo28(
35084
+ const toOtherChains = useMemo29(
34430
35085
  () => allowedDestChainIds ? otherChains.filter((c) => allowedDestChainIds.has(Number(c.chainId))) : otherChains,
34431
35086
  [otherChains, allowedDestChainIds]
34432
35087
  );
34433
- const allChains = useMemo28(
35088
+ const allChains = useMemo29(
34434
35089
  () => [...popularChains, ...otherChains],
34435
35090
  [popularChains, otherChains]
34436
35091
  );
34437
- const destInitialized = useRef18(false);
34438
- useEffect32(() => {
35092
+ const destInitialized = useRef19(false);
35093
+ useEffect33(() => {
34439
35094
  if (!defaultDestRef || destInitialized.current || allChains.length === 0)
34440
35095
  return;
34441
35096
  const chain = allChains.find(
@@ -34483,18 +35138,18 @@ function SwapMode({
34483
35138
  });
34484
35139
  const route = useSwapRoute();
34485
35140
  const execution = useSwapExecution(fromChain);
34486
- const fromTokenPriceUSD = useMemo28(() => {
35141
+ const fromTokenPriceUSD = useMemo29(() => {
34487
35142
  const p = fromToken?.usdPrice;
34488
35143
  return typeof p === "number" && Number.isFinite(p) && p > 0 ? p : 0;
34489
35144
  }, [fromToken]);
34490
35145
  const hasFromUsdPrice = fromTokenPriceUSD > 0;
34491
- const toTokenPriceUSD = useMemo28(() => {
35146
+ const toTokenPriceUSD = useMemo29(() => {
34492
35147
  const p = toToken?.usdPrice;
34493
35148
  return typeof p === "number" && Number.isFinite(p) && p > 0 ? p : 0;
34494
35149
  }, [toToken]);
34495
35150
  const hasToUsdPrice = toTokenPriceUSD > 0;
34496
35151
  const rawSellNum = parseFloat(amount) || 0;
34497
- const usdSellNum = useMemo28(() => {
35152
+ const usdSellNum = useMemo29(() => {
34498
35153
  if (amountInputMode === "usd") return rawSellNum / currencyRate;
34499
35154
  return hasFromUsdPrice ? rawSellNum * fromTokenPriceUSD : 0;
34500
35155
  }, [
@@ -34504,7 +35159,7 @@ function SwapMode({
34504
35159
  hasFromUsdPrice,
34505
35160
  fromTokenPriceUSD
34506
35161
  ]);
34507
- const tokenSellNum = useMemo28(() => {
35162
+ const tokenSellNum = useMemo29(() => {
34508
35163
  if (amountInputMode === "usd") {
34509
35164
  return hasFromUsdPrice && fromTokenPriceUSD > 0 ? usdSellNum / fromTokenPriceUSD : 0;
34510
35165
  }
@@ -34516,7 +35171,7 @@ function SwapMode({
34516
35171
  hasFromUsdPrice,
34517
35172
  fromTokenPriceUSD
34518
35173
  ]);
34519
- const tokenAmountStr = useMemo28(() => {
35174
+ const tokenAmountStr = useMemo29(() => {
34520
35175
  if (tokenSellNum <= 0) return "";
34521
35176
  const decimals = fromToken?.decimals ?? 18;
34522
35177
  return truncateDecimal(tokenSellNum, Math.min(decimals, 18));
@@ -34727,7 +35382,7 @@ function SwapMode({
34727
35382
  fromToken?.decimals,
34728
35383
  route
34729
35384
  ]);
34730
- const fromBalance = useMemo28(() => {
35385
+ const fromBalance = useMemo29(() => {
34731
35386
  const walletToken = fromToken;
34732
35387
  if (!walletToken || !("balance" in walletToken)) return null;
34733
35388
  const raw = walletToken.balance;
@@ -34737,7 +35392,7 @@ function SwapMode({
34737
35392
  return Number.isFinite(n) ? n : null;
34738
35393
  }, [fromToken]);
34739
35394
  const balanceUsd = fromBalance !== null && hasFromUsdPrice ? fromBalance * fromTokenPriceUSD : null;
34740
- const estimatedToAmount = useMemo28(() => {
35395
+ const estimatedToAmount = useMemo29(() => {
34741
35396
  if (tokenSellNum <= 0 || !hasFromUsdPrice || !hasToUsdPrice) return null;
34742
35397
  return tokenSellNum * (fromTokenPriceUSD / toTokenPriceUSD);
34743
35398
  }, [
@@ -34747,10 +35402,10 @@ function SwapMode({
34747
35402
  hasFromUsdPrice,
34748
35403
  hasToUsdPrice
34749
35404
  ]);
34750
- const backendToUsdStr = useMemo28(() => {
35405
+ const backendToUsdStr = useMemo29(() => {
34751
35406
  return route.data?.finalExchangeRate?.toAmountMinUSD ?? route.data?.route?.estimate?.toAmountMinUsd ?? route.data?.route?.estimate?.toAmountUsd ?? null;
34752
35407
  }, [route.data]);
34753
- const toAmount = useMemo28(() => {
35408
+ const toAmount = useMemo29(() => {
34754
35409
  if (backendToUsdStr && toTokenPriceUSD > 0) {
34755
35410
  const usd = parseFloat(backendToUsdStr);
34756
35411
  if (Number.isFinite(usd) && usd > 0) return usd / toTokenPriceUSD;
@@ -34776,7 +35431,7 @@ function SwapMode({
34776
35431
  estimatedToAmount
34777
35432
  ]);
34778
35433
  const fromUsd = usdSellNum;
34779
- const toUsd = useMemo28(() => {
35434
+ const toUsd = useMemo29(() => {
34780
35435
  if (backendToUsdStr) {
34781
35436
  const n = parseFloat(backendToUsdStr);
34782
35437
  if (Number.isFinite(n) && n > 0) return n;
@@ -34787,12 +35442,12 @@ function SwapMode({
34787
35442
  const isEstimate = !route.data;
34788
35443
  const USD_EPSILON = 1e-3;
34789
35444
  const displayToUsd = toUsd > USD_EPSILON ? toUsd : estimatedToAmount !== null && hasToUsdPrice ? estimatedToAmount * toTokenPriceUSD : 0;
34790
- const priceImpact = useMemo28(() => {
35445
+ const priceImpact = useMemo29(() => {
34791
35446
  if (!route.data || fromUsd < 0.01 || displayToUsd < 0.01) return null;
34792
35447
  const impact = 1 - displayToUsd / fromUsd;
34793
35448
  return impact > 1e-3 ? impact : null;
34794
35449
  }, [route.data, fromUsd, displayToUsd]);
34795
- const routePath = useMemo28(() => {
35450
+ const routePath = useMemo29(() => {
34796
35451
  if (!route.data) return null;
34797
35452
  const provider = route.data.route?.provider;
34798
35453
  const steps = route.data.route?.steps;
@@ -34819,19 +35474,19 @@ function SwapMode({
34819
35474
  return null;
34820
35475
  }, [route.data, fromToken?.symbol, toToken?.symbol]);
34821
35476
  const isGasSponsored = !!route.data?.sponsorship;
34822
- const networkCostUsd = useMemo28(() => {
35477
+ const networkCostUsd = useMemo29(() => {
34823
35478
  const fees = route.data?.route?.estimate?.fees;
34824
35479
  if (!fees?.length) return null;
34825
35480
  const gasTotal = fees.filter((f) => f.type?.toLowerCase().includes("gas")).reduce((sum, f) => sum + (Number(f.amountUsd) || 0), 0);
34826
35481
  return gasTotal > 0 ? gasTotal : null;
34827
35482
  }, [route.data]);
34828
- const protocolFeeUsd = useMemo28(() => {
35483
+ const protocolFeeUsd = useMemo29(() => {
34829
35484
  const fees = route.data?.route?.estimate?.fees;
34830
35485
  if (!fees?.length) return null;
34831
35486
  const total = fees.filter((f) => !f.type?.toLowerCase().includes("gas")).reduce((sum, f) => sum + (Number(f.amountUsd) || 0), 0);
34832
35487
  return total > 0 ? total : null;
34833
35488
  }, [route.data]);
34834
- const exchangeRate = useMemo28(() => {
35489
+ const exchangeRate = useMemo29(() => {
34835
35490
  if (!hasFromUsdPrice || !hasToUsdPrice) return null;
34836
35491
  return toTokenPriceUSD / fromTokenPriceUSD;
34837
35492
  }, [fromTokenPriceUSD, toTokenPriceUSD, hasFromUsdPrice, hasToUsdPrice]);
@@ -34840,13 +35495,13 @@ function SwapMode({
34840
35495
  const hasAmount = rawSellNum > 0 && (amountInputMode === "token" || hasFromUsdPrice);
34841
35496
  const isConnected = walletStatus === "connected" && !!walletAddress;
34842
35497
  const canGetQuote = hasTokens && hasAmount && !insufficient && isConnected && (!needsDestAddress || isValidDestAddress);
34843
- useEffect32(() => {
35498
+ useEffect33(() => {
34844
35499
  if (!fromToken) return;
34845
35500
  if (!hasFromUsdPrice && amountInputMode === "usd") {
34846
35501
  setAmountInputMode("token");
34847
35502
  }
34848
35503
  }, [fromToken, hasFromUsdPrice, amountInputMode]);
34849
- useEffect32(() => {
35504
+ useEffect33(() => {
34850
35505
  if (displayToAmount === null) {
34851
35506
  prevToAmountRef.current = null;
34852
35507
  return;
@@ -34860,14 +35515,14 @@ function SwapMode({
34860
35515
  const t = setTimeout(() => setRateUpdated(false), 700);
34861
35516
  return () => clearTimeout(t);
34862
35517
  }, [displayToAmount]);
34863
- useEffect32(() => {
35518
+ useEffect33(() => {
34864
35519
  setDestAddress("");
34865
35520
  }, [toChainType]);
34866
- const fetchRef = useRef18(route.fetch);
34867
- useEffect32(() => {
35521
+ const fetchRef = useRef19(route.fetch);
35522
+ useEffect33(() => {
34868
35523
  fetchRef.current = route.fetch;
34869
35524
  });
34870
- useEffect32(() => {
35525
+ useEffect33(() => {
34871
35526
  if (!canGetQuote || stage !== "home") return;
34872
35527
  if (!fromToken || !fromChain || !toToken || !toChain || !walletAddress)
34873
35528
  return;
@@ -34896,7 +35551,7 @@ function SwapMode({
34896
35551
  destAddress,
34897
35552
  slippage
34898
35553
  ]);
34899
- useEffect32(() => {
35554
+ useEffect33(() => {
34900
35555
  if (!canGetQuote || !fromToken || !fromChain || !toToken || !toChain || !walletAddress) {
34901
35556
  latestFetchParamsRef.current = null;
34902
35557
  return;
@@ -34923,12 +35578,12 @@ function SwapMode({
34923
35578
  destAddress,
34924
35579
  slippage
34925
35580
  ]);
34926
- useEffect32(() => {
35581
+ useEffect33(() => {
34927
35582
  quoteTimestampRef.current = route.data ? Date.now() : null;
34928
35583
  setQuoteAge(0);
34929
35584
  }, [route.data]);
34930
- const msgTimeoutRef = useRef18(null);
34931
- useEffect32(() => {
35585
+ const msgTimeoutRef = useRef19(null);
35586
+ useEffect33(() => {
34932
35587
  if (!route.loading) {
34933
35588
  setQuoteLoadingMsgIdx(0);
34934
35589
  setQuoteLoadingMsgVisible(true);
@@ -34946,7 +35601,7 @@ function SwapMode({
34946
35601
  if (msgTimeoutRef.current !== null) clearTimeout(msgTimeoutRef.current);
34947
35602
  };
34948
35603
  }, [route.loading]);
34949
- useEffect32(() => {
35604
+ useEffect33(() => {
34950
35605
  if (!route.data) return;
34951
35606
  const id = setInterval(() => {
34952
35607
  const ts = quoteTimestampRef.current;
@@ -34960,7 +35615,7 @@ function SwapMode({
34960
35615
  }, 1e3);
34961
35616
  return () => clearInterval(id);
34962
35617
  }, [route.data]);
34963
- useEffect32(() => {
35618
+ useEffect33(() => {
34964
35619
  if (stage !== "review") return;
34965
35620
  if (!route.data || !walletAddress) return;
34966
35621
  const fromTokenAddress = fromToken?.address;
@@ -34971,7 +35626,7 @@ function SwapMode({
34971
35626
  routeResult: route.data
34972
35627
  });
34973
35628
  }, [stage, route.data, walletAddress, fromToken]);
34974
- useEffect32(() => {
35629
+ useEffect33(() => {
34975
35630
  if (!showSettings) {
34976
35631
  setShowCurrencyDropdown(false);
34977
35632
  return;
@@ -34984,7 +35639,7 @@ function SwapMode({
34984
35639
  document.addEventListener("mousedown", handler);
34985
35640
  return () => document.removeEventListener("mousedown", handler);
34986
35641
  }, [showSettings]);
34987
- useEffect32(() => {
35642
+ useEffect33(() => {
34988
35643
  if (!showCurrencyDropdown) return;
34989
35644
  const handler = (e2) => {
34990
35645
  if (currencyDropdownRef.current && !currencyDropdownRef.current.contains(e2.target)) {
@@ -34995,7 +35650,7 @@ function SwapMode({
34995
35650
  return () => document.removeEventListener("mousedown", handler);
34996
35651
  }, [showCurrencyDropdown]);
34997
35652
  if (stage === "select-from") {
34998
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
35653
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
34999
35654
  SwapTokenSelect,
35000
35655
  {
35001
35656
  side: "from",
@@ -35013,7 +35668,7 @@ function SwapMode({
35013
35668
  ) });
35014
35669
  }
35015
35670
  if (stage === "select-to" && !lockDestToken) {
35016
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
35671
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
35017
35672
  SwapTokenSelect,
35018
35673
  {
35019
35674
  side: "to",
@@ -35032,9 +35687,9 @@ function SwapMode({
35032
35687
  ) });
35033
35688
  }
35034
35689
  if (stage === "connect-wallet") {
35035
- return /* @__PURE__ */ jsxs45(WidgetContainer, { theme: resolvedTheme, style, children: [
35036
- /* @__PURE__ */ jsx57(
35037
- SwapWalletSelector,
35690
+ return /* @__PURE__ */ jsxs47(WidgetContainer, { theme: resolvedTheme, style, children: [
35691
+ /* @__PURE__ */ jsx59(
35692
+ SwapWalletSelector_default,
35038
35693
  {
35039
35694
  walletStatus,
35040
35695
  walletAddress,
@@ -35042,7 +35697,7 @@ function SwapMode({
35042
35697
  onBack: handleWalletConnected
35043
35698
  }
35044
35699
  ),
35045
- isConnected && /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx57(
35700
+ isConnected && /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx59(
35046
35701
  "button",
35047
35702
  {
35048
35703
  onClick: () => setStage("home"),
@@ -35075,8 +35730,8 @@ function SwapMode({
35075
35730
  const offset = circ - progress / 100 * circ;
35076
35731
  const isApproving = txStatus === "approving";
35077
35732
  const title = isApproving ? "Approving..." : "Order Submitted";
35078
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
35079
- /* @__PURE__ */ jsxs45(
35733
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
35734
+ /* @__PURE__ */ jsxs47(
35080
35735
  "div",
35081
35736
  {
35082
35737
  style: {
@@ -35086,7 +35741,7 @@ function SwapMode({
35086
35741
  marginBottom: spacing[5]
35087
35742
  },
35088
35743
  children: [
35089
- /* @__PURE__ */ jsx57(
35744
+ /* @__PURE__ */ jsx59(
35090
35745
  "button",
35091
35746
  {
35092
35747
  onClick: handleReset,
@@ -35101,7 +35756,7 @@ function SwapMode({
35101
35756
  border: 0,
35102
35757
  cursor: "pointer"
35103
35758
  },
35104
- children: /* @__PURE__ */ jsx57(
35759
+ children: /* @__PURE__ */ jsx59(
35105
35760
  "svg",
35106
35761
  {
35107
35762
  style: {
@@ -35115,12 +35770,12 @@ function SwapMode({
35115
35770
  strokeWidth: 2,
35116
35771
  strokeLinecap: "round",
35117
35772
  strokeLinejoin: "round",
35118
- children: /* @__PURE__ */ jsx57("path", { d: "M19 12H5m7-7-7 7 7 7" })
35773
+ children: /* @__PURE__ */ jsx59("path", { d: "M19 12H5m7-7-7 7 7 7" })
35119
35774
  }
35120
35775
  )
35121
35776
  }
35122
35777
  ),
35123
- /* @__PURE__ */ jsx57(
35778
+ /* @__PURE__ */ jsx59(
35124
35779
  "button",
35125
35780
  {
35126
35781
  onClick: handleReset,
@@ -35137,7 +35792,7 @@ function SwapMode({
35137
35792
  ]
35138
35793
  }
35139
35794
  ),
35140
- /* @__PURE__ */ jsx57(
35795
+ /* @__PURE__ */ jsx59(
35141
35796
  "h1",
35142
35797
  {
35143
35798
  style: {
@@ -35149,7 +35804,7 @@ function SwapMode({
35149
35804
  children: title
35150
35805
  }
35151
35806
  ),
35152
- /* @__PURE__ */ jsxs45(
35807
+ /* @__PURE__ */ jsxs47(
35153
35808
  "div",
35154
35809
  {
35155
35810
  style: {
@@ -35163,7 +35818,7 @@ function SwapMode({
35163
35818
  gap: spacing[5]
35164
35819
  },
35165
35820
  children: [
35166
- /* @__PURE__ */ jsxs45(
35821
+ /* @__PURE__ */ jsxs47(
35167
35822
  "div",
35168
35823
  {
35169
35824
  style: {
@@ -35175,14 +35830,14 @@ function SwapMode({
35175
35830
  justifyContent: "center"
35176
35831
  },
35177
35832
  children: [
35178
- /* @__PURE__ */ jsxs45(
35833
+ /* @__PURE__ */ jsxs47(
35179
35834
  "svg",
35180
35835
  {
35181
35836
  width: ringSize,
35182
35837
  height: ringSize,
35183
35838
  style: { position: "absolute", inset: 0 },
35184
35839
  children: [
35185
- /* @__PURE__ */ jsx57(
35840
+ /* @__PURE__ */ jsx59(
35186
35841
  "circle",
35187
35842
  {
35188
35843
  cx: ringSize / 2,
@@ -35193,7 +35848,7 @@ function SwapMode({
35193
35848
  strokeWidth: ringStroke
35194
35849
  }
35195
35850
  ),
35196
- /* @__PURE__ */ jsx57(
35851
+ /* @__PURE__ */ jsx59(
35197
35852
  "circle",
35198
35853
  {
35199
35854
  cx: ringSize / 2,
@@ -35212,7 +35867,7 @@ function SwapMode({
35212
35867
  ]
35213
35868
  }
35214
35869
  ),
35215
- /* @__PURE__ */ jsxs45(
35870
+ /* @__PURE__ */ jsxs47(
35216
35871
  "div",
35217
35872
  {
35218
35873
  style: {
@@ -35223,7 +35878,7 @@ function SwapMode({
35223
35878
  textAlign: "center"
35224
35879
  },
35225
35880
  children: [
35226
- /* @__PURE__ */ jsx57(
35881
+ /* @__PURE__ */ jsx59(
35227
35882
  "span",
35228
35883
  {
35229
35884
  style: {
@@ -35236,7 +35891,7 @@ function SwapMode({
35236
35891
  children: isApproving ? "Approving" : "Swapping"
35237
35892
  }
35238
35893
  ),
35239
- /* @__PURE__ */ jsxs45(
35894
+ /* @__PURE__ */ jsxs47(
35240
35895
  "div",
35241
35896
  {
35242
35897
  style: {
@@ -35246,7 +35901,7 @@ function SwapMode({
35246
35901
  gap: spacing[1.5]
35247
35902
  },
35248
35903
  children: [
35249
- fromToken?.iconUrl ? /* @__PURE__ */ jsx57(
35904
+ fromToken?.iconUrl ? /* @__PURE__ */ jsx59(
35250
35905
  "img",
35251
35906
  {
35252
35907
  src: fromToken.iconUrl,
@@ -35257,7 +35912,7 @@ function SwapMode({
35257
35912
  },
35258
35913
  alt: ""
35259
35914
  }
35260
- ) : /* @__PURE__ */ jsx57(
35915
+ ) : /* @__PURE__ */ jsx59(
35261
35916
  "div",
35262
35917
  {
35263
35918
  style: {
@@ -35268,7 +35923,7 @@ function SwapMode({
35268
35923
  }
35269
35924
  }
35270
35925
  ),
35271
- /* @__PURE__ */ jsx57(
35926
+ /* @__PURE__ */ jsx59(
35272
35927
  "svg",
35273
35928
  {
35274
35929
  style: {
@@ -35282,10 +35937,10 @@ function SwapMode({
35282
35937
  strokeWidth: 2,
35283
35938
  strokeLinecap: "round",
35284
35939
  strokeLinejoin: "round",
35285
- children: /* @__PURE__ */ jsx57("path", { d: "M5 12h14m-7-7 7 7-7 7" })
35940
+ children: /* @__PURE__ */ jsx59("path", { d: "M5 12h14m-7-7 7 7-7 7" })
35286
35941
  }
35287
35942
  ),
35288
- toToken?.iconUrl ? /* @__PURE__ */ jsx57(
35943
+ toToken?.iconUrl ? /* @__PURE__ */ jsx59(
35289
35944
  "img",
35290
35945
  {
35291
35946
  src: toToken.iconUrl,
@@ -35296,7 +35951,7 @@ function SwapMode({
35296
35951
  },
35297
35952
  alt: ""
35298
35953
  }
35299
- ) : /* @__PURE__ */ jsx57(
35954
+ ) : /* @__PURE__ */ jsx59(
35300
35955
  "div",
35301
35956
  {
35302
35957
  style: {
@@ -35310,7 +35965,7 @@ function SwapMode({
35310
35965
  ]
35311
35966
  }
35312
35967
  ),
35313
- /* @__PURE__ */ jsxs45(
35968
+ /* @__PURE__ */ jsxs47(
35314
35969
  "span",
35315
35970
  {
35316
35971
  style: {
@@ -35322,7 +35977,7 @@ function SwapMode({
35322
35977
  children: [
35323
35978
  fromToken?.symbol,
35324
35979
  " ",
35325
- /* @__PURE__ */ jsx57(
35980
+ /* @__PURE__ */ jsx59(
35326
35981
  "span",
35327
35982
  {
35328
35983
  style: {
@@ -35337,7 +35992,7 @@ function SwapMode({
35337
35992
  ]
35338
35993
  }
35339
35994
  ),
35340
- /* @__PURE__ */ jsxs45(
35995
+ /* @__PURE__ */ jsxs47(
35341
35996
  "span",
35342
35997
  {
35343
35998
  style: {
@@ -35357,7 +36012,7 @@ function SwapMode({
35357
36012
  ]
35358
36013
  }
35359
36014
  ),
35360
- /* @__PURE__ */ jsxs45(
36015
+ /* @__PURE__ */ jsxs47(
35361
36016
  "div",
35362
36017
  {
35363
36018
  style: {
@@ -35367,7 +36022,7 @@ function SwapMode({
35367
36022
  justifyContent: "space-between"
35368
36023
  },
35369
36024
  children: [
35370
- /* @__PURE__ */ jsx57(
36025
+ /* @__PURE__ */ jsx59(
35371
36026
  ProcessingStepNode,
35372
36027
  {
35373
36028
  active: activeStep >= 0,
@@ -35376,8 +36031,8 @@ function SwapMode({
35376
36031
  label: `Sending ${fromToken?.symbol ?? ""}`
35377
36032
  }
35378
36033
  ),
35379
- /* @__PURE__ */ jsx57(ProcessingStepLine, { done: activeStep > 0 }),
35380
- /* @__PURE__ */ jsx57(
36034
+ /* @__PURE__ */ jsx59(ProcessingStepLine, { done: activeStep > 0 }),
36035
+ /* @__PURE__ */ jsx59(
35381
36036
  ProcessingStepNode,
35382
36037
  {
35383
36038
  active: activeStep >= 1,
@@ -35386,8 +36041,8 @@ function SwapMode({
35386
36041
  label: "Create Order"
35387
36042
  }
35388
36043
  ),
35389
- /* @__PURE__ */ jsx57(ProcessingStepLine, { done: activeStep > 1 }),
35390
- /* @__PURE__ */ jsx57(
36044
+ /* @__PURE__ */ jsx59(ProcessingStepLine, { done: activeStep > 1 }),
36045
+ /* @__PURE__ */ jsx59(
35391
36046
  ProcessingStepNode,
35392
36047
  {
35393
36048
  active: activeStep >= 2,
@@ -35406,7 +36061,7 @@ function SwapMode({
35406
36061
  fromChainTxUrl
35407
36062
  );
35408
36063
  const isCopied = copiedHash === txHash;
35409
- return /* @__PURE__ */ jsxs45(
36064
+ return /* @__PURE__ */ jsxs47(
35410
36065
  "div",
35411
36066
  {
35412
36067
  style: {
@@ -35415,7 +36070,7 @@ function SwapMode({
35415
36070
  gap: spacing[3]
35416
36071
  },
35417
36072
  children: [
35418
- explorerUrl && /* @__PURE__ */ jsxs45(
36073
+ explorerUrl && /* @__PURE__ */ jsxs47(
35419
36074
  "a",
35420
36075
  {
35421
36076
  href: explorerUrl,
@@ -35434,7 +36089,7 @@ function SwapMode({
35434
36089
  },
35435
36090
  children: [
35436
36091
  "View transaction",
35437
- /* @__PURE__ */ jsxs45(
36092
+ /* @__PURE__ */ jsxs47(
35438
36093
  "svg",
35439
36094
  {
35440
36095
  style: { width: "0.875rem", height: "0.875rem" },
@@ -35445,16 +36100,16 @@ function SwapMode({
35445
36100
  strokeLinecap: "round",
35446
36101
  strokeLinejoin: "round",
35447
36102
  children: [
35448
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35449
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35450
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
36103
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
36104
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
36105
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35451
36106
  ]
35452
36107
  }
35453
36108
  )
35454
36109
  ]
35455
36110
  }
35456
36111
  ),
35457
- /* @__PURE__ */ jsx57(
36112
+ /* @__PURE__ */ jsx59(
35458
36113
  "button",
35459
36114
  {
35460
36115
  onClick: () => handleCopyHash(txHash),
@@ -35471,11 +36126,11 @@ function SwapMode({
35471
36126
  padding: 0,
35472
36127
  transition: "color 0.15s"
35473
36128
  },
35474
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(Fragment10, { children: [
36129
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(Fragment12, { children: [
35475
36130
  txHash.slice(0, 6),
35476
36131
  "\u2026",
35477
36132
  txHash.slice(-4),
35478
- /* @__PURE__ */ jsxs45(
36133
+ /* @__PURE__ */ jsxs47(
35479
36134
  "svg",
35480
36135
  {
35481
36136
  style: { width: "0.875rem", height: "0.875rem" },
@@ -35486,7 +36141,7 @@ function SwapMode({
35486
36141
  strokeLinecap: "round",
35487
36142
  strokeLinejoin: "round",
35488
36143
  children: [
35489
- /* @__PURE__ */ jsx57(
36144
+ /* @__PURE__ */ jsx59(
35490
36145
  "rect",
35491
36146
  {
35492
36147
  x: "9",
@@ -35497,7 +36152,7 @@ function SwapMode({
35497
36152
  ry: "2"
35498
36153
  }
35499
36154
  ),
35500
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36155
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
35501
36156
  ]
35502
36157
  }
35503
36158
  )
@@ -35525,10 +36180,10 @@ function SwapMode({
35525
36180
  dateStyle: "medium",
35526
36181
  timeStyle: "short"
35527
36182
  }) ?? null;
35528
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45("div", { style: { position: "relative", overflow: "hidden" }, children: [
35529
- /* @__PURE__ */ jsx57(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx57(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
35530
- /* @__PURE__ */ jsxs45("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
35531
- /* @__PURE__ */ jsxs45(
36183
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47("div", { style: { position: "relative", overflow: "hidden" }, children: [
36184
+ /* @__PURE__ */ jsx59(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx59(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
36185
+ /* @__PURE__ */ jsxs47("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
36186
+ /* @__PURE__ */ jsxs47(
35532
36187
  "div",
35533
36188
  {
35534
36189
  style: {
@@ -35538,7 +36193,7 @@ function SwapMode({
35538
36193
  marginBottom: spacing[5]
35539
36194
  },
35540
36195
  children: [
35541
- /* @__PURE__ */ jsx57(
36196
+ /* @__PURE__ */ jsx59(
35542
36197
  "div",
35543
36198
  {
35544
36199
  style: {
@@ -35551,7 +36206,7 @@ function SwapMode({
35551
36206
  justifyContent: "center",
35552
36207
  flexShrink: 0
35553
36208
  },
35554
- children: /* @__PURE__ */ jsx57(
36209
+ children: /* @__PURE__ */ jsx59(
35555
36210
  "svg",
35556
36211
  {
35557
36212
  style: {
@@ -35565,12 +36220,12 @@ function SwapMode({
35565
36220
  strokeWidth: 3,
35566
36221
  strokeLinecap: "round",
35567
36222
  strokeLinejoin: "round",
35568
- children: /* @__PURE__ */ jsx57("path", { d: "M20 6L9 17l-5-5" })
36223
+ children: /* @__PURE__ */ jsx59("path", { d: "M20 6L9 17l-5-5" })
35569
36224
  }
35570
36225
  )
35571
36226
  }
35572
36227
  ),
35573
- /* @__PURE__ */ jsx57(
36228
+ /* @__PURE__ */ jsx59(
35574
36229
  "h2",
35575
36230
  {
35576
36231
  style: {
@@ -35584,7 +36239,7 @@ function SwapMode({
35584
36239
  ]
35585
36240
  }
35586
36241
  ),
35587
- /* @__PURE__ */ jsxs45(
36242
+ /* @__PURE__ */ jsxs47(
35588
36243
  "div",
35589
36244
  {
35590
36245
  style: {
@@ -35594,7 +36249,7 @@ function SwapMode({
35594
36249
  padding: spacing[5]
35595
36250
  },
35596
36251
  children: [
35597
- /* @__PURE__ */ jsxs45(
36252
+ /* @__PURE__ */ jsxs47(
35598
36253
  "div",
35599
36254
  {
35600
36255
  style: {
@@ -35604,7 +36259,7 @@ function SwapMode({
35604
36259
  fontSize: fontSize.sm
35605
36260
  },
35606
36261
  children: [
35607
- /* @__PURE__ */ jsxs45(
36262
+ /* @__PURE__ */ jsxs47(
35608
36263
  "div",
35609
36264
  {
35610
36265
  style: {
@@ -35613,8 +36268,8 @@ function SwapMode({
35613
36268
  gap: spacing[2]
35614
36269
  },
35615
36270
  children: [
35616
- fromToken?.iconUrl && /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
35617
- /* @__PURE__ */ jsx57(
36271
+ fromToken?.iconUrl && /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
36272
+ /* @__PURE__ */ jsx59(
35618
36273
  "img",
35619
36274
  {
35620
36275
  src: fromToken.iconUrl,
@@ -35626,7 +36281,7 @@ function SwapMode({
35626
36281
  }
35627
36282
  }
35628
36283
  ),
35629
- fromChain?.chainIconURI && /* @__PURE__ */ jsx57(
36284
+ fromChain?.chainIconURI && /* @__PURE__ */ jsx59(
35630
36285
  "img",
35631
36286
  {
35632
36287
  src: fromChain.chainIconURI,
@@ -35644,11 +36299,11 @@ function SwapMode({
35644
36299
  }
35645
36300
  )
35646
36301
  ] }),
35647
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "You sold" })
36302
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "You sold" })
35648
36303
  ]
35649
36304
  }
35650
36305
  ),
35651
- /* @__PURE__ */ jsxs45(
36306
+ /* @__PURE__ */ jsxs47(
35652
36307
  "span",
35653
36308
  {
35654
36309
  style: {
@@ -35665,7 +36320,7 @@ function SwapMode({
35665
36320
  ]
35666
36321
  }
35667
36322
  ),
35668
- /* @__PURE__ */ jsxs45(
36323
+ /* @__PURE__ */ jsxs47(
35669
36324
  "div",
35670
36325
  {
35671
36326
  style: {
@@ -35676,7 +36331,7 @@ function SwapMode({
35676
36331
  marginTop: spacing[3]
35677
36332
  },
35678
36333
  children: [
35679
- /* @__PURE__ */ jsxs45(
36334
+ /* @__PURE__ */ jsxs47(
35680
36335
  "div",
35681
36336
  {
35682
36337
  style: {
@@ -35685,8 +36340,8 @@ function SwapMode({
35685
36340
  gap: spacing[2]
35686
36341
  },
35687
36342
  children: [
35688
- toToken?.iconUrl && /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
35689
- /* @__PURE__ */ jsx57(
36343
+ toToken?.iconUrl && /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
36344
+ /* @__PURE__ */ jsx59(
35690
36345
  "img",
35691
36346
  {
35692
36347
  src: toToken.iconUrl,
@@ -35698,7 +36353,7 @@ function SwapMode({
35698
36353
  }
35699
36354
  }
35700
36355
  ),
35701
- toChain?.chainIconURI && /* @__PURE__ */ jsx57(
36356
+ toChain?.chainIconURI && /* @__PURE__ */ jsx59(
35702
36357
  "img",
35703
36358
  {
35704
36359
  src: toChain.chainIconURI,
@@ -35716,11 +36371,11 @@ function SwapMode({
35716
36371
  }
35717
36372
  )
35718
36373
  ] }),
35719
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Received" })
36374
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Received" })
35720
36375
  ]
35721
36376
  }
35722
36377
  ),
35723
- /* @__PURE__ */ jsxs45(
36378
+ /* @__PURE__ */ jsxs47(
35724
36379
  "span",
35725
36380
  {
35726
36381
  style: {
@@ -35737,7 +36392,7 @@ function SwapMode({
35737
36392
  ]
35738
36393
  }
35739
36394
  ),
35740
- /* @__PURE__ */ jsx57(
36395
+ /* @__PURE__ */ jsx59(
35741
36396
  "div",
35742
36397
  {
35743
36398
  style: {
@@ -35747,7 +36402,7 @@ function SwapMode({
35747
36402
  }
35748
36403
  }
35749
36404
  ),
35750
- /* @__PURE__ */ jsxs45(
36405
+ /* @__PURE__ */ jsxs47(
35751
36406
  "div",
35752
36407
  {
35753
36408
  style: {
@@ -35757,28 +36412,28 @@ function SwapMode({
35757
36412
  fontSize: fontSize.sm
35758
36413
  },
35759
36414
  children: [
35760
- fromUsd > 0 && /* @__PURE__ */ jsx57(
36415
+ fromUsd > 0 && /* @__PURE__ */ jsx59(
35761
36416
  SuccessReceiptRow,
35762
36417
  {
35763
36418
  label: "Value sold",
35764
36419
  value: fmtLocal(fromUsd)
35765
36420
  }
35766
36421
  ),
35767
- toUsd > 0 && /* @__PURE__ */ jsx57(
36422
+ toUsd > 0 && /* @__PURE__ */ jsx59(
35768
36423
  SuccessReceiptRow,
35769
36424
  {
35770
36425
  label: "Value received",
35771
36426
  value: fmtLocal(toUsd)
35772
36427
  }
35773
36428
  ),
35774
- effectiveRate && /* @__PURE__ */ jsx57(
36429
+ effectiveRate && /* @__PURE__ */ jsx59(
35775
36430
  SuccessReceiptRow,
35776
36431
  {
35777
36432
  label: "Effective rate",
35778
36433
  value: effectiveRate
35779
36434
  }
35780
36435
  ),
35781
- completedStr && /* @__PURE__ */ jsx57(SuccessReceiptRow, { label: "Completed", value: completedStr }),
36436
+ completedStr && /* @__PURE__ */ jsx59(SuccessReceiptRow, { label: "Completed", value: completedStr }),
35782
36437
  txHash && (() => {
35783
36438
  const srcUrl = buildExplorerUrl(
35784
36439
  txHash,
@@ -35786,7 +36441,7 @@ function SwapMode({
35786
36441
  fromChainTxUrl
35787
36442
  );
35788
36443
  const isCopied = copiedHash === txHash;
35789
- return /* @__PURE__ */ jsxs45(
36444
+ return /* @__PURE__ */ jsxs47(
35790
36445
  "div",
35791
36446
  {
35792
36447
  style: {
@@ -35795,8 +36450,8 @@ function SwapMode({
35795
36450
  justifyContent: "space-between"
35796
36451
  },
35797
36452
  children: [
35798
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
35799
- /* @__PURE__ */ jsxs45(
36453
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
36454
+ /* @__PURE__ */ jsxs47(
35800
36455
  "div",
35801
36456
  {
35802
36457
  style: {
@@ -35805,7 +36460,7 @@ function SwapMode({
35805
36460
  gap: spacing[2]
35806
36461
  },
35807
36462
  children: [
35808
- srcUrl && /* @__PURE__ */ jsxs45(
36463
+ srcUrl && /* @__PURE__ */ jsxs47(
35809
36464
  "a",
35810
36465
  {
35811
36466
  href: srcUrl,
@@ -35825,7 +36480,7 @@ function SwapMode({
35825
36480
  txHash.slice(0, 6),
35826
36481
  "\u2026",
35827
36482
  txHash.slice(-4),
35828
- /* @__PURE__ */ jsxs45(
36483
+ /* @__PURE__ */ jsxs47(
35829
36484
  "svg",
35830
36485
  {
35831
36486
  style: { width: "0.75rem", height: "0.75rem" },
@@ -35836,16 +36491,16 @@ function SwapMode({
35836
36491
  strokeLinecap: "round",
35837
36492
  strokeLinejoin: "round",
35838
36493
  children: [
35839
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35840
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35841
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
36494
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
36495
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
36496
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35842
36497
  ]
35843
36498
  }
35844
36499
  )
35845
36500
  ]
35846
36501
  }
35847
36502
  ),
35848
- /* @__PURE__ */ jsx57(
36503
+ /* @__PURE__ */ jsx59(
35849
36504
  "button",
35850
36505
  {
35851
36506
  onClick: () => handleCopyHash(txHash),
@@ -35863,7 +36518,7 @@ function SwapMode({
35863
36518
  padding: 0,
35864
36519
  transition: "color 0.15s"
35865
36520
  },
35866
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(
36521
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(
35867
36522
  "svg",
35868
36523
  {
35869
36524
  style: {
@@ -35877,7 +36532,7 @@ function SwapMode({
35877
36532
  strokeLinecap: "round",
35878
36533
  strokeLinejoin: "round",
35879
36534
  children: [
35880
- /* @__PURE__ */ jsx57(
36535
+ /* @__PURE__ */ jsx59(
35881
36536
  "rect",
35882
36537
  {
35883
36538
  x: "9",
@@ -35888,7 +36543,7 @@ function SwapMode({
35888
36543
  ry: "2"
35889
36544
  }
35890
36545
  ),
35891
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36546
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
35892
36547
  ]
35893
36548
  }
35894
36549
  )
@@ -35908,7 +36563,7 @@ function SwapMode({
35908
36563
  toChainTxUrl
35909
36564
  );
35910
36565
  const isCopied = copiedHash === destTxHash;
35911
- return /* @__PURE__ */ jsxs45(
36566
+ return /* @__PURE__ */ jsxs47(
35912
36567
  "div",
35913
36568
  {
35914
36569
  style: {
@@ -35917,8 +36572,8 @@ function SwapMode({
35917
36572
  justifyContent: "space-between"
35918
36573
  },
35919
36574
  children: [
35920
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
35921
- /* @__PURE__ */ jsxs45(
36575
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
36576
+ /* @__PURE__ */ jsxs47(
35922
36577
  "div",
35923
36578
  {
35924
36579
  style: {
@@ -35927,7 +36582,7 @@ function SwapMode({
35927
36582
  gap: spacing[2]
35928
36583
  },
35929
36584
  children: [
35930
- destUrl && /* @__PURE__ */ jsxs45(
36585
+ destUrl && /* @__PURE__ */ jsxs47(
35931
36586
  "a",
35932
36587
  {
35933
36588
  href: destUrl,
@@ -35947,7 +36602,7 @@ function SwapMode({
35947
36602
  destTxHash.slice(0, 6),
35948
36603
  "\u2026",
35949
36604
  destTxHash.slice(-4),
35950
- /* @__PURE__ */ jsxs45(
36605
+ /* @__PURE__ */ jsxs47(
35951
36606
  "svg",
35952
36607
  {
35953
36608
  style: { width: "0.75rem", height: "0.75rem" },
@@ -35958,16 +36613,16 @@ function SwapMode({
35958
36613
  strokeLinecap: "round",
35959
36614
  strokeLinejoin: "round",
35960
36615
  children: [
35961
- /* @__PURE__ */ jsx57("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
35962
- /* @__PURE__ */ jsx57("polyline", { points: "15 3 21 3 21 9" }),
35963
- /* @__PURE__ */ jsx57("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
36616
+ /* @__PURE__ */ jsx59("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
36617
+ /* @__PURE__ */ jsx59("polyline", { points: "15 3 21 3 21 9" }),
36618
+ /* @__PURE__ */ jsx59("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
35964
36619
  ]
35965
36620
  }
35966
36621
  )
35967
36622
  ]
35968
36623
  }
35969
36624
  ),
35970
- /* @__PURE__ */ jsx57(
36625
+ /* @__PURE__ */ jsx59(
35971
36626
  "button",
35972
36627
  {
35973
36628
  onClick: () => handleCopyHash(destTxHash),
@@ -35984,7 +36639,7 @@ function SwapMode({
35984
36639
  padding: 0,
35985
36640
  transition: "color 0.15s"
35986
36641
  },
35987
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs45(
36642
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs47(
35988
36643
  "svg",
35989
36644
  {
35990
36645
  style: {
@@ -35998,7 +36653,7 @@ function SwapMode({
35998
36653
  strokeLinecap: "round",
35999
36654
  strokeLinejoin: "round",
36000
36655
  children: [
36001
- /* @__PURE__ */ jsx57(
36656
+ /* @__PURE__ */ jsx59(
36002
36657
  "rect",
36003
36658
  {
36004
36659
  x: "9",
@@ -36009,7 +36664,7 @@ function SwapMode({
36009
36664
  ry: "2"
36010
36665
  }
36011
36666
  ),
36012
- /* @__PURE__ */ jsx57("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36667
+ /* @__PURE__ */ jsx59("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
36013
36668
  ]
36014
36669
  }
36015
36670
  )
@@ -36029,7 +36684,7 @@ function SwapMode({
36029
36684
  }
36030
36685
  )
36031
36686
  ] }),
36032
- /* @__PURE__ */ jsxs45(
36687
+ /* @__PURE__ */ jsxs47(
36033
36688
  "div",
36034
36689
  {
36035
36690
  style: {
@@ -36039,7 +36694,7 @@ function SwapMode({
36039
36694
  gap: spacing[2]
36040
36695
  },
36041
36696
  children: [
36042
- /* @__PURE__ */ jsx57(
36697
+ /* @__PURE__ */ jsx59(
36043
36698
  "button",
36044
36699
  {
36045
36700
  onClick: handleReset,
@@ -36057,7 +36712,7 @@ function SwapMode({
36057
36712
  children: "Done"
36058
36713
  }
36059
36714
  ),
36060
- fromToken && toToken && /* @__PURE__ */ jsxs45(
36715
+ fromToken && toToken && /* @__PURE__ */ jsxs47(
36061
36716
  "button",
36062
36717
  {
36063
36718
  onClick: handleSwapBack,
@@ -36086,7 +36741,7 @@ function SwapMode({
36086
36741
  ] }) });
36087
36742
  }
36088
36743
  if (stage === "error") {
36089
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx57(
36744
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx59(
36090
36745
  ErrorPage,
36091
36746
  {
36092
36747
  error: mapError(execution.errorMessage),
@@ -36098,7 +36753,7 @@ function SwapMode({
36098
36753
  if (stage === "review") {
36099
36754
  const reviewToAmount = toAmount ?? displayToAmount;
36100
36755
  const reviewToUsd = toUsd > 0 ? toUsd : displayToUsd;
36101
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45(
36756
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47(
36102
36757
  "div",
36103
36758
  {
36104
36759
  style: {
@@ -36107,7 +36762,7 @@ function SwapMode({
36107
36762
  overflowY: "auto"
36108
36763
  },
36109
36764
  children: [
36110
- /* @__PURE__ */ jsxs45(
36765
+ /* @__PURE__ */ jsxs47(
36111
36766
  "div",
36112
36767
  {
36113
36768
  style: {
@@ -36117,7 +36772,7 @@ function SwapMode({
36117
36772
  marginBottom: spacing[5]
36118
36773
  },
36119
36774
  children: [
36120
- /* @__PURE__ */ jsx57(
36775
+ /* @__PURE__ */ jsx59(
36121
36776
  "span",
36122
36777
  {
36123
36778
  style: {
@@ -36128,7 +36783,7 @@ function SwapMode({
36128
36783
  children: "You're swapping"
36129
36784
  }
36130
36785
  ),
36131
- /* @__PURE__ */ jsx57(
36786
+ /* @__PURE__ */ jsx59(
36132
36787
  "button",
36133
36788
  {
36134
36789
  onClick: () => setStage("home"),
@@ -36143,7 +36798,7 @@ function SwapMode({
36143
36798
  border: 0,
36144
36799
  cursor: "pointer"
36145
36800
  },
36146
- children: /* @__PURE__ */ jsx57(
36801
+ children: /* @__PURE__ */ jsx59(
36147
36802
  "svg",
36148
36803
  {
36149
36804
  style: {
@@ -36157,7 +36812,7 @@ function SwapMode({
36157
36812
  strokeWidth: 2,
36158
36813
  strokeLinecap: "round",
36159
36814
  strokeLinejoin: "round",
36160
- children: /* @__PURE__ */ jsx57("path", { d: "M18 6L6 18M6 6l12 12" })
36815
+ children: /* @__PURE__ */ jsx59("path", { d: "M18 6L6 18M6 6l12 12" })
36161
36816
  }
36162
36817
  )
36163
36818
  }
@@ -36165,7 +36820,7 @@ function SwapMode({
36165
36820
  ]
36166
36821
  }
36167
36822
  ),
36168
- /* @__PURE__ */ jsxs45(
36823
+ /* @__PURE__ */ jsxs47(
36169
36824
  "div",
36170
36825
  {
36171
36826
  style: {
@@ -36174,8 +36829,8 @@ function SwapMode({
36174
36829
  justifyContent: "space-between"
36175
36830
  },
36176
36831
  children: [
36177
- /* @__PURE__ */ jsxs45("div", { children: [
36178
- /* @__PURE__ */ jsxs45(
36832
+ /* @__PURE__ */ jsxs47("div", { children: [
36833
+ /* @__PURE__ */ jsxs47(
36179
36834
  "p",
36180
36835
  {
36181
36836
  style: {
@@ -36191,7 +36846,7 @@ function SwapMode({
36191
36846
  ]
36192
36847
  }
36193
36848
  ),
36194
- /* @__PURE__ */ jsx57(
36849
+ /* @__PURE__ */ jsx59(
36195
36850
  "p",
36196
36851
  {
36197
36852
  style: {
@@ -36203,7 +36858,7 @@ function SwapMode({
36203
36858
  }
36204
36859
  )
36205
36860
  ] }),
36206
- fromToken?.iconUrl && /* @__PURE__ */ jsx57(
36861
+ fromToken?.iconUrl && /* @__PURE__ */ jsx59(
36207
36862
  TokenIcon,
36208
36863
  {
36209
36864
  icon: fromToken.iconUrl,
@@ -36214,7 +36869,7 @@ function SwapMode({
36214
36869
  ]
36215
36870
  }
36216
36871
  ),
36217
- /* @__PURE__ */ jsx57(
36872
+ /* @__PURE__ */ jsx59(
36218
36873
  "div",
36219
36874
  {
36220
36875
  style: {
@@ -36222,7 +36877,7 @@ function SwapMode({
36222
36877
  justifyContent: "center",
36223
36878
  margin: `${spacing[3]} 0`
36224
36879
  },
36225
- children: /* @__PURE__ */ jsx57(
36880
+ children: /* @__PURE__ */ jsx59(
36226
36881
  "svg",
36227
36882
  {
36228
36883
  style: {
@@ -36236,12 +36891,12 @@ function SwapMode({
36236
36891
  strokeWidth: 2,
36237
36892
  strokeLinecap: "round",
36238
36893
  strokeLinejoin: "round",
36239
- children: /* @__PURE__ */ jsx57("path", { d: "M12 5v14m-7-7l7 7 7-7" })
36894
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 5v14m-7-7l7 7 7-7" })
36240
36895
  }
36241
36896
  )
36242
36897
  }
36243
36898
  ),
36244
- /* @__PURE__ */ jsxs45(
36899
+ /* @__PURE__ */ jsxs47(
36245
36900
  "div",
36246
36901
  {
36247
36902
  style: {
@@ -36250,8 +36905,8 @@ function SwapMode({
36250
36905
  justifyContent: "space-between"
36251
36906
  },
36252
36907
  children: [
36253
- /* @__PURE__ */ jsxs45("div", { children: [
36254
- /* @__PURE__ */ jsxs45(
36908
+ /* @__PURE__ */ jsxs47("div", { children: [
36909
+ /* @__PURE__ */ jsxs47(
36255
36910
  "p",
36256
36911
  {
36257
36912
  style: {
@@ -36267,7 +36922,7 @@ function SwapMode({
36267
36922
  ]
36268
36923
  }
36269
36924
  ),
36270
- /* @__PURE__ */ jsx57(
36925
+ /* @__PURE__ */ jsx59(
36271
36926
  "p",
36272
36927
  {
36273
36928
  style: {
@@ -36279,7 +36934,7 @@ function SwapMode({
36279
36934
  }
36280
36935
  )
36281
36936
  ] }),
36282
- toToken?.iconUrl && /* @__PURE__ */ jsx57(
36937
+ toToken?.iconUrl && /* @__PURE__ */ jsx59(
36283
36938
  TokenIcon,
36284
36939
  {
36285
36940
  icon: toToken.iconUrl,
@@ -36290,7 +36945,7 @@ function SwapMode({
36290
36945
  ]
36291
36946
  }
36292
36947
  ),
36293
- /* @__PURE__ */ jsxs45(
36948
+ /* @__PURE__ */ jsxs47(
36294
36949
  "button",
36295
36950
  {
36296
36951
  onClick: () => setShowReviewDetails((v) => !v),
@@ -36309,13 +36964,13 @@ function SwapMode({
36309
36964
  padding: 0
36310
36965
  },
36311
36966
  children: [
36312
- /* @__PURE__ */ jsx57(
36967
+ /* @__PURE__ */ jsx59(
36313
36968
  "div",
36314
36969
  {
36315
36970
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
36316
36971
  }
36317
36972
  ),
36318
- /* @__PURE__ */ jsxs45(
36973
+ /* @__PURE__ */ jsxs47(
36319
36974
  "span",
36320
36975
  {
36321
36976
  style: {
@@ -36327,7 +36982,7 @@ function SwapMode({
36327
36982
  },
36328
36983
  children: [
36329
36984
  showReviewDetails ? "Hide details" : "View details",
36330
- /* @__PURE__ */ jsx57(
36985
+ /* @__PURE__ */ jsx59(
36331
36986
  "svg",
36332
36987
  {
36333
36988
  style: {
@@ -36342,10 +36997,10 @@ function SwapMode({
36342
36997
  strokeWidth: 2,
36343
36998
  strokeLinecap: "round",
36344
36999
  strokeLinejoin: "round",
36345
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
37000
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
36346
37001
  }
36347
37002
  ),
36348
- route.data && /* @__PURE__ */ jsxs45(
37003
+ route.data && /* @__PURE__ */ jsxs47(
36349
37004
  "svg",
36350
37005
  {
36351
37006
  width: "14",
@@ -36358,7 +37013,7 @@ function SwapMode({
36358
37013
  marginLeft: "0.125rem"
36359
37014
  },
36360
37015
  children: [
36361
- /* @__PURE__ */ jsx57(
37016
+ /* @__PURE__ */ jsx59(
36362
37017
  "circle",
36363
37018
  {
36364
37019
  cx: "7",
@@ -36369,7 +37024,7 @@ function SwapMode({
36369
37024
  strokeWidth: "1.5"
36370
37025
  }
36371
37026
  ),
36372
- /* @__PURE__ */ jsx57(
37027
+ /* @__PURE__ */ jsx59(
36373
37028
  "circle",
36374
37029
  {
36375
37030
  cx: "7",
@@ -36390,7 +37045,7 @@ function SwapMode({
36390
37045
  ]
36391
37046
  }
36392
37047
  ),
36393
- /* @__PURE__ */ jsx57(
37048
+ /* @__PURE__ */ jsx59(
36394
37049
  "div",
36395
37050
  {
36396
37051
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
@@ -36399,7 +37054,7 @@ function SwapMode({
36399
37054
  ]
36400
37055
  }
36401
37056
  ),
36402
- showReviewDetails && /* @__PURE__ */ jsxs45(
37057
+ showReviewDetails && /* @__PURE__ */ jsxs47(
36403
37058
  "div",
36404
37059
  {
36405
37060
  style: {
@@ -36410,7 +37065,7 @@ function SwapMode({
36410
37065
  marginBottom: spacing[2]
36411
37066
  },
36412
37067
  children: [
36413
- exchangeRate !== null && /* @__PURE__ */ jsx57(
37068
+ exchangeRate !== null && /* @__PURE__ */ jsx59(
36414
37069
  ReviewDetailRow,
36415
37070
  {
36416
37071
  label: "Rate",
@@ -36418,7 +37073,7 @@ function SwapMode({
36418
37073
  value: `1 ${fromToken?.symbol} = ${fmtAmount(1 / (exchangeRate ?? 1), 4)} ${toToken?.symbol} ($${fmtAmount(fromTokenPriceUSD, 2)})`
36419
37074
  }
36420
37075
  ),
36421
- /* @__PURE__ */ jsx57(
37076
+ /* @__PURE__ */ jsx59(
36422
37077
  ReviewDetailRow,
36423
37078
  {
36424
37079
  label: "Fee",
@@ -36426,12 +37081,12 @@ function SwapMode({
36426
37081
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
36427
37082
  }
36428
37083
  ),
36429
- /* @__PURE__ */ jsx57(
37084
+ /* @__PURE__ */ jsx59(
36430
37085
  ReviewDetailRow,
36431
37086
  {
36432
37087
  label: "Network cost",
36433
37088
  tooltip: "Estimated gas fee paid to the blockchain network",
36434
- value: isGasSponsored ? /* @__PURE__ */ jsx57(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs45(
37089
+ value: isGasSponsored ? /* @__PURE__ */ jsx59(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs47(
36435
37090
  "span",
36436
37091
  {
36437
37092
  style: {
@@ -36440,14 +37095,14 @@ function SwapMode({
36440
37095
  gap: "0.25rem"
36441
37096
  },
36442
37097
  children: [
36443
- /* @__PURE__ */ jsx57(GasIcon, { size: "0.875rem" }),
37098
+ /* @__PURE__ */ jsx59(GasIcon, { size: "0.875rem" }),
36444
37099
  fmtLocal(networkCostUsd)
36445
37100
  ]
36446
37101
  }
36447
37102
  ) : "\u2014"
36448
37103
  }
36449
37104
  ),
36450
- /* @__PURE__ */ jsx57(
37105
+ /* @__PURE__ */ jsx59(
36451
37106
  ReviewDetailRow,
36452
37107
  {
36453
37108
  label: "Max slippage",
@@ -36455,12 +37110,12 @@ function SwapMode({
36455
37110
  value: `${slippage}%`
36456
37111
  }
36457
37112
  ),
36458
- (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx57(
37113
+ (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx59(
36459
37114
  ReviewDetailRow,
36460
37115
  {
36461
37116
  label: "Route",
36462
37117
  tooltip: "Protocol or bridge used to execute your swap",
36463
- value: /* @__PURE__ */ jsx57(
37118
+ value: /* @__PURE__ */ jsx59(
36464
37119
  "span",
36465
37120
  {
36466
37121
  style: {
@@ -36480,7 +37135,7 @@ function SwapMode({
36480
37135
  ]
36481
37136
  }
36482
37137
  ),
36483
- /* @__PURE__ */ jsx57(
37138
+ /* @__PURE__ */ jsx59(
36484
37139
  SwapActionArea,
36485
37140
  {
36486
37141
  fromTokenSymbol: fromToken?.symbol ?? "",
@@ -36499,12 +37154,12 @@ function SwapMode({
36499
37154
  const ctaDisabled = !hasTokens || !hasAmount || insufficient || isConnected && needsDestAddress && !isValidDestAddress || route.loading;
36500
37155
  const ctaAction = !isConnected ? handleConnectAndReview : () => void handleReview();
36501
37156
  const showRateRow = hasTokens && exchangeRate !== null;
36502
- return /* @__PURE__ */ jsx57(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs45(
37157
+ return /* @__PURE__ */ jsx59(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs47(
36503
37158
  "div",
36504
37159
  {
36505
37160
  style: { display: "flex", flexDirection: "column", minHeight: "500px" },
36506
37161
  children: [
36507
- /* @__PURE__ */ jsxs45(
37162
+ /* @__PURE__ */ jsxs47(
36508
37163
  "div",
36509
37164
  {
36510
37165
  style: {
@@ -36515,7 +37170,7 @@ function SwapMode({
36515
37170
  marginBottom: spacing[1]
36516
37171
  },
36517
37172
  children: [
36518
- /* @__PURE__ */ jsx57(
37173
+ /* @__PURE__ */ jsx59(
36519
37174
  "span",
36520
37175
  {
36521
37176
  style: {
@@ -36529,7 +37184,7 @@ function SwapMode({
36529
37184
  children: "Swap"
36530
37185
  }
36531
37186
  ),
36532
- /* @__PURE__ */ jsxs45(
37187
+ /* @__PURE__ */ jsxs47(
36533
37188
  "div",
36534
37189
  {
36535
37190
  ref: settingsRef,
@@ -36540,7 +37195,7 @@ function SwapMode({
36540
37195
  position: "relative"
36541
37196
  },
36542
37197
  children: [
36543
- walletAddress ? /* @__PURE__ */ jsxs45(
37198
+ walletAddress ? /* @__PURE__ */ jsxs47(
36544
37199
  "button",
36545
37200
  {
36546
37201
  onClick: () => void disconnectWallet(),
@@ -36558,7 +37213,7 @@ function SwapMode({
36558
37213
  " \xD7"
36559
37214
  ]
36560
37215
  }
36561
- ) : /* @__PURE__ */ jsx57(
37216
+ ) : /* @__PURE__ */ jsx59(
36562
37217
  "button",
36563
37218
  {
36564
37219
  onClick: handleConnectAndReview,
@@ -36573,7 +37228,7 @@ function SwapMode({
36573
37228
  children: "Connect wallet"
36574
37229
  }
36575
37230
  ),
36576
- /* @__PURE__ */ jsx57(
37231
+ /* @__PURE__ */ jsx59(
36577
37232
  "button",
36578
37233
  {
36579
37234
  onClick: () => setShowSettings((v) => !v),
@@ -36591,7 +37246,7 @@ function SwapMode({
36591
37246
  color: colors.mutedForeground,
36592
37247
  padding: 0
36593
37248
  },
36594
- children: /* @__PURE__ */ jsxs45(
37249
+ children: /* @__PURE__ */ jsxs47(
36595
37250
  "svg",
36596
37251
  {
36597
37252
  style: { width: "1rem", height: "1rem" },
@@ -36602,14 +37257,14 @@ function SwapMode({
36602
37257
  strokeLinecap: "round",
36603
37258
  strokeLinejoin: "round",
36604
37259
  children: [
36605
- /* @__PURE__ */ jsx57("circle", { cx: "12", cy: "12", r: "3" }),
36606
- /* @__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" })
37260
+ /* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "3" }),
37261
+ /* @__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" })
36607
37262
  ]
36608
37263
  }
36609
37264
  )
36610
37265
  }
36611
37266
  ),
36612
- showSettings && /* @__PURE__ */ jsxs45(
37267
+ showSettings && /* @__PURE__ */ jsxs47(
36613
37268
  "div",
36614
37269
  {
36615
37270
  style: {
@@ -36625,7 +37280,7 @@ function SwapMode({
36625
37280
  zIndex: 100
36626
37281
  },
36627
37282
  children: [
36628
- /* @__PURE__ */ jsx57(
37283
+ /* @__PURE__ */ jsx59(
36629
37284
  "p",
36630
37285
  {
36631
37286
  style: {
@@ -36639,7 +37294,7 @@ function SwapMode({
36639
37294
  children: "Appearance"
36640
37295
  }
36641
37296
  ),
36642
- /* @__PURE__ */ jsx57("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs45(
37297
+ /* @__PURE__ */ jsx59("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs47(
36643
37298
  "div",
36644
37299
  {
36645
37300
  style: {
@@ -36648,8 +37303,8 @@ function SwapMode({
36648
37303
  justifyContent: "space-between"
36649
37304
  },
36650
37305
  children: [
36651
- /* @__PURE__ */ jsxs45("div", { children: [
36652
- /* @__PURE__ */ jsx57(
37306
+ /* @__PURE__ */ jsxs47("div", { children: [
37307
+ /* @__PURE__ */ jsx59(
36653
37308
  "p",
36654
37309
  {
36655
37310
  style: {
@@ -36660,7 +37315,7 @@ function SwapMode({
36660
37315
  children: "Dark mode"
36661
37316
  }
36662
37317
  ),
36663
- /* @__PURE__ */ jsx57(
37318
+ /* @__PURE__ */ jsx59(
36664
37319
  "p",
36665
37320
  {
36666
37321
  style: {
@@ -36672,7 +37327,7 @@ function SwapMode({
36672
37327
  }
36673
37328
  )
36674
37329
  ] }),
36675
- /* @__PURE__ */ jsx57(
37330
+ /* @__PURE__ */ jsx59(
36676
37331
  "button",
36677
37332
  {
36678
37333
  role: "switch",
@@ -36689,7 +37344,7 @@ function SwapMode({
36689
37344
  transition: "background-color 0.2s",
36690
37345
  flexShrink: 0
36691
37346
  },
36692
- children: /* @__PURE__ */ jsx57(
37347
+ children: /* @__PURE__ */ jsx59(
36693
37348
  "span",
36694
37349
  {
36695
37350
  style: {
@@ -36710,7 +37365,7 @@ function SwapMode({
36710
37365
  ]
36711
37366
  }
36712
37367
  ) }),
36713
- /* @__PURE__ */ jsx57(
37368
+ /* @__PURE__ */ jsx59(
36714
37369
  "p",
36715
37370
  {
36716
37371
  style: {
@@ -36724,8 +37379,8 @@ function SwapMode({
36724
37379
  children: "Transaction Settings"
36725
37380
  }
36726
37381
  ),
36727
- /* @__PURE__ */ jsxs45("div", { style: { marginBottom: spacing[4] }, children: [
36728
- /* @__PURE__ */ jsx57(
37382
+ /* @__PURE__ */ jsxs47("div", { style: { marginBottom: spacing[4] }, children: [
37383
+ /* @__PURE__ */ jsx59(
36729
37384
  "p",
36730
37385
  {
36731
37386
  style: {
@@ -36737,8 +37392,8 @@ function SwapMode({
36737
37392
  children: "Max slippage"
36738
37393
  }
36739
37394
  ),
36740
- /* @__PURE__ */ jsxs45("div", { style: { display: "flex", gap: spacing[1.5] }, children: [
36741
- [0.1, 0.5, 1].map((v) => /* @__PURE__ */ jsxs45(
37395
+ /* @__PURE__ */ jsxs47("div", { style: { display: "flex", gap: spacing[1.5] }, children: [
37396
+ [0.1, 0.5, 1].map((v) => /* @__PURE__ */ jsxs47(
36742
37397
  "button",
36743
37398
  {
36744
37399
  onClick: () => {
@@ -36763,7 +37418,7 @@ function SwapMode({
36763
37418
  },
36764
37419
  v
36765
37420
  )),
36766
- /* @__PURE__ */ jsx57("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx57(
37421
+ /* @__PURE__ */ jsx59("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx59(
36767
37422
  "input",
36768
37423
  {
36769
37424
  type: "number",
@@ -36794,7 +37449,7 @@ function SwapMode({
36794
37449
  }
36795
37450
  ) })
36796
37451
  ] }),
36797
- slippage > 5 && /* @__PURE__ */ jsx57(
37452
+ slippage > 5 && /* @__PURE__ */ jsx59(
36798
37453
  "p",
36799
37454
  {
36800
37455
  style: {
@@ -36806,7 +37461,7 @@ function SwapMode({
36806
37461
  }
36807
37462
  )
36808
37463
  ] }),
36809
- /* @__PURE__ */ jsx57("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs45(
37464
+ /* @__PURE__ */ jsx59("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs47(
36810
37465
  "div",
36811
37466
  {
36812
37467
  style: {
@@ -36815,8 +37470,8 @@ function SwapMode({
36815
37470
  justifyContent: "space-between"
36816
37471
  },
36817
37472
  children: [
36818
- /* @__PURE__ */ jsxs45("div", { children: [
36819
- /* @__PURE__ */ jsx57(
37473
+ /* @__PURE__ */ jsxs47("div", { children: [
37474
+ /* @__PURE__ */ jsx59(
36820
37475
  "p",
36821
37476
  {
36822
37477
  style: {
@@ -36827,7 +37482,7 @@ function SwapMode({
36827
37482
  children: "Max approval"
36828
37483
  }
36829
37484
  ),
36830
- /* @__PURE__ */ jsx57(
37485
+ /* @__PURE__ */ jsx59(
36831
37486
  "p",
36832
37487
  {
36833
37488
  style: {
@@ -36839,7 +37494,7 @@ function SwapMode({
36839
37494
  }
36840
37495
  )
36841
37496
  ] }),
36842
- /* @__PURE__ */ jsx57(
37497
+ /* @__PURE__ */ jsx59(
36843
37498
  "button",
36844
37499
  {
36845
37500
  role: "switch",
@@ -36856,7 +37511,7 @@ function SwapMode({
36856
37511
  transition: "background-color 0.2s",
36857
37512
  flexShrink: 0
36858
37513
  },
36859
- children: /* @__PURE__ */ jsx57(
37514
+ children: /* @__PURE__ */ jsx59(
36860
37515
  "span",
36861
37516
  {
36862
37517
  style: {
@@ -36877,7 +37532,7 @@ function SwapMode({
36877
37532
  ]
36878
37533
  }
36879
37534
  ) }),
36880
- /* @__PURE__ */ jsxs45(
37535
+ /* @__PURE__ */ jsxs47(
36881
37536
  "div",
36882
37537
  {
36883
37538
  style: {
@@ -36887,7 +37542,7 @@ function SwapMode({
36887
37542
  gap: spacing[3]
36888
37543
  },
36889
37544
  children: [
36890
- /* @__PURE__ */ jsx57(
37545
+ /* @__PURE__ */ jsx59(
36891
37546
  "p",
36892
37547
  {
36893
37548
  style: {
@@ -36899,13 +37554,13 @@ function SwapMode({
36899
37554
  children: "Display currency"
36900
37555
  }
36901
37556
  ),
36902
- /* @__PURE__ */ jsxs45(
37557
+ /* @__PURE__ */ jsxs47(
36903
37558
  "div",
36904
37559
  {
36905
37560
  ref: currencyDropdownRef,
36906
37561
  style: { position: "relative", flexShrink: 0 },
36907
37562
  children: [
36908
- /* @__PURE__ */ jsxs45(
37563
+ /* @__PURE__ */ jsxs47(
36909
37564
  "button",
36910
37565
  {
36911
37566
  onClick: () => setShowCurrencyDropdown((v) => !v),
@@ -36925,9 +37580,9 @@ function SwapMode({
36925
37580
  whiteSpace: "nowrap"
36926
37581
  },
36927
37582
  children: [
36928
- /* @__PURE__ */ jsx57("span", { children: currencySymbol }),
36929
- /* @__PURE__ */ jsx57("span", { children: selectedCurrency }),
36930
- /* @__PURE__ */ jsx57(
37583
+ /* @__PURE__ */ jsx59("span", { children: currencySymbol }),
37584
+ /* @__PURE__ */ jsx59("span", { children: selectedCurrency }),
37585
+ /* @__PURE__ */ jsx59(
36931
37586
  "svg",
36932
37587
  {
36933
37588
  style: {
@@ -36943,13 +37598,13 @@ function SwapMode({
36943
37598
  strokeWidth: 2.5,
36944
37599
  strokeLinecap: "round",
36945
37600
  strokeLinejoin: "round",
36946
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
37601
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
36947
37602
  }
36948
37603
  )
36949
37604
  ]
36950
37605
  }
36951
37606
  ),
36952
- showCurrencyDropdown && /* @__PURE__ */ jsx57(
37607
+ showCurrencyDropdown && /* @__PURE__ */ jsx59(
36953
37608
  "div",
36954
37609
  {
36955
37610
  style: {
@@ -36968,7 +37623,7 @@ function SwapMode({
36968
37623
  },
36969
37624
  children: SUPPORTED_CURRENCIES.map((c) => {
36970
37625
  const isSelected = selectedCurrency === c.code;
36971
- return /* @__PURE__ */ jsxs45(
37626
+ return /* @__PURE__ */ jsxs47(
36972
37627
  "button",
36973
37628
  {
36974
37629
  onClick: () => {
@@ -36991,7 +37646,7 @@ function SwapMode({
36991
37646
  fontFamily: "inherit"
36992
37647
  },
36993
37648
  children: [
36994
- /* @__PURE__ */ jsx57(
37649
+ /* @__PURE__ */ jsx59(
36995
37650
  "span",
36996
37651
  {
36997
37652
  style: {
@@ -37002,8 +37657,8 @@ function SwapMode({
37002
37657
  children: c.symbol
37003
37658
  }
37004
37659
  ),
37005
- /* @__PURE__ */ jsx57("span", { style: { flexShrink: 0 }, children: c.code }),
37006
- /* @__PURE__ */ jsx57(
37660
+ /* @__PURE__ */ jsx59("span", { style: { flexShrink: 0 }, children: c.code }),
37661
+ /* @__PURE__ */ jsx59(
37007
37662
  "span",
37008
37663
  {
37009
37664
  style: {
@@ -37038,7 +37693,7 @@ function SwapMode({
37038
37693
  ]
37039
37694
  }
37040
37695
  ),
37041
- /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs45(
37696
+ /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs47(
37042
37697
  "div",
37043
37698
  {
37044
37699
  onMouseEnter: () => setHoverSell(true),
@@ -37050,7 +37705,7 @@ function SwapMode({
37050
37705
  padding: `${spacing[4]} ${spacing[5]} ${spacing[5]}`
37051
37706
  },
37052
37707
  children: [
37053
- /* @__PURE__ */ jsxs45(
37708
+ /* @__PURE__ */ jsxs47(
37054
37709
  "div",
37055
37710
  {
37056
37711
  style: {
@@ -37060,7 +37715,7 @@ function SwapMode({
37060
37715
  marginBottom: spacing[1]
37061
37716
  },
37062
37717
  children: [
37063
- /* @__PURE__ */ jsx57(
37718
+ /* @__PURE__ */ jsx59(
37064
37719
  "span",
37065
37720
  {
37066
37721
  style: {
@@ -37071,7 +37726,7 @@ function SwapMode({
37071
37726
  children: "Sell"
37072
37727
  }
37073
37728
  ),
37074
- /* @__PURE__ */ jsx57(
37729
+ /* @__PURE__ */ jsx59(
37075
37730
  "div",
37076
37731
  {
37077
37732
  style: {
@@ -37082,7 +37737,7 @@ function SwapMode({
37082
37737
  transition: "opacity 0.2s",
37083
37738
  pointerEvents: hoverSell && fromBalance !== null ? "auto" : "none"
37084
37739
  },
37085
- children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx57(
37740
+ children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx59(
37086
37741
  "button",
37087
37742
  {
37088
37743
  onClick: () => {
@@ -37138,12 +37793,12 @@ function SwapMode({
37138
37793
  ]
37139
37794
  }
37140
37795
  ),
37141
- /* @__PURE__ */ jsxs45(
37796
+ /* @__PURE__ */ jsxs47(
37142
37797
  "div",
37143
37798
  {
37144
37799
  style: { display: "flex", alignItems: "center", gap: spacing[3] },
37145
37800
  children: [
37146
- amountInputMode === "usd" && /* @__PURE__ */ jsx57(
37801
+ amountInputMode === "usd" && /* @__PURE__ */ jsx59(
37147
37802
  "span",
37148
37803
  {
37149
37804
  style: {
@@ -37158,7 +37813,7 @@ function SwapMode({
37158
37813
  children: currencySymbol
37159
37814
  }
37160
37815
  ),
37161
- /* @__PURE__ */ jsx57(
37816
+ /* @__PURE__ */ jsx59(
37162
37817
  "input",
37163
37818
  {
37164
37819
  inputMode: "decimal",
@@ -37184,7 +37839,7 @@ function SwapMode({
37184
37839
  }
37185
37840
  }
37186
37841
  ),
37187
- amountInputMode === "token" && fromToken && /* @__PURE__ */ jsx57(
37842
+ amountInputMode === "token" && fromToken && /* @__PURE__ */ jsx59(
37188
37843
  "span",
37189
37844
  {
37190
37845
  style: {
@@ -37199,7 +37854,7 @@ function SwapMode({
37199
37854
  children: fromToken.symbol
37200
37855
  }
37201
37856
  ),
37202
- /* @__PURE__ */ jsx57(
37857
+ /* @__PURE__ */ jsx59(
37203
37858
  TokenPillButton,
37204
37859
  {
37205
37860
  token: fromToken,
@@ -37211,7 +37866,7 @@ function SwapMode({
37211
37866
  ]
37212
37867
  }
37213
37868
  ),
37214
- /* @__PURE__ */ jsxs45(
37869
+ /* @__PURE__ */ jsxs47(
37215
37870
  "div",
37216
37871
  {
37217
37872
  style: {
@@ -37223,7 +37878,7 @@ function SwapMode({
37223
37878
  color: colors.mutedForeground
37224
37879
  },
37225
37880
  children: [
37226
- /* @__PURE__ */ jsxs45(
37881
+ /* @__PURE__ */ jsxs47(
37227
37882
  "button",
37228
37883
  {
37229
37884
  type: "button",
@@ -37241,8 +37896,8 @@ function SwapMode({
37241
37896
  fontFamily: "inherit"
37242
37897
  },
37243
37898
  children: [
37244
- /* @__PURE__ */ jsx57("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
37245
- hasFromUsdPrice && /* @__PURE__ */ jsx57(
37899
+ /* @__PURE__ */ jsx59("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
37900
+ hasFromUsdPrice && /* @__PURE__ */ jsx59(
37246
37901
  "svg",
37247
37902
  {
37248
37903
  style: { width: "0.75rem", height: "0.75rem" },
@@ -37252,17 +37907,17 @@ function SwapMode({
37252
37907
  strokeWidth: 2,
37253
37908
  strokeLinecap: "round",
37254
37909
  strokeLinejoin: "round",
37255
- children: /* @__PURE__ */ jsx57("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
37910
+ children: /* @__PURE__ */ jsx59("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
37256
37911
  }
37257
37912
  )
37258
37913
  ]
37259
37914
  }
37260
37915
  ),
37261
- fromBalance !== null && fromToken && /* @__PURE__ */ jsxs45("span", { children: [
37916
+ fromBalance !== null && fromToken && /* @__PURE__ */ jsxs47("span", { children: [
37262
37917
  fmtAmount(fromBalance, 6),
37263
37918
  " ",
37264
37919
  fromToken.symbol,
37265
- balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ jsxs45("span", { children: [
37920
+ balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ jsxs47("span", { children: [
37266
37921
  " \u2248 ",
37267
37922
  fmtLocal(balanceUsd)
37268
37923
  ] })
@@ -37273,7 +37928,7 @@ function SwapMode({
37273
37928
  ]
37274
37929
  }
37275
37930
  ) }),
37276
- /* @__PURE__ */ jsx57("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx57(
37931
+ /* @__PURE__ */ jsx59("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx59(
37277
37932
  "button",
37278
37933
  {
37279
37934
  onClick: handleFlip,
@@ -37294,7 +37949,7 @@ function SwapMode({
37294
37949
  cursor: lockDestToken ? "default" : "pointer",
37295
37950
  opacity: lockDestToken ? 0.4 : 1
37296
37951
  },
37297
- children: /* @__PURE__ */ jsx57(
37952
+ children: /* @__PURE__ */ jsx59(
37298
37953
  "svg",
37299
37954
  {
37300
37955
  style: {
@@ -37306,7 +37961,7 @@ function SwapMode({
37306
37961
  fill: "none",
37307
37962
  stroke: "currentColor",
37308
37963
  strokeWidth: 2,
37309
- children: /* @__PURE__ */ jsx57(
37964
+ children: /* @__PURE__ */ jsx59(
37310
37965
  "path",
37311
37966
  {
37312
37967
  strokeLinecap: "round",
@@ -37318,7 +37973,7 @@ function SwapMode({
37318
37973
  )
37319
37974
  }
37320
37975
  ) }),
37321
- /* @__PURE__ */ jsx57("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs45(
37976
+ /* @__PURE__ */ jsx59("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs47(
37322
37977
  "div",
37323
37978
  {
37324
37979
  style: {
@@ -37327,7 +37982,7 @@ function SwapMode({
37327
37982
  padding: `${spacing[5]} ${spacing[5]} ${spacing[5]}`
37328
37983
  },
37329
37984
  children: [
37330
- /* @__PURE__ */ jsx57(
37985
+ /* @__PURE__ */ jsx59(
37331
37986
  "span",
37332
37987
  {
37333
37988
  style: {
@@ -37338,7 +37993,7 @@ function SwapMode({
37338
37993
  children: "Buy"
37339
37994
  }
37340
37995
  ),
37341
- /* @__PURE__ */ jsxs45(
37996
+ /* @__PURE__ */ jsxs47(
37342
37997
  "div",
37343
37998
  {
37344
37999
  style: {
@@ -37348,7 +38003,7 @@ function SwapMode({
37348
38003
  marginTop: spacing[1]
37349
38004
  },
37350
38005
  children: [
37351
- /* @__PURE__ */ jsx57(
38006
+ /* @__PURE__ */ jsx59(
37352
38007
  "div",
37353
38008
  {
37354
38009
  style: {
@@ -37361,7 +38016,7 @@ function SwapMode({
37361
38016
  },
37362
38017
  children: displayToAmount !== null ? (() => {
37363
38018
  const s = `${isEstimate ? "~" : ""}${fmtAmount(displayToAmount, 5)}`;
37364
- return /* @__PURE__ */ jsx57(
38019
+ return /* @__PURE__ */ jsx59(
37365
38020
  "span",
37366
38021
  {
37367
38022
  style: {
@@ -37372,7 +38027,7 @@ function SwapMode({
37372
38027
  children: s
37373
38028
  }
37374
38029
  );
37375
- })() : route.loading ? /* @__PURE__ */ jsx57(
38030
+ })() : route.loading ? /* @__PURE__ */ jsx59(
37376
38031
  "span",
37377
38032
  {
37378
38033
  style: {
@@ -37382,7 +38037,7 @@ function SwapMode({
37382
38037
  },
37383
38038
  children: "\u2026"
37384
38039
  }
37385
- ) : /* @__PURE__ */ jsx57(
38040
+ ) : /* @__PURE__ */ jsx59(
37386
38041
  "span",
37387
38042
  {
37388
38043
  style: {
@@ -37395,7 +38050,7 @@ function SwapMode({
37395
38050
  },
37396
38051
  rateUpdated ? "flash" : "stable"
37397
38052
  ),
37398
- /* @__PURE__ */ jsx57(
38053
+ /* @__PURE__ */ jsx59(
37399
38054
  TokenPillButton,
37400
38055
  {
37401
38056
  token: toToken,
@@ -37409,7 +38064,7 @@ function SwapMode({
37409
38064
  ]
37410
38065
  }
37411
38066
  ),
37412
- /* @__PURE__ */ jsxs45(
38067
+ /* @__PURE__ */ jsxs47(
37413
38068
  "div",
37414
38069
  {
37415
38070
  style: {
@@ -37421,8 +38076,8 @@ function SwapMode({
37421
38076
  color: colors.mutedForeground
37422
38077
  },
37423
38078
  children: [
37424
- /* @__PURE__ */ jsx57("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
37425
- priceImpact !== null && /* @__PURE__ */ jsxs45(
38079
+ /* @__PURE__ */ jsx59("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
38080
+ priceImpact !== null && /* @__PURE__ */ jsxs47(
37426
38081
  "span",
37427
38082
  {
37428
38083
  style: {
@@ -37443,7 +38098,7 @@ function SwapMode({
37443
38098
  ]
37444
38099
  }
37445
38100
  ),
37446
- needsDestAddress && toChain && /* @__PURE__ */ jsxs45(
38101
+ needsDestAddress && toChain && /* @__PURE__ */ jsxs47(
37447
38102
  "div",
37448
38103
  {
37449
38104
  style: {
@@ -37452,7 +38107,7 @@ function SwapMode({
37452
38107
  borderTop: "1px solid hsl(var(--tw-border))"
37453
38108
  },
37454
38109
  children: [
37455
- /* @__PURE__ */ jsxs45(
38110
+ /* @__PURE__ */ jsxs47(
37456
38111
  "p",
37457
38112
  {
37458
38113
  style: {
@@ -37467,8 +38122,8 @@ function SwapMode({
37467
38122
  ]
37468
38123
  }
37469
38124
  ),
37470
- /* @__PURE__ */ jsxs45("div", { style: { position: "relative" }, children: [
37471
- /* @__PURE__ */ jsx57(
38125
+ /* @__PURE__ */ jsxs47("div", { style: { position: "relative" }, children: [
38126
+ /* @__PURE__ */ jsx59(
37472
38127
  "input",
37473
38128
  {
37474
38129
  type: "text",
@@ -37491,7 +38146,7 @@ function SwapMode({
37491
38146
  }
37492
38147
  }
37493
38148
  ),
37494
- /* @__PURE__ */ jsx57(
38149
+ /* @__PURE__ */ jsx59(
37495
38150
  "button",
37496
38151
  {
37497
38152
  type: "button",
@@ -37517,7 +38172,7 @@ function SwapMode({
37517
38172
  }
37518
38173
  )
37519
38174
  ] }),
37520
- destAddress && !isValidDestAddress && /* @__PURE__ */ jsxs45(
38175
+ destAddress && !isValidDestAddress && /* @__PURE__ */ jsxs47(
37521
38176
  "p",
37522
38177
  {
37523
38178
  style: {
@@ -37538,7 +38193,7 @@ function SwapMode({
37538
38193
  ]
37539
38194
  }
37540
38195
  ) }),
37541
- route.error && !route.loading && /* @__PURE__ */ jsx57(
38196
+ route.error && !route.loading && /* @__PURE__ */ jsx59(
37542
38197
  "p",
37543
38198
  {
37544
38199
  style: {
@@ -37551,7 +38206,7 @@ function SwapMode({
37551
38206
  children: mapError(route.error).message
37552
38207
  }
37553
38208
  ),
37554
- route.loading && /* @__PURE__ */ jsxs45(
38209
+ route.loading && /* @__PURE__ */ jsxs47(
37555
38210
  "div",
37556
38211
  {
37557
38212
  style: {
@@ -37563,13 +38218,13 @@ function SwapMode({
37563
38218
  padding: `0 ${spacing[3]}`
37564
38219
  },
37565
38220
  children: [
37566
- /* @__PURE__ */ jsx57(
38221
+ /* @__PURE__ */ jsx59(
37567
38222
  "svg",
37568
38223
  {
37569
38224
  className: "tw-animate-spin",
37570
38225
  style: { width: "0.875rem", height: "0.875rem", flexShrink: 0 },
37571
38226
  viewBox: "0 0 88 88",
37572
- children: /* @__PURE__ */ jsx57(
38227
+ children: /* @__PURE__ */ jsx59(
37573
38228
  "circle",
37574
38229
  {
37575
38230
  cx: "44",
@@ -37584,7 +38239,7 @@ function SwapMode({
37584
38239
  )
37585
38240
  }
37586
38241
  ),
37587
- /* @__PURE__ */ jsx57(
38242
+ /* @__PURE__ */ jsx59(
37588
38243
  "span",
37589
38244
  {
37590
38245
  style: {
@@ -37599,7 +38254,7 @@ function SwapMode({
37599
38254
  ]
37600
38255
  }
37601
38256
  ),
37602
- /* @__PURE__ */ jsx57("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx57(
38257
+ /* @__PURE__ */ jsx59("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx59(
37603
38258
  "button",
37604
38259
  {
37605
38260
  disabled: ctaDisabled,
@@ -37628,7 +38283,7 @@ function SwapMode({
37628
38283
  children: ctaLabel
37629
38284
  }
37630
38285
  ) }),
37631
- showRateRow && /* @__PURE__ */ jsxs45(
38286
+ showRateRow && /* @__PURE__ */ jsxs47(
37632
38287
  "div",
37633
38288
  {
37634
38289
  style: {
@@ -37638,7 +38293,7 @@ function SwapMode({
37638
38293
  color: colors.mutedForeground
37639
38294
  },
37640
38295
  children: [
37641
- /* @__PURE__ */ jsxs45(
38296
+ /* @__PURE__ */ jsxs47(
37642
38297
  "button",
37643
38298
  {
37644
38299
  onClick: () => setShowRateDetails((v) => !v),
@@ -37656,7 +38311,7 @@ function SwapMode({
37656
38311
  padding: `${spacing[1]} 0`
37657
38312
  },
37658
38313
  children: [
37659
- /* @__PURE__ */ jsxs45("span", { style: { flex: 1, textAlign: "left" }, children: [
38314
+ /* @__PURE__ */ jsxs47("span", { style: { flex: 1, textAlign: "left" }, children: [
37660
38315
  "1 ",
37661
38316
  toToken?.symbol,
37662
38317
  " = ",
@@ -37664,7 +38319,7 @@ function SwapMode({
37664
38319
  " ",
37665
38320
  fromToken?.symbol
37666
38321
  ] }),
37667
- /* @__PURE__ */ jsxs45(
38322
+ /* @__PURE__ */ jsxs47(
37668
38323
  "span",
37669
38324
  {
37670
38325
  style: {
@@ -37674,15 +38329,15 @@ function SwapMode({
37674
38329
  flexShrink: 0
37675
38330
  },
37676
38331
  children: [
37677
- !isGasSponsored && /* @__PURE__ */ jsx57(GasIcon, {}),
37678
- /* @__PURE__ */ jsx57(
38332
+ !isGasSponsored && /* @__PURE__ */ jsx59(GasIcon, {}),
38333
+ /* @__PURE__ */ jsx59(
37679
38334
  "span",
37680
38335
  {
37681
38336
  style: isGasSponsored ? { color: colors.green[500] } : void 0,
37682
38337
  children: isGasSponsored ? "\u2726 Sponsored" : networkCostUsd !== null ? fmtLocal(networkCostUsd) : "\u2014"
37683
38338
  }
37684
38339
  ),
37685
- route.data && /* @__PURE__ */ jsxs45(
38340
+ route.data && /* @__PURE__ */ jsxs47(
37686
38341
  "svg",
37687
38342
  {
37688
38343
  width: "14",
@@ -37694,7 +38349,7 @@ function SwapMode({
37694
38349
  opacity: 0.75
37695
38350
  },
37696
38351
  children: [
37697
- /* @__PURE__ */ jsx57(
38352
+ /* @__PURE__ */ jsx59(
37698
38353
  "circle",
37699
38354
  {
37700
38355
  cx: "7",
@@ -37705,7 +38360,7 @@ function SwapMode({
37705
38360
  strokeWidth: "1.5"
37706
38361
  }
37707
38362
  ),
37708
- /* @__PURE__ */ jsx57(
38363
+ /* @__PURE__ */ jsx59(
37709
38364
  "circle",
37710
38365
  {
37711
38366
  cx: "7",
@@ -37723,7 +38378,7 @@ function SwapMode({
37723
38378
  ]
37724
38379
  }
37725
38380
  ),
37726
- /* @__PURE__ */ jsx57(
38381
+ /* @__PURE__ */ jsx59(
37727
38382
  "svg",
37728
38383
  {
37729
38384
  style: {
@@ -37738,7 +38393,7 @@ function SwapMode({
37738
38393
  strokeWidth: 2,
37739
38394
  strokeLinecap: "round",
37740
38395
  strokeLinejoin: "round",
37741
- children: /* @__PURE__ */ jsx57("path", { d: "M6 9l6 6 6-6" })
38396
+ children: /* @__PURE__ */ jsx59("path", { d: "M6 9l6 6 6-6" })
37742
38397
  }
37743
38398
  )
37744
38399
  ]
@@ -37747,7 +38402,7 @@ function SwapMode({
37747
38402
  ]
37748
38403
  }
37749
38404
  ),
37750
- showRateDetails && /* @__PURE__ */ jsxs45(
38405
+ showRateDetails && /* @__PURE__ */ jsxs47(
37751
38406
  "div",
37752
38407
  {
37753
38408
  style: {
@@ -37759,18 +38414,18 @@ function SwapMode({
37759
38414
  gap: spacing[2.5]
37760
38415
  },
37761
38416
  children: [
37762
- /* @__PURE__ */ jsx57(
38417
+ /* @__PURE__ */ jsx59(
37763
38418
  RateRow,
37764
38419
  {
37765
38420
  label: "Fee",
37766
38421
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
37767
38422
  }
37768
38423
  ),
37769
- /* @__PURE__ */ jsx57(
38424
+ /* @__PURE__ */ jsx59(
37770
38425
  RateRow,
37771
38426
  {
37772
38427
  label: "Network cost",
37773
- value: isGasSponsored ? /* @__PURE__ */ jsx57(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs45(
38428
+ value: isGasSponsored ? /* @__PURE__ */ jsx59(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs47(
37774
38429
  "span",
37775
38430
  {
37776
38431
  style: {
@@ -37779,19 +38434,19 @@ function SwapMode({
37779
38434
  gap: "0.25rem"
37780
38435
  },
37781
38436
  children: [
37782
- /* @__PURE__ */ jsx57(GasIcon, { size: "0.75rem" }),
38437
+ /* @__PURE__ */ jsx59(GasIcon, { size: "0.75rem" }),
37783
38438
  fmtLocal(networkCostUsd)
37784
38439
  ]
37785
38440
  }
37786
- ) : /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
38441
+ ) : /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
37787
38442
  }
37788
38443
  ),
37789
- /* @__PURE__ */ jsx57(RateRow, { label: "Max slippage", value: `${slippage}%` }),
37790
- /* @__PURE__ */ jsx57(
38444
+ /* @__PURE__ */ jsx59(RateRow, { label: "Max slippage", value: `${slippage}%` }),
38445
+ /* @__PURE__ */ jsx59(
37791
38446
  RateRow,
37792
38447
  {
37793
38448
  label: "Route",
37794
- value: routePath ? /* @__PURE__ */ jsx57(
38449
+ value: routePath ? /* @__PURE__ */ jsx59(
37795
38450
  "span",
37796
38451
  {
37797
38452
  style: {
@@ -37805,7 +38460,7 @@ function SwapMode({
37805
38460
  title: routePath,
37806
38461
  children: routePath
37807
38462
  }
37808
- ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
38463
+ ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
37809
38464
  }
37810
38465
  )
37811
38466
  ]
@@ -37814,7 +38469,7 @@ function SwapMode({
37814
38469
  ]
37815
38470
  }
37816
38471
  ),
37817
- /* @__PURE__ */ jsx57(WidgetSecurityFooter, {})
38472
+ /* @__PURE__ */ jsx59(WidgetSecurityFooter, {})
37818
38473
  ]
37819
38474
  }
37820
38475
  ) });
@@ -37842,8 +38497,8 @@ function SwapActionArea({
37842
38497
  label = "Swap";
37843
38498
  }
37844
38499
  const isDisabled = isSubmitting || isChecking;
37845
- return /* @__PURE__ */ jsxs45("div", { style: { marginTop: spacing[6] }, children: [
37846
- isGasSponsored && !isSubmitting && /* @__PURE__ */ jsxs45(
38500
+ return /* @__PURE__ */ jsxs47("div", { style: { marginTop: spacing[6] }, children: [
38501
+ isGasSponsored && !isSubmitting && /* @__PURE__ */ jsxs47(
37847
38502
  "div",
37848
38503
  {
37849
38504
  style: {
@@ -37854,7 +38509,7 @@ function SwapActionArea({
37854
38509
  marginBottom: spacing[3]
37855
38510
  },
37856
38511
  children: [
37857
- /* @__PURE__ */ jsx57(
38512
+ /* @__PURE__ */ jsx59(
37858
38513
  "svg",
37859
38514
  {
37860
38515
  style: {
@@ -37864,10 +38519,10 @@ function SwapActionArea({
37864
38519
  },
37865
38520
  viewBox: "0 0 24 24",
37866
38521
  fill: "currentColor",
37867
- children: /* @__PURE__ */ jsx57("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38522
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
37868
38523
  }
37869
38524
  ),
37870
- /* @__PURE__ */ jsx57(
38525
+ /* @__PURE__ */ jsx59(
37871
38526
  "span",
37872
38527
  {
37873
38528
  style: {
@@ -37881,7 +38536,7 @@ function SwapActionArea({
37881
38536
  ]
37882
38537
  }
37883
38538
  ),
37884
- /* @__PURE__ */ jsx57(
38539
+ /* @__PURE__ */ jsx59(
37885
38540
  "button",
37886
38541
  {
37887
38542
  onClick: onExecute,
@@ -37904,7 +38559,7 @@ function SwapActionArea({
37904
38559
  children: label
37905
38560
  }
37906
38561
  ),
37907
- needsApproval && !isSubmitting && /* @__PURE__ */ jsxs45(
38562
+ needsApproval && !isSubmitting && /* @__PURE__ */ jsxs47(
37908
38563
  "p",
37909
38564
  {
37910
38565
  style: {
@@ -37936,7 +38591,7 @@ function TokenPillButton({
37936
38591
  const iconUrl = token?.iconUrl ?? token?.logoURI;
37937
38592
  const chainIcon = chain?.chainIconURI;
37938
38593
  if (!token) {
37939
- return /* @__PURE__ */ jsxs45(
38594
+ return /* @__PURE__ */ jsxs47(
37940
38595
  "button",
37941
38596
  {
37942
38597
  onClick: disabled ? void 0 : onClick,
@@ -37959,7 +38614,7 @@ function TokenPillButton({
37959
38614
  },
37960
38615
  children: [
37961
38616
  placeholder,
37962
- /* @__PURE__ */ jsx57(
38617
+ /* @__PURE__ */ jsx59(
37963
38618
  "svg",
37964
38619
  {
37965
38620
  style: { width: "1rem", height: "1rem" },
@@ -37967,7 +38622,7 @@ function TokenPillButton({
37967
38622
  fill: "none",
37968
38623
  stroke: "currentColor",
37969
38624
  strokeWidth: 2,
37970
- children: /* @__PURE__ */ jsx57(
38625
+ children: /* @__PURE__ */ jsx59(
37971
38626
  "path",
37972
38627
  {
37973
38628
  strokeLinecap: "round",
@@ -37981,7 +38636,7 @@ function TokenPillButton({
37981
38636
  }
37982
38637
  );
37983
38638
  }
37984
- return /* @__PURE__ */ jsxs45(
38639
+ return /* @__PURE__ */ jsxs47(
37985
38640
  "button",
37986
38641
  {
37987
38642
  onClick: disabled ? void 0 : onClick,
@@ -38001,8 +38656,8 @@ function TokenPillButton({
38001
38656
  opacity: disabled ? 0.85 : 1
38002
38657
  },
38003
38658
  children: [
38004
- /* @__PURE__ */ jsxs45("div", { style: { position: "relative" }, children: [
38005
- iconUrl ? /* @__PURE__ */ jsx57(
38659
+ /* @__PURE__ */ jsxs47("div", { style: { position: "relative" }, children: [
38660
+ iconUrl ? /* @__PURE__ */ jsx59(
38006
38661
  "img",
38007
38662
  {
38008
38663
  src: iconUrl,
@@ -38014,7 +38669,7 @@ function TokenPillButton({
38014
38669
  objectFit: "cover"
38015
38670
  }
38016
38671
  }
38017
- ) : /* @__PURE__ */ jsx57(
38672
+ ) : /* @__PURE__ */ jsx59(
38018
38673
  "div",
38019
38674
  {
38020
38675
  style: {
@@ -38026,7 +38681,7 @@ function TokenPillButton({
38026
38681
  alignItems: "center",
38027
38682
  justifyContent: "center"
38028
38683
  },
38029
- children: /* @__PURE__ */ jsx57(
38684
+ children: /* @__PURE__ */ jsx59(
38030
38685
  "span",
38031
38686
  {
38032
38687
  style: {
@@ -38039,7 +38694,7 @@ function TokenPillButton({
38039
38694
  )
38040
38695
  }
38041
38696
  ),
38042
- chainIcon && /* @__PURE__ */ jsx57(
38697
+ chainIcon && /* @__PURE__ */ jsx59(
38043
38698
  "img",
38044
38699
  {
38045
38700
  src: chainIcon,
@@ -38057,7 +38712,7 @@ function TokenPillButton({
38057
38712
  }
38058
38713
  )
38059
38714
  ] }),
38060
- /* @__PURE__ */ jsx57(
38715
+ /* @__PURE__ */ jsx59(
38061
38716
  "span",
38062
38717
  {
38063
38718
  style: {
@@ -38068,7 +38723,7 @@ function TokenPillButton({
38068
38723
  children: token.symbol
38069
38724
  }
38070
38725
  ),
38071
- !disabled && /* @__PURE__ */ jsx57(
38726
+ !disabled && /* @__PURE__ */ jsx59(
38072
38727
  "svg",
38073
38728
  {
38074
38729
  style: {
@@ -38080,7 +38735,7 @@ function TokenPillButton({
38080
38735
  fill: "none",
38081
38736
  stroke: "currentColor",
38082
38737
  strokeWidth: 2,
38083
- children: /* @__PURE__ */ jsx57(
38738
+ children: /* @__PURE__ */ jsx59(
38084
38739
  "path",
38085
38740
  {
38086
38741
  strokeLinecap: "round",
@@ -38101,8 +38756,8 @@ function TokenIcon({
38101
38756
  }) {
38102
38757
  const imgSize = size === "lg" ? "2.75rem" : "2.5rem";
38103
38758
  const badgeSize = size === "lg" ? "1.125rem" : "1rem";
38104
- return /* @__PURE__ */ jsxs45("div", { style: { position: "relative", flexShrink: 0 }, children: [
38105
- /* @__PURE__ */ jsx57(
38759
+ return /* @__PURE__ */ jsxs47("div", { style: { position: "relative", flexShrink: 0 }, children: [
38760
+ /* @__PURE__ */ jsx59(
38106
38761
  "img",
38107
38762
  {
38108
38763
  src: icon,
@@ -38110,7 +38765,7 @@ function TokenIcon({
38110
38765
  style: { width: imgSize, height: imgSize, borderRadius: "9999px" }
38111
38766
  }
38112
38767
  ),
38113
- chainIcon && /* @__PURE__ */ jsx57(
38768
+ chainIcon && /* @__PURE__ */ jsx59(
38114
38769
  "img",
38115
38770
  {
38116
38771
  src: chainIcon,
@@ -38134,15 +38789,15 @@ function ReviewDetailRow({
38134
38789
  value,
38135
38790
  tooltip
38136
38791
  }) {
38137
- const iconRef = useRef18(null);
38138
- const [tipPos, setTipPos] = useState32(null);
38792
+ const iconRef = useRef19(null);
38793
+ const [tipPos, setTipPos] = useState33(null);
38139
38794
  const handleMouseEnter = () => {
38140
38795
  if (!tooltip || !iconRef.current) return;
38141
38796
  const r = iconRef.current.getBoundingClientRect();
38142
38797
  setTipPos({ x: r.left + r.width / 2, y: r.top - 8 });
38143
38798
  };
38144
38799
  const handleMouseLeave = () => setTipPos(null);
38145
- return /* @__PURE__ */ jsxs45(
38800
+ return /* @__PURE__ */ jsxs47(
38146
38801
  "div",
38147
38802
  {
38148
38803
  style: {
@@ -38151,7 +38806,7 @@ function ReviewDetailRow({
38151
38806
  justifyContent: "space-between"
38152
38807
  },
38153
38808
  children: [
38154
- /* @__PURE__ */ jsxs45(
38809
+ /* @__PURE__ */ jsxs47(
38155
38810
  "span",
38156
38811
  {
38157
38812
  style: {
@@ -38162,14 +38817,14 @@ function ReviewDetailRow({
38162
38817
  },
38163
38818
  children: [
38164
38819
  label,
38165
- /* @__PURE__ */ jsx57(
38820
+ /* @__PURE__ */ jsx59(
38166
38821
  "span",
38167
38822
  {
38168
38823
  ref: iconRef,
38169
38824
  style: { display: "inline-flex", alignItems: "center" },
38170
38825
  onMouseEnter: handleMouseEnter,
38171
38826
  onMouseLeave: handleMouseLeave,
38172
- children: /* @__PURE__ */ jsxs45(
38827
+ children: /* @__PURE__ */ jsxs47(
38173
38828
  "svg",
38174
38829
  {
38175
38830
  style: {
@@ -38185,8 +38840,8 @@ function ReviewDetailRow({
38185
38840
  strokeLinecap: "round",
38186
38841
  strokeLinejoin: "round",
38187
38842
  children: [
38188
- /* @__PURE__ */ jsx57("circle", { cx: "12", cy: "12", r: "10" }),
38189
- /* @__PURE__ */ jsx57("path", { d: "M12 16v-4M12 8h.01" })
38843
+ /* @__PURE__ */ jsx59("circle", { cx: "12", cy: "12", r: "10" }),
38844
+ /* @__PURE__ */ jsx59("path", { d: "M12 16v-4M12 8h.01" })
38190
38845
  ]
38191
38846
  }
38192
38847
  )
@@ -38195,9 +38850,9 @@ function ReviewDetailRow({
38195
38850
  ]
38196
38851
  }
38197
38852
  ),
38198
- /* @__PURE__ */ jsx57("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
38853
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
38199
38854
  tooltip && tipPos && typeof document !== "undefined" && ReactDOM.createPortal(
38200
- /* @__PURE__ */ jsx57(
38855
+ /* @__PURE__ */ jsx59(
38201
38856
  "span",
38202
38857
  {
38203
38858
  style: {
@@ -38226,7 +38881,7 @@ function ReviewDetailRow({
38226
38881
  );
38227
38882
  }
38228
38883
  function GasIcon({ size = "0.875rem" }) {
38229
- return /* @__PURE__ */ jsxs45(
38884
+ return /* @__PURE__ */ jsxs47(
38230
38885
  "svg",
38231
38886
  {
38232
38887
  style: { width: size, height: size, flexShrink: 0 },
@@ -38237,16 +38892,16 @@ function GasIcon({ size = "0.875rem" }) {
38237
38892
  strokeLinecap: "round",
38238
38893
  strokeLinejoin: "round",
38239
38894
  children: [
38240
- /* @__PURE__ */ jsx57("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
38241
- /* @__PURE__ */ jsx57("path", { d: "M3 11h11" }),
38242
- /* @__PURE__ */ jsx57("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
38243
- /* @__PURE__ */ jsx57("path", { d: "M19 22V12" })
38895
+ /* @__PURE__ */ jsx59("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
38896
+ /* @__PURE__ */ jsx59("path", { d: "M3 11h11" }),
38897
+ /* @__PURE__ */ jsx59("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
38898
+ /* @__PURE__ */ jsx59("path", { d: "M19 22V12" })
38244
38899
  ]
38245
38900
  }
38246
38901
  );
38247
38902
  }
38248
38903
  function SponsoredBadge() {
38249
- return /* @__PURE__ */ jsxs45(
38904
+ return /* @__PURE__ */ jsxs47(
38250
38905
  "span",
38251
38906
  {
38252
38907
  style: {
@@ -38257,13 +38912,13 @@ function SponsoredBadge() {
38257
38912
  fontWeight: fontWeight.medium
38258
38913
  },
38259
38914
  children: [
38260
- /* @__PURE__ */ jsx57(
38915
+ /* @__PURE__ */ jsx59(
38261
38916
  "svg",
38262
38917
  {
38263
38918
  style: { width: "0.75rem", height: "0.75rem" },
38264
38919
  viewBox: "0 0 24 24",
38265
38920
  fill: "currentColor",
38266
- children: /* @__PURE__ */ jsx57("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38921
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
38267
38922
  }
38268
38923
  ),
38269
38924
  "Sponsored"
@@ -38275,7 +38930,7 @@ function SuccessReceiptRow({
38275
38930
  label,
38276
38931
  value
38277
38932
  }) {
38278
- return /* @__PURE__ */ jsxs45(
38933
+ return /* @__PURE__ */ jsxs47(
38279
38934
  "div",
38280
38935
  {
38281
38936
  style: {
@@ -38284,8 +38939,8 @@ function SuccessReceiptRow({
38284
38939
  justifyContent: "space-between"
38285
38940
  },
38286
38941
  children: [
38287
- /* @__PURE__ */ jsx57("span", { style: { color: colors.mutedForeground }, children: label }),
38288
- /* @__PURE__ */ jsx57("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
38942
+ /* @__PURE__ */ jsx59("span", { style: { color: colors.mutedForeground }, children: label }),
38943
+ /* @__PURE__ */ jsx59("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
38289
38944
  ]
38290
38945
  }
38291
38946
  );
@@ -38299,7 +38954,7 @@ function ProcessingStepNode({
38299
38954
  const nodeColor = done ? colors.green[500] : active ? `hsl(var(--tw-primary))` : colors.border;
38300
38955
  const iconColor = done ? "#fff" : active ? `hsl(var(--tw-primary))` : colors.mutedForeground;
38301
38956
  const nodeBg = done ? colors.green[500] : "transparent";
38302
- const iconEl = icon === "send" ? /* @__PURE__ */ jsx57(
38957
+ const iconEl = icon === "send" ? /* @__PURE__ */ jsx59(
38303
38958
  "svg",
38304
38959
  {
38305
38960
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38309,9 +38964,9 @@ function ProcessingStepNode({
38309
38964
  strokeWidth: 2,
38310
38965
  strokeLinecap: "round",
38311
38966
  strokeLinejoin: "round",
38312
- children: /* @__PURE__ */ jsx57("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
38967
+ children: /* @__PURE__ */ jsx59("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
38313
38968
  }
38314
- ) : icon === "plus" ? /* @__PURE__ */ jsx57(
38969
+ ) : icon === "plus" ? /* @__PURE__ */ jsx59(
38315
38970
  "svg",
38316
38971
  {
38317
38972
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38321,9 +38976,9 @@ function ProcessingStepNode({
38321
38976
  strokeWidth: 2,
38322
38977
  strokeLinecap: "round",
38323
38978
  strokeLinejoin: "round",
38324
- children: /* @__PURE__ */ jsx57("path", { d: "M12 5v14M5 12h14" })
38979
+ children: /* @__PURE__ */ jsx59("path", { d: "M12 5v14M5 12h14" })
38325
38980
  }
38326
- ) : /* @__PURE__ */ jsxs45(
38981
+ ) : /* @__PURE__ */ jsxs47(
38327
38982
  "svg",
38328
38983
  {
38329
38984
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -38334,12 +38989,12 @@ function ProcessingStepNode({
38334
38989
  strokeLinecap: "round",
38335
38990
  strokeLinejoin: "round",
38336
38991
  children: [
38337
- /* @__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" }),
38338
- /* @__PURE__ */ jsx57("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
38992
+ /* @__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" }),
38993
+ /* @__PURE__ */ jsx59("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
38339
38994
  ]
38340
38995
  }
38341
38996
  );
38342
- const doneIcon = /* @__PURE__ */ jsx57(
38997
+ const doneIcon = /* @__PURE__ */ jsx59(
38343
38998
  "svg",
38344
38999
  {
38345
39000
  style: { width: "0.875rem", height: "0.875rem", color: "#fff" },
@@ -38349,10 +39004,10 @@ function ProcessingStepNode({
38349
39004
  strokeWidth: 3,
38350
39005
  strokeLinecap: "round",
38351
39006
  strokeLinejoin: "round",
38352
- children: /* @__PURE__ */ jsx57("path", { d: "M20 6L9 17l-5-5" })
39007
+ children: /* @__PURE__ */ jsx59("path", { d: "M20 6L9 17l-5-5" })
38353
39008
  }
38354
39009
  );
38355
- return /* @__PURE__ */ jsxs45(
39010
+ return /* @__PURE__ */ jsxs47(
38356
39011
  "div",
38357
39012
  {
38358
39013
  style: {
@@ -38363,7 +39018,7 @@ function ProcessingStepNode({
38363
39018
  maxWidth: "5rem"
38364
39019
  },
38365
39020
  children: [
38366
- /* @__PURE__ */ jsx57(
39021
+ /* @__PURE__ */ jsx59(
38367
39022
  "div",
38368
39023
  {
38369
39024
  style: {
@@ -38381,7 +39036,7 @@ function ProcessingStepNode({
38381
39036
  children: done ? doneIcon : iconEl
38382
39037
  }
38383
39038
  ),
38384
- /* @__PURE__ */ jsx57(
39039
+ /* @__PURE__ */ jsx59(
38385
39040
  "span",
38386
39041
  {
38387
39042
  style: {
@@ -38400,7 +39055,7 @@ function ProcessingStepNode({
38400
39055
  );
38401
39056
  }
38402
39057
  function ProcessingStepLine({ done }) {
38403
- return /* @__PURE__ */ jsx57(
39058
+ return /* @__PURE__ */ jsx59(
38404
39059
  "div",
38405
39060
  {
38406
39061
  style: {
@@ -38436,8 +39091,8 @@ var init_SwapMode = __esm({
38436
39091
  init_useSwapExecution();
38437
39092
  init_useForex();
38438
39093
  init_SwapTokenSelect();
38439
- init_SwapWalletSelector();
38440
39094
  init_currency();
39095
+ init_components2();
38441
39096
  ConfettiEffect3 = lazy2(
38442
39097
  () => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports))
38443
39098
  );
@@ -38470,14 +39125,14 @@ var init_swap = __esm({
38470
39125
 
38471
39126
  // src/widget/TrustwareWidgetV2.tsx
38472
39127
  import {
38473
- useState as useState33,
38474
- useEffect as useEffect33,
38475
- useRef as useRef19,
39128
+ useState as useState34,
39129
+ useEffect as useEffect34,
39130
+ useRef as useRef20,
38476
39131
  useCallback as useCallback23,
38477
39132
  useImperativeHandle,
38478
39133
  forwardRef
38479
39134
  } from "react";
38480
- import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
39135
+ import { Fragment as Fragment13, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
38481
39136
  function WidgetContent({
38482
39137
  style,
38483
39138
  onStateChange,
@@ -38488,7 +39143,7 @@ function WidgetContent({
38488
39143
  const { transactionHash, transactionStatus } = useDepositTransaction();
38489
39144
  const { resolvedTheme, toggleTheme } = useDepositUi();
38490
39145
  useWalletExternalDisconnect(() => setCurrentStep("home"));
38491
- useEffect33(() => {
39146
+ useEffect34(() => {
38492
39147
  const state = {
38493
39148
  currentStep,
38494
39149
  amount,
@@ -38508,9 +39163,9 @@ function WidgetContent({
38508
39163
  transactionStatus,
38509
39164
  onStateChange
38510
39165
  ]);
38511
- return /* @__PURE__ */ jsxs46("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
38512
- showThemeToggle && /* @__PURE__ */ jsx58("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx58(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
38513
- /* @__PURE__ */ jsx58(
39166
+ return /* @__PURE__ */ jsxs48("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
39167
+ showThemeToggle && /* @__PURE__ */ jsx60("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx60(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
39168
+ /* @__PURE__ */ jsx60(
38514
39169
  WidgetRouter,
38515
39170
  {
38516
39171
  currentStep,
@@ -38531,7 +39186,7 @@ function WidgetInner({
38531
39186
  const { transactionStatus } = useDepositTransaction();
38532
39187
  const { resolvedTheme } = useDepositUi();
38533
39188
  const { status, revalidate, errors } = useTrustware();
38534
- const [showConfirmDialog, setShowConfirmDialog] = useState33(false);
39189
+ const [showConfirmDialog, setShowConfirmDialog] = useState34(false);
38535
39190
  const handleCloseRequest = useCallback23(() => {
38536
39191
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
38537
39192
  setShowConfirmDialog(true);
@@ -38543,7 +39198,7 @@ function WidgetInner({
38543
39198
  onClose?.();
38544
39199
  }
38545
39200
  }, [transactionStatus, onClose, resetState]);
38546
- useEffect33(() => {
39201
+ useEffect34(() => {
38547
39202
  closeRequestRef.current = handleCloseRequest;
38548
39203
  }, [handleCloseRequest, closeRequestRef]);
38549
39204
  const handleConfirmClose = useCallback23(() => {
@@ -38559,16 +39214,16 @@ function WidgetInner({
38559
39214
  const handleRefresh = useCallback23(() => {
38560
39215
  revalidate?.();
38561
39216
  }, [revalidate]);
38562
- return /* @__PURE__ */ jsxs46(Fragment11, { children: [
38563
- /* @__PURE__ */ jsxs46(WidgetContainer, { theme: effectiveTheme, style, children: [
38564
- /* @__PURE__ */ jsx58(
39217
+ return /* @__PURE__ */ jsxs48(Fragment13, { children: [
39218
+ /* @__PURE__ */ jsxs48(WidgetContainer, { theme: effectiveTheme, style, children: [
39219
+ /* @__PURE__ */ jsx60(
38565
39220
  WidgetContent,
38566
39221
  {
38567
39222
  onStateChange,
38568
39223
  showThemeToggle
38569
39224
  }
38570
39225
  ),
38571
- /* @__PURE__ */ jsx58(
39226
+ /* @__PURE__ */ jsx60(
38572
39227
  InitErrorOverlay,
38573
39228
  {
38574
39229
  open: initBlocked,
@@ -38579,7 +39234,7 @@ function WidgetInner({
38579
39234
  }
38580
39235
  )
38581
39236
  ] }),
38582
- /* @__PURE__ */ jsx58(
39237
+ /* @__PURE__ */ jsx60(
38583
39238
  ConfirmCloseDialog,
38584
39239
  {
38585
39240
  open: showConfirmDialog,
@@ -38627,8 +39282,8 @@ var init_TrustwareWidgetV2 = __esm({
38627
39282
  onOpen,
38628
39283
  showThemeToggle = true
38629
39284
  }, ref) {
38630
- const [isOpen, setIsOpen] = useState33(defaultOpen);
38631
- const closeRequestRef = useRef19(null);
39285
+ const [isOpen, setIsOpen] = useState34(defaultOpen);
39286
+ const closeRequestRef = useRef20(null);
38632
39287
  const config = useTrustwareConfig();
38633
39288
  const effectiveInitialStep = initialStep;
38634
39289
  const open = useCallback23(() => {
@@ -38660,9 +39315,9 @@ var init_TrustwareWidgetV2 = __esm({
38660
39315
  return null;
38661
39316
  }
38662
39317
  if (config.features.swapMode) {
38663
- return /* @__PURE__ */ jsx58(SwapMode, { theme, style });
39318
+ return /* @__PURE__ */ jsx60(SwapMode, { theme, style });
38664
39319
  }
38665
- return /* @__PURE__ */ jsx58(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx58(
39320
+ return /* @__PURE__ */ jsx60(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx60(
38666
39321
  WidgetInner,
38667
39322
  {
38668
39323
  theme,