@trustware/sdk-staging 1.1.13-staging.1 → 1.1.13-staging.2

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
@@ -550,7 +550,7 @@ var init_constants = __esm({
550
550
  "src/constants.ts"() {
551
551
  "use strict";
552
552
  SDK_NAME = "@trustware/sdk";
553
- SDK_VERSION = "1.1.13-staging.1";
553
+ SDK_VERSION = "1.1.13-staging.2";
554
554
  API_ROOT = "https://bv-staging-api.trustware.io";
555
555
  GTM_ID = "GTM-TZDGNCXB";
556
556
  API_PREFIX = "/api";
@@ -9716,7 +9716,7 @@ var init_failure = __esm({
9716
9716
  });
9717
9717
 
9718
9718
  // src/hooks/useGTM.ts
9719
- import { useEffect as useEffect11, useRef as useRef3, useCallback as useCallback8 } from "react";
9719
+ import { useEffect as useEffect11, useCallback as useCallback8 } from "react";
9720
9720
  function isGA4Allowed() {
9721
9721
  try {
9722
9722
  return Trustware.getConfig().features.shouldAllowGA4;
@@ -9785,7 +9785,6 @@ function useGTMTracker() {
9785
9785
  return { trackEvent, trackPageView, setUserProperty, directGtag };
9786
9786
  }
9787
9787
  function useGTM(gtmId) {
9788
- const scriptRef = useRef3(null);
9789
9788
  const tracker = useGTMTracker();
9790
9789
  useEffect11(() => {
9791
9790
  if (!isGA4Allowed()) {
@@ -9800,14 +9799,24 @@ function useGTM(gtmId) {
9800
9799
  );
9801
9800
  return;
9802
9801
  }
9803
- if (isContainerInitialized) return;
9802
+ containerRefCount += 1;
9803
+ const release = () => {
9804
+ containerRefCount -= 1;
9805
+ if (containerRefCount > 0) return;
9806
+ if (injectedScript) {
9807
+ injectedScript.parentNode?.removeChild(injectedScript);
9808
+ injectedScript = null;
9809
+ }
9810
+ isContainerInitialized = false;
9811
+ };
9812
+ if (isContainerInitialized) return release;
9804
9813
  const alreadyLoaded = document.querySelector(
9805
9814
  `script[src*="googletagmanager.com/gtm.js?id=${gtmId}"]`
9806
9815
  );
9807
9816
  if (alreadyLoaded) {
9808
9817
  window.dataLayer = window.dataLayer || [];
9809
9818
  isContainerInitialized = true;
9810
- return;
9819
+ return release;
9811
9820
  }
9812
9821
  window.dataLayer = window.dataLayer || [];
9813
9822
  window.dataLayer.push({
@@ -9819,15 +9828,9 @@ function useGTM(gtmId) {
9819
9828
  script.async = true;
9820
9829
  script.src = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`;
9821
9830
  firstScript.parentNode?.insertBefore(script, firstScript);
9822
- scriptRef.current = script;
9831
+ injectedScript = script;
9823
9832
  isContainerInitialized = true;
9824
- return () => {
9825
- if (scriptRef.current) {
9826
- scriptRef.current.parentNode?.removeChild(scriptRef.current);
9827
- scriptRef.current = null;
9828
- }
9829
- isContainerInitialized = false;
9830
- };
9833
+ return release;
9831
9834
  }, [gtmId]);
9832
9835
  const addNoscriptIframe = useCallback8(() => {
9833
9836
  if (!isGA4Allowed()) return;
@@ -9845,12 +9848,14 @@ function useGTM(gtmId) {
9845
9848
  }, [gtmId]);
9846
9849
  return { ...tracker, addNoscriptIframe };
9847
9850
  }
9848
- var isContainerInitialized;
9851
+ var isContainerInitialized, containerRefCount, injectedScript;
9849
9852
  var init_useGTM = __esm({
9850
9853
  "src/hooks/useGTM.ts"() {
9851
9854
  "use strict";
9852
9855
  init_core2();
9853
9856
  isContainerInitialized = false;
9857
+ containerRefCount = 0;
9858
+ injectedScript = null;
9854
9859
  }
9855
9860
  });
9856
9861
 
@@ -9864,7 +9869,7 @@ var init_hooks = __esm({
9864
9869
  });
9865
9870
 
9866
9871
  // src/widget/hooks/useTransactionPolling.ts
9867
- import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef4, useState as useState13 } from "react";
9872
+ import { useCallback as useCallback9, useEffect as useEffect12, useRef as useRef3, useState as useState13 } from "react";
9868
9873
  function useTransactionPolling() {
9869
9874
  const { setCurrentStep } = useDepositNavigation();
9870
9875
  const { setTransactionStatus, setErrorMessage } = useDepositTransaction();
@@ -9885,11 +9890,11 @@ function useTransactionPolling() {
9885
9890
  transaction: null,
9886
9891
  receiptSubmitted: false
9887
9892
  });
9888
- const pollingRef = useRef4(null);
9889
- const timeoutRef = useRef4(null);
9890
- const abortRef = useRef4(false);
9891
- const startTimeRef = useRef4(0);
9892
- const pollCountRef = useRef4(0);
9893
+ const pollingRef = useRef3(null);
9894
+ const timeoutRef = useRef3(null);
9895
+ const abortRef = useRef3(false);
9896
+ const startTimeRef = useRef3(0);
9897
+ const pollCountRef = useRef3(0);
9893
9898
  const clearPolling = useCallback9(() => {
9894
9899
  abortRef.current = true;
9895
9900
  if (pollingRef.current) {
@@ -10060,7 +10065,7 @@ function useTransactionPolling() {
10060
10065
  receiptSubmitted: false
10061
10066
  });
10062
10067
  }, [clearPolling]);
10063
- const clearPollingRef = useRef4(clearPolling);
10068
+ const clearPollingRef = useRef3(clearPolling);
10064
10069
  clearPollingRef.current = clearPolling;
10065
10070
  useEffect12(() => {
10066
10071
  return () => {
@@ -10129,7 +10134,7 @@ var init_hooks2 = __esm({
10129
10134
  });
10130
10135
 
10131
10136
  // src/widget/state/deposit/useWalletTokenState.ts
10132
- import { useCallback as useCallback10, useEffect as useEffect13, useRef as useRef5, useState as useState14 } from "react";
10137
+ import { useCallback as useCallback10, useEffect as useEffect13, useRef as useRef4, useState as useState14 } from "react";
10133
10138
  function useWalletTokenState({
10134
10139
  walletAddress,
10135
10140
  selectedChain,
@@ -10140,16 +10145,16 @@ function useWalletTokenState({
10140
10145
  const [yourWalletTokens, setYourWalletTokens] = useState14([]);
10141
10146
  const [yourWalletTokensLoading, setYourWalletTokensLoading] = useState14(false);
10142
10147
  const [walletTokensReloadNonce, setWalletTokensReloadNonce] = useState14(0);
10143
- const lastLoadedWalletRef = useRef5(null);
10148
+ const lastLoadedWalletRef = useRef4(null);
10144
10149
  const { tokens } = useTokens(null);
10145
10150
  const { chains } = useChains();
10146
- const selectedChainRef = useRef5(selectedChain);
10151
+ const selectedChainRef = useRef4(selectedChain);
10147
10152
  selectedChainRef.current = selectedChain;
10148
- const selectedTokenRef = useRef5(selectedToken);
10153
+ const selectedTokenRef = useRef4(selectedToken);
10149
10154
  selectedTokenRef.current = selectedToken;
10150
- const setSelectedChainRef = useRef5(setSelectedChain);
10155
+ const setSelectedChainRef = useRef4(setSelectedChain);
10151
10156
  setSelectedChainRef.current = setSelectedChain;
10152
- const setSelectedTokenRef = useRef5(setSelectedToken);
10157
+ const setSelectedTokenRef = useRef4(setSelectedToken);
10153
10158
  setSelectedTokenRef.current = setSelectedToken;
10154
10159
  const { address: fallbackAddress } = useWalletInfo();
10155
10160
  const getCurrentWalletAddress = useCallback10(
@@ -11281,7 +11286,7 @@ var init_AmountSlider = __esm({
11281
11286
  });
11282
11287
 
11283
11288
  // src/widget/components/AmountInputDisplay.tsx
11284
- import { useRef as useRef6, useState as useState15 } from "react";
11289
+ import { useRef as useRef5, useState as useState15 } from "react";
11285
11290
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
11286
11291
  function formatDisplayAmount(value) {
11287
11292
  if (!Number.isFinite(value) || value <= 0) return "0";
@@ -11321,7 +11326,7 @@ function AmountInputDisplay({
11321
11326
  inputAriaLabel = "Deposit amount"
11322
11327
  }) {
11323
11328
  const [isEditing, setIsEditing] = useState15(false);
11324
- const inputRef = useRef6(null);
11329
+ const inputRef = useRef5(null);
11325
11330
  const handleAmountClick = () => {
11326
11331
  if (isFixedAmount) return;
11327
11332
  const isZeroish = !amount || parseFloat(amount) === 0;
@@ -11647,7 +11652,7 @@ var init_ConfettiEffect = __esm({
11647
11652
  });
11648
11653
 
11649
11654
  // src/widget/components/Dialog.tsx
11650
- import { useEffect as useEffect15, useRef as useRef7 } from "react";
11655
+ import { useEffect as useEffect15, useRef as useRef6 } from "react";
11651
11656
  import { Fragment, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
11652
11657
  var Dialog;
11653
11658
  var init_Dialog = __esm({
@@ -11664,10 +11669,10 @@ var init_Dialog = __esm({
11664
11669
  confirmText = "Close Anyway",
11665
11670
  isDark = false
11666
11671
  }) => {
11667
- const dialogRef = useRef7(null);
11668
- const overlayRef = useRef7(null);
11669
- const firstButtonRef = useRef7(null);
11670
- const lastButtonRef = useRef7(null);
11672
+ const dialogRef = useRef6(null);
11673
+ const overlayRef = useRef6(null);
11674
+ const firstButtonRef = useRef6(null);
11675
+ const lastButtonRef = useRef6(null);
11671
11676
  useEffect15(() => {
11672
11677
  const handleEscape = (e2) => {
11673
11678
  if (e2.key === "Escape" && open) {
@@ -12012,7 +12017,7 @@ var init_TransactionHashLink = __esm({
12012
12017
  });
12013
12018
 
12014
12019
  // src/widget/components/SwipeToConfirmTokens.tsx
12015
- import { useState as useState17, useRef as useRef8, useCallback as useCallback12, useEffect as useEffect16 } from "react";
12020
+ import { useState as useState17, useRef as useRef7, useCallback as useCallback12, useEffect as useEffect16 } from "react";
12016
12021
  import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
12017
12022
  function SwipeToConfirmTokens({
12018
12023
  fromToken,
@@ -12030,13 +12035,13 @@ function SwipeToConfirmTokens({
12030
12035
  const [dragX, setDragX] = useState17(0);
12031
12036
  const [isDragging, setIsDragging] = useState17(false);
12032
12037
  const [isComplete, setIsComplete] = useState17(false);
12033
- const trackRef = useRef8(null);
12034
- const thumbRef = useRef8(null);
12038
+ const trackRef = useRef7(null);
12039
+ const thumbRef = useRef7(null);
12035
12040
  const [isLongPressing, setIsLongPressing] = useState17(false);
12036
12041
  const [longPressProgress, setLongPressProgress] = useState17(0);
12037
- const longPressTimerRef = useRef8(null);
12038
- const longPressStartRef = useRef8(null);
12039
- const longPressAnimationRef = useRef8(null);
12042
+ const longPressTimerRef = useRef7(null);
12043
+ const longPressStartRef = useRef7(null);
12044
+ const longPressAnimationRef = useRef7(null);
12040
12045
  const LONG_PRESS_DURATION = 1500;
12041
12046
  const thumbSize = 48;
12042
12047
  const padding = 4;
@@ -12928,7 +12933,7 @@ var init_Toast = __esm({
12928
12933
  // src/widget/components/TokenSwipePill.tsx
12929
12934
  import React9, {
12930
12935
  useState as useState19,
12931
- useRef as useRef9,
12936
+ useRef as useRef8,
12932
12937
  useCallback as useCallback14,
12933
12938
  useEffect as useEffect18,
12934
12939
  useMemo as useMemo9
@@ -12945,8 +12950,8 @@ function TokenSwipePill({
12945
12950
  }) {
12946
12951
  const [isDragging, setIsDragging] = useState19(false);
12947
12952
  const [dragOffset, setDragOffset] = useState19(0);
12948
- const startXRef = useRef9(0);
12949
- const containerRef = useRef9(null);
12953
+ const startXRef = useRef8(0);
12954
+ const containerRef = useRef8(null);
12950
12955
  const currentIndex = tokens.findIndex(
12951
12956
  (t) => normalizeAddress2(
12952
12957
  t.address,
@@ -14276,7 +14281,7 @@ var init_ErrorPage = __esm({
14276
14281
  });
14277
14282
 
14278
14283
  // src/widget/components/ImageLoader.tsx
14279
- import { useCallback as useCallback15, useEffect as useEffect20, useMemo as useMemo11, useRef as useRef10, useState as useState21 } from "react";
14284
+ import { useCallback as useCallback15, useEffect as useEffect20, useMemo as useMemo11, useRef as useRef9, useState as useState21 } from "react";
14280
14285
  import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
14281
14286
  function Skeleton({
14282
14287
  background,
@@ -14308,10 +14313,10 @@ function ImageLoader({
14308
14313
  const [status, setStatus] = useState21("idle");
14309
14314
  const [attempt, setAttempt] = useState21(0);
14310
14315
  const [srcIsEmpty, setSrcIsEmpty] = useState21(false);
14311
- const imgRef = useRef10(null);
14312
- const observerRef = useRef10(null);
14313
- const onLoadRef = useRef10(onLoad);
14314
- const onErrorRef = useRef10(onError);
14316
+ const imgRef = useRef9(null);
14317
+ const observerRef = useRef9(null);
14318
+ const onLoadRef = useRef9(onLoad);
14319
+ const onErrorRef = useRef9(onError);
14315
14320
  useEffect20(() => {
14316
14321
  onLoadRef.current = onLoad;
14317
14322
  onErrorRef.current = onError;
@@ -17425,7 +17430,7 @@ var init_WalletNamespaceTabs = __esm({
17425
17430
  });
17426
17431
 
17427
17432
  // src/widget/features/wallet/components/CryptoWalletDropdownContent.tsx
17428
- import { useEffect as useEffect24, useMemo as useMemo17, useRef as useRef11, useState as useState24 } from "react";
17433
+ import { useEffect as useEffect24, useMemo as useMemo17, useRef as useRef10, useState as useState24 } from "react";
17429
17434
  import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
17430
17435
  function ecosystemToNamespace(ecosystem) {
17431
17436
  switch (ecosystem.trim().toLowerCase()) {
@@ -17512,7 +17517,7 @@ function MobileWalletDropdownContent({
17512
17517
  const { selectedNamespace, setSelectedNamespace } = useDepositWallet();
17513
17518
  const { walletMetaId, isConnected, status, detected } = useWalletInfo();
17514
17519
  const [hoveredId, setHoveredId] = useState24(null);
17515
- const storeFallbackTimeoutRef = useRef11(
17520
+ const storeFallbackTimeoutRef = useRef10(
17516
17521
  null
17517
17522
  );
17518
17523
  useEffect24(() => {
@@ -17983,7 +17988,7 @@ var init_HomePaymentOptions = __esm({
17983
17988
  });
17984
17989
 
17985
17990
  // src/widget/features/wallet/hooks/useHomeWalletActions.ts
17986
- import { useCallback as useCallback18, useEffect as useEffect25, useMemo as useMemo18, useRef as useRef12, useState as useState25 } from "react";
17991
+ import { useCallback as useCallback18, useEffect as useEffect25, useMemo as useMemo18, useRef as useRef11, useState as useState25 } from "react";
17987
17992
  function useHomeWalletActions({
17988
17993
  connectWallet,
17989
17994
  detectedWallets,
@@ -17994,8 +17999,8 @@ function useHomeWalletActions({
17994
17999
  }) {
17995
18000
  const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = useState25(false);
17996
18001
  const [isFiatDropdownOpen, setIsFiatDropdownOpen] = useState25(false);
17997
- const cryptoDropdownRef = useRef12(null);
17998
- const fiatDropdownRef = useRef12(null);
18002
+ const cryptoDropdownRef = useRef11(null);
18003
+ const fiatDropdownRef = useRef11(null);
17999
18004
  const { disconnect } = useWalletInfo();
18000
18005
  useEffect25(() => {
18001
18006
  const handleClickOutside = (event) => {
@@ -32250,7 +32255,7 @@ var init_smart_account2 = __esm({
32250
32255
  });
32251
32256
 
32252
32257
  // src/widget/features/transaction/hooks/useTransactionActionModel.ts
32253
- import { useCallback as useCallback19, useEffect as useEffect26, useMemo as useMemo20, useRef as useRef13, useState as useState26 } from "react";
32258
+ import { useCallback as useCallback19, useEffect as useEffect26, useMemo as useMemo20, useRef as useRef12, useState as useState26 } from "react";
32254
32259
  import { encodeFunctionData as encodeFunctionData9, erc20Abi } from "viem";
32255
32260
  function normalizeTokenAddressForCompare(chain, addr) {
32256
32261
  const chainType = (chain.type ?? chain.chainType ?? "").toLowerCase();
@@ -32272,7 +32277,7 @@ function useTransactionActionModel({
32272
32277
  walletAddress,
32273
32278
  walletStatus
32274
32279
  }) {
32275
- const feeDataCacheRef = useRef13({});
32280
+ const feeDataCacheRef = useRef12({});
32276
32281
  const { isSubmitting, submitTransaction } = useTransactionSubmit();
32277
32282
  const { trackEvent } = useGTMTracker();
32278
32283
  const destinationConfig = (() => {
@@ -33413,7 +33418,7 @@ var init_CryptoPay = __esm({
33413
33418
  });
33414
33419
 
33415
33420
  // src/widget/pages/Processing.tsx
33416
- import { useEffect as useEffect29, useMemo as useMemo22, useRef as useRef14 } from "react";
33421
+ import { useEffect as useEffect29, useMemo as useMemo22, useRef as useRef13 } from "react";
33417
33422
  import { jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
33418
33423
  function getProgressFromStatus(status) {
33419
33424
  switch (status) {
@@ -33452,7 +33457,7 @@ function Processing({ style }) {
33452
33457
  const { resetState, setCurrentStep } = useDepositNavigation();
33453
33458
  const { transactionStatus, transactionHash, intentId } = useDepositTransaction();
33454
33459
  const { transaction, startPolling, isPolling } = useTransactionPolling();
33455
- const hasStartedPolling = useRef14(false);
33460
+ const hasStartedPolling = useRef13(false);
33456
33461
  useEffect29(() => {
33457
33462
  return () => {
33458
33463
  hasStartedPolling.current = false;
@@ -33809,15 +33814,31 @@ var init_WidgetRouter = __esm({
33809
33814
  }
33810
33815
  });
33811
33816
 
33817
+ // src/widget/app/WidgetAnalytics.tsx
33818
+ import { Fragment as Fragment10, jsx as jsx51 } from "react/jsx-runtime";
33819
+ function WidgetAnalytics({
33820
+ children
33821
+ }) {
33822
+ useGTM(GTM_ID);
33823
+ return /* @__PURE__ */ jsx51(Fragment10, { children });
33824
+ }
33825
+ var init_WidgetAnalytics = __esm({
33826
+ "src/widget/app/WidgetAnalytics.tsx"() {
33827
+ "use strict";
33828
+ init_hooks();
33829
+ init_constants();
33830
+ }
33831
+ });
33832
+
33812
33833
  // src/modes/swap/hooks/useSwapRoute.ts
33813
- import { useCallback as useCallback20, useRef as useRef15, useState as useState28 } from "react";
33834
+ import { useCallback as useCallback20, useRef as useRef14, useState as useState28 } from "react";
33814
33835
  function useSwapRoute() {
33815
33836
  const [state, setState] = useState28({
33816
33837
  data: null,
33817
33838
  loading: false,
33818
33839
  error: null
33819
33840
  });
33820
- const abortRef = useRef15(false);
33841
+ const abortRef = useRef14(false);
33821
33842
  const fetch2 = useCallback20(
33822
33843
  async (params) => {
33823
33844
  const { fromToken, fromChain, toToken, toChain, amount, walletAddress } = params;
@@ -33877,7 +33898,7 @@ var init_useSwapRoute = __esm({
33877
33898
  });
33878
33899
 
33879
33900
  // src/modes/swap/hooks/useSwapExecution.ts
33880
- import { useCallback as useCallback21, useRef as useRef16, useState as useState29 } from "react";
33901
+ import { useCallback as useCallback21, useRef as useRef15, useState as useState29 } from "react";
33881
33902
  import { encodeFunctionData as encodeFunctionData10, erc20Abi as erc20Abi2 } from "viem";
33882
33903
  function normalizeTx(raw) {
33883
33904
  const r = raw;
@@ -33917,11 +33938,11 @@ function useSwapExecution(fromChain) {
33917
33938
  isSubmitting: false,
33918
33939
  allowanceStatus: "unknown"
33919
33940
  });
33920
- const saFailedUntilRef = useRef16(0);
33921
- const pollingRef = useRef16(null);
33922
- const timeoutRef = useRef16(null);
33923
- const abortRef = useRef16(false);
33924
- const pollCountRef = useRef16(0);
33941
+ const saFailedUntilRef = useRef15(0);
33942
+ const pollingRef = useRef15(null);
33943
+ const timeoutRef = useRef15(null);
33944
+ const abortRef = useRef15(false);
33945
+ const pollCountRef = useRef15(0);
33925
33946
  const clearPolling = useCallback21(() => {
33926
33947
  abortRef.current = true;
33927
33948
  if (pollingRef.current) clearTimeout(pollingRef.current);
@@ -34368,6 +34389,36 @@ var init_walletBalance = __esm({
34368
34389
  }
34369
34390
  });
34370
34391
 
34392
+ // src/modes/swap/analytics.ts
34393
+ function chainLabel(chain) {
34394
+ return chain?.networkName ?? chain?.axelarChainName ?? chain?.chainId ?? UNKNOWN;
34395
+ }
34396
+ function tokenLabel(token) {
34397
+ return token?.symbol ?? UNKNOWN;
34398
+ }
34399
+ function buildSwapPaymentParams(ctx) {
34400
+ return {
34401
+ from_chain: chainLabel(ctx.fromChain),
34402
+ from_token: tokenLabel(ctx.fromToken),
34403
+ to_chain: chainLabel(ctx.toChain),
34404
+ to_token: tokenLabel(ctx.toToken),
34405
+ domain: ctx.domain
34406
+ };
34407
+ }
34408
+ function claimAttemptOnce(slot, attempt) {
34409
+ if (!attempt) return false;
34410
+ if (slot.current === attempt) return false;
34411
+ slot.current = attempt;
34412
+ return true;
34413
+ }
34414
+ var UNKNOWN;
34415
+ var init_analytics = __esm({
34416
+ "src/modes/swap/analytics.ts"() {
34417
+ "use strict";
34418
+ UNKNOWN = "unknown";
34419
+ }
34420
+ });
34421
+
34371
34422
  // src/core/forex.ts
34372
34423
  async function fetchForexRates(base2 = "USD") {
34373
34424
  let r;
@@ -34397,12 +34448,12 @@ var init_forex = __esm({
34397
34448
  });
34398
34449
 
34399
34450
  // src/modes/swap/hooks/useForex.ts
34400
- import { useEffect as useEffect30, useRef as useRef17, useState as useState30 } from "react";
34451
+ import { useEffect as useEffect30, useRef as useRef16, useState as useState30 } from "react";
34401
34452
  function useForex() {
34402
34453
  const [rates, setRates] = useState30({ USD: 1 });
34403
34454
  const [error, setError] = useState30(null);
34404
34455
  const [lastUpdated, setLastUpdated] = useState30(null);
34405
- const timerRef = useRef17(null);
34456
+ const timerRef = useRef16(null);
34406
34457
  useEffect30(() => {
34407
34458
  let cancelled = false;
34408
34459
  const load = () => {
@@ -34441,7 +34492,7 @@ var init_useForex = __esm({
34441
34492
 
34442
34493
  // src/modes/swap/components/SwapTokenSelect.tsx
34443
34494
  import { useState as useState31, useMemo as useMemo26, useEffect as useEffect31 } from "react";
34444
- import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
34495
+ import { jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
34445
34496
  function SwapTokenSelect({
34446
34497
  side,
34447
34498
  selectedChain: initialChain,
@@ -34585,7 +34636,7 @@ function SwapTokenSelect({
34585
34636
  borderBottom: `1px solid ${colors.border}`
34586
34637
  },
34587
34638
  children: [
34588
- /* @__PURE__ */ jsx51(
34639
+ /* @__PURE__ */ jsx52(
34589
34640
  "button",
34590
34641
  {
34591
34642
  type: "button",
@@ -34599,7 +34650,7 @@ function SwapTokenSelect({
34599
34650
  cursor: "pointer"
34600
34651
  },
34601
34652
  "aria-label": "Go back",
34602
- children: /* @__PURE__ */ jsx51(
34653
+ children: /* @__PURE__ */ jsx52(
34603
34654
  "svg",
34604
34655
  {
34605
34656
  style: {
@@ -34611,7 +34662,7 @@ function SwapTokenSelect({
34611
34662
  fill: "none",
34612
34663
  stroke: "currentColor",
34613
34664
  strokeWidth: 2,
34614
- children: /* @__PURE__ */ jsx51(
34665
+ children: /* @__PURE__ */ jsx52(
34615
34666
  "path",
34616
34667
  {
34617
34668
  strokeLinecap: "round",
@@ -34623,7 +34674,7 @@ function SwapTokenSelect({
34623
34674
  )
34624
34675
  }
34625
34676
  ),
34626
- /* @__PURE__ */ jsx51(
34677
+ /* @__PURE__ */ jsx52(
34627
34678
  "h1",
34628
34679
  {
34629
34680
  style: {
@@ -34641,7 +34692,7 @@ function SwapTokenSelect({
34641
34692
  }
34642
34693
  ),
34643
34694
  /* @__PURE__ */ jsxs42("div", { style: { flex: 1, display: "flex", overflow: "hidden" }, children: [
34644
- /* @__PURE__ */ jsx51(
34695
+ /* @__PURE__ */ jsx52(
34645
34696
  ChainSelectorPanel,
34646
34697
  {
34647
34698
  error: chainsError,
@@ -34652,7 +34703,7 @@ function SwapTokenSelect({
34652
34703
  popularChains
34653
34704
  }
34654
34705
  ),
34655
- /* @__PURE__ */ jsx51(
34706
+ /* @__PURE__ */ jsx52(
34656
34707
  TokenSelectorPanel,
34657
34708
  {
34658
34709
  filteredTokens: visibleTokens,
@@ -34671,7 +34722,7 @@ function SwapTokenSelect({
34671
34722
  }
34672
34723
  )
34673
34724
  ] }),
34674
- /* @__PURE__ */ jsx51(WidgetSecurityFooter, {})
34725
+ /* @__PURE__ */ jsx52(WidgetSecurityFooter, {})
34675
34726
  ]
34676
34727
  }
34677
34728
  );
@@ -34761,8 +34812,8 @@ var init_currency = __esm({
34761
34812
  });
34762
34813
 
34763
34814
  // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx
34764
- import { useEffect as useEffect32, useMemo as useMemo27, useRef as useRef18, useState as useState32 } from "react";
34765
- import { Fragment as Fragment10, jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
34815
+ import { useEffect as useEffect32, useMemo as useMemo27, useRef as useRef17, useState as useState32 } from "react";
34816
+ import { Fragment as Fragment11, jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
34766
34817
  function SwapWalletSelectorMobile({
34767
34818
  walletStatus,
34768
34819
  walletAddress,
@@ -34782,8 +34833,8 @@ function SwapWalletSelectorMobile({
34782
34833
  const [wcConnecting, setWcConnecting] = useState32(false);
34783
34834
  const [connectingId, setConnectingId] = useState32(null);
34784
34835
  const [selectedNamespace, setSelectedNamespace] = useState32("evm");
34785
- const prevStatusRef = useRef18(walletStatus);
34786
- const storeFallbackTimeoutRef = useRef18(
34836
+ const prevStatusRef = useRef17(walletStatus);
34837
+ const storeFallbackTimeoutRef = useRef17(
34787
34838
  null
34788
34839
  );
34789
34840
  useEffect32(() => {
@@ -34904,7 +34955,7 @@ function SwapWalletSelectorMobile({
34904
34955
  borderBottom: `1px solid ${colors.border}`
34905
34956
  },
34906
34957
  children: [
34907
- /* @__PURE__ */ jsx52(
34958
+ /* @__PURE__ */ jsx53(
34908
34959
  "button",
34909
34960
  {
34910
34961
  type: "button",
@@ -34917,7 +34968,7 @@ function SwapWalletSelectorMobile({
34917
34968
  border: 0,
34918
34969
  cursor: "pointer"
34919
34970
  },
34920
- children: /* @__PURE__ */ jsx52(
34971
+ children: /* @__PURE__ */ jsx53(
34921
34972
  "svg",
34922
34973
  {
34923
34974
  style: {
@@ -34929,7 +34980,7 @@ function SwapWalletSelectorMobile({
34929
34980
  fill: "none",
34930
34981
  stroke: "currentColor",
34931
34982
  strokeWidth: 2,
34932
- children: /* @__PURE__ */ jsx52(
34983
+ children: /* @__PURE__ */ jsx53(
34933
34984
  "path",
34934
34985
  {
34935
34986
  strokeLinecap: "round",
@@ -34941,7 +34992,7 @@ function SwapWalletSelectorMobile({
34941
34992
  )
34942
34993
  }
34943
34994
  ),
34944
- /* @__PURE__ */ jsx52(
34995
+ /* @__PURE__ */ jsx53(
34945
34996
  "h1",
34946
34997
  {
34947
34998
  style: {
@@ -34954,11 +35005,11 @@ function SwapWalletSelectorMobile({
34954
35005
  children: "Connect Wallet"
34955
35006
  }
34956
35007
  ),
34957
- /* @__PURE__ */ jsx52("div", { style: { width: "1.25rem", marginLeft: spacing[2] }, "aria-hidden": true })
35008
+ /* @__PURE__ */ jsx53("div", { style: { width: "1.25rem", marginLeft: spacing[2] }, "aria-hidden": true })
34958
35009
  ]
34959
35010
  }
34960
35011
  ),
34961
- /* @__PURE__ */ jsx52("div", { style: { padding: `${spacing[3]} ${spacing[4]} 0` }, children: /* @__PURE__ */ jsx52(
35012
+ /* @__PURE__ */ jsx53("div", { style: { padding: `${spacing[3]} ${spacing[4]} 0` }, children: /* @__PURE__ */ jsx53(
34962
35013
  "div",
34963
35014
  {
34964
35015
  style: {
@@ -34969,7 +35020,7 @@ function SwapWalletSelectorMobile({
34969
35020
  padding: "3px",
34970
35021
  gap: "2px"
34971
35022
  },
34972
- children: tabs.map((t) => /* @__PURE__ */ jsx52(
35023
+ children: tabs.map((t) => /* @__PURE__ */ jsx53(
34973
35024
  "button",
34974
35025
  {
34975
35026
  onClick: () => setSelectedNamespace(t.id),
@@ -35003,8 +35054,8 @@ function SwapWalletSelectorMobile({
35003
35054
  },
35004
35055
  children: [
35005
35056
  mobileWalletEntries.length === 0 ? /* @__PURE__ */ jsxs43("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
35006
- /* @__PURE__ */ jsx52("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
35007
- /* @__PURE__ */ jsx52(
35057
+ /* @__PURE__ */ jsx53("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
35058
+ /* @__PURE__ */ jsx53(
35008
35059
  "h3",
35009
35060
  {
35010
35061
  style: {
@@ -35016,7 +35067,7 @@ function SwapWalletSelectorMobile({
35016
35067
  children: "No Wallets Found"
35017
35068
  }
35018
35069
  ),
35019
- /* @__PURE__ */ jsx52(
35070
+ /* @__PURE__ */ jsx53(
35020
35071
  "p",
35021
35072
  {
35022
35073
  style: {
@@ -35027,7 +35078,7 @@ function SwapWalletSelectorMobile({
35027
35078
  children: "Please install a web3 wallet to continue."
35028
35079
  }
35029
35080
  ),
35030
- /* @__PURE__ */ jsx52(
35081
+ /* @__PURE__ */ jsx53(
35031
35082
  "a",
35032
35083
  {
35033
35084
  href: "https://metamask.io/download/",
@@ -35048,7 +35099,7 @@ function SwapWalletSelectorMobile({
35048
35099
  children: "Install MetaMask"
35049
35100
  }
35050
35101
  )
35051
- ] }) : /* @__PURE__ */ jsx52(
35102
+ ] }) : /* @__PURE__ */ jsx53(
35052
35103
  "div",
35053
35104
  {
35054
35105
  style: {
@@ -35082,7 +35133,7 @@ function SwapWalletSelectorMobile({
35082
35133
  isRowDisabled && { opacity: 0.4 }
35083
35134
  ),
35084
35135
  children: [
35085
- /* @__PURE__ */ jsx52(
35136
+ /* @__PURE__ */ jsx53(
35086
35137
  "div",
35087
35138
  {
35088
35139
  style: {
@@ -35096,7 +35147,7 @@ function SwapWalletSelectorMobile({
35096
35147
  overflow: "hidden",
35097
35148
  flexShrink: 0
35098
35149
  },
35099
- children: meta.logo ? /* @__PURE__ */ jsx52(
35150
+ children: meta.logo ? /* @__PURE__ */ jsx53(
35100
35151
  "img",
35101
35152
  {
35102
35153
  src: meta.logo,
@@ -35107,11 +35158,11 @@ function SwapWalletSelectorMobile({
35107
35158
  objectFit: "contain"
35108
35159
  }
35109
35160
  }
35110
- ) : /* @__PURE__ */ jsx52("span", { style: { fontSize: "1.5rem" }, children: meta.emoji || "\u{1F45B}" })
35161
+ ) : /* @__PURE__ */ jsx53("span", { style: { fontSize: "1.5rem" }, children: meta.emoji || "\u{1F45B}" })
35111
35162
  }
35112
35163
  ),
35113
35164
  /* @__PURE__ */ jsxs43("div", { style: { flex: 1, minWidth: 0 }, children: [
35114
- /* @__PURE__ */ jsx52(
35165
+ /* @__PURE__ */ jsx53(
35115
35166
  "p",
35116
35167
  {
35117
35168
  style: {
@@ -35136,7 +35187,7 @@ function SwapWalletSelectorMobile({
35136
35187
  }
35137
35188
  )
35138
35189
  ] }),
35139
- isConnecting ? /* @__PURE__ */ jsx52(
35190
+ isConnecting ? /* @__PURE__ */ jsx53(
35140
35191
  "div",
35141
35192
  {
35142
35193
  style: {
@@ -35149,7 +35200,7 @@ function SwapWalletSelectorMobile({
35149
35200
  flexShrink: 0
35150
35201
  }
35151
35202
  }
35152
- ) : isWalletConnected ? /* @__PURE__ */ jsx52(
35203
+ ) : isWalletConnected ? /* @__PURE__ */ jsx53(
35153
35204
  "button",
35154
35205
  {
35155
35206
  onClick: handleDisconnect,
@@ -35166,7 +35217,7 @@ function SwapWalletSelectorMobile({
35166
35217
  },
35167
35218
  children: "Disconnect"
35168
35219
  }
35169
- ) : /* @__PURE__ */ jsx52(
35220
+ ) : /* @__PURE__ */ jsx53(
35170
35221
  "button",
35171
35222
  {
35172
35223
  onClick: () => void handleClick(entry),
@@ -35198,8 +35249,8 @@ function SwapWalletSelectorMobile({
35198
35249
  })
35199
35250
  }
35200
35251
  ),
35201
- selectedNamespace === "evm" && /* @__PURE__ */ jsxs43(Fragment10, { children: [
35202
- /* @__PURE__ */ jsx52(
35252
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs43(Fragment11, { children: [
35253
+ /* @__PURE__ */ jsx53(
35203
35254
  "div",
35204
35255
  {
35205
35256
  style: {
@@ -35235,7 +35286,7 @@ function SwapWalletSelectorMobile({
35235
35286
  ),
35236
35287
  onClick: !wcConnected && !wcRowDisabled ? () => void handleWalletConnect() : void 0,
35237
35288
  children: [
35238
- /* @__PURE__ */ jsx52(
35289
+ /* @__PURE__ */ jsx53(
35239
35290
  "div",
35240
35291
  {
35241
35292
  style: {
@@ -35248,7 +35299,7 @@ function SwapWalletSelectorMobile({
35248
35299
  justifyContent: "center",
35249
35300
  flexShrink: 0
35250
35301
  },
35251
- children: /* @__PURE__ */ jsx52(
35302
+ children: /* @__PURE__ */ jsx53(
35252
35303
  "svg",
35253
35304
  {
35254
35305
  style: {
@@ -35258,13 +35309,13 @@ function SwapWalletSelectorMobile({
35258
35309
  },
35259
35310
  viewBox: "0 0 24 24",
35260
35311
  fill: "currentColor",
35261
- children: /* @__PURE__ */ jsx52("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" })
35312
+ children: /* @__PURE__ */ jsx53("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" })
35262
35313
  }
35263
35314
  )
35264
35315
  }
35265
35316
  ),
35266
35317
  /* @__PURE__ */ jsxs43("div", { style: { flex: 1, minWidth: 0 }, children: [
35267
- /* @__PURE__ */ jsx52(
35318
+ /* @__PURE__ */ jsx53(
35268
35319
  "p",
35269
35320
  {
35270
35321
  style: {
@@ -35289,7 +35340,7 @@ function SwapWalletSelectorMobile({
35289
35340
  }
35290
35341
  )
35291
35342
  ] }),
35292
- wcConnecting ? /* @__PURE__ */ jsx52(
35343
+ wcConnecting ? /* @__PURE__ */ jsx53(
35293
35344
  "div",
35294
35345
  {
35295
35346
  style: {
@@ -35302,7 +35353,7 @@ function SwapWalletSelectorMobile({
35302
35353
  flexShrink: 0
35303
35354
  }
35304
35355
  }
35305
- ) : wcConnected ? /* @__PURE__ */ jsx52(
35356
+ ) : wcConnected ? /* @__PURE__ */ jsx53(
35306
35357
  "button",
35307
35358
  {
35308
35359
  onClick: (e2) => {
@@ -35322,7 +35373,7 @@ function SwapWalletSelectorMobile({
35322
35373
  },
35323
35374
  children: "Disconnect"
35324
35375
  }
35325
- ) : /* @__PURE__ */ jsx52(
35376
+ ) : /* @__PURE__ */ jsx53(
35326
35377
  "button",
35327
35378
  {
35328
35379
  onClick: (e2) => {
@@ -35377,8 +35428,8 @@ var init_SwapWalletSelectorMobile = __esm({
35377
35428
  });
35378
35429
 
35379
35430
  // src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx
35380
- import { useEffect as useEffect33, useMemo as useMemo28, useRef as useRef19, useState as useState33 } from "react";
35381
- import { Fragment as Fragment11, jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
35431
+ import { useEffect as useEffect33, useMemo as useMemo28, useRef as useRef18, useState as useState33 } from "react";
35432
+ import { Fragment as Fragment12, jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
35382
35433
  function SwapWalletSelectorDesktop({
35383
35434
  walletStatus,
35384
35435
  walletAddress,
@@ -35398,7 +35449,7 @@ function SwapWalletSelectorDesktop({
35398
35449
  const [connectingId, setConnectingId] = useState33(null);
35399
35450
  const [timerExpired, setTimerExpired] = useState33(false);
35400
35451
  const [selectedNamespace, setSelectedNamespace] = useState33("evm");
35401
- const prevStatusRef = useRef19(walletStatus);
35452
+ const prevStatusRef = useRef18(walletStatus);
35402
35453
  useEffect33(() => {
35403
35454
  const t = setTimeout(() => setTimerExpired(true), 450);
35404
35455
  return () => clearTimeout(t);
@@ -35482,7 +35533,7 @@ function SwapWalletSelectorDesktop({
35482
35533
  borderBottom: `1px solid ${colors.border}`
35483
35534
  },
35484
35535
  children: [
35485
- /* @__PURE__ */ jsx53(
35536
+ /* @__PURE__ */ jsx54(
35486
35537
  "button",
35487
35538
  {
35488
35539
  type: "button",
@@ -35495,7 +35546,7 @@ function SwapWalletSelectorDesktop({
35495
35546
  border: 0,
35496
35547
  cursor: "pointer"
35497
35548
  },
35498
- children: /* @__PURE__ */ jsx53(
35549
+ children: /* @__PURE__ */ jsx54(
35499
35550
  "svg",
35500
35551
  {
35501
35552
  style: {
@@ -35507,7 +35558,7 @@ function SwapWalletSelectorDesktop({
35507
35558
  fill: "none",
35508
35559
  stroke: "currentColor",
35509
35560
  strokeWidth: 2,
35510
- children: /* @__PURE__ */ jsx53(
35561
+ children: /* @__PURE__ */ jsx54(
35511
35562
  "path",
35512
35563
  {
35513
35564
  strokeLinecap: "round",
@@ -35519,7 +35570,7 @@ function SwapWalletSelectorDesktop({
35519
35570
  )
35520
35571
  }
35521
35572
  ),
35522
- /* @__PURE__ */ jsx53(
35573
+ /* @__PURE__ */ jsx54(
35523
35574
  "h1",
35524
35575
  {
35525
35576
  style: {
@@ -35532,7 +35583,7 @@ function SwapWalletSelectorDesktop({
35532
35583
  children: "Connect Wallet"
35533
35584
  }
35534
35585
  ),
35535
- /* @__PURE__ */ jsx53(
35586
+ /* @__PURE__ */ jsx54(
35536
35587
  "div",
35537
35588
  {
35538
35589
  style: {
@@ -35543,7 +35594,7 @@ function SwapWalletSelectorDesktop({
35543
35594
  padding: "3px",
35544
35595
  gap: "2px"
35545
35596
  },
35546
- children: tabs.map((t) => /* @__PURE__ */ jsx53(
35597
+ children: tabs.map((t) => /* @__PURE__ */ jsx54(
35547
35598
  "button",
35548
35599
  {
35549
35600
  onClick: () => setSelectedNamespace(t.id),
@@ -35592,7 +35643,7 @@ function SwapWalletSelectorDesktop({
35592
35643
  animation: "tw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
35593
35644
  },
35594
35645
  children: [
35595
- /* @__PURE__ */ jsx53(
35646
+ /* @__PURE__ */ jsx54(
35596
35647
  "div",
35597
35648
  {
35598
35649
  style: {
@@ -35603,7 +35654,7 @@ function SwapWalletSelectorDesktop({
35603
35654
  }
35604
35655
  }
35605
35656
  ),
35606
- /* @__PURE__ */ jsx53(
35657
+ /* @__PURE__ */ jsx54(
35607
35658
  "div",
35608
35659
  {
35609
35660
  style: {
@@ -35618,7 +35669,7 @@ function SwapWalletSelectorDesktop({
35618
35669
  },
35619
35670
  i
35620
35671
  )),
35621
- /* @__PURE__ */ jsx53(
35672
+ /* @__PURE__ */ jsx54(
35622
35673
  "p",
35623
35674
  {
35624
35675
  style: {
@@ -35633,8 +35684,8 @@ function SwapWalletSelectorDesktop({
35633
35684
  ]
35634
35685
  }
35635
35686
  ) : filteredWallets.length === 0 ? /* @__PURE__ */ jsxs44("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
35636
- /* @__PURE__ */ jsx53("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
35637
- /* @__PURE__ */ jsx53(
35687
+ /* @__PURE__ */ jsx54("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
35688
+ /* @__PURE__ */ jsx54(
35638
35689
  "h3",
35639
35690
  {
35640
35691
  style: {
@@ -35646,7 +35697,7 @@ function SwapWalletSelectorDesktop({
35646
35697
  children: "No Wallets Found"
35647
35698
  }
35648
35699
  ),
35649
- /* @__PURE__ */ jsx53(
35700
+ /* @__PURE__ */ jsx54(
35650
35701
  "p",
35651
35702
  {
35652
35703
  style: {
@@ -35657,7 +35708,7 @@ function SwapWalletSelectorDesktop({
35657
35708
  children: "Please install a web3 wallet to continue."
35658
35709
  }
35659
35710
  ),
35660
- /* @__PURE__ */ jsx53(
35711
+ /* @__PURE__ */ jsx54(
35661
35712
  "a",
35662
35713
  {
35663
35714
  href: "https://metamask.io/download/",
@@ -35678,7 +35729,7 @@ function SwapWalletSelectorDesktop({
35678
35729
  children: "Install MetaMask"
35679
35730
  }
35680
35731
  )
35681
- ] }) : /* @__PURE__ */ jsx53(
35732
+ ] }) : /* @__PURE__ */ jsx54(
35682
35733
  "div",
35683
35734
  {
35684
35735
  style: {
@@ -35709,7 +35760,7 @@ function SwapWalletSelectorDesktop({
35709
35760
  }
35710
35761
  ),
35711
35762
  children: [
35712
- /* @__PURE__ */ jsx53(
35763
+ /* @__PURE__ */ jsx54(
35713
35764
  "div",
35714
35765
  {
35715
35766
  style: {
@@ -35723,7 +35774,7 @@ function SwapWalletSelectorDesktop({
35723
35774
  overflow: "hidden",
35724
35775
  flexShrink: 0
35725
35776
  },
35726
- children: wallet.meta.logo ? /* @__PURE__ */ jsx53(
35777
+ children: wallet.meta.logo ? /* @__PURE__ */ jsx54(
35727
35778
  "img",
35728
35779
  {
35729
35780
  src: wallet.meta.logo,
@@ -35734,7 +35785,7 @@ function SwapWalletSelectorDesktop({
35734
35785
  objectFit: "contain"
35735
35786
  }
35736
35787
  }
35737
- ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx53(
35788
+ ) : wallet.detail?.info?.icon ? /* @__PURE__ */ jsx54(
35738
35789
  "img",
35739
35790
  {
35740
35791
  src: wallet.detail.info.icon,
@@ -35745,11 +35796,11 @@ function SwapWalletSelectorDesktop({
35745
35796
  objectFit: "contain"
35746
35797
  }
35747
35798
  }
35748
- ) : /* @__PURE__ */ jsx53("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
35799
+ ) : /* @__PURE__ */ jsx54("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
35749
35800
  }
35750
35801
  ),
35751
35802
  /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
35752
- /* @__PURE__ */ jsx53(
35803
+ /* @__PURE__ */ jsx54(
35753
35804
  "p",
35754
35805
  {
35755
35806
  style: {
@@ -35774,7 +35825,7 @@ function SwapWalletSelectorDesktop({
35774
35825
  }
35775
35826
  )
35776
35827
  ] }),
35777
- isConnecting ? /* @__PURE__ */ jsx53(
35828
+ isConnecting ? /* @__PURE__ */ jsx54(
35778
35829
  "div",
35779
35830
  {
35780
35831
  style: {
@@ -35787,7 +35838,7 @@ function SwapWalletSelectorDesktop({
35787
35838
  flexShrink: 0
35788
35839
  }
35789
35840
  }
35790
- ) : isWalletConnected ? /* @__PURE__ */ jsx53(
35841
+ ) : isWalletConnected ? /* @__PURE__ */ jsx54(
35791
35842
  "button",
35792
35843
  {
35793
35844
  onClick: handleDisconnect,
@@ -35804,7 +35855,7 @@ function SwapWalletSelectorDesktop({
35804
35855
  },
35805
35856
  children: "Disconnect"
35806
35857
  }
35807
- ) : /* @__PURE__ */ jsx53(
35858
+ ) : /* @__PURE__ */ jsx54(
35808
35859
  "button",
35809
35860
  {
35810
35861
  onClick: () => void handleClick(wallet),
@@ -35836,8 +35887,8 @@ function SwapWalletSelectorDesktop({
35836
35887
  })
35837
35888
  }
35838
35889
  ),
35839
- selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment11, { children: [
35840
- /* @__PURE__ */ jsx53(
35890
+ selectedNamespace === "evm" && /* @__PURE__ */ jsxs44(Fragment12, { children: [
35891
+ /* @__PURE__ */ jsx54(
35841
35892
  "div",
35842
35893
  {
35843
35894
  style: {
@@ -35871,7 +35922,7 @@ function SwapWalletSelectorDesktop({
35871
35922
  ),
35872
35923
  onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
35873
35924
  children: [
35874
- /* @__PURE__ */ jsx53(
35925
+ /* @__PURE__ */ jsx54(
35875
35926
  "div",
35876
35927
  {
35877
35928
  style: {
@@ -35884,7 +35935,7 @@ function SwapWalletSelectorDesktop({
35884
35935
  justifyContent: "center",
35885
35936
  flexShrink: 0
35886
35937
  },
35887
- children: /* @__PURE__ */ jsx53(
35938
+ children: /* @__PURE__ */ jsx54(
35888
35939
  "svg",
35889
35940
  {
35890
35941
  style: {
@@ -35894,13 +35945,13 @@ function SwapWalletSelectorDesktop({
35894
35945
  },
35895
35946
  viewBox: "0 0 24 24",
35896
35947
  fill: "currentColor",
35897
- children: /* @__PURE__ */ jsx53("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" })
35948
+ children: /* @__PURE__ */ jsx54("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" })
35898
35949
  }
35899
35950
  )
35900
35951
  }
35901
35952
  ),
35902
35953
  /* @__PURE__ */ jsxs44("div", { style: { flex: 1, minWidth: 0 }, children: [
35903
- /* @__PURE__ */ jsx53(
35954
+ /* @__PURE__ */ jsx54(
35904
35955
  "p",
35905
35956
  {
35906
35957
  style: {
@@ -35925,7 +35976,7 @@ function SwapWalletSelectorDesktop({
35925
35976
  }
35926
35977
  )
35927
35978
  ] }),
35928
- wcConnecting ? /* @__PURE__ */ jsx53(
35979
+ wcConnecting ? /* @__PURE__ */ jsx54(
35929
35980
  "div",
35930
35981
  {
35931
35982
  style: {
@@ -35938,7 +35989,7 @@ function SwapWalletSelectorDesktop({
35938
35989
  flexShrink: 0
35939
35990
  }
35940
35991
  }
35941
- ) : wcConnected ? /* @__PURE__ */ jsx53(
35992
+ ) : wcConnected ? /* @__PURE__ */ jsx54(
35942
35993
  "button",
35943
35994
  {
35944
35995
  onClick: (e2) => {
@@ -35958,7 +36009,7 @@ function SwapWalletSelectorDesktop({
35958
36009
  },
35959
36010
  children: "Disconnect"
35960
36011
  }
35961
- ) : /* @__PURE__ */ jsx53(
36012
+ ) : /* @__PURE__ */ jsx54(
35962
36013
  "button",
35963
36014
  {
35964
36015
  onClick: (e2) => {
@@ -36000,7 +36051,7 @@ var init_SwapWalletSelectorDesktop = __esm({
36000
36051
  });
36001
36052
 
36002
36053
  // src/modes/swap/components/SwapWalletSelector/index.tsx
36003
- import { Fragment as Fragment12, jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
36054
+ import { Fragment as Fragment13, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
36004
36055
  function SwapWalletSelector({
36005
36056
  walletStatus,
36006
36057
  walletAddress,
@@ -36008,8 +36059,8 @@ function SwapWalletSelector({
36008
36059
  onBack
36009
36060
  }) {
36010
36061
  const isMobile = useIsMobile();
36011
- return /* @__PURE__ */ jsxs45(Fragment12, { children: [
36012
- isMobile && /* @__PURE__ */ jsx54(
36062
+ return /* @__PURE__ */ jsxs45(Fragment13, { children: [
36063
+ isMobile && /* @__PURE__ */ jsx55(
36013
36064
  SwapWalletSelectorMobile_default,
36014
36065
  {
36015
36066
  walletStatus,
@@ -36018,7 +36069,7 @@ function SwapWalletSelector({
36018
36069
  onBack
36019
36070
  }
36020
36071
  ),
36021
- !isMobile && /* @__PURE__ */ jsx54(
36072
+ !isMobile && /* @__PURE__ */ jsx55(
36022
36073
  SwapWalletSelectorDesktop,
36023
36074
  {
36024
36075
  walletStatus,
@@ -36055,11 +36106,11 @@ import {
36055
36106
  useCallback as useCallback22,
36056
36107
  useEffect as useEffect34,
36057
36108
  useMemo as useMemo29,
36058
- useRef as useRef20,
36109
+ useRef as useRef19,
36059
36110
  useState as useState34
36060
36111
  } from "react";
36061
36112
  import ReactDOM from "react-dom";
36062
- import { Fragment as Fragment13, jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
36113
+ import { Fragment as Fragment14, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
36063
36114
  function fmtAmount(n, max = 6) {
36064
36115
  if (!isFinite(n) || n === 0) return "0";
36065
36116
  return n.toLocaleString(void 0, { maximumFractionDigits: max });
@@ -36141,8 +36192,8 @@ function RateRow({ label, value }) {
36141
36192
  justifyContent: "space-between"
36142
36193
  },
36143
36194
  children: [
36144
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: label }),
36145
- /* @__PURE__ */ jsx55("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
36195
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: label }),
36196
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
36146
36197
  ]
36147
36198
  }
36148
36199
  );
@@ -36174,13 +36225,13 @@ function SwapMode({
36174
36225
  const [completedAt, setCompletedAt] = useState34(null);
36175
36226
  const [copiedHash, setCopiedHash] = useState34(null);
36176
36227
  const [rateUpdated, setRateUpdated] = useState34(false);
36177
- const prevToAmountRef = useRef20(null);
36228
+ const prevToAmountRef = useRef19(null);
36178
36229
  const [destAddress, setDestAddress] = useState34("");
36179
36230
  const [quoteAge, setQuoteAge] = useState34(0);
36180
- const quoteTimestampRef = useRef20(null);
36231
+ const quoteTimestampRef = useRef19(null);
36181
36232
  const [quoteLoadingMsgIdx, setQuoteLoadingMsgIdx] = useState34(0);
36182
36233
  const [quoteLoadingMsgVisible, setQuoteLoadingMsgVisible] = useState34(true);
36183
- const latestFetchParamsRef = useRef20(null);
36234
+ const latestFetchParamsRef = useRef19(null);
36184
36235
  const { rates: forexRates } = useForex();
36185
36236
  const currencyMeta = getCurrencyMeta(selectedCurrency);
36186
36237
  const currencyRate = forexRates[selectedCurrency] ?? 1;
@@ -36196,9 +36247,12 @@ function SwapMode({
36196
36247
  },
36197
36248
  [currencyRate, selectedCurrency]
36198
36249
  );
36199
- const settingsRef = useRef20(null);
36200
- const currencyDropdownRef = useRef20(null);
36250
+ const settingsRef = useRef19(null);
36251
+ const currencyDropdownRef = useRef19(null);
36201
36252
  const { emitEvent } = useTrustware();
36253
+ const { trackEvent } = useGTMTracker();
36254
+ const initiatedAttemptRef = useRef19(null);
36255
+ const completedAttemptRef = useRef19(null);
36202
36256
  const { features, theme: configTheme } = useTrustwareConfig();
36203
36257
  const effectiveThemeSetting = themeProp ?? configTheme ?? "system";
36204
36258
  const { resolvedTheme, toggleTheme } = useThemePreference(
@@ -36231,7 +36285,7 @@ function SwapMode({
36231
36285
  () => [...popularChains, ...otherChains],
36232
36286
  [popularChains, otherChains]
36233
36287
  );
36234
- const destInitialized = useRef20(false);
36288
+ const destInitialized = useRef19(false);
36235
36289
  useEffect34(() => {
36236
36290
  if (!defaultDestRef || destInitialized.current || allChains.length === 0)
36237
36291
  return;
@@ -36440,6 +36494,16 @@ function SwapMode({
36440
36494
  }, []);
36441
36495
  const handleExecute = useCallback22(async () => {
36442
36496
  if (!route.data) return;
36497
+ const paymentParams = buildSwapPaymentParams({
36498
+ fromChain,
36499
+ fromToken,
36500
+ toChain,
36501
+ toToken,
36502
+ domain: window.origin
36503
+ });
36504
+ if (claimAttemptOnce(initiatedAttemptRef, route.data)) {
36505
+ trackEvent("payment_initiated", paymentParams);
36506
+ }
36443
36507
  setStage("processing");
36444
36508
  const fromTokenAddress = fromToken?.address ?? fromToken?.address;
36445
36509
  const fromTokenDecimals = fromToken?.decimals ?? void 0;
@@ -36455,12 +36519,25 @@ function SwapMode({
36455
36519
  walletAddress ?? void 0,
36456
36520
  maxApproval,
36457
36521
  () => {
36522
+ if (claimAttemptOnce(completedAttemptRef, routeToSend)) {
36523
+ trackEvent("payment_completed", paymentParams);
36524
+ }
36458
36525
  setCompletedAt(/* @__PURE__ */ new Date());
36459
36526
  setStage("success");
36460
36527
  },
36461
36528
  () => setStage("error")
36462
36529
  );
36463
- }, [route, execution, fromToken, walletAddress, maxApproval]);
36530
+ }, [
36531
+ route,
36532
+ execution,
36533
+ fromChain,
36534
+ fromToken,
36535
+ toChain,
36536
+ toToken,
36537
+ walletAddress,
36538
+ maxApproval,
36539
+ trackEvent
36540
+ ]);
36464
36541
  const handleReset = useCallback22(() => {
36465
36542
  execution.reset();
36466
36543
  route.clear();
@@ -36670,7 +36747,7 @@ function SwapMode({
36670
36747
  useEffect34(() => {
36671
36748
  setDestAddress("");
36672
36749
  }, [toChainType]);
36673
- const fetchRef = useRef20(route.fetch);
36750
+ const fetchRef = useRef19(route.fetch);
36674
36751
  useEffect34(() => {
36675
36752
  fetchRef.current = route.fetch;
36676
36753
  });
@@ -36734,7 +36811,7 @@ function SwapMode({
36734
36811
  quoteTimestampRef.current = route.data ? Date.now() : null;
36735
36812
  setQuoteAge(0);
36736
36813
  }, [route.data]);
36737
- const msgTimeoutRef = useRef20(null);
36814
+ const msgTimeoutRef = useRef19(null);
36738
36815
  useEffect34(() => {
36739
36816
  if (!route.loading) {
36740
36817
  setQuoteLoadingMsgIdx(0);
@@ -36807,7 +36884,7 @@ function SwapMode({
36807
36884
  return () => document.removeEventListener("mousedown", handler);
36808
36885
  }, [showCurrencyDropdown]);
36809
36886
  if (stage === "select-from") {
36810
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx55(
36887
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx56(
36811
36888
  SwapTokenSelect,
36812
36889
  {
36813
36890
  side: "from",
@@ -36825,7 +36902,7 @@ function SwapMode({
36825
36902
  ) });
36826
36903
  }
36827
36904
  if (stage === "select-to" && !lockDestToken) {
36828
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx55(
36905
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx56(
36829
36906
  SwapTokenSelect,
36830
36907
  {
36831
36908
  side: "to",
@@ -36845,7 +36922,7 @@ function SwapMode({
36845
36922
  }
36846
36923
  if (stage === "connect-wallet") {
36847
36924
  return /* @__PURE__ */ jsxs46(WidgetContainer, { theme: resolvedTheme, style, children: [
36848
- /* @__PURE__ */ jsx55(
36925
+ /* @__PURE__ */ jsx56(
36849
36926
  SwapWalletSelector_default,
36850
36927
  {
36851
36928
  walletStatus,
@@ -36854,7 +36931,7 @@ function SwapMode({
36854
36931
  onBack: handleWalletConnected
36855
36932
  }
36856
36933
  ),
36857
- isConnected && /* @__PURE__ */ jsx55("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx55(
36934
+ isConnected && /* @__PURE__ */ jsx56("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ jsx56(
36858
36935
  "button",
36859
36936
  {
36860
36937
  onClick: () => setStage("home"),
@@ -36887,7 +36964,7 @@ function SwapMode({
36887
36964
  const offset = circ - progress / 100 * circ;
36888
36965
  const isApproving = txStatus === "approving";
36889
36966
  const title = isApproving ? "Approving..." : "Order Submitted";
36890
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
36967
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
36891
36968
  /* @__PURE__ */ jsxs46(
36892
36969
  "div",
36893
36970
  {
@@ -36898,7 +36975,7 @@ function SwapMode({
36898
36975
  marginBottom: spacing[5]
36899
36976
  },
36900
36977
  children: [
36901
- /* @__PURE__ */ jsx55(
36978
+ /* @__PURE__ */ jsx56(
36902
36979
  "button",
36903
36980
  {
36904
36981
  onClick: handleReset,
@@ -36913,7 +36990,7 @@ function SwapMode({
36913
36990
  border: 0,
36914
36991
  cursor: "pointer"
36915
36992
  },
36916
- children: /* @__PURE__ */ jsx55(
36993
+ children: /* @__PURE__ */ jsx56(
36917
36994
  "svg",
36918
36995
  {
36919
36996
  style: {
@@ -36927,12 +37004,12 @@ function SwapMode({
36927
37004
  strokeWidth: 2,
36928
37005
  strokeLinecap: "round",
36929
37006
  strokeLinejoin: "round",
36930
- children: /* @__PURE__ */ jsx55("path", { d: "M19 12H5m7-7-7 7 7 7" })
37007
+ children: /* @__PURE__ */ jsx56("path", { d: "M19 12H5m7-7-7 7 7 7" })
36931
37008
  }
36932
37009
  )
36933
37010
  }
36934
37011
  ),
36935
- /* @__PURE__ */ jsx55(
37012
+ /* @__PURE__ */ jsx56(
36936
37013
  "button",
36937
37014
  {
36938
37015
  onClick: handleReset,
@@ -36949,7 +37026,7 @@ function SwapMode({
36949
37026
  ]
36950
37027
  }
36951
37028
  ),
36952
- /* @__PURE__ */ jsx55(
37029
+ /* @__PURE__ */ jsx56(
36953
37030
  "h1",
36954
37031
  {
36955
37032
  style: {
@@ -36994,7 +37071,7 @@ function SwapMode({
36994
37071
  height: ringSize,
36995
37072
  style: { position: "absolute", inset: 0 },
36996
37073
  children: [
36997
- /* @__PURE__ */ jsx55(
37074
+ /* @__PURE__ */ jsx56(
36998
37075
  "circle",
36999
37076
  {
37000
37077
  cx: ringSize / 2,
@@ -37005,7 +37082,7 @@ function SwapMode({
37005
37082
  strokeWidth: ringStroke
37006
37083
  }
37007
37084
  ),
37008
- /* @__PURE__ */ jsx55(
37085
+ /* @__PURE__ */ jsx56(
37009
37086
  "circle",
37010
37087
  {
37011
37088
  cx: ringSize / 2,
@@ -37035,7 +37112,7 @@ function SwapMode({
37035
37112
  textAlign: "center"
37036
37113
  },
37037
37114
  children: [
37038
- /* @__PURE__ */ jsx55(
37115
+ /* @__PURE__ */ jsx56(
37039
37116
  "span",
37040
37117
  {
37041
37118
  style: {
@@ -37058,7 +37135,7 @@ function SwapMode({
37058
37135
  gap: spacing[1.5]
37059
37136
  },
37060
37137
  children: [
37061
- fromToken?.iconUrl ? /* @__PURE__ */ jsx55(
37138
+ fromToken?.iconUrl ? /* @__PURE__ */ jsx56(
37062
37139
  "img",
37063
37140
  {
37064
37141
  src: fromToken.iconUrl,
@@ -37069,7 +37146,7 @@ function SwapMode({
37069
37146
  },
37070
37147
  alt: ""
37071
37148
  }
37072
- ) : /* @__PURE__ */ jsx55(
37149
+ ) : /* @__PURE__ */ jsx56(
37073
37150
  "div",
37074
37151
  {
37075
37152
  style: {
@@ -37080,7 +37157,7 @@ function SwapMode({
37080
37157
  }
37081
37158
  }
37082
37159
  ),
37083
- /* @__PURE__ */ jsx55(
37160
+ /* @__PURE__ */ jsx56(
37084
37161
  "svg",
37085
37162
  {
37086
37163
  style: {
@@ -37094,10 +37171,10 @@ function SwapMode({
37094
37171
  strokeWidth: 2,
37095
37172
  strokeLinecap: "round",
37096
37173
  strokeLinejoin: "round",
37097
- children: /* @__PURE__ */ jsx55("path", { d: "M5 12h14m-7-7 7 7-7 7" })
37174
+ children: /* @__PURE__ */ jsx56("path", { d: "M5 12h14m-7-7 7 7-7 7" })
37098
37175
  }
37099
37176
  ),
37100
- toToken?.iconUrl ? /* @__PURE__ */ jsx55(
37177
+ toToken?.iconUrl ? /* @__PURE__ */ jsx56(
37101
37178
  "img",
37102
37179
  {
37103
37180
  src: toToken.iconUrl,
@@ -37108,7 +37185,7 @@ function SwapMode({
37108
37185
  },
37109
37186
  alt: ""
37110
37187
  }
37111
- ) : /* @__PURE__ */ jsx55(
37188
+ ) : /* @__PURE__ */ jsx56(
37112
37189
  "div",
37113
37190
  {
37114
37191
  style: {
@@ -37134,7 +37211,7 @@ function SwapMode({
37134
37211
  children: [
37135
37212
  fromToken?.symbol,
37136
37213
  " ",
37137
- /* @__PURE__ */ jsx55(
37214
+ /* @__PURE__ */ jsx56(
37138
37215
  "span",
37139
37216
  {
37140
37217
  style: {
@@ -37179,7 +37256,7 @@ function SwapMode({
37179
37256
  justifyContent: "space-between"
37180
37257
  },
37181
37258
  children: [
37182
- /* @__PURE__ */ jsx55(
37259
+ /* @__PURE__ */ jsx56(
37183
37260
  ProcessingStepNode,
37184
37261
  {
37185
37262
  active: activeStep >= 0,
@@ -37188,8 +37265,8 @@ function SwapMode({
37188
37265
  label: `Sending ${fromToken?.symbol ?? ""}`
37189
37266
  }
37190
37267
  ),
37191
- /* @__PURE__ */ jsx55(ProcessingStepLine, { done: activeStep > 0 }),
37192
- /* @__PURE__ */ jsx55(
37268
+ /* @__PURE__ */ jsx56(ProcessingStepLine, { done: activeStep > 0 }),
37269
+ /* @__PURE__ */ jsx56(
37193
37270
  ProcessingStepNode,
37194
37271
  {
37195
37272
  active: activeStep >= 1,
@@ -37198,8 +37275,8 @@ function SwapMode({
37198
37275
  label: "Create Order"
37199
37276
  }
37200
37277
  ),
37201
- /* @__PURE__ */ jsx55(ProcessingStepLine, { done: activeStep > 1 }),
37202
- /* @__PURE__ */ jsx55(
37278
+ /* @__PURE__ */ jsx56(ProcessingStepLine, { done: activeStep > 1 }),
37279
+ /* @__PURE__ */ jsx56(
37203
37280
  ProcessingStepNode,
37204
37281
  {
37205
37282
  active: activeStep >= 2,
@@ -37257,16 +37334,16 @@ function SwapMode({
37257
37334
  strokeLinecap: "round",
37258
37335
  strokeLinejoin: "round",
37259
37336
  children: [
37260
- /* @__PURE__ */ jsx55("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37261
- /* @__PURE__ */ jsx55("polyline", { points: "15 3 21 3 21 9" }),
37262
- /* @__PURE__ */ jsx55("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37337
+ /* @__PURE__ */ jsx56("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37338
+ /* @__PURE__ */ jsx56("polyline", { points: "15 3 21 3 21 9" }),
37339
+ /* @__PURE__ */ jsx56("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37263
37340
  ]
37264
37341
  }
37265
37342
  )
37266
37343
  ]
37267
37344
  }
37268
37345
  ),
37269
- /* @__PURE__ */ jsx55(
37346
+ /* @__PURE__ */ jsx56(
37270
37347
  "button",
37271
37348
  {
37272
37349
  onClick: () => handleCopyHash(txHash),
@@ -37283,7 +37360,7 @@ function SwapMode({
37283
37360
  padding: 0,
37284
37361
  transition: "color 0.15s"
37285
37362
  },
37286
- children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs46(Fragment13, { children: [
37363
+ children: isCopied ? "Copied!" : /* @__PURE__ */ jsxs46(Fragment14, { children: [
37287
37364
  txHash.slice(0, 6),
37288
37365
  "\u2026",
37289
37366
  txHash.slice(-4),
@@ -37298,7 +37375,7 @@ function SwapMode({
37298
37375
  strokeLinecap: "round",
37299
37376
  strokeLinejoin: "round",
37300
37377
  children: [
37301
- /* @__PURE__ */ jsx55(
37378
+ /* @__PURE__ */ jsx56(
37302
37379
  "rect",
37303
37380
  {
37304
37381
  x: "9",
@@ -37309,7 +37386,7 @@ function SwapMode({
37309
37386
  ry: "2"
37310
37387
  }
37311
37388
  ),
37312
- /* @__PURE__ */ jsx55("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37389
+ /* @__PURE__ */ jsx56("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37313
37390
  ]
37314
37391
  }
37315
37392
  )
@@ -37337,8 +37414,8 @@ function SwapMode({
37337
37414
  dateStyle: "medium",
37338
37415
  timeStyle: "short"
37339
37416
  }) ?? null;
37340
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46("div", { style: { position: "relative", overflow: "hidden" }, children: [
37341
- /* @__PURE__ */ jsx55(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx55(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
37417
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46("div", { style: { position: "relative", overflow: "hidden" }, children: [
37418
+ /* @__PURE__ */ jsx56(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx56(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
37342
37419
  /* @__PURE__ */ jsxs46("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
37343
37420
  /* @__PURE__ */ jsxs46(
37344
37421
  "div",
@@ -37350,7 +37427,7 @@ function SwapMode({
37350
37427
  marginBottom: spacing[5]
37351
37428
  },
37352
37429
  children: [
37353
- /* @__PURE__ */ jsx55(
37430
+ /* @__PURE__ */ jsx56(
37354
37431
  "div",
37355
37432
  {
37356
37433
  style: {
@@ -37363,7 +37440,7 @@ function SwapMode({
37363
37440
  justifyContent: "center",
37364
37441
  flexShrink: 0
37365
37442
  },
37366
- children: /* @__PURE__ */ jsx55(
37443
+ children: /* @__PURE__ */ jsx56(
37367
37444
  "svg",
37368
37445
  {
37369
37446
  style: {
@@ -37377,12 +37454,12 @@ function SwapMode({
37377
37454
  strokeWidth: 3,
37378
37455
  strokeLinecap: "round",
37379
37456
  strokeLinejoin: "round",
37380
- children: /* @__PURE__ */ jsx55("path", { d: "M20 6L9 17l-5-5" })
37457
+ children: /* @__PURE__ */ jsx56("path", { d: "M20 6L9 17l-5-5" })
37381
37458
  }
37382
37459
  )
37383
37460
  }
37384
37461
  ),
37385
- /* @__PURE__ */ jsx55(
37462
+ /* @__PURE__ */ jsx56(
37386
37463
  "h2",
37387
37464
  {
37388
37465
  style: {
@@ -37426,7 +37503,7 @@ function SwapMode({
37426
37503
  },
37427
37504
  children: [
37428
37505
  fromToken?.iconUrl && /* @__PURE__ */ jsxs46("div", { style: { position: "relative", flexShrink: 0 }, children: [
37429
- /* @__PURE__ */ jsx55(
37506
+ /* @__PURE__ */ jsx56(
37430
37507
  "img",
37431
37508
  {
37432
37509
  src: fromToken.iconUrl,
@@ -37438,7 +37515,7 @@ function SwapMode({
37438
37515
  }
37439
37516
  }
37440
37517
  ),
37441
- fromChain?.chainIconURI && /* @__PURE__ */ jsx55(
37518
+ fromChain?.chainIconURI && /* @__PURE__ */ jsx56(
37442
37519
  "img",
37443
37520
  {
37444
37521
  src: fromChain.chainIconURI,
@@ -37456,7 +37533,7 @@ function SwapMode({
37456
37533
  }
37457
37534
  )
37458
37535
  ] }),
37459
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: "You sold" })
37536
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: "You sold" })
37460
37537
  ]
37461
37538
  }
37462
37539
  ),
@@ -37498,7 +37575,7 @@ function SwapMode({
37498
37575
  },
37499
37576
  children: [
37500
37577
  toToken?.iconUrl && /* @__PURE__ */ jsxs46("div", { style: { position: "relative", flexShrink: 0 }, children: [
37501
- /* @__PURE__ */ jsx55(
37578
+ /* @__PURE__ */ jsx56(
37502
37579
  "img",
37503
37580
  {
37504
37581
  src: toToken.iconUrl,
@@ -37510,7 +37587,7 @@ function SwapMode({
37510
37587
  }
37511
37588
  }
37512
37589
  ),
37513
- toChain?.chainIconURI && /* @__PURE__ */ jsx55(
37590
+ toChain?.chainIconURI && /* @__PURE__ */ jsx56(
37514
37591
  "img",
37515
37592
  {
37516
37593
  src: toChain.chainIconURI,
@@ -37528,7 +37605,7 @@ function SwapMode({
37528
37605
  }
37529
37606
  )
37530
37607
  ] }),
37531
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: "Received" })
37608
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: "Received" })
37532
37609
  ]
37533
37610
  }
37534
37611
  ),
@@ -37549,7 +37626,7 @@ function SwapMode({
37549
37626
  ]
37550
37627
  }
37551
37628
  ),
37552
- /* @__PURE__ */ jsx55(
37629
+ /* @__PURE__ */ jsx56(
37553
37630
  "div",
37554
37631
  {
37555
37632
  style: {
@@ -37569,28 +37646,28 @@ function SwapMode({
37569
37646
  fontSize: fontSize.sm
37570
37647
  },
37571
37648
  children: [
37572
- fromUsd > 0 && /* @__PURE__ */ jsx55(
37649
+ fromUsd > 0 && /* @__PURE__ */ jsx56(
37573
37650
  SuccessReceiptRow,
37574
37651
  {
37575
37652
  label: "Value sold",
37576
37653
  value: fmtLocal(fromUsd)
37577
37654
  }
37578
37655
  ),
37579
- toUsd > 0 && /* @__PURE__ */ jsx55(
37656
+ toUsd > 0 && /* @__PURE__ */ jsx56(
37580
37657
  SuccessReceiptRow,
37581
37658
  {
37582
37659
  label: "Value received",
37583
37660
  value: fmtLocal(toUsd)
37584
37661
  }
37585
37662
  ),
37586
- effectiveRate && /* @__PURE__ */ jsx55(
37663
+ effectiveRate && /* @__PURE__ */ jsx56(
37587
37664
  SuccessReceiptRow,
37588
37665
  {
37589
37666
  label: "Effective rate",
37590
37667
  value: effectiveRate
37591
37668
  }
37592
37669
  ),
37593
- completedStr && /* @__PURE__ */ jsx55(SuccessReceiptRow, { label: "Completed", value: completedStr }),
37670
+ completedStr && /* @__PURE__ */ jsx56(SuccessReceiptRow, { label: "Completed", value: completedStr }),
37594
37671
  txHash && (() => {
37595
37672
  const srcUrl = buildExplorerUrl(
37596
37673
  txHash,
@@ -37607,7 +37684,7 @@ function SwapMode({
37607
37684
  justifyContent: "space-between"
37608
37685
  },
37609
37686
  children: [
37610
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
37687
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
37611
37688
  /* @__PURE__ */ jsxs46(
37612
37689
  "div",
37613
37690
  {
@@ -37648,16 +37725,16 @@ function SwapMode({
37648
37725
  strokeLinecap: "round",
37649
37726
  strokeLinejoin: "round",
37650
37727
  children: [
37651
- /* @__PURE__ */ jsx55("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37652
- /* @__PURE__ */ jsx55("polyline", { points: "15 3 21 3 21 9" }),
37653
- /* @__PURE__ */ jsx55("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37728
+ /* @__PURE__ */ jsx56("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37729
+ /* @__PURE__ */ jsx56("polyline", { points: "15 3 21 3 21 9" }),
37730
+ /* @__PURE__ */ jsx56("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37654
37731
  ]
37655
37732
  }
37656
37733
  )
37657
37734
  ]
37658
37735
  }
37659
37736
  ),
37660
- /* @__PURE__ */ jsx55(
37737
+ /* @__PURE__ */ jsx56(
37661
37738
  "button",
37662
37739
  {
37663
37740
  onClick: () => handleCopyHash(txHash),
@@ -37689,7 +37766,7 @@ function SwapMode({
37689
37766
  strokeLinecap: "round",
37690
37767
  strokeLinejoin: "round",
37691
37768
  children: [
37692
- /* @__PURE__ */ jsx55(
37769
+ /* @__PURE__ */ jsx56(
37693
37770
  "rect",
37694
37771
  {
37695
37772
  x: "9",
@@ -37700,7 +37777,7 @@ function SwapMode({
37700
37777
  ry: "2"
37701
37778
  }
37702
37779
  ),
37703
- /* @__PURE__ */ jsx55("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37780
+ /* @__PURE__ */ jsx56("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37704
37781
  ]
37705
37782
  }
37706
37783
  )
@@ -37729,7 +37806,7 @@ function SwapMode({
37729
37806
  justifyContent: "space-between"
37730
37807
  },
37731
37808
  children: [
37732
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
37809
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
37733
37810
  /* @__PURE__ */ jsxs46(
37734
37811
  "div",
37735
37812
  {
@@ -37770,16 +37847,16 @@ function SwapMode({
37770
37847
  strokeLinecap: "round",
37771
37848
  strokeLinejoin: "round",
37772
37849
  children: [
37773
- /* @__PURE__ */ jsx55("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37774
- /* @__PURE__ */ jsx55("polyline", { points: "15 3 21 3 21 9" }),
37775
- /* @__PURE__ */ jsx55("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37850
+ /* @__PURE__ */ jsx56("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
37851
+ /* @__PURE__ */ jsx56("polyline", { points: "15 3 21 3 21 9" }),
37852
+ /* @__PURE__ */ jsx56("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
37776
37853
  ]
37777
37854
  }
37778
37855
  )
37779
37856
  ]
37780
37857
  }
37781
37858
  ),
37782
- /* @__PURE__ */ jsx55(
37859
+ /* @__PURE__ */ jsx56(
37783
37860
  "button",
37784
37861
  {
37785
37862
  onClick: () => handleCopyHash(destTxHash),
@@ -37810,7 +37887,7 @@ function SwapMode({
37810
37887
  strokeLinecap: "round",
37811
37888
  strokeLinejoin: "round",
37812
37889
  children: [
37813
- /* @__PURE__ */ jsx55(
37890
+ /* @__PURE__ */ jsx56(
37814
37891
  "rect",
37815
37892
  {
37816
37893
  x: "9",
@@ -37821,7 +37898,7 @@ function SwapMode({
37821
37898
  ry: "2"
37822
37899
  }
37823
37900
  ),
37824
- /* @__PURE__ */ jsx55("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37901
+ /* @__PURE__ */ jsx56("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
37825
37902
  ]
37826
37903
  }
37827
37904
  )
@@ -37851,7 +37928,7 @@ function SwapMode({
37851
37928
  gap: spacing[2]
37852
37929
  },
37853
37930
  children: [
37854
- /* @__PURE__ */ jsx55(
37931
+ /* @__PURE__ */ jsx56(
37855
37932
  "button",
37856
37933
  {
37857
37934
  onClick: handleReset,
@@ -37898,7 +37975,7 @@ function SwapMode({
37898
37975
  ] }) });
37899
37976
  }
37900
37977
  if (stage === "error") {
37901
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx55(
37978
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsx56(
37902
37979
  ErrorPage,
37903
37980
  {
37904
37981
  error: mapError(execution.errorMessage),
@@ -37910,7 +37987,7 @@ function SwapMode({
37910
37987
  if (stage === "review") {
37911
37988
  const reviewToAmount = toAmount ?? displayToAmount;
37912
37989
  const reviewToUsd = toUsd > 0 ? toUsd : displayToUsd;
37913
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46(
37990
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46(
37914
37991
  "div",
37915
37992
  {
37916
37993
  style: {
@@ -37929,7 +38006,7 @@ function SwapMode({
37929
38006
  marginBottom: spacing[5]
37930
38007
  },
37931
38008
  children: [
37932
- /* @__PURE__ */ jsx55(
38009
+ /* @__PURE__ */ jsx56(
37933
38010
  "span",
37934
38011
  {
37935
38012
  style: {
@@ -37940,7 +38017,7 @@ function SwapMode({
37940
38017
  children: "You're swapping"
37941
38018
  }
37942
38019
  ),
37943
- /* @__PURE__ */ jsx55(
38020
+ /* @__PURE__ */ jsx56(
37944
38021
  "button",
37945
38022
  {
37946
38023
  onClick: () => setStage("home"),
@@ -37955,7 +38032,7 @@ function SwapMode({
37955
38032
  border: 0,
37956
38033
  cursor: "pointer"
37957
38034
  },
37958
- children: /* @__PURE__ */ jsx55(
38035
+ children: /* @__PURE__ */ jsx56(
37959
38036
  "svg",
37960
38037
  {
37961
38038
  style: {
@@ -37969,7 +38046,7 @@ function SwapMode({
37969
38046
  strokeWidth: 2,
37970
38047
  strokeLinecap: "round",
37971
38048
  strokeLinejoin: "round",
37972
- children: /* @__PURE__ */ jsx55("path", { d: "M18 6L6 18M6 6l12 12" })
38049
+ children: /* @__PURE__ */ jsx56("path", { d: "M18 6L6 18M6 6l12 12" })
37973
38050
  }
37974
38051
  )
37975
38052
  }
@@ -38003,7 +38080,7 @@ function SwapMode({
38003
38080
  ]
38004
38081
  }
38005
38082
  ),
38006
- /* @__PURE__ */ jsx55(
38083
+ /* @__PURE__ */ jsx56(
38007
38084
  "p",
38008
38085
  {
38009
38086
  style: {
@@ -38015,7 +38092,7 @@ function SwapMode({
38015
38092
  }
38016
38093
  )
38017
38094
  ] }),
38018
- fromToken?.iconUrl && /* @__PURE__ */ jsx55(
38095
+ fromToken?.iconUrl && /* @__PURE__ */ jsx56(
38019
38096
  TokenIcon,
38020
38097
  {
38021
38098
  icon: fromToken.iconUrl,
@@ -38026,7 +38103,7 @@ function SwapMode({
38026
38103
  ]
38027
38104
  }
38028
38105
  ),
38029
- /* @__PURE__ */ jsx55(
38106
+ /* @__PURE__ */ jsx56(
38030
38107
  "div",
38031
38108
  {
38032
38109
  style: {
@@ -38034,7 +38111,7 @@ function SwapMode({
38034
38111
  justifyContent: "center",
38035
38112
  margin: `${spacing[3]} 0`
38036
38113
  },
38037
- children: /* @__PURE__ */ jsx55(
38114
+ children: /* @__PURE__ */ jsx56(
38038
38115
  "svg",
38039
38116
  {
38040
38117
  style: {
@@ -38048,7 +38125,7 @@ function SwapMode({
38048
38125
  strokeWidth: 2,
38049
38126
  strokeLinecap: "round",
38050
38127
  strokeLinejoin: "round",
38051
- children: /* @__PURE__ */ jsx55("path", { d: "M12 5v14m-7-7l7 7 7-7" })
38128
+ children: /* @__PURE__ */ jsx56("path", { d: "M12 5v14m-7-7l7 7 7-7" })
38052
38129
  }
38053
38130
  )
38054
38131
  }
@@ -38079,7 +38156,7 @@ function SwapMode({
38079
38156
  ]
38080
38157
  }
38081
38158
  ),
38082
- /* @__PURE__ */ jsx55(
38159
+ /* @__PURE__ */ jsx56(
38083
38160
  "p",
38084
38161
  {
38085
38162
  style: {
@@ -38091,7 +38168,7 @@ function SwapMode({
38091
38168
  }
38092
38169
  )
38093
38170
  ] }),
38094
- toToken?.iconUrl && /* @__PURE__ */ jsx55(
38171
+ toToken?.iconUrl && /* @__PURE__ */ jsx56(
38095
38172
  TokenIcon,
38096
38173
  {
38097
38174
  icon: toToken.iconUrl,
@@ -38121,7 +38198,7 @@ function SwapMode({
38121
38198
  padding: 0
38122
38199
  },
38123
38200
  children: [
38124
- /* @__PURE__ */ jsx55(
38201
+ /* @__PURE__ */ jsx56(
38125
38202
  "div",
38126
38203
  {
38127
38204
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
@@ -38139,7 +38216,7 @@ function SwapMode({
38139
38216
  },
38140
38217
  children: [
38141
38218
  showReviewDetails ? "Hide details" : "View details",
38142
- /* @__PURE__ */ jsx55(
38219
+ /* @__PURE__ */ jsx56(
38143
38220
  "svg",
38144
38221
  {
38145
38222
  style: {
@@ -38154,7 +38231,7 @@ function SwapMode({
38154
38231
  strokeWidth: 2,
38155
38232
  strokeLinecap: "round",
38156
38233
  strokeLinejoin: "round",
38157
- children: /* @__PURE__ */ jsx55("path", { d: "M6 9l6 6 6-6" })
38234
+ children: /* @__PURE__ */ jsx56("path", { d: "M6 9l6 6 6-6" })
38158
38235
  }
38159
38236
  ),
38160
38237
  route.data && /* @__PURE__ */ jsxs46(
@@ -38170,7 +38247,7 @@ function SwapMode({
38170
38247
  marginLeft: "0.125rem"
38171
38248
  },
38172
38249
  children: [
38173
- /* @__PURE__ */ jsx55(
38250
+ /* @__PURE__ */ jsx56(
38174
38251
  "circle",
38175
38252
  {
38176
38253
  cx: "7",
@@ -38181,7 +38258,7 @@ function SwapMode({
38181
38258
  strokeWidth: "1.5"
38182
38259
  }
38183
38260
  ),
38184
- /* @__PURE__ */ jsx55(
38261
+ /* @__PURE__ */ jsx56(
38185
38262
  "circle",
38186
38263
  {
38187
38264
  cx: "7",
@@ -38202,7 +38279,7 @@ function SwapMode({
38202
38279
  ]
38203
38280
  }
38204
38281
  ),
38205
- /* @__PURE__ */ jsx55(
38282
+ /* @__PURE__ */ jsx56(
38206
38283
  "div",
38207
38284
  {
38208
38285
  style: { flex: 1, height: "1px", backgroundColor: colors.border }
@@ -38222,7 +38299,7 @@ function SwapMode({
38222
38299
  marginBottom: spacing[2]
38223
38300
  },
38224
38301
  children: [
38225
- exchangeRate !== null && /* @__PURE__ */ jsx55(
38302
+ exchangeRate !== null && /* @__PURE__ */ jsx56(
38226
38303
  ReviewDetailRow,
38227
38304
  {
38228
38305
  label: "Rate",
@@ -38230,7 +38307,7 @@ function SwapMode({
38230
38307
  value: `1 ${fromToken?.symbol} = ${fmtAmount(1 / (exchangeRate ?? 1), 4)} ${toToken?.symbol} ($${fmtAmount(fromTokenPriceUSD, 2)})`
38231
38308
  }
38232
38309
  ),
38233
- /* @__PURE__ */ jsx55(
38310
+ /* @__PURE__ */ jsx56(
38234
38311
  ReviewDetailRow,
38235
38312
  {
38236
38313
  label: "Fee",
@@ -38238,12 +38315,12 @@ function SwapMode({
38238
38315
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
38239
38316
  }
38240
38317
  ),
38241
- /* @__PURE__ */ jsx55(
38318
+ /* @__PURE__ */ jsx56(
38242
38319
  ReviewDetailRow,
38243
38320
  {
38244
38321
  label: "Network cost",
38245
38322
  tooltip: "Estimated gas fee paid to the blockchain network",
38246
- value: isGasSponsored ? /* @__PURE__ */ jsx55(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs46(
38323
+ value: isGasSponsored ? /* @__PURE__ */ jsx56(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs46(
38247
38324
  "span",
38248
38325
  {
38249
38326
  style: {
@@ -38252,14 +38329,14 @@ function SwapMode({
38252
38329
  gap: "0.25rem"
38253
38330
  },
38254
38331
  children: [
38255
- /* @__PURE__ */ jsx55(GasIcon, { size: "0.875rem" }),
38332
+ /* @__PURE__ */ jsx56(GasIcon, { size: "0.875rem" }),
38256
38333
  fmtLocal(networkCostUsd)
38257
38334
  ]
38258
38335
  }
38259
38336
  ) : "\u2014"
38260
38337
  }
38261
38338
  ),
38262
- /* @__PURE__ */ jsx55(
38339
+ /* @__PURE__ */ jsx56(
38263
38340
  ReviewDetailRow,
38264
38341
  {
38265
38342
  label: "Max slippage",
@@ -38267,12 +38344,12 @@ function SwapMode({
38267
38344
  value: `${slippage}%`
38268
38345
  }
38269
38346
  ),
38270
- (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx55(
38347
+ (routePath || route.data?.route?.provider) && /* @__PURE__ */ jsx56(
38271
38348
  ReviewDetailRow,
38272
38349
  {
38273
38350
  label: "Route",
38274
38351
  tooltip: "Protocol or bridge used to execute your swap",
38275
- value: /* @__PURE__ */ jsx55(
38352
+ value: /* @__PURE__ */ jsx56(
38276
38353
  "span",
38277
38354
  {
38278
38355
  style: {
@@ -38292,7 +38369,7 @@ function SwapMode({
38292
38369
  ]
38293
38370
  }
38294
38371
  ),
38295
- /* @__PURE__ */ jsx55(
38372
+ /* @__PURE__ */ jsx56(
38296
38373
  SwapActionArea,
38297
38374
  {
38298
38375
  fromTokenSymbol: fromToken?.symbol ?? "",
@@ -38316,7 +38393,7 @@ function SwapMode({
38316
38393
  const ctaDisabled = !hasTokens || !hasAmount || insufficient || isConnected && needsDestAddress && !isValidDestAddress || route.loading || feesExceedOutput;
38317
38394
  const ctaAction = !isConnected ? handleConnectAndReview : () => void handleReview();
38318
38395
  const showRateRow = hasTokens && exchangeRate !== null;
38319
- return /* @__PURE__ */ jsx55(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46(
38396
+ return /* @__PURE__ */ jsx56(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ jsxs46(
38320
38397
  "div",
38321
38398
  {
38322
38399
  style: { display: "flex", flexDirection: "column", minHeight: "500px" },
@@ -38332,7 +38409,7 @@ function SwapMode({
38332
38409
  marginBottom: spacing[1]
38333
38410
  },
38334
38411
  children: [
38335
- /* @__PURE__ */ jsx55(
38412
+ /* @__PURE__ */ jsx56(
38336
38413
  "span",
38337
38414
  {
38338
38415
  style: {
@@ -38374,7 +38451,7 @@ function SwapMode({
38374
38451
  walletAddress.slice(-4)
38375
38452
  ]
38376
38453
  }
38377
- ) : /* @__PURE__ */ jsx55(
38454
+ ) : /* @__PURE__ */ jsx56(
38378
38455
  "button",
38379
38456
  {
38380
38457
  onClick: handleConnectAndReview,
@@ -38389,7 +38466,7 @@ function SwapMode({
38389
38466
  children: "Connect wallet"
38390
38467
  }
38391
38468
  ),
38392
- /* @__PURE__ */ jsx55(
38469
+ /* @__PURE__ */ jsx56(
38393
38470
  "button",
38394
38471
  {
38395
38472
  onClick: () => setShowSettings((v) => !v),
@@ -38418,8 +38495,8 @@ function SwapMode({
38418
38495
  strokeLinecap: "round",
38419
38496
  strokeLinejoin: "round",
38420
38497
  children: [
38421
- /* @__PURE__ */ jsx55("circle", { cx: "12", cy: "12", r: "3" }),
38422
- /* @__PURE__ */ jsx55("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" })
38498
+ /* @__PURE__ */ jsx56("circle", { cx: "12", cy: "12", r: "3" }),
38499
+ /* @__PURE__ */ jsx56("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" })
38423
38500
  ]
38424
38501
  }
38425
38502
  )
@@ -38441,7 +38518,7 @@ function SwapMode({
38441
38518
  zIndex: 100
38442
38519
  },
38443
38520
  children: [
38444
- /* @__PURE__ */ jsx55(
38521
+ /* @__PURE__ */ jsx56(
38445
38522
  "p",
38446
38523
  {
38447
38524
  style: {
@@ -38455,7 +38532,7 @@ function SwapMode({
38455
38532
  children: "Appearance"
38456
38533
  }
38457
38534
  ),
38458
- /* @__PURE__ */ jsx55("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs46(
38535
+ /* @__PURE__ */ jsx56("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs46(
38459
38536
  "div",
38460
38537
  {
38461
38538
  style: {
@@ -38465,7 +38542,7 @@ function SwapMode({
38465
38542
  },
38466
38543
  children: [
38467
38544
  /* @__PURE__ */ jsxs46("div", { children: [
38468
- /* @__PURE__ */ jsx55(
38545
+ /* @__PURE__ */ jsx56(
38469
38546
  "p",
38470
38547
  {
38471
38548
  style: {
@@ -38476,7 +38553,7 @@ function SwapMode({
38476
38553
  children: "Dark mode"
38477
38554
  }
38478
38555
  ),
38479
- /* @__PURE__ */ jsx55(
38556
+ /* @__PURE__ */ jsx56(
38480
38557
  "p",
38481
38558
  {
38482
38559
  style: {
@@ -38488,7 +38565,7 @@ function SwapMode({
38488
38565
  }
38489
38566
  )
38490
38567
  ] }),
38491
- /* @__PURE__ */ jsx55(
38568
+ /* @__PURE__ */ jsx56(
38492
38569
  "button",
38493
38570
  {
38494
38571
  role: "switch",
@@ -38505,7 +38582,7 @@ function SwapMode({
38505
38582
  transition: "background-color 0.2s",
38506
38583
  flexShrink: 0
38507
38584
  },
38508
- children: /* @__PURE__ */ jsx55(
38585
+ children: /* @__PURE__ */ jsx56(
38509
38586
  "span",
38510
38587
  {
38511
38588
  style: {
@@ -38526,7 +38603,7 @@ function SwapMode({
38526
38603
  ]
38527
38604
  }
38528
38605
  ) }),
38529
- /* @__PURE__ */ jsx55(
38606
+ /* @__PURE__ */ jsx56(
38530
38607
  "p",
38531
38608
  {
38532
38609
  style: {
@@ -38541,7 +38618,7 @@ function SwapMode({
38541
38618
  }
38542
38619
  ),
38543
38620
  /* @__PURE__ */ jsxs46("div", { style: { marginBottom: spacing[4] }, children: [
38544
- /* @__PURE__ */ jsx55(
38621
+ /* @__PURE__ */ jsx56(
38545
38622
  "p",
38546
38623
  {
38547
38624
  style: {
@@ -38579,7 +38656,7 @@ function SwapMode({
38579
38656
  },
38580
38657
  v
38581
38658
  )),
38582
- /* @__PURE__ */ jsx55("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx55(
38659
+ /* @__PURE__ */ jsx56("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ jsx56(
38583
38660
  "input",
38584
38661
  {
38585
38662
  type: "number",
@@ -38610,7 +38687,7 @@ function SwapMode({
38610
38687
  }
38611
38688
  ) })
38612
38689
  ] }),
38613
- slippage > 5 && /* @__PURE__ */ jsx55(
38690
+ slippage > 5 && /* @__PURE__ */ jsx56(
38614
38691
  "p",
38615
38692
  {
38616
38693
  style: {
@@ -38622,7 +38699,7 @@ function SwapMode({
38622
38699
  }
38623
38700
  )
38624
38701
  ] }),
38625
- canSetMaxApproval && /* @__PURE__ */ jsx55("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs46(
38702
+ canSetMaxApproval && /* @__PURE__ */ jsx56("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ jsxs46(
38626
38703
  "div",
38627
38704
  {
38628
38705
  style: {
@@ -38632,7 +38709,7 @@ function SwapMode({
38632
38709
  },
38633
38710
  children: [
38634
38711
  /* @__PURE__ */ jsxs46("div", { children: [
38635
- /* @__PURE__ */ jsx55(
38712
+ /* @__PURE__ */ jsx56(
38636
38713
  "p",
38637
38714
  {
38638
38715
  style: {
@@ -38643,7 +38720,7 @@ function SwapMode({
38643
38720
  children: "Max approval"
38644
38721
  }
38645
38722
  ),
38646
- /* @__PURE__ */ jsx55(
38723
+ /* @__PURE__ */ jsx56(
38647
38724
  "p",
38648
38725
  {
38649
38726
  style: {
@@ -38655,7 +38732,7 @@ function SwapMode({
38655
38732
  }
38656
38733
  )
38657
38734
  ] }),
38658
- /* @__PURE__ */ jsx55(
38735
+ /* @__PURE__ */ jsx56(
38659
38736
  "button",
38660
38737
  {
38661
38738
  role: "switch",
@@ -38672,7 +38749,7 @@ function SwapMode({
38672
38749
  transition: "background-color 0.2s",
38673
38750
  flexShrink: 0
38674
38751
  },
38675
- children: /* @__PURE__ */ jsx55(
38752
+ children: /* @__PURE__ */ jsx56(
38676
38753
  "span",
38677
38754
  {
38678
38755
  style: {
@@ -38703,7 +38780,7 @@ function SwapMode({
38703
38780
  gap: spacing[3]
38704
38781
  },
38705
38782
  children: [
38706
- /* @__PURE__ */ jsx55(
38783
+ /* @__PURE__ */ jsx56(
38707
38784
  "p",
38708
38785
  {
38709
38786
  style: {
@@ -38741,9 +38818,9 @@ function SwapMode({
38741
38818
  whiteSpace: "nowrap"
38742
38819
  },
38743
38820
  children: [
38744
- /* @__PURE__ */ jsx55("span", { children: currencySymbol }),
38745
- /* @__PURE__ */ jsx55("span", { children: selectedCurrency }),
38746
- /* @__PURE__ */ jsx55(
38821
+ /* @__PURE__ */ jsx56("span", { children: currencySymbol }),
38822
+ /* @__PURE__ */ jsx56("span", { children: selectedCurrency }),
38823
+ /* @__PURE__ */ jsx56(
38747
38824
  "svg",
38748
38825
  {
38749
38826
  style: {
@@ -38759,13 +38836,13 @@ function SwapMode({
38759
38836
  strokeWidth: 2.5,
38760
38837
  strokeLinecap: "round",
38761
38838
  strokeLinejoin: "round",
38762
- children: /* @__PURE__ */ jsx55("path", { d: "M6 9l6 6 6-6" })
38839
+ children: /* @__PURE__ */ jsx56("path", { d: "M6 9l6 6 6-6" })
38763
38840
  }
38764
38841
  )
38765
38842
  ]
38766
38843
  }
38767
38844
  ),
38768
- showCurrencyDropdown && /* @__PURE__ */ jsx55(
38845
+ showCurrencyDropdown && /* @__PURE__ */ jsx56(
38769
38846
  "div",
38770
38847
  {
38771
38848
  style: {
@@ -38807,7 +38884,7 @@ function SwapMode({
38807
38884
  fontFamily: "inherit"
38808
38885
  },
38809
38886
  children: [
38810
- /* @__PURE__ */ jsx55(
38887
+ /* @__PURE__ */ jsx56(
38811
38888
  "span",
38812
38889
  {
38813
38890
  style: {
@@ -38818,8 +38895,8 @@ function SwapMode({
38818
38895
  children: c.symbol
38819
38896
  }
38820
38897
  ),
38821
- /* @__PURE__ */ jsx55("span", { style: { flexShrink: 0 }, children: c.code }),
38822
- /* @__PURE__ */ jsx55(
38898
+ /* @__PURE__ */ jsx56("span", { style: { flexShrink: 0 }, children: c.code }),
38899
+ /* @__PURE__ */ jsx56(
38823
38900
  "span",
38824
38901
  {
38825
38902
  style: {
@@ -38854,7 +38931,7 @@ function SwapMode({
38854
38931
  ]
38855
38932
  }
38856
38933
  ),
38857
- /* @__PURE__ */ jsx55("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs46(
38934
+ /* @__PURE__ */ jsx56("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ jsxs46(
38858
38935
  "div",
38859
38936
  {
38860
38937
  onMouseEnter: () => setHoverSell(true),
@@ -38876,7 +38953,7 @@ function SwapMode({
38876
38953
  marginBottom: spacing[1]
38877
38954
  },
38878
38955
  children: [
38879
- /* @__PURE__ */ jsx55(
38956
+ /* @__PURE__ */ jsx56(
38880
38957
  "span",
38881
38958
  {
38882
38959
  style: {
@@ -38887,7 +38964,7 @@ function SwapMode({
38887
38964
  children: "Sell"
38888
38965
  }
38889
38966
  ),
38890
- /* @__PURE__ */ jsx55(
38967
+ /* @__PURE__ */ jsx56(
38891
38968
  "div",
38892
38969
  {
38893
38970
  style: {
@@ -38898,7 +38975,7 @@ function SwapMode({
38898
38975
  transition: "opacity 0.2s",
38899
38976
  pointerEvents: hoverSell && fromBalance !== null ? "auto" : "none"
38900
38977
  },
38901
- children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx55(
38978
+ children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ jsx56(
38902
38979
  "button",
38903
38980
  {
38904
38981
  onClick: () => {
@@ -38959,7 +39036,7 @@ function SwapMode({
38959
39036
  {
38960
39037
  style: { display: "flex", alignItems: "center", gap: spacing[3] },
38961
39038
  children: [
38962
- amountInputMode === "usd" && /* @__PURE__ */ jsx55(
39039
+ amountInputMode === "usd" && /* @__PURE__ */ jsx56(
38963
39040
  "span",
38964
39041
  {
38965
39042
  style: {
@@ -38974,7 +39051,7 @@ function SwapMode({
38974
39051
  children: currencySymbol
38975
39052
  }
38976
39053
  ),
38977
- /* @__PURE__ */ jsx55(
39054
+ /* @__PURE__ */ jsx56(
38978
39055
  "input",
38979
39056
  {
38980
39057
  inputMode: "decimal",
@@ -39000,22 +39077,7 @@ function SwapMode({
39000
39077
  }
39001
39078
  }
39002
39079
  ),
39003
- amountInputMode === "token" && fromToken && /* @__PURE__ */ jsx55(
39004
- "span",
39005
- {
39006
- style: {
39007
- fontSize: scaleFontSize(amount || "0"),
39008
- fontWeight: fontWeight.medium,
39009
- letterSpacing: "-0.02em",
39010
- color: amount ? colors.foreground : `${colors.mutedForeground}80`,
39011
- transition: "font-size 0.15s ease",
39012
- flexShrink: 0,
39013
- userSelect: "none"
39014
- },
39015
- children: fromToken.symbol
39016
- }
39017
- ),
39018
- /* @__PURE__ */ jsx55(
39080
+ /* @__PURE__ */ jsx56(
39019
39081
  TokenPillButton,
39020
39082
  {
39021
39083
  token: fromToken,
@@ -39057,8 +39119,8 @@ function SwapMode({
39057
39119
  fontFamily: "inherit"
39058
39120
  },
39059
39121
  children: [
39060
- /* @__PURE__ */ jsx55("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
39061
- hasFromUsdPrice && /* @__PURE__ */ jsx55(
39122
+ /* @__PURE__ */ jsx56("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
39123
+ hasFromUsdPrice && /* @__PURE__ */ jsx56(
39062
39124
  "svg",
39063
39125
  {
39064
39126
  style: { width: "0.75rem", height: "0.75rem" },
@@ -39068,7 +39130,7 @@ function SwapMode({
39068
39130
  strokeWidth: 2,
39069
39131
  strokeLinecap: "round",
39070
39132
  strokeLinejoin: "round",
39071
- children: /* @__PURE__ */ jsx55("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
39133
+ children: /* @__PURE__ */ jsx56("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
39072
39134
  }
39073
39135
  )
39074
39136
  ]
@@ -39089,7 +39151,7 @@ function SwapMode({
39089
39151
  ]
39090
39152
  }
39091
39153
  ) }),
39092
- /* @__PURE__ */ jsx55("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx55(
39154
+ /* @__PURE__ */ jsx56("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ jsx56(
39093
39155
  "button",
39094
39156
  {
39095
39157
  onClick: handleFlip,
@@ -39110,7 +39172,7 @@ function SwapMode({
39110
39172
  cursor: lockDestToken ? "default" : "pointer",
39111
39173
  opacity: lockDestToken ? 0.4 : 1
39112
39174
  },
39113
- children: /* @__PURE__ */ jsx55(
39175
+ children: /* @__PURE__ */ jsx56(
39114
39176
  "svg",
39115
39177
  {
39116
39178
  style: {
@@ -39122,7 +39184,7 @@ function SwapMode({
39122
39184
  fill: "none",
39123
39185
  stroke: "currentColor",
39124
39186
  strokeWidth: 2,
39125
- children: /* @__PURE__ */ jsx55(
39187
+ children: /* @__PURE__ */ jsx56(
39126
39188
  "path",
39127
39189
  {
39128
39190
  strokeLinecap: "round",
@@ -39134,7 +39196,7 @@ function SwapMode({
39134
39196
  )
39135
39197
  }
39136
39198
  ) }),
39137
- /* @__PURE__ */ jsx55("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs46(
39199
+ /* @__PURE__ */ jsx56("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ jsxs46(
39138
39200
  "div",
39139
39201
  {
39140
39202
  style: {
@@ -39143,7 +39205,7 @@ function SwapMode({
39143
39205
  padding: `${spacing[5]} ${spacing[5]} ${spacing[5]}`
39144
39206
  },
39145
39207
  children: [
39146
- /* @__PURE__ */ jsx55(
39208
+ /* @__PURE__ */ jsx56(
39147
39209
  "span",
39148
39210
  {
39149
39211
  style: {
@@ -39164,7 +39226,7 @@ function SwapMode({
39164
39226
  marginTop: spacing[1]
39165
39227
  },
39166
39228
  children: [
39167
- /* @__PURE__ */ jsx55(
39229
+ /* @__PURE__ */ jsx56(
39168
39230
  "div",
39169
39231
  {
39170
39232
  style: {
@@ -39177,7 +39239,7 @@ function SwapMode({
39177
39239
  },
39178
39240
  children: displayToAmount !== null ? (() => {
39179
39241
  const s = `${isEstimate ? "~" : ""}${fmtAmount(displayToAmount, 5)}`;
39180
- return /* @__PURE__ */ jsx55(
39242
+ return /* @__PURE__ */ jsx56(
39181
39243
  "span",
39182
39244
  {
39183
39245
  style: {
@@ -39188,7 +39250,7 @@ function SwapMode({
39188
39250
  children: s
39189
39251
  }
39190
39252
  );
39191
- })() : route.loading ? /* @__PURE__ */ jsx55(
39253
+ })() : route.loading ? /* @__PURE__ */ jsx56(
39192
39254
  "span",
39193
39255
  {
39194
39256
  style: {
@@ -39198,7 +39260,7 @@ function SwapMode({
39198
39260
  },
39199
39261
  children: "\u2026"
39200
39262
  }
39201
- ) : /* @__PURE__ */ jsx55(
39263
+ ) : /* @__PURE__ */ jsx56(
39202
39264
  "span",
39203
39265
  {
39204
39266
  style: {
@@ -39211,7 +39273,7 @@ function SwapMode({
39211
39273
  },
39212
39274
  rateUpdated ? "flash" : "stable"
39213
39275
  ),
39214
- /* @__PURE__ */ jsx55(
39276
+ /* @__PURE__ */ jsx56(
39215
39277
  TokenPillButton,
39216
39278
  {
39217
39279
  token: toToken,
@@ -39237,7 +39299,7 @@ function SwapMode({
39237
39299
  color: colors.mutedForeground
39238
39300
  },
39239
39301
  children: [
39240
- /* @__PURE__ */ jsx55("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
39302
+ /* @__PURE__ */ jsx56("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
39241
39303
  priceImpact !== null && /* @__PURE__ */ jsxs46(
39242
39304
  "span",
39243
39305
  {
@@ -39284,7 +39346,7 @@ function SwapMode({
39284
39346
  }
39285
39347
  ),
39286
39348
  /* @__PURE__ */ jsxs46("div", { style: { position: "relative" }, children: [
39287
- /* @__PURE__ */ jsx55(
39349
+ /* @__PURE__ */ jsx56(
39288
39350
  "input",
39289
39351
  {
39290
39352
  type: "text",
@@ -39307,7 +39369,7 @@ function SwapMode({
39307
39369
  }
39308
39370
  }
39309
39371
  ),
39310
- /* @__PURE__ */ jsx55(
39372
+ /* @__PURE__ */ jsx56(
39311
39373
  "button",
39312
39374
  {
39313
39375
  type: "button",
@@ -39354,7 +39416,7 @@ function SwapMode({
39354
39416
  ]
39355
39417
  }
39356
39418
  ) }),
39357
- route.error && !route.loading && /* @__PURE__ */ jsx55(
39419
+ route.error && !route.loading && /* @__PURE__ */ jsx56(
39358
39420
  "p",
39359
39421
  {
39360
39422
  style: {
@@ -39379,13 +39441,13 @@ function SwapMode({
39379
39441
  padding: `0 ${spacing[3]}`
39380
39442
  },
39381
39443
  children: [
39382
- /* @__PURE__ */ jsx55(
39444
+ /* @__PURE__ */ jsx56(
39383
39445
  "svg",
39384
39446
  {
39385
39447
  className: "tw-animate-spin",
39386
39448
  style: { width: "0.875rem", height: "0.875rem", flexShrink: 0 },
39387
39449
  viewBox: "0 0 88 88",
39388
- children: /* @__PURE__ */ jsx55(
39450
+ children: /* @__PURE__ */ jsx56(
39389
39451
  "circle",
39390
39452
  {
39391
39453
  cx: "44",
@@ -39400,7 +39462,7 @@ function SwapMode({
39400
39462
  )
39401
39463
  }
39402
39464
  ),
39403
- /* @__PURE__ */ jsx55(
39465
+ /* @__PURE__ */ jsx56(
39404
39466
  "span",
39405
39467
  {
39406
39468
  style: {
@@ -39415,7 +39477,7 @@ function SwapMode({
39415
39477
  ]
39416
39478
  }
39417
39479
  ),
39418
- /* @__PURE__ */ jsx55("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx55(
39480
+ /* @__PURE__ */ jsx56("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ jsx56(
39419
39481
  "button",
39420
39482
  {
39421
39483
  disabled: ctaDisabled,
@@ -39490,8 +39552,8 @@ function SwapMode({
39490
39552
  flexShrink: 0
39491
39553
  },
39492
39554
  children: [
39493
- !isGasSponsored && /* @__PURE__ */ jsx55(GasIcon, {}),
39494
- /* @__PURE__ */ jsx55(
39555
+ !isGasSponsored && /* @__PURE__ */ jsx56(GasIcon, {}),
39556
+ /* @__PURE__ */ jsx56(
39495
39557
  "span",
39496
39558
  {
39497
39559
  style: isGasSponsored ? { color: colors.green[500] } : void 0,
@@ -39510,7 +39572,7 @@ function SwapMode({
39510
39572
  opacity: 0.75
39511
39573
  },
39512
39574
  children: [
39513
- /* @__PURE__ */ jsx55(
39575
+ /* @__PURE__ */ jsx56(
39514
39576
  "circle",
39515
39577
  {
39516
39578
  cx: "7",
@@ -39521,7 +39583,7 @@ function SwapMode({
39521
39583
  strokeWidth: "1.5"
39522
39584
  }
39523
39585
  ),
39524
- /* @__PURE__ */ jsx55(
39586
+ /* @__PURE__ */ jsx56(
39525
39587
  "circle",
39526
39588
  {
39527
39589
  cx: "7",
@@ -39539,7 +39601,7 @@ function SwapMode({
39539
39601
  ]
39540
39602
  }
39541
39603
  ),
39542
- /* @__PURE__ */ jsx55(
39604
+ /* @__PURE__ */ jsx56(
39543
39605
  "svg",
39544
39606
  {
39545
39607
  style: {
@@ -39554,7 +39616,7 @@ function SwapMode({
39554
39616
  strokeWidth: 2,
39555
39617
  strokeLinecap: "round",
39556
39618
  strokeLinejoin: "round",
39557
- children: /* @__PURE__ */ jsx55("path", { d: "M6 9l6 6 6-6" })
39619
+ children: /* @__PURE__ */ jsx56("path", { d: "M6 9l6 6 6-6" })
39558
39620
  }
39559
39621
  )
39560
39622
  ]
@@ -39575,18 +39637,18 @@ function SwapMode({
39575
39637
  gap: spacing[2.5]
39576
39638
  },
39577
39639
  children: [
39578
- /* @__PURE__ */ jsx55(
39640
+ /* @__PURE__ */ jsx56(
39579
39641
  RateRow,
39580
39642
  {
39581
39643
  label: "Fee",
39582
39644
  value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
39583
39645
  }
39584
39646
  ),
39585
- /* @__PURE__ */ jsx55(
39647
+ /* @__PURE__ */ jsx56(
39586
39648
  RateRow,
39587
39649
  {
39588
39650
  label: "Network cost",
39589
- value: isGasSponsored ? /* @__PURE__ */ jsx55(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs46(
39651
+ value: isGasSponsored ? /* @__PURE__ */ jsx56(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ jsxs46(
39590
39652
  "span",
39591
39653
  {
39592
39654
  style: {
@@ -39595,19 +39657,19 @@ function SwapMode({
39595
39657
  gap: "0.25rem"
39596
39658
  },
39597
39659
  children: [
39598
- /* @__PURE__ */ jsx55(GasIcon, { size: "0.75rem" }),
39660
+ /* @__PURE__ */ jsx56(GasIcon, { size: "0.75rem" }),
39599
39661
  fmtLocal(networkCostUsd)
39600
39662
  ]
39601
39663
  }
39602
- ) : /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
39664
+ ) : /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
39603
39665
  }
39604
39666
  ),
39605
- /* @__PURE__ */ jsx55(RateRow, { label: "Max slippage", value: `${slippage}%` }),
39606
- /* @__PURE__ */ jsx55(
39667
+ /* @__PURE__ */ jsx56(RateRow, { label: "Max slippage", value: `${slippage}%` }),
39668
+ /* @__PURE__ */ jsx56(
39607
39669
  RateRow,
39608
39670
  {
39609
39671
  label: "Route",
39610
- value: routePath ? /* @__PURE__ */ jsx55(
39672
+ value: routePath ? /* @__PURE__ */ jsx56(
39611
39673
  "span",
39612
39674
  {
39613
39675
  style: {
@@ -39621,7 +39683,7 @@ function SwapMode({
39621
39683
  title: routePath,
39622
39684
  children: routePath
39623
39685
  }
39624
- ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
39686
+ ) : route.data?.route?.provider ?? /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
39625
39687
  }
39626
39688
  )
39627
39689
  ]
@@ -39630,7 +39692,7 @@ function SwapMode({
39630
39692
  ]
39631
39693
  }
39632
39694
  ),
39633
- /* @__PURE__ */ jsx55(WidgetSecurityFooter, {})
39695
+ /* @__PURE__ */ jsx56(WidgetSecurityFooter, {})
39634
39696
  ]
39635
39697
  }
39636
39698
  ) });
@@ -39677,7 +39739,7 @@ function SwapActionArea({
39677
39739
  marginBottom: spacing[3]
39678
39740
  },
39679
39741
  children: [
39680
- /* @__PURE__ */ jsx55(
39742
+ /* @__PURE__ */ jsx56(
39681
39743
  "svg",
39682
39744
  {
39683
39745
  style: {
@@ -39687,10 +39749,10 @@ function SwapActionArea({
39687
39749
  },
39688
39750
  viewBox: "0 0 24 24",
39689
39751
  fill: "currentColor",
39690
- children: /* @__PURE__ */ jsx55("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
39752
+ children: /* @__PURE__ */ jsx56("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
39691
39753
  }
39692
39754
  ),
39693
- /* @__PURE__ */ jsx55(
39755
+ /* @__PURE__ */ jsx56(
39694
39756
  "span",
39695
39757
  {
39696
39758
  style: {
@@ -39704,8 +39766,8 @@ function SwapActionArea({
39704
39766
  ]
39705
39767
  }
39706
39768
  ),
39707
- quoteUnavailable ? /* @__PURE__ */ jsxs46(Fragment13, { children: [
39708
- /* @__PURE__ */ jsx55(
39769
+ quoteUnavailable ? /* @__PURE__ */ jsxs46(Fragment14, { children: [
39770
+ /* @__PURE__ */ jsx56(
39709
39771
  "p",
39710
39772
  {
39711
39773
  style: {
@@ -39717,7 +39779,7 @@ function SwapActionArea({
39717
39779
  children: quoteError ?? "This quote expired."
39718
39780
  }
39719
39781
  ),
39720
- /* @__PURE__ */ jsx55(
39782
+ /* @__PURE__ */ jsx56(
39721
39783
  "button",
39722
39784
  {
39723
39785
  onClick: onRetryQuote,
@@ -39735,7 +39797,7 @@ function SwapActionArea({
39735
39797
  children: "Get a new quote"
39736
39798
  }
39737
39799
  )
39738
- ] }) : /* @__PURE__ */ jsx55(
39800
+ ] }) : /* @__PURE__ */ jsx56(
39739
39801
  "button",
39740
39802
  {
39741
39803
  onClick: onExecute,
@@ -39813,7 +39875,7 @@ function TokenPillButton({
39813
39875
  },
39814
39876
  children: [
39815
39877
  placeholder,
39816
- /* @__PURE__ */ jsx55(
39878
+ /* @__PURE__ */ jsx56(
39817
39879
  "svg",
39818
39880
  {
39819
39881
  style: { width: "1rem", height: "1rem" },
@@ -39821,7 +39883,7 @@ function TokenPillButton({
39821
39883
  fill: "none",
39822
39884
  stroke: "currentColor",
39823
39885
  strokeWidth: 2,
39824
- children: /* @__PURE__ */ jsx55(
39886
+ children: /* @__PURE__ */ jsx56(
39825
39887
  "path",
39826
39888
  {
39827
39889
  strokeLinecap: "round",
@@ -39856,7 +39918,7 @@ function TokenPillButton({
39856
39918
  },
39857
39919
  children: [
39858
39920
  /* @__PURE__ */ jsxs46("div", { style: { position: "relative" }, children: [
39859
- iconUrl ? /* @__PURE__ */ jsx55(
39921
+ iconUrl ? /* @__PURE__ */ jsx56(
39860
39922
  "img",
39861
39923
  {
39862
39924
  src: iconUrl,
@@ -39868,7 +39930,7 @@ function TokenPillButton({
39868
39930
  objectFit: "cover"
39869
39931
  }
39870
39932
  }
39871
- ) : /* @__PURE__ */ jsx55(
39933
+ ) : /* @__PURE__ */ jsx56(
39872
39934
  "div",
39873
39935
  {
39874
39936
  style: {
@@ -39880,7 +39942,7 @@ function TokenPillButton({
39880
39942
  alignItems: "center",
39881
39943
  justifyContent: "center"
39882
39944
  },
39883
- children: /* @__PURE__ */ jsx55(
39945
+ children: /* @__PURE__ */ jsx56(
39884
39946
  "span",
39885
39947
  {
39886
39948
  style: {
@@ -39893,7 +39955,7 @@ function TokenPillButton({
39893
39955
  )
39894
39956
  }
39895
39957
  ),
39896
- chainIcon && /* @__PURE__ */ jsx55(
39958
+ chainIcon && /* @__PURE__ */ jsx56(
39897
39959
  "img",
39898
39960
  {
39899
39961
  src: chainIcon,
@@ -39911,7 +39973,7 @@ function TokenPillButton({
39911
39973
  }
39912
39974
  )
39913
39975
  ] }),
39914
- /* @__PURE__ */ jsx55(
39976
+ /* @__PURE__ */ jsx56(
39915
39977
  "span",
39916
39978
  {
39917
39979
  style: {
@@ -39922,7 +39984,7 @@ function TokenPillButton({
39922
39984
  children: token.symbol
39923
39985
  }
39924
39986
  ),
39925
- !disabled && /* @__PURE__ */ jsx55(
39987
+ !disabled && /* @__PURE__ */ jsx56(
39926
39988
  "svg",
39927
39989
  {
39928
39990
  style: {
@@ -39934,7 +39996,7 @@ function TokenPillButton({
39934
39996
  fill: "none",
39935
39997
  stroke: "currentColor",
39936
39998
  strokeWidth: 2,
39937
- children: /* @__PURE__ */ jsx55(
39999
+ children: /* @__PURE__ */ jsx56(
39938
40000
  "path",
39939
40001
  {
39940
40002
  strokeLinecap: "round",
@@ -39956,7 +40018,7 @@ function TokenIcon({
39956
40018
  const imgSize = size === "lg" ? "2.75rem" : "2.5rem";
39957
40019
  const badgeSize = size === "lg" ? "1.125rem" : "1rem";
39958
40020
  return /* @__PURE__ */ jsxs46("div", { style: { position: "relative", flexShrink: 0 }, children: [
39959
- /* @__PURE__ */ jsx55(
40021
+ /* @__PURE__ */ jsx56(
39960
40022
  "img",
39961
40023
  {
39962
40024
  src: icon,
@@ -39964,7 +40026,7 @@ function TokenIcon({
39964
40026
  style: { width: imgSize, height: imgSize, borderRadius: "9999px" }
39965
40027
  }
39966
40028
  ),
39967
- chainIcon && /* @__PURE__ */ jsx55(
40029
+ chainIcon && /* @__PURE__ */ jsx56(
39968
40030
  "img",
39969
40031
  {
39970
40032
  src: chainIcon,
@@ -39988,7 +40050,7 @@ function ReviewDetailRow({
39988
40050
  value,
39989
40051
  tooltip
39990
40052
  }) {
39991
- const iconRef = useRef20(null);
40053
+ const iconRef = useRef19(null);
39992
40054
  const [tipPos, setTipPos] = useState34(null);
39993
40055
  const handleMouseEnter = () => {
39994
40056
  if (!tooltip || !iconRef.current) return;
@@ -40016,7 +40078,7 @@ function ReviewDetailRow({
40016
40078
  },
40017
40079
  children: [
40018
40080
  label,
40019
- /* @__PURE__ */ jsx55(
40081
+ /* @__PURE__ */ jsx56(
40020
40082
  "span",
40021
40083
  {
40022
40084
  ref: iconRef,
@@ -40039,8 +40101,8 @@ function ReviewDetailRow({
40039
40101
  strokeLinecap: "round",
40040
40102
  strokeLinejoin: "round",
40041
40103
  children: [
40042
- /* @__PURE__ */ jsx55("circle", { cx: "12", cy: "12", r: "10" }),
40043
- /* @__PURE__ */ jsx55("path", { d: "M12 16v-4M12 8h.01" })
40104
+ /* @__PURE__ */ jsx56("circle", { cx: "12", cy: "12", r: "10" }),
40105
+ /* @__PURE__ */ jsx56("path", { d: "M12 16v-4M12 8h.01" })
40044
40106
  ]
40045
40107
  }
40046
40108
  )
@@ -40049,9 +40111,9 @@ function ReviewDetailRow({
40049
40111
  ]
40050
40112
  }
40051
40113
  ),
40052
- /* @__PURE__ */ jsx55("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
40114
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
40053
40115
  tooltip && tipPos && typeof document !== "undefined" && ReactDOM.createPortal(
40054
- /* @__PURE__ */ jsx55(
40116
+ /* @__PURE__ */ jsx56(
40055
40117
  "span",
40056
40118
  {
40057
40119
  style: {
@@ -40091,10 +40153,10 @@ function GasIcon({ size = "0.875rem" }) {
40091
40153
  strokeLinecap: "round",
40092
40154
  strokeLinejoin: "round",
40093
40155
  children: [
40094
- /* @__PURE__ */ jsx55("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
40095
- /* @__PURE__ */ jsx55("path", { d: "M3 11h11" }),
40096
- /* @__PURE__ */ jsx55("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
40097
- /* @__PURE__ */ jsx55("path", { d: "M19 22V12" })
40156
+ /* @__PURE__ */ jsx56("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
40157
+ /* @__PURE__ */ jsx56("path", { d: "M3 11h11" }),
40158
+ /* @__PURE__ */ jsx56("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
40159
+ /* @__PURE__ */ jsx56("path", { d: "M19 22V12" })
40098
40160
  ]
40099
40161
  }
40100
40162
  );
@@ -40111,13 +40173,13 @@ function SponsoredBadge() {
40111
40173
  fontWeight: fontWeight.medium
40112
40174
  },
40113
40175
  children: [
40114
- /* @__PURE__ */ jsx55(
40176
+ /* @__PURE__ */ jsx56(
40115
40177
  "svg",
40116
40178
  {
40117
40179
  style: { width: "0.75rem", height: "0.75rem" },
40118
40180
  viewBox: "0 0 24 24",
40119
40181
  fill: "currentColor",
40120
- children: /* @__PURE__ */ jsx55("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
40182
+ children: /* @__PURE__ */ jsx56("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
40121
40183
  }
40122
40184
  ),
40123
40185
  "Sponsored"
@@ -40138,8 +40200,8 @@ function SuccessReceiptRow({
40138
40200
  justifyContent: "space-between"
40139
40201
  },
40140
40202
  children: [
40141
- /* @__PURE__ */ jsx55("span", { style: { color: colors.mutedForeground }, children: label }),
40142
- /* @__PURE__ */ jsx55("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
40203
+ /* @__PURE__ */ jsx56("span", { style: { color: colors.mutedForeground }, children: label }),
40204
+ /* @__PURE__ */ jsx56("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
40143
40205
  ]
40144
40206
  }
40145
40207
  );
@@ -40153,7 +40215,7 @@ function ProcessingStepNode({
40153
40215
  const nodeColor = done ? colors.green[500] : active ? `hsl(var(--tw-primary))` : colors.border;
40154
40216
  const iconColor = done ? "#fff" : active ? `hsl(var(--tw-primary))` : colors.mutedForeground;
40155
40217
  const nodeBg = done ? colors.green[500] : "transparent";
40156
- const iconEl = icon === "send" ? /* @__PURE__ */ jsx55(
40218
+ const iconEl = icon === "send" ? /* @__PURE__ */ jsx56(
40157
40219
  "svg",
40158
40220
  {
40159
40221
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -40163,9 +40225,9 @@ function ProcessingStepNode({
40163
40225
  strokeWidth: 2,
40164
40226
  strokeLinecap: "round",
40165
40227
  strokeLinejoin: "round",
40166
- children: /* @__PURE__ */ jsx55("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
40228
+ children: /* @__PURE__ */ jsx56("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
40167
40229
  }
40168
- ) : icon === "plus" ? /* @__PURE__ */ jsx55(
40230
+ ) : icon === "plus" ? /* @__PURE__ */ jsx56(
40169
40231
  "svg",
40170
40232
  {
40171
40233
  style: { width: "0.875rem", height: "0.875rem", color: iconColor },
@@ -40175,7 +40237,7 @@ function ProcessingStepNode({
40175
40237
  strokeWidth: 2,
40176
40238
  strokeLinecap: "round",
40177
40239
  strokeLinejoin: "round",
40178
- children: /* @__PURE__ */ jsx55("path", { d: "M12 5v14M5 12h14" })
40240
+ children: /* @__PURE__ */ jsx56("path", { d: "M12 5v14M5 12h14" })
40179
40241
  }
40180
40242
  ) : /* @__PURE__ */ jsxs46(
40181
40243
  "svg",
@@ -40188,12 +40250,12 @@ function ProcessingStepNode({
40188
40250
  strokeLinecap: "round",
40189
40251
  strokeLinejoin: "round",
40190
40252
  children: [
40191
- /* @__PURE__ */ jsx55("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" }),
40192
- /* @__PURE__ */ jsx55("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
40253
+ /* @__PURE__ */ jsx56("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" }),
40254
+ /* @__PURE__ */ jsx56("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
40193
40255
  ]
40194
40256
  }
40195
40257
  );
40196
- const doneIcon = /* @__PURE__ */ jsx55(
40258
+ const doneIcon = /* @__PURE__ */ jsx56(
40197
40259
  "svg",
40198
40260
  {
40199
40261
  style: { width: "0.875rem", height: "0.875rem", color: "#fff" },
@@ -40203,7 +40265,7 @@ function ProcessingStepNode({
40203
40265
  strokeWidth: 3,
40204
40266
  strokeLinecap: "round",
40205
40267
  strokeLinejoin: "round",
40206
- children: /* @__PURE__ */ jsx55("path", { d: "M20 6L9 17l-5-5" })
40268
+ children: /* @__PURE__ */ jsx56("path", { d: "M20 6L9 17l-5-5" })
40207
40269
  }
40208
40270
  );
40209
40271
  return /* @__PURE__ */ jsxs46(
@@ -40217,7 +40279,7 @@ function ProcessingStepNode({
40217
40279
  maxWidth: "5rem"
40218
40280
  },
40219
40281
  children: [
40220
- /* @__PURE__ */ jsx55(
40282
+ /* @__PURE__ */ jsx56(
40221
40283
  "div",
40222
40284
  {
40223
40285
  style: {
@@ -40235,7 +40297,7 @@ function ProcessingStepNode({
40235
40297
  children: done ? doneIcon : iconEl
40236
40298
  }
40237
40299
  ),
40238
- /* @__PURE__ */ jsx55(
40300
+ /* @__PURE__ */ jsx56(
40239
40301
  "span",
40240
40302
  {
40241
40303
  style: {
@@ -40254,7 +40316,7 @@ function ProcessingStepNode({
40254
40316
  );
40255
40317
  }
40256
40318
  function ProcessingStepLine({ done }) {
40257
- return /* @__PURE__ */ jsx55(
40319
+ return /* @__PURE__ */ jsx56(
40258
40320
  "div",
40259
40321
  {
40260
40322
  style: {
@@ -40289,6 +40351,7 @@ var init_SwapMode = __esm({
40289
40351
  init_useSwapRoute();
40290
40352
  init_useSwapExecution();
40291
40353
  init_walletBalance();
40354
+ init_analytics();
40292
40355
  init_useForex();
40293
40356
  init_SwapTokenSelect();
40294
40357
  init_currency();
@@ -40327,12 +40390,12 @@ var init_swap = __esm({
40327
40390
  import {
40328
40391
  useState as useState35,
40329
40392
  useEffect as useEffect35,
40330
- useRef as useRef21,
40393
+ useRef as useRef20,
40331
40394
  useCallback as useCallback23,
40332
40395
  useImperativeHandle,
40333
40396
  forwardRef
40334
40397
  } from "react";
40335
- import { Fragment as Fragment14, jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
40398
+ import { Fragment as Fragment15, jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
40336
40399
  function WidgetContent({
40337
40400
  style,
40338
40401
  onStateChange,
@@ -40364,8 +40427,8 @@ function WidgetContent({
40364
40427
  onStateChange
40365
40428
  ]);
40366
40429
  return /* @__PURE__ */ jsxs47("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
40367
- showThemeToggle && /* @__PURE__ */ jsx56("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx56(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
40368
- /* @__PURE__ */ jsx56(
40430
+ showThemeToggle && /* @__PURE__ */ jsx57("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx57(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
40431
+ /* @__PURE__ */ jsx57(
40369
40432
  WidgetRouter,
40370
40433
  {
40371
40434
  currentStep,
@@ -40387,7 +40450,6 @@ function WidgetInner({
40387
40450
  const { resolvedTheme } = useDepositUi();
40388
40451
  const { status, revalidate, errors } = useTrustware();
40389
40452
  const [showConfirmDialog, setShowConfirmDialog] = useState35(false);
40390
- useGTM(GTM_ID);
40391
40453
  const handleCloseRequest = useCallback23(() => {
40392
40454
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
40393
40455
  setShowConfirmDialog(true);
@@ -40415,16 +40477,16 @@ function WidgetInner({
40415
40477
  const handleRefresh = useCallback23(() => {
40416
40478
  revalidate?.();
40417
40479
  }, [revalidate]);
40418
- return /* @__PURE__ */ jsxs47(Fragment14, { children: [
40480
+ return /* @__PURE__ */ jsxs47(Fragment15, { children: [
40419
40481
  /* @__PURE__ */ jsxs47(WidgetContainer, { theme: effectiveTheme, style, children: [
40420
- /* @__PURE__ */ jsx56(
40482
+ /* @__PURE__ */ jsx57(
40421
40483
  WidgetContent,
40422
40484
  {
40423
40485
  onStateChange,
40424
40486
  showThemeToggle
40425
40487
  }
40426
40488
  ),
40427
- /* @__PURE__ */ jsx56(
40489
+ /* @__PURE__ */ jsx57(
40428
40490
  InitErrorOverlay,
40429
40491
  {
40430
40492
  open: initBlocked,
@@ -40435,7 +40497,7 @@ function WidgetInner({
40435
40497
  }
40436
40498
  )
40437
40499
  ] }),
40438
- /* @__PURE__ */ jsx56(
40500
+ /* @__PURE__ */ jsx57(
40439
40501
  ConfirmCloseDialog,
40440
40502
  {
40441
40503
  open: showConfirmDialog,
@@ -40461,8 +40523,7 @@ var init_TrustwareWidgetV2 = __esm({
40461
40523
  init_provider();
40462
40524
  init_manager();
40463
40525
  init_useTrustwareConfig();
40464
- init_hooks();
40465
- init_constants();
40526
+ init_WidgetAnalytics();
40466
40527
  init_swap();
40467
40528
  widgetContentContainerStyle = {
40468
40529
  position: "relative",
@@ -40486,7 +40547,7 @@ var init_TrustwareWidgetV2 = __esm({
40486
40547
  showThemeToggle = true
40487
40548
  }, ref) {
40488
40549
  const [isOpen, setIsOpen] = useState35(defaultOpen);
40489
- const closeRequestRef = useRef21(null);
40550
+ const closeRequestRef = useRef20(null);
40490
40551
  const config = useTrustwareConfig();
40491
40552
  const effectiveInitialStep = initialStep;
40492
40553
  const open = useCallback23(() => {
@@ -40517,10 +40578,10 @@ var init_TrustwareWidgetV2 = __esm({
40517
40578
  if (!isOpen) {
40518
40579
  return null;
40519
40580
  }
40520
- if (config.mode === "swap") {
40521
- return /* @__PURE__ */ jsx56(SwapMode, { theme, style });
40522
- }
40523
- return /* @__PURE__ */ jsx56(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx56(
40581
+ return /* @__PURE__ */ jsx57(WidgetAnalytics, { children: config.mode === "swap" ? (
40582
+ // Swap Mode bypasses DepositProvider — fully standalone
40583
+ /* @__PURE__ */ jsx57(SwapMode, { theme, style })
40584
+ ) : /* @__PURE__ */ jsx57(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx57(
40524
40585
  WidgetInner,
40525
40586
  {
40526
40587
  theme,
@@ -40529,7 +40590,7 @@ var init_TrustwareWidgetV2 = __esm({
40529
40590
  closeRequestRef,
40530
40591
  showThemeToggle
40531
40592
  }
40532
- ) });
40593
+ ) }) });
40533
40594
  });
40534
40595
  }
40535
40596
  });