@trustware/sdk-staging 1.1.3-staging.20 → 1.1.3-staging.31

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
@@ -47,19 +47,21 @@ var init_config = __esm({
47
47
  };
48
48
  DEFAULT_FEATURE_FLAGS = {
49
49
  tokensPagination: false,
50
- balanceStreaming: false
50
+ balanceStreaming: false,
51
+ shouldAllowGA4: true
51
52
  };
52
53
  }
53
54
  });
54
55
 
55
56
  // src/constants.ts
56
- var SDK_NAME, SDK_VERSION, API_ROOT, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
57
+ var SDK_NAME, SDK_VERSION, API_ROOT, GTM_ID, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
57
58
  var init_constants = __esm({
58
59
  "src/constants.ts"() {
59
60
  "use strict";
60
61
  SDK_NAME = "@trustware/sdk";
61
- SDK_VERSION = "1.1.3-staging.20";
62
+ SDK_VERSION = "1.1.3-staging.31";
62
63
  API_ROOT = "https://bv-staging-api.trustware.io";
64
+ GTM_ID = "";
63
65
  API_PREFIX = "/api";
64
66
  ASSETS_BASE_URL = "https://app.trustware.io";
65
67
  WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
@@ -151,7 +153,8 @@ function resolveConfig(input) {
151
153
  const walletConnect = resolveWalletConnectConfig(input.walletConnect);
152
154
  const features = {
153
155
  tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
154
- balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming
156
+ balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
157
+ shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4
155
158
  };
156
159
  return {
157
160
  apiKey: input.apiKey,
@@ -810,7 +813,7 @@ __export(ConfettiEffect_exports, {
810
813
  ConfettiEffect: () => ConfettiEffect,
811
814
  default: () => ConfettiEffect_default
812
815
  });
813
- import { useEffect as useEffect12, useState as useState15 } from "react";
816
+ import { useEffect as useEffect13, useState as useState15 } from "react";
814
817
  import { jsx as jsx6 } from "react/jsx-runtime";
815
818
  function ConfettiEffect({
816
819
  isActive,
@@ -818,7 +821,7 @@ function ConfettiEffect({
818
821
  pieceCount = 50
819
822
  }) {
820
823
  const [pieces, setPieces] = useState15([]);
821
- useEffect12(() => {
824
+ useEffect13(() => {
822
825
  if (isActive) {
823
826
  const colors2 = [
824
827
  "#10b981",
@@ -4215,6 +4218,26 @@ var Trustware = {
4215
4218
  });
4216
4219
  return Trustware;
4217
4220
  },
4221
+ setDestinationChain(chain) {
4222
+ const prev = TrustwareConfigStore.get();
4223
+ TrustwareConfigStore.update({
4224
+ routes: {
4225
+ ...prev.routes,
4226
+ toChain: chain
4227
+ }
4228
+ });
4229
+ return Trustware;
4230
+ },
4231
+ setDestinationToken(token) {
4232
+ const prev = TrustwareConfigStore.get();
4233
+ TrustwareConfigStore.update({
4234
+ routes: {
4235
+ ...prev.routes,
4236
+ toToken: token
4237
+ }
4238
+ });
4239
+ return Trustware;
4240
+ },
4218
4241
  /** Read active wallet */
4219
4242
  getWallet() {
4220
4243
  return walletManager.wallet;
@@ -4258,10 +4281,10 @@ init_http();
4258
4281
 
4259
4282
  // src/widget/TrustwareWidgetV2.tsx
4260
4283
  import {
4261
- useState as useState22,
4262
- useEffect as useEffect25,
4263
- useRef as useRef11,
4264
- useCallback as useCallback14,
4284
+ useState as useState23,
4285
+ useEffect as useEffect27,
4286
+ useRef as useRef13,
4287
+ useCallback as useCallback15,
4265
4288
  useImperativeHandle,
4266
4289
  forwardRef
4267
4290
  } from "react";
@@ -5000,7 +5023,7 @@ function useWalletSessionState() {
5000
5023
  }
5001
5024
 
5002
5025
  // src/widget/state/deposit/useWalletTokenState.ts
5003
- import { useEffect as useEffect11, useRef as useRef3, useState as useState12 } from "react";
5026
+ import { useEffect as useEffect12, useRef as useRef4, useState as useState12 } from "react";
5004
5027
 
5005
5028
  // src/widget/hooks/useRouteBuilder.ts
5006
5029
  import { useEffect as useEffect8, useMemo as useMemo5, useRef, useState as useState8 } from "react";
@@ -5299,7 +5322,8 @@ function useTrustwareConfig() {
5299
5322
  },
5300
5323
  features: {
5301
5324
  tokensPagination: false,
5302
- balanceStreaming: false
5325
+ balanceStreaming: false,
5326
+ shouldAllowGA4: true
5303
5327
  }
5304
5328
  };
5305
5329
  }
@@ -5503,7 +5527,144 @@ function mapTransactionError(err) {
5503
5527
  }
5504
5528
 
5505
5529
  // src/widget/hooks/useTransactionPolling.ts
5506
- import { useCallback as useCallback6, useEffect as useEffect10, useRef as useRef2, useState as useState11 } from "react";
5530
+ import { useCallback as useCallback7, useEffect as useEffect11, useRef as useRef3, useState as useState11 } from "react";
5531
+ init_constants();
5532
+
5533
+ // src/hooks/useGTM.ts
5534
+ import { useEffect as useEffect10, useRef as useRef2, useCallback as useCallback6 } from "react";
5535
+ function useGTM(gtmId) {
5536
+ const isInitialized = useRef2(false);
5537
+ const scriptRef = useRef2(null);
5538
+ const isGA4Allowed = useCallback6(() => {
5539
+ try {
5540
+ return Trustware.getConfig().features.shouldAllowGA4;
5541
+ } catch {
5542
+ return false;
5543
+ }
5544
+ }, []);
5545
+ useEffect10(() => {
5546
+ if (!isGA4Allowed()) {
5547
+ console.warn(
5548
+ "useGTM: GA4 tracking is disabled or Trustware config not initialized."
5549
+ );
5550
+ return;
5551
+ }
5552
+ if (!gtmId || typeof gtmId !== "string") {
5553
+ console.error(
5554
+ "useGTM: A valid GTM Container ID is required (format: GTM-XXXXX)."
5555
+ );
5556
+ return;
5557
+ }
5558
+ if (isInitialized.current) return;
5559
+ const alreadyLoaded = document.querySelector(
5560
+ `script[src*="googletagmanager.com/gtm.js?id=${gtmId}"]`
5561
+ );
5562
+ if (alreadyLoaded) {
5563
+ window.dataLayer = window.dataLayer || [];
5564
+ isInitialized.current = true;
5565
+ return;
5566
+ }
5567
+ window.dataLayer = window.dataLayer || [];
5568
+ window.dataLayer.push({
5569
+ "gtm.start": (/* @__PURE__ */ new Date()).getTime(),
5570
+ event: "gtm.js"
5571
+ });
5572
+ const firstScript = document.getElementsByTagName("script")[0];
5573
+ const script = document.createElement("script");
5574
+ script.async = true;
5575
+ script.src = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`;
5576
+ firstScript.parentNode?.insertBefore(script, firstScript);
5577
+ scriptRef.current = script;
5578
+ isInitialized.current = true;
5579
+ return () => {
5580
+ if (scriptRef.current) {
5581
+ scriptRef.current.parentNode?.removeChild(scriptRef.current);
5582
+ scriptRef.current = null;
5583
+ }
5584
+ isInitialized.current = false;
5585
+ };
5586
+ }, [gtmId, isGA4Allowed]);
5587
+ const addNoscriptIframe = useCallback6(() => {
5588
+ if (!isGA4Allowed()) return;
5589
+ if (document.querySelector('iframe[src*="googletagmanager.com/ns.html"]'))
5590
+ return;
5591
+ const noscript = document.createElement("noscript");
5592
+ const iframe = document.createElement("iframe");
5593
+ iframe.src = `https://www.googletagmanager.com/ns.html?id=${gtmId}`;
5594
+ iframe.height = "0";
5595
+ iframe.width = "0";
5596
+ iframe.style.display = "none";
5597
+ iframe.style.visibility = "hidden";
5598
+ noscript.appendChild(iframe);
5599
+ document.body.insertBefore(noscript, document.body.firstChild);
5600
+ }, [gtmId, isGA4Allowed]);
5601
+ const trackEvent = useCallback6(
5602
+ (eventName, eventParams = {}) => {
5603
+ if (!isInitialized.current) {
5604
+ console.warn(
5605
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5606
+ );
5607
+ return;
5608
+ }
5609
+ if (!eventName || typeof eventName !== "string") {
5610
+ console.error("useGTM: A valid event name is required.");
5611
+ return;
5612
+ }
5613
+ const payload = { event: eventName, ...eventParams };
5614
+ window.dataLayer.push(payload);
5615
+ },
5616
+ []
5617
+ );
5618
+ const trackPageView = useCallback6(
5619
+ (pagePath, pageTitle = document.title) => {
5620
+ trackEvent("page_view", {
5621
+ page_path: pagePath,
5622
+ page_title: pageTitle,
5623
+ page_location: window.location.href
5624
+ });
5625
+ },
5626
+ [trackEvent]
5627
+ );
5628
+ const setUserProperty = useCallback6(
5629
+ (propertyName, value) => {
5630
+ if (!isInitialized.current) {
5631
+ console.warn(
5632
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5633
+ );
5634
+ return;
5635
+ }
5636
+ const payload = {
5637
+ event: "user_property",
5638
+ user_property_name: propertyName,
5639
+ user_property_value: value
5640
+ };
5641
+ window.dataLayer.push(payload);
5642
+ },
5643
+ []
5644
+ );
5645
+ const directGtag = useCallback6(
5646
+ (command, ...args) => {
5647
+ if (!isGA4Allowed()) return;
5648
+ if (!window.gtag) {
5649
+ console.warn(
5650
+ "useGTM: window.gtag is not available. Load gtag.js separately to use this method."
5651
+ );
5652
+ return;
5653
+ }
5654
+ window.gtag(command, ...args);
5655
+ },
5656
+ [isGA4Allowed]
5657
+ );
5658
+ return {
5659
+ trackEvent,
5660
+ trackPageView,
5661
+ setUserProperty,
5662
+ directGtag,
5663
+ addNoscriptIframe
5664
+ };
5665
+ }
5666
+
5667
+ // src/widget/hooks/useTransactionPolling.ts
5507
5668
  var FAST_POLL_INTERVAL_MS = 1500;
5508
5669
  var NORMAL_POLL_INTERVAL_MS = 2500;
5509
5670
  var POLL_TIMEOUT_MS = 5 * 60 * 1e3;
@@ -5511,6 +5672,15 @@ function useTransactionPolling() {
5511
5672
  const { setCurrentStep } = useDepositNavigation();
5512
5673
  const { setTransactionStatus, setErrorMessage } = useDepositTransaction();
5513
5674
  const { emitSuccess } = useTrustware();
5675
+ const { selectedChain, selectedToken } = useDepositForm();
5676
+ const destinationConfig = (() => {
5677
+ try {
5678
+ return Trustware.getConfig();
5679
+ } catch {
5680
+ return void 0;
5681
+ }
5682
+ })();
5683
+ const { trackEvent } = useGTM(GTM_ID);
5514
5684
  const [state, setState] = useState11({
5515
5685
  isPolling: false,
5516
5686
  apiStatus: null,
@@ -5518,12 +5688,12 @@ function useTransactionPolling() {
5518
5688
  transaction: null,
5519
5689
  receiptSubmitted: false
5520
5690
  });
5521
- const pollingRef = useRef2(null);
5522
- const timeoutRef = useRef2(null);
5523
- const abortRef = useRef2(false);
5524
- const startTimeRef = useRef2(0);
5525
- const pollCountRef = useRef2(0);
5526
- const clearPolling = useCallback6(() => {
5691
+ const pollingRef = useRef3(null);
5692
+ const timeoutRef = useRef3(null);
5693
+ const abortRef = useRef3(false);
5694
+ const startTimeRef = useRef3(0);
5695
+ const pollCountRef = useRef3(0);
5696
+ const clearPolling = useCallback7(() => {
5527
5697
  abortRef.current = true;
5528
5698
  if (pollingRef.current) {
5529
5699
  clearTimeout(pollingRef.current);
@@ -5534,7 +5704,7 @@ function useTransactionPolling() {
5534
5704
  timeoutRef.current = null;
5535
5705
  }
5536
5706
  }, []);
5537
- const startPolling = useCallback6(
5707
+ const startPolling = useCallback7(
5538
5708
  async (intentId, _txHash) => {
5539
5709
  clearPolling();
5540
5710
  abortRef.current = false;
@@ -5581,6 +5751,13 @@ function useTransactionPolling() {
5581
5751
  }));
5582
5752
  setTransactionStatus("success");
5583
5753
  setCurrentStep("success");
5754
+ trackEvent("payment_completed", {
5755
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId ?? "unknown",
5756
+ from_token: selectedToken?.symbol ?? "unknown",
5757
+ to_chain: destinationConfig?.routes?.toChain ?? "unknown",
5758
+ to_token: destinationConfig?.routes?.toToken ?? "unknown",
5759
+ domain: window.origin
5760
+ });
5584
5761
  emitSuccess?.(tx);
5585
5762
  return;
5586
5763
  }
@@ -5643,20 +5820,27 @@ function useTransactionPolling() {
5643
5820
  },
5644
5821
  [
5645
5822
  clearPolling,
5823
+ destinationConfig?.routes.toChain,
5824
+ destinationConfig?.routes.toToken,
5646
5825
  emitSuccess,
5647
- setTransactionStatus,
5826
+ selectedChain?.axelarChainName,
5827
+ selectedChain?.chainId,
5828
+ selectedChain?.networkName,
5829
+ selectedToken?.symbol,
5648
5830
  setCurrentStep,
5649
- setErrorMessage
5831
+ setErrorMessage,
5832
+ setTransactionStatus,
5833
+ trackEvent
5650
5834
  ]
5651
5835
  );
5652
- const stopPolling = useCallback6(() => {
5836
+ const stopPolling = useCallback7(() => {
5653
5837
  clearPolling();
5654
5838
  setState((prev) => ({
5655
5839
  ...prev,
5656
5840
  isPolling: false
5657
5841
  }));
5658
5842
  }, [clearPolling]);
5659
- const resetPolling = useCallback6(() => {
5843
+ const resetPolling = useCallback7(() => {
5660
5844
  clearPolling();
5661
5845
  setState({
5662
5846
  isPolling: false,
@@ -5666,9 +5850,9 @@ function useTransactionPolling() {
5666
5850
  receiptSubmitted: false
5667
5851
  });
5668
5852
  }, [clearPolling]);
5669
- const clearPollingRef = useRef2(clearPolling);
5853
+ const clearPollingRef = useRef3(clearPolling);
5670
5854
  clearPollingRef.current = clearPolling;
5671
- useEffect10(() => {
5855
+ useEffect11(() => {
5672
5856
  return () => {
5673
5857
  clearPollingRef.current();
5674
5858
  };
@@ -5739,10 +5923,10 @@ function useWalletTokenState({
5739
5923
  }) {
5740
5924
  const [yourWalletTokens, setYourWalletTokens] = useState12([]);
5741
5925
  const [walletTokensReloadNonce, setWalletTokensReloadNonce] = useState12(0);
5742
- const lastLoadedWalletRef = useRef3(null);
5926
+ const lastLoadedWalletRef = useRef4(null);
5743
5927
  const { tokens } = useTokens(null);
5744
5928
  const { chains } = useChains();
5745
- useEffect11(() => {
5929
+ useEffect12(() => {
5746
5930
  if (!walletAddress || chains.length === 0 || tokens.length === 0) {
5747
5931
  setYourWalletTokens([]);
5748
5932
  if (!walletAddress) {
@@ -6137,7 +6321,7 @@ function useDepositUi() {
6137
6321
  }
6138
6322
 
6139
6323
  // src/widget/components/AmountSlider.tsx
6140
- import { useCallback as useCallback7, useMemo as useMemo8 } from "react";
6324
+ import { useCallback as useCallback8, useMemo as useMemo8 } from "react";
6141
6325
  import { jsx as jsx3, jsxs } from "react/jsx-runtime";
6142
6326
  var roundToNiceNumber = (value, range) => {
6143
6327
  let roundingFactor;
@@ -6187,7 +6371,7 @@ function AmountSlider({
6187
6371
  style,
6188
6372
  disabled = false
6189
6373
  }) {
6190
- const generateTickMarks = useCallback7(
6374
+ const generateTickMarks = useCallback8(
6191
6375
  (minValue, maxValue) => {
6192
6376
  const range = maxValue - minValue;
6193
6377
  if (range <= 0) {
@@ -6239,21 +6423,21 @@ function AmountSlider({
6239
6423
  () => generateTickMarks(min, max),
6240
6424
  [generateTickMarks, min, max]
6241
6425
  );
6242
- const getPercentage = useCallback7(() => {
6426
+ const getPercentage = useCallback8(() => {
6243
6427
  const range = max - min;
6244
6428
  if (range <= 0) return 0;
6245
6429
  const clampedValue = Math.min(Math.max(value, min), max);
6246
6430
  return (clampedValue - min) / range * 100;
6247
6431
  }, [max, min, value]);
6248
6432
  const percentage = useMemo8(() => getPercentage(), [getPercentage]);
6249
- const handleChange = useCallback7(
6433
+ const handleChange = useCallback8(
6250
6434
  (e2) => {
6251
6435
  const newValue = Math.min(Math.max(Number(e2.target.value), min), max);
6252
6436
  onChange(newValue);
6253
6437
  },
6254
6438
  [onChange, min, max]
6255
6439
  );
6256
- const handleTickClick = useCallback7(
6440
+ const handleTickClick = useCallback8(
6257
6441
  (tickValue) => {
6258
6442
  if (disabled) return;
6259
6443
  onChange(tickValue);
@@ -6471,7 +6655,7 @@ function AmountSlider({
6471
6655
  }
6472
6656
 
6473
6657
  // src/widget/components/AmountInputDisplay.tsx
6474
- import { useRef as useRef4, useState as useState14 } from "react";
6658
+ import { useRef as useRef5, useState as useState14 } from "react";
6475
6659
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
6476
6660
  function formatDisplayAmount(value) {
6477
6661
  if (!Number.isFinite(value) || value <= 0) return "0";
@@ -6511,7 +6695,7 @@ function AmountInputDisplay({
6511
6695
  inputAriaLabel = "Deposit amount"
6512
6696
  }) {
6513
6697
  const [isEditing, setIsEditing] = useState14(false);
6514
- const inputRef = useRef4(null);
6698
+ const inputRef = useRef5(null);
6515
6699
  const handleAmountClick = () => {
6516
6700
  if (isFixedAmount) return;
6517
6701
  const isZeroish = !amount || parseFloat(amount) === 0;
@@ -6726,7 +6910,7 @@ function CircularProgress({
6726
6910
  }
6727
6911
 
6728
6912
  // src/widget/components/Dialog.tsx
6729
- import { useEffect as useEffect13, useRef as useRef5 } from "react";
6913
+ import { useEffect as useEffect14, useRef as useRef6 } from "react";
6730
6914
  import { Fragment, jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
6731
6915
  var Dialog = ({
6732
6916
  open,
@@ -6738,11 +6922,11 @@ var Dialog = ({
6738
6922
  confirmText = "Close Anyway",
6739
6923
  isDark = false
6740
6924
  }) => {
6741
- const dialogRef = useRef5(null);
6742
- const overlayRef = useRef5(null);
6743
- const firstButtonRef = useRef5(null);
6744
- const lastButtonRef = useRef5(null);
6745
- useEffect13(() => {
6925
+ const dialogRef = useRef6(null);
6926
+ const overlayRef = useRef6(null);
6927
+ const firstButtonRef = useRef6(null);
6928
+ const lastButtonRef = useRef6(null);
6929
+ useEffect14(() => {
6746
6930
  const handleEscape = (e2) => {
6747
6931
  if (e2.key === "Escape" && open) {
6748
6932
  e2.preventDefault();
@@ -6756,7 +6940,7 @@ var Dialog = ({
6756
6940
  document.removeEventListener("keydown", handleEscape);
6757
6941
  };
6758
6942
  }, [open, onCancel]);
6759
- useEffect13(() => {
6943
+ useEffect14(() => {
6760
6944
  const handleTabKey = (e2) => {
6761
6945
  if (!open) return;
6762
6946
  if (e2.key === "Tab") {
@@ -6780,7 +6964,7 @@ var Dialog = ({
6780
6964
  document.removeEventListener("keydown", handleTabKey);
6781
6965
  };
6782
6966
  }, [open]);
6783
- useEffect13(() => {
6967
+ useEffect14(() => {
6784
6968
  if (open) {
6785
6969
  const originalStyle = window.getComputedStyle(document.body).overflow;
6786
6970
  document.body.style.overflow = "hidden";
@@ -7078,7 +7262,7 @@ function TransactionHashLink({
7078
7262
  }
7079
7263
 
7080
7264
  // src/widget/components/SwipeToConfirmTokens.tsx
7081
- import { useState as useState16, useRef as useRef6, useCallback as useCallback8, useEffect as useEffect14 } from "react";
7265
+ import { useState as useState16, useRef as useRef7, useCallback as useCallback9, useEffect as useEffect15 } from "react";
7082
7266
  import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
7083
7267
  function SwipeToConfirmTokens({
7084
7268
  fromToken,
@@ -7096,30 +7280,30 @@ function SwipeToConfirmTokens({
7096
7280
  const [dragX, setDragX] = useState16(0);
7097
7281
  const [isDragging, setIsDragging] = useState16(false);
7098
7282
  const [isComplete, setIsComplete] = useState16(false);
7099
- const trackRef = useRef6(null);
7100
- const thumbRef = useRef6(null);
7283
+ const trackRef = useRef7(null);
7284
+ const thumbRef = useRef7(null);
7101
7285
  const [isLongPressing, setIsLongPressing] = useState16(false);
7102
7286
  const [longPressProgress, setLongPressProgress] = useState16(0);
7103
- const longPressTimerRef = useRef6(null);
7104
- const longPressStartRef = useRef6(null);
7105
- const longPressAnimationRef = useRef6(null);
7287
+ const longPressTimerRef = useRef7(null);
7288
+ const longPressStartRef = useRef7(null);
7289
+ const longPressAnimationRef = useRef7(null);
7106
7290
  const LONG_PRESS_DURATION = 1500;
7107
7291
  const thumbSize = 48;
7108
7292
  const padding = 4;
7109
7293
  const threshold = 0.8;
7110
- const getMaxDrag = useCallback8(() => {
7294
+ const getMaxDrag = useCallback9(() => {
7111
7295
  if (!trackRef.current) return 0;
7112
7296
  return trackRef.current.offsetWidth - thumbSize - padding * 2;
7113
7297
  }, []);
7114
- const getProgress = useCallback8(() => {
7298
+ const getProgress = useCallback9(() => {
7115
7299
  const maxDrag = getMaxDrag();
7116
7300
  return maxDrag > 0 ? dragX / maxDrag : 0;
7117
7301
  }, [dragX, getMaxDrag]);
7118
- const handleDragStart = useCallback8(() => {
7302
+ const handleDragStart = useCallback9(() => {
7119
7303
  if (disabled || isComplete) return;
7120
7304
  setIsDragging(true);
7121
7305
  }, [disabled, isComplete]);
7122
- const handleDragMove = useCallback8(
7306
+ const handleDragMove = useCallback9(
7123
7307
  (clientX) => {
7124
7308
  if (!isDragging || !trackRef.current || isComplete) return;
7125
7309
  const rect = trackRef.current.getBoundingClientRect();
@@ -7130,7 +7314,7 @@ function SwipeToConfirmTokens({
7130
7314
  },
7131
7315
  [isDragging, isComplete, getMaxDrag]
7132
7316
  );
7133
- const handleDragEnd = useCallback8(() => {
7317
+ const handleDragEnd = useCallback9(() => {
7134
7318
  if (!isDragging) return;
7135
7319
  setIsDragging(false);
7136
7320
  const progress2 = getProgress();
@@ -7143,14 +7327,14 @@ function SwipeToConfirmTokens({
7143
7327
  setDragX(0);
7144
7328
  }
7145
7329
  }, [isDragging, getProgress, getMaxDrag, onConfirm]);
7146
- const triggerConfirmation = useCallback8(() => {
7330
+ const triggerConfirmation = useCallback9(() => {
7147
7331
  if (isComplete) return;
7148
7332
  setDragX(getMaxDrag());
7149
7333
  setIsComplete(true);
7150
7334
  if (navigator.vibrate) navigator.vibrate(50);
7151
7335
  setTimeout(() => onConfirm(), 150);
7152
7336
  }, [isComplete, getMaxDrag, onConfirm]);
7153
- const cancelLongPress = useCallback8(() => {
7337
+ const cancelLongPress = useCallback9(() => {
7154
7338
  setIsLongPressing(false);
7155
7339
  setLongPressProgress(0);
7156
7340
  longPressStartRef.current = null;
@@ -7163,7 +7347,7 @@ function SwipeToConfirmTokens({
7163
7347
  longPressAnimationRef.current = null;
7164
7348
  }
7165
7349
  }, []);
7166
- const startLongPress = useCallback8(() => {
7350
+ const startLongPress = useCallback9(() => {
7167
7351
  if (disabled || isComplete || isDragging) return;
7168
7352
  setIsLongPressing(true);
7169
7353
  longPressStartRef.current = Date.now();
@@ -7181,7 +7365,7 @@ function SwipeToConfirmTokens({
7181
7365
  };
7182
7366
  longPressAnimationRef.current = requestAnimationFrame(animateProgress);
7183
7367
  }, [disabled, isComplete, isDragging, triggerConfirmation, cancelLongPress]);
7184
- const handleKeyDown = useCallback8(
7368
+ const handleKeyDown = useCallback9(
7185
7369
  (e2) => {
7186
7370
  if (disabled || isComplete) return;
7187
7371
  if (e2.key === "Enter" || e2.key === " ") {
@@ -7191,7 +7375,7 @@ function SwipeToConfirmTokens({
7191
7375
  },
7192
7376
  [disabled, isComplete, startLongPress]
7193
7377
  );
7194
- const handleKeyUp = useCallback8(
7378
+ const handleKeyUp = useCallback9(
7195
7379
  (e2) => {
7196
7380
  if (e2.key === "Enter" || e2.key === " ") {
7197
7381
  e2.preventDefault();
@@ -7200,7 +7384,7 @@ function SwipeToConfirmTokens({
7200
7384
  },
7201
7385
  [cancelLongPress]
7202
7386
  );
7203
- useEffect14(() => {
7387
+ useEffect15(() => {
7204
7388
  return () => {
7205
7389
  if (longPressTimerRef.current) clearTimeout(longPressTimerRef.current);
7206
7390
  if (longPressAnimationRef.current)
@@ -7211,15 +7395,15 @@ function SwipeToConfirmTokens({
7211
7395
  e2.preventDefault();
7212
7396
  handleDragStart();
7213
7397
  };
7214
- const handleMouseMove = useCallback8(
7398
+ const handleMouseMove = useCallback9(
7215
7399
  (e2) => handleDragMove(e2.clientX),
7216
7400
  [handleDragMove]
7217
7401
  );
7218
- const handleMouseUp = useCallback8(() => handleDragEnd(), [handleDragEnd]);
7402
+ const handleMouseUp = useCallback9(() => handleDragEnd(), [handleDragEnd]);
7219
7403
  const handleTouchStart = () => handleDragStart();
7220
7404
  const handleTouchMove = (e2) => handleDragMove(e2.touches[0].clientX);
7221
7405
  const handleTouchEnd = () => handleDragEnd();
7222
- useEffect14(() => {
7406
+ useEffect15(() => {
7223
7407
  if (isDragging) {
7224
7408
  window.addEventListener("mousemove", handleMouseMove);
7225
7409
  window.addEventListener("mouseup", handleMouseUp);
@@ -7231,7 +7415,29 @@ function SwipeToConfirmTokens({
7231
7415
  }, [isDragging, handleMouseMove, handleMouseUp]);
7232
7416
  const progress = getProgress();
7233
7417
  const effectiveProgress = isLongPressing ? longPressProgress : progress;
7234
- const getTokenInitials = (symbol) => symbol?.slice(0, 2).toUpperCase();
7418
+ const [blinkOpacity, setBlinkOpacity] = useState16(1);
7419
+ useEffect15(() => {
7420
+ if (disabled || isComplete || isDragging || isLongPressing) {
7421
+ setBlinkOpacity(1);
7422
+ return;
7423
+ }
7424
+ let direction = -1;
7425
+ const interval = setInterval(() => {
7426
+ setBlinkOpacity((prev) => {
7427
+ const newVal = prev + direction * 0.8;
7428
+ if (newVal <= 0.2) {
7429
+ direction = 1;
7430
+ return 0.2;
7431
+ }
7432
+ if (newVal >= 1) {
7433
+ direction = -1;
7434
+ return 1;
7435
+ }
7436
+ return newVal;
7437
+ });
7438
+ }, 700);
7439
+ return () => clearInterval(interval);
7440
+ }, [disabled, isComplete, isDragging, isLongPressing]);
7235
7441
  const getAriaLabel = () => {
7236
7442
  if (!isWalletConnected) return "Connect your wallet to deposit";
7237
7443
  if (isComplete) return "Transaction confirmed";
@@ -7451,27 +7657,52 @@ function SwipeToConfirmTokens({
7451
7657
  onTouchStart: handleTouchStart,
7452
7658
  onTouchMove: handleTouchMove,
7453
7659
  onTouchEnd: handleTouchEnd,
7454
- children: fromToken.iconUrl ? /* @__PURE__ */ jsx9(
7455
- "img",
7660
+ children: /* @__PURE__ */ jsx9(
7661
+ ImageLoader,
7456
7662
  {
7457
- src: fromToken.iconUrl,
7663
+ src: fromToken.iconUrl || "",
7458
7664
  alt: fromToken.symbol,
7459
- style: {
7665
+ imgStyle: {
7460
7666
  width: "2.5rem",
7461
7667
  height: "2.5rem",
7462
7668
  objectFit: "contain",
7463
7669
  borderRadius: "9999px"
7464
- }
7465
- }
7466
- ) : /* @__PURE__ */ jsx9(
7467
- "span",
7468
- {
7469
- style: {
7470
- fontSize: fontSize.sm,
7471
- fontWeight: fontWeight.bold,
7472
- color: colors.white
7473
7670
  },
7474
- children: getTokenInitials(fromToken.symbol)
7671
+ retry: 1,
7672
+ Fallback: /* @__PURE__ */ jsx9(
7673
+ "span",
7674
+ {
7675
+ style: {
7676
+ fontSize: fontSize.sm,
7677
+ fontWeight: fontWeight.bold,
7678
+ color: colors.white,
7679
+ opacity: blinkOpacity,
7680
+ transition: "opacity 0.5s ease-in-out"
7681
+ },
7682
+ children: /* @__PURE__ */ jsx9(
7683
+ "svg",
7684
+ {
7685
+ style: {
7686
+ width: "2rem",
7687
+ height: "2rem",
7688
+ color: colors.zinc[500]
7689
+ },
7690
+ fill: "none",
7691
+ stroke: "currentColor",
7692
+ viewBox: "0 0 24 24",
7693
+ children: /* @__PURE__ */ jsx9(
7694
+ "path",
7695
+ {
7696
+ strokeLinecap: "round",
7697
+ strokeLinejoin: "round",
7698
+ strokeWidth: 2,
7699
+ d: "M9 5l7 7-7 7"
7700
+ }
7701
+ )
7702
+ }
7703
+ )
7704
+ }
7705
+ )
7475
7706
  }
7476
7707
  )
7477
7708
  }
@@ -7507,47 +7738,6 @@ function SwipeToConfirmTokens({
7507
7738
  }
7508
7739
  )
7509
7740
  }
7510
- ),
7511
- !toTokenIcon && !isComplete && /* @__PURE__ */ jsx9(
7512
- "div",
7513
- {
7514
- style: {
7515
- position: "absolute",
7516
- top: "50%",
7517
- transform: "translateY(-50%)",
7518
- width: "3rem",
7519
- height: "3rem",
7520
- borderRadius: "9999px",
7521
- display: "flex",
7522
- alignItems: "center",
7523
- justifyContent: "center",
7524
- transition: "opacity 0.2s",
7525
- right: `${padding}px`,
7526
- opacity: 0.3 + effectiveProgress * 0.7
7527
- },
7528
- children: /* @__PURE__ */ jsx9(
7529
- "svg",
7530
- {
7531
- style: {
7532
- width: "1.5rem",
7533
- height: "1.5rem",
7534
- color: colors.white
7535
- },
7536
- fill: "none",
7537
- stroke: "currentColor",
7538
- viewBox: "0 0 24 24",
7539
- children: /* @__PURE__ */ jsx9(
7540
- "path",
7541
- {
7542
- strokeLinecap: "round",
7543
- strokeLinejoin: "round",
7544
- strokeWidth: 2,
7545
- d: "M9 5l7 7-7 7"
7546
- }
7547
- )
7548
- }
7549
- )
7550
- }
7551
7741
  )
7552
7742
  ]
7553
7743
  }
@@ -7660,7 +7850,7 @@ function ThemeToggle({
7660
7850
  }
7661
7851
 
7662
7852
  // src/widget/components/Toast.tsx
7663
- import { useEffect as useEffect15, useState as useState17, useCallback as useCallback9 } from "react";
7853
+ import { useEffect as useEffect16, useState as useState17, useCallback as useCallback10 } from "react";
7664
7854
  import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
7665
7855
  var variantStyles = {
7666
7856
  default: {
@@ -7691,13 +7881,13 @@ function ToastItem({
7691
7881
  onDismiss
7692
7882
  }) {
7693
7883
  const [isExiting, setIsExiting] = useState17(false);
7694
- useEffect15(() => {
7884
+ useEffect16(() => {
7695
7885
  const timer = setTimeout(() => {
7696
7886
  setIsExiting(true);
7697
7887
  }, duration);
7698
7888
  return () => clearTimeout(timer);
7699
7889
  }, [duration]);
7700
- useEffect15(() => {
7890
+ useEffect16(() => {
7701
7891
  if (isExiting) {
7702
7892
  const exitTimer = setTimeout(() => {
7703
7893
  onDismiss(id);
@@ -7902,7 +8092,7 @@ toast.error = (title, description) => toast({ title, description, variant: "dest
7902
8092
  toast.success = (title, description) => toast({ title, description, variant: "success" });
7903
8093
  function ToastContainer() {
7904
8094
  const [activeToasts, setActiveToasts] = useState17([]);
7905
- useEffect15(() => {
8095
+ useEffect16(() => {
7906
8096
  const listener = (newToasts) => {
7907
8097
  setActiveToasts(newToasts);
7908
8098
  };
@@ -7914,7 +8104,7 @@ function ToastContainer() {
7914
8104
  }
7915
8105
  };
7916
8106
  }, []);
7917
- const handleDismiss = useCallback9((id) => {
8107
+ const handleDismiss = useCallback10((id) => {
7918
8108
  toasts = toasts.filter((t) => t.id !== id);
7919
8109
  notifyListeners();
7920
8110
  }, []);
@@ -7953,9 +8143,9 @@ function ToastContainer() {
7953
8143
  // src/widget/components/TokenSwipePill.tsx
7954
8144
  import React9, {
7955
8145
  useState as useState18,
7956
- useRef as useRef7,
7957
- useCallback as useCallback10,
7958
- useEffect as useEffect16,
8146
+ useRef as useRef8,
8147
+ useCallback as useCallback11,
8148
+ useEffect as useEffect17,
7959
8149
  useMemo as useMemo9
7960
8150
  } from "react";
7961
8151
  import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
@@ -7971,8 +8161,8 @@ function TokenSwipePill({
7971
8161
  }) {
7972
8162
  const [isDragging, setIsDragging] = useState18(false);
7973
8163
  const [dragOffset, setDragOffset] = useState18(0);
7974
- const startXRef = useRef7(0);
7975
- const containerRef = useRef7(null);
8164
+ const startXRef = useRef8(0);
8165
+ const containerRef = useRef8(null);
7976
8166
  const currentIndex = tokens.findIndex(
7977
8167
  (t) => normalizeAddress2(
7978
8168
  t.address,
@@ -7993,11 +8183,11 @@ function TokenSwipePill({
7993
8183
  }
7994
8184
  return pos;
7995
8185
  };
7996
- const handleDragStart = useCallback10((clientX) => {
8186
+ const handleDragStart = useCallback11((clientX) => {
7997
8187
  setIsDragging(true);
7998
8188
  startXRef.current = clientX;
7999
8189
  }, []);
8000
- const handleDragMove = useCallback10(
8190
+ const handleDragMove = useCallback11(
8001
8191
  (clientX) => {
8002
8192
  if (!isDragging) return;
8003
8193
  const delta = startXRef.current - clientX;
@@ -8005,7 +8195,7 @@ function TokenSwipePill({
8005
8195
  },
8006
8196
  [isDragging]
8007
8197
  );
8008
- const handleDragEnd = useCallback10(() => {
8198
+ const handleDragEnd = useCallback11(() => {
8009
8199
  if (!isDragging) return;
8010
8200
  setIsDragging(false);
8011
8201
  if (Math.abs(dragOffset) > swipeThreshold) {
@@ -8023,13 +8213,13 @@ function TokenSwipePill({
8023
8213
  e2.preventDefault();
8024
8214
  handleDragStart(e2.clientX);
8025
8215
  };
8026
- const handleMouseMove = useCallback10(
8216
+ const handleMouseMove = useCallback11(
8027
8217
  (e2) => {
8028
8218
  handleDragMove(e2.clientX);
8029
8219
  },
8030
8220
  [handleDragMove]
8031
8221
  );
8032
- const handleMouseUp = useCallback10(() => {
8222
+ const handleMouseUp = useCallback11(() => {
8033
8223
  handleDragEnd();
8034
8224
  }, [handleDragEnd]);
8035
8225
  const handleTouchStart = (e2) => {
@@ -8043,7 +8233,7 @@ function TokenSwipePill({
8043
8233
  const handleTouchEnd = () => {
8044
8234
  handleDragEnd();
8045
8235
  };
8046
- useEffect16(() => {
8236
+ useEffect17(() => {
8047
8237
  if (isDragging) {
8048
8238
  window.addEventListener("mousemove", handleMouseMove);
8049
8239
  window.addEventListener("mouseup", handleMouseUp);
@@ -8054,8 +8244,8 @@ function TokenSwipePill({
8054
8244
  }
8055
8245
  }, [isDragging, handleMouseMove, handleMouseUp]);
8056
8246
  const visualOffset = Math.max(-40, Math.min(40, dragOffset * 0.5));
8057
- const getTokenInitials = (symbol) => {
8058
- return symbol?.slice(0, 2).toUpperCase();
8247
+ const getChainInitials = (chain) => {
8248
+ return chain?.slice(0, 2).toUpperCase();
8059
8249
  };
8060
8250
  const chainBadge = useMemo9(() => {
8061
8251
  const url = selectedToken.chainData?.chainIconURI || selectedToken.chainData?.iconUrl;
@@ -8082,6 +8272,7 @@ function TokenSwipePill({
8082
8272
  alignItems: "flex-start",
8083
8273
  gap: spacing[2],
8084
8274
  padding: `${spacing[1.5]} ${spacing[4]}`,
8275
+ minWidth: "16.875rem",
8085
8276
  backgroundColor: colors.background,
8086
8277
  borderRadius: borderRadius.full,
8087
8278
  border: `1px solid ${colors.border}`,
@@ -8102,7 +8293,8 @@ function TokenSwipePill({
8102
8293
  style: {
8103
8294
  display: "flex",
8104
8295
  flexDirection: "column",
8105
- alignItems: "center"
8296
+ alignItems: "center",
8297
+ width: "70%"
8106
8298
  },
8107
8299
  children: [
8108
8300
  /* @__PURE__ */ jsxs9(
@@ -8182,26 +8374,31 @@ function TokenSwipePill({
8182
8374
  alignItems: "center",
8183
8375
  justifyContent: "center"
8184
8376
  },
8185
- children: validateIconUrl(token.iconUrl, isCenter) ? /* @__PURE__ */ jsx12(
8186
- "img",
8377
+ children: /* @__PURE__ */ jsx12(
8378
+ ImageLoader,
8187
8379
  {
8188
8380
  src: validateIconUrl(token.iconUrl, isCenter),
8189
8381
  alt: token.symbol,
8190
- style: {
8382
+ imgStyle: {
8191
8383
  width: "2rem",
8192
8384
  height: "2rem",
8193
8385
  objectFit: "contain"
8194
- }
8195
- }
8196
- ) : /* @__PURE__ */ jsx12(
8197
- "span",
8198
- {
8199
- style: {
8200
- fontSize: fontSize.xs,
8201
- fontWeight: fontWeight.bold,
8202
- color: colors.zinc[800]
8203
8386
  },
8204
- children: getTokenInitials(token.symbol)
8387
+ Fallback: /* @__PURE__ */ jsx12(
8388
+ "span",
8389
+ {
8390
+ style: {
8391
+ fontSize: fontSize.xs,
8392
+ fontWeight: fontWeight.bold,
8393
+ color: colors.zinc[800],
8394
+ width: "2rem",
8395
+ height: "2rem",
8396
+ objectFit: "contain",
8397
+ textAlign: "center"
8398
+ },
8399
+ children: token.symbol
8400
+ }
8401
+ )
8205
8402
  }
8206
8403
  )
8207
8404
  }
@@ -8224,16 +8421,27 @@ function TokenSwipePill({
8224
8421
  overflow: "hidden"
8225
8422
  },
8226
8423
  children: /* @__PURE__ */ jsx12(
8227
- "img",
8424
+ ImageLoader,
8228
8425
  {
8229
- src: chainBadge,
8426
+ src: chainBadge || "",
8230
8427
  alt: selectedToken.chainData?.networkName,
8231
- style: {
8428
+ imgStyle: {
8232
8429
  width: "0.75rem",
8233
8430
  height: "0.75rem",
8234
8431
  borderRadius: "9999px",
8235
8432
  objectFit: "cover"
8236
- }
8433
+ },
8434
+ Fallback: /* @__PURE__ */ jsx12(
8435
+ "span",
8436
+ {
8437
+ style: {
8438
+ fontSize: "10px"
8439
+ },
8440
+ children: getChainInitials(
8441
+ selectedToken.chainData?.networkName
8442
+ )
8443
+ }
8444
+ )
8237
8445
  }
8238
8446
  )
8239
8447
  }
@@ -8713,7 +8921,7 @@ function TransactionSteps({
8713
8921
  }
8714
8922
 
8715
8923
  // src/widget/components/WidgetContainer.tsx
8716
- import { useEffect as useEffect17, useState as useState19 } from "react";
8924
+ import { useEffect as useEffect18, useState as useState19 } from "react";
8717
8925
  import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
8718
8926
  var INJECTED_STYLES = ALL_THEME_STYLES + ALL_ANIMATION_STYLES;
8719
8927
  function WidgetContainer({
@@ -8723,7 +8931,7 @@ function WidgetContainer({
8723
8931
  style
8724
8932
  }) {
8725
8933
  const [resolvedTheme, setResolvedTheme] = useState19("light");
8726
- useEffect17(() => {
8934
+ useEffect18(() => {
8727
8935
  if (theme === "system") {
8728
8936
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
8729
8937
  setResolvedTheme(mediaQuery.matches ? "dark" : "light");
@@ -8966,8 +9174,147 @@ function WidgetSecurityFooter({
8966
9174
  );
8967
9175
  }
8968
9176
 
8969
- // src/widget/components/Skeletons/LoadingSkeleton.tsx
9177
+ // src/widget/components/ImageLoader.tsx
9178
+ import { useEffect as useEffect19, useMemo as useMemo11, useRef as useRef9, useState as useState20 } from "react";
8970
9179
  import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
9180
+ function Skeleton({
9181
+ background,
9182
+ height,
9183
+ borderRadius: borderRadius2
9184
+ }) {
9185
+ return /* @__PURE__ */ jsx17(
9186
+ "div",
9187
+ {
9188
+ style: {
9189
+ background: background || "#eee",
9190
+ height: height || "50px",
9191
+ borderRadius: borderRadius2 || "100%"
9192
+ }
9193
+ }
9194
+ );
9195
+ }
9196
+ function ImageLoader({
9197
+ src,
9198
+ alt = "",
9199
+ retry = 0,
9200
+ retryDelay = 1e3,
9201
+ lazy: lazy2 = true,
9202
+ Fallback = null,
9203
+ // skeleton = null,
9204
+ imgStyle,
9205
+ onLoad,
9206
+ onError
9207
+ }) {
9208
+ const [status, setStatus] = useState20("idle");
9209
+ const [attempt, setAttempt] = useState20(0);
9210
+ const [srcIsEmpty, setSrcIsEmpty] = useState20(false);
9211
+ const imgRef = useRef9(null);
9212
+ const observerRef = useRef9(null);
9213
+ useEffect19(() => {
9214
+ if (status === "error" && attempt < retry) {
9215
+ const timer = setTimeout(() => {
9216
+ setAttempt((prev) => prev + 1);
9217
+ setStatus("loading");
9218
+ }, retryDelay);
9219
+ return () => clearTimeout(timer);
9220
+ }
9221
+ }, [status, attempt, retry, retryDelay]);
9222
+ const loadImage = () => {
9223
+ if (!src) {
9224
+ setSrcIsEmpty(true);
9225
+ return;
9226
+ }
9227
+ setStatus("loading");
9228
+ const img = new Image();
9229
+ img.src = src;
9230
+ img.onload = () => {
9231
+ setStatus("success");
9232
+ onLoad?.();
9233
+ };
9234
+ img.onerror = () => {
9235
+ setStatus("error");
9236
+ onError?.();
9237
+ };
9238
+ };
9239
+ useEffect19(() => {
9240
+ if (!lazy2) {
9241
+ setTimeout(() => {
9242
+ loadImage();
9243
+ }, 0);
9244
+ return;
9245
+ }
9246
+ observerRef.current = new IntersectionObserver(
9247
+ (entries) => {
9248
+ entries.forEach((entry) => {
9249
+ if (entry.isIntersecting) {
9250
+ loadImage();
9251
+ observerRef.current?.disconnect();
9252
+ }
9253
+ });
9254
+ },
9255
+ { threshold: 0.1 }
9256
+ );
9257
+ if (imgRef.current) {
9258
+ observerRef.current.observe(imgRef.current);
9259
+ }
9260
+ return () => observerRef.current?.disconnect();
9261
+ }, [lazy2, src, loadImage]);
9262
+ const showFallback = useMemo11(() => {
9263
+ return (status === "error" && attempt >= retry || srcIsEmpty) && Fallback;
9264
+ }, [status, attempt, retry, srcIsEmpty, Fallback]);
9265
+ return /* @__PURE__ */ jsxs14("div", { ref: imgRef, style: { position: "relative" }, children: [
9266
+ status === "loading" && /* @__PURE__ */ jsx17(
9267
+ Skeleton,
9268
+ {
9269
+ height: imgStyle?.height,
9270
+ borderRadius: imgStyle?.borderRadius
9271
+ }
9272
+ ),
9273
+ status === "success" && /* @__PURE__ */ jsx17(
9274
+ "img",
9275
+ {
9276
+ src,
9277
+ alt,
9278
+ style: {
9279
+ // Css guards to prevent external styles from interfering with image rendering
9280
+ all: "revert",
9281
+ // Undo any inherited/global resets (e.g. Tailwind, normalize.css)
9282
+ display: "block",
9283
+ // Prevent inline baseline gap
9284
+ width: "100%",
9285
+ // Restore intended sizing
9286
+ maxWidth: "100%",
9287
+ // Prevent overflow
9288
+ height: "auto",
9289
+ // Maintain aspect ratio
9290
+ border: "none",
9291
+ // Strip any border resets
9292
+ padding: 0,
9293
+ // Strip padding resets
9294
+ margin: 0,
9295
+ // Strip margin resets
9296
+ objectFit: "cover",
9297
+ // Preserve visual intent
9298
+ verticalAlign: "middle",
9299
+ // Guard against inline stripping
9300
+ filter: "none",
9301
+ // Prevent inherited filter washes
9302
+ opacity: 1,
9303
+ // Prevent inherited opacity stripping
9304
+ mixBlendMode: "normal",
9305
+ // Prevent blend mode interference
9306
+ colorScheme: "normal",
9307
+ // Prevent dark-mode inversion
9308
+ ...imgStyle
9309
+ }
9310
+ }
9311
+ ),
9312
+ showFallback && Fallback
9313
+ ] });
9314
+ }
9315
+
9316
+ // src/widget/components/Skeletons/LoadingSkeleton.tsx
9317
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
8971
9318
  var containerStyle = {
8972
9319
  display: "flex",
8973
9320
  flexDirection: "column",
@@ -9003,11 +9350,11 @@ var lineSmStyle = {
9003
9350
  function LoadingSkeleton({
9004
9351
  style
9005
9352
  }) {
9006
- return /* @__PURE__ */ jsx17("div", { style: { ...containerStyle, ...style }, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs14("div", { style: rowStyle, children: [
9007
- /* @__PURE__ */ jsx17("div", { style: circleStyle, className: "tw-animate-pulse" }),
9008
- /* @__PURE__ */ jsxs14("div", { style: { flex: 1 }, children: [
9009
- /* @__PURE__ */ jsx17("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
9010
- /* @__PURE__ */ jsx17(
9353
+ return /* @__PURE__ */ jsx18("div", { style: { ...containerStyle, ...style }, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs15("div", { style: rowStyle, children: [
9354
+ /* @__PURE__ */ jsx18("div", { style: circleStyle, className: "tw-animate-pulse" }),
9355
+ /* @__PURE__ */ jsxs15("div", { style: { flex: 1 }, children: [
9356
+ /* @__PURE__ */ jsx18("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
9357
+ /* @__PURE__ */ jsx18(
9011
9358
  "div",
9012
9359
  {
9013
9360
  style: { ...lineSmStyle, marginTop: spacing[2] },
@@ -9034,14 +9381,14 @@ function clearPersistedState() {
9034
9381
  }
9035
9382
 
9036
9383
  // src/widget/app/WidgetShellOverlays.tsx
9037
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
9384
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
9038
9385
  function ConfirmCloseDialog({
9039
9386
  open,
9040
9387
  onConfirm,
9041
9388
  onCancel,
9042
9389
  theme
9043
9390
  }) {
9044
- return /* @__PURE__ */ jsx18(
9391
+ return /* @__PURE__ */ jsx19(
9045
9392
  Dialog,
9046
9393
  {
9047
9394
  open,
@@ -9060,7 +9407,7 @@ function InitErrorOverlay({
9060
9407
  onRefresh
9061
9408
  }) {
9062
9409
  if (!open) return null;
9063
- return /* @__PURE__ */ jsx18(
9410
+ return /* @__PURE__ */ jsx19(
9064
9411
  "div",
9065
9412
  {
9066
9413
  role: "dialog",
@@ -9078,7 +9425,7 @@ function InitErrorOverlay({
9078
9425
  padding: spacing[6],
9079
9426
  borderRadius: "20px"
9080
9427
  },
9081
- children: /* @__PURE__ */ jsxs15(
9428
+ children: /* @__PURE__ */ jsxs16(
9082
9429
  "div",
9083
9430
  {
9084
9431
  style: {
@@ -9093,7 +9440,7 @@ function InitErrorOverlay({
9093
9440
  border: `1px solid ${colors.border}`
9094
9441
  },
9095
9442
  children: [
9096
- /* @__PURE__ */ jsx18(
9443
+ /* @__PURE__ */ jsx19(
9097
9444
  "h2",
9098
9445
  {
9099
9446
  id: "init-error-title",
@@ -9105,7 +9452,7 @@ function InitErrorOverlay({
9105
9452
  children: "API key validation failed"
9106
9453
  }
9107
9454
  ),
9108
- /* @__PURE__ */ jsx18(
9455
+ /* @__PURE__ */ jsx19(
9109
9456
  "p",
9110
9457
  {
9111
9458
  id: "init-error-description",
@@ -9117,7 +9464,7 @@ function InitErrorOverlay({
9117
9464
  children: "We could not validate your Trustware API key. Please refresh to retry."
9118
9465
  }
9119
9466
  ),
9120
- /* @__PURE__ */ jsx18(
9467
+ /* @__PURE__ */ jsx19(
9121
9468
  "button",
9122
9469
  {
9123
9470
  onClick: onRefresh,
@@ -9148,7 +9495,7 @@ function InitErrorOverlay({
9148
9495
  }
9149
9496
 
9150
9497
  // src/widget/app/WidgetRouter.tsx
9151
- import { useMemo as useMemo21 } from "react";
9498
+ import { useMemo as useMemo22 } from "react";
9152
9499
 
9153
9500
  // src/widget/helpers/tokenAmount.ts
9154
9501
  function rawToDecimal(rawAmount, decimals) {
@@ -9211,12 +9558,12 @@ function resolveChainLabel(chain) {
9211
9558
  }
9212
9559
 
9213
9560
  // src/widget/features/token-selection/components/AvailableTokenListItem.tsx
9214
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
9561
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
9215
9562
  function AvailableTokenListItem({
9216
9563
  onSelect,
9217
9564
  token
9218
9565
  }) {
9219
- return /* @__PURE__ */ jsxs16(
9566
+ return /* @__PURE__ */ jsxs17(
9220
9567
  "button",
9221
9568
  {
9222
9569
  type: "button",
@@ -9234,7 +9581,7 @@ function AvailableTokenListItem({
9234
9581
  cursor: "pointer"
9235
9582
  },
9236
9583
  children: [
9237
- token.iconUrl ? /* @__PURE__ */ jsx19(
9584
+ token.iconUrl ? /* @__PURE__ */ jsx20(
9238
9585
  "img",
9239
9586
  {
9240
9587
  src: token.iconUrl,
@@ -9255,7 +9602,7 @@ function AvailableTokenListItem({
9255
9602
  }
9256
9603
  }
9257
9604
  ) : null,
9258
- /* @__PURE__ */ jsx19(
9605
+ /* @__PURE__ */ jsx20(
9259
9606
  "div",
9260
9607
  {
9261
9608
  style: {
@@ -9268,7 +9615,7 @@ function AvailableTokenListItem({
9268
9615
  flexShrink: 0,
9269
9616
  display: token.iconUrl ? "none" : "flex"
9270
9617
  },
9271
- children: /* @__PURE__ */ jsx19(
9618
+ children: /* @__PURE__ */ jsx20(
9272
9619
  "span",
9273
9620
  {
9274
9621
  style: {
@@ -9281,8 +9628,8 @@ function AvailableTokenListItem({
9281
9628
  )
9282
9629
  }
9283
9630
  ),
9284
- /* @__PURE__ */ jsxs16("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9285
- /* @__PURE__ */ jsx19(
9631
+ /* @__PURE__ */ jsxs17("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9632
+ /* @__PURE__ */ jsx20(
9286
9633
  "div",
9287
9634
  {
9288
9635
  style: {
@@ -9290,7 +9637,7 @@ function AvailableTokenListItem({
9290
9637
  alignItems: "center",
9291
9638
  gap: spacing[1.5]
9292
9639
  },
9293
- children: /* @__PURE__ */ jsx19(
9640
+ children: /* @__PURE__ */ jsx20(
9294
9641
  "span",
9295
9642
  {
9296
9643
  style: {
@@ -9306,7 +9653,7 @@ function AvailableTokenListItem({
9306
9653
  )
9307
9654
  }
9308
9655
  ),
9309
- /* @__PURE__ */ jsx19(
9656
+ /* @__PURE__ */ jsx20(
9310
9657
  "span",
9311
9658
  {
9312
9659
  style: {
@@ -9321,7 +9668,7 @@ function AvailableTokenListItem({
9321
9668
  }
9322
9669
  )
9323
9670
  ] }),
9324
- token.balance !== void 0 ? /* @__PURE__ */ jsx19("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ jsx19(
9671
+ token.balance !== void 0 ? /* @__PURE__ */ jsx20("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ jsx20(
9325
9672
  "span",
9326
9673
  {
9327
9674
  style: {
@@ -9332,7 +9679,7 @@ function AvailableTokenListItem({
9332
9679
  children: formatTokenBalance(token.balance, token.decimals)
9333
9680
  }
9334
9681
  ) }) : null,
9335
- /* @__PURE__ */ jsx19(
9682
+ /* @__PURE__ */ jsx20(
9336
9683
  "svg",
9337
9684
  {
9338
9685
  style: {
@@ -9345,7 +9692,7 @@ function AvailableTokenListItem({
9345
9692
  fill: "none",
9346
9693
  stroke: "currentColor",
9347
9694
  strokeWidth: 2,
9348
- children: /* @__PURE__ */ jsx19("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9695
+ children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9349
9696
  }
9350
9697
  )
9351
9698
  ]
@@ -9354,7 +9701,7 @@ function AvailableTokenListItem({
9354
9701
  }
9355
9702
 
9356
9703
  // src/widget/features/token-selection/components/ChainSelectorPanel.tsx
9357
- import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
9704
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
9358
9705
  function ChainItem({
9359
9706
  chain,
9360
9707
  index,
@@ -9363,7 +9710,7 @@ function ChainItem({
9363
9710
  }) {
9364
9711
  const key = chain.id ?? chain.chainId ?? chain.networkIdentifier ?? `chain-${index}`;
9365
9712
  const label = resolveChainLabel(chain);
9366
- return /* @__PURE__ */ jsxs17(
9713
+ return /* @__PURE__ */ jsxs18(
9367
9714
  "button",
9368
9715
  {
9369
9716
  type: "button",
@@ -9385,7 +9732,7 @@ function ChainItem({
9385
9732
  }
9386
9733
  },
9387
9734
  children: [
9388
- chain.chainIconURI ? /* @__PURE__ */ jsx20(
9735
+ chain.chainIconURI ? /* @__PURE__ */ jsx21(
9389
9736
  "img",
9390
9737
  {
9391
9738
  src: chain.chainIconURI,
@@ -9398,7 +9745,7 @@ function ChainItem({
9398
9745
  flexShrink: 0
9399
9746
  }
9400
9747
  }
9401
- ) : /* @__PURE__ */ jsx20(
9748
+ ) : /* @__PURE__ */ jsx21(
9402
9749
  "div",
9403
9750
  {
9404
9751
  style: {
@@ -9411,7 +9758,7 @@ function ChainItem({
9411
9758
  justifyContent: "center",
9412
9759
  flexShrink: 0
9413
9760
  },
9414
- children: /* @__PURE__ */ jsx20(
9761
+ children: /* @__PURE__ */ jsx21(
9415
9762
  "span",
9416
9763
  {
9417
9764
  style: {
@@ -9424,7 +9771,7 @@ function ChainItem({
9424
9771
  )
9425
9772
  }
9426
9773
  ),
9427
- /* @__PURE__ */ jsx20("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ jsx20(
9774
+ /* @__PURE__ */ jsx21("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ jsx21(
9428
9775
  "span",
9429
9776
  {
9430
9777
  style: {
@@ -9439,7 +9786,7 @@ function ChainItem({
9439
9786
  children: label
9440
9787
  }
9441
9788
  ) }),
9442
- isSelected && /* @__PURE__ */ jsx20(
9789
+ isSelected && /* @__PURE__ */ jsx21(
9443
9790
  "div",
9444
9791
  {
9445
9792
  style: {
@@ -9452,7 +9799,7 @@ function ChainItem({
9452
9799
  justifyContent: "center",
9453
9800
  flexShrink: 0
9454
9801
  },
9455
- children: /* @__PURE__ */ jsx20(
9802
+ children: /* @__PURE__ */ jsx21(
9456
9803
  "svg",
9457
9804
  {
9458
9805
  style: {
@@ -9464,7 +9811,7 @@ function ChainItem({
9464
9811
  fill: "none",
9465
9812
  stroke: "currentColor",
9466
9813
  strokeWidth: 3,
9467
- children: /* @__PURE__ */ jsx20(
9814
+ children: /* @__PURE__ */ jsx21(
9468
9815
  "path",
9469
9816
  {
9470
9817
  strokeLinecap: "round",
@@ -9489,7 +9836,7 @@ function ChainSelectorPanel({
9489
9836
  otherChains,
9490
9837
  popularChains
9491
9838
  }) {
9492
- return /* @__PURE__ */ jsxs17(
9839
+ return /* @__PURE__ */ jsxs18(
9493
9840
  "div",
9494
9841
  {
9495
9842
  style: {
@@ -9500,14 +9847,14 @@ function ChainSelectorPanel({
9500
9847
  overflow: "hidden"
9501
9848
  },
9502
9849
  children: [
9503
- /* @__PURE__ */ jsx20(
9850
+ /* @__PURE__ */ jsx21(
9504
9851
  "div",
9505
9852
  {
9506
9853
  style: {
9507
9854
  padding: `${spacing[2]} ${spacing[3]}`,
9508
9855
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
9509
9856
  },
9510
- children: /* @__PURE__ */ jsx20(
9857
+ children: /* @__PURE__ */ jsx21(
9511
9858
  "span",
9512
9859
  {
9513
9860
  style: {
@@ -9522,7 +9869,7 @@ function ChainSelectorPanel({
9522
9869
  )
9523
9870
  }
9524
9871
  ),
9525
- /* @__PURE__ */ jsx20(
9872
+ /* @__PURE__ */ jsx21(
9526
9873
  "div",
9527
9874
  {
9528
9875
  style: {
@@ -9530,7 +9877,7 @@ function ChainSelectorPanel({
9530
9877
  overflowY: "auto",
9531
9878
  padding: `${spacing[2]} ${spacing[1]}`
9532
9879
  },
9533
- children: isLoading ? /* @__PURE__ */ jsx20(
9880
+ children: isLoading ? /* @__PURE__ */ jsx21(
9534
9881
  "div",
9535
9882
  {
9536
9883
  style: {
@@ -9539,7 +9886,7 @@ function ChainSelectorPanel({
9539
9886
  gap: spacing[2],
9540
9887
  padding: `0 ${spacing[2]}`
9541
9888
  },
9542
- children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxs17(
9889
+ children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxs18(
9543
9890
  "div",
9544
9891
  {
9545
9892
  style: {
@@ -9549,7 +9896,7 @@ function ChainSelectorPanel({
9549
9896
  padding: `${spacing[2]} 0`
9550
9897
  },
9551
9898
  children: [
9552
- /* @__PURE__ */ jsx20(
9899
+ /* @__PURE__ */ jsx21(
9553
9900
  "div",
9554
9901
  {
9555
9902
  style: {
@@ -9561,7 +9908,7 @@ function ChainSelectorPanel({
9561
9908
  className: "tw-animate-pulse"
9562
9909
  }
9563
9910
  ),
9564
- /* @__PURE__ */ jsx20(
9911
+ /* @__PURE__ */ jsx21(
9565
9912
  "div",
9566
9913
  {
9567
9914
  style: {
@@ -9578,7 +9925,7 @@ function ChainSelectorPanel({
9578
9925
  i
9579
9926
  ))
9580
9927
  }
9581
- ) : error ? /* @__PURE__ */ jsxs17(
9928
+ ) : error ? /* @__PURE__ */ jsxs18(
9582
9929
  "div",
9583
9930
  {
9584
9931
  style: {
@@ -9586,8 +9933,8 @@ function ChainSelectorPanel({
9586
9933
  textAlign: "center"
9587
9934
  },
9588
9935
  children: [
9589
- /* @__PURE__ */ jsx20("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9590
- /* @__PURE__ */ jsx20(
9936
+ /* @__PURE__ */ jsx21("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9937
+ /* @__PURE__ */ jsx21(
9591
9938
  "button",
9592
9939
  {
9593
9940
  type: "button",
@@ -9606,9 +9953,9 @@ function ChainSelectorPanel({
9606
9953
  )
9607
9954
  ]
9608
9955
  }
9609
- ) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
9610
- popularChains.length > 0 && /* @__PURE__ */ jsxs17("div", { style: { marginBottom: spacing[2] }, children: [
9611
- /* @__PURE__ */ jsx20("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ jsx20(
9956
+ ) : /* @__PURE__ */ jsxs18(Fragment3, { children: [
9957
+ popularChains.length > 0 && /* @__PURE__ */ jsxs18("div", { style: { marginBottom: spacing[2] }, children: [
9958
+ /* @__PURE__ */ jsx21("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ jsx21(
9612
9959
  "span",
9613
9960
  {
9614
9961
  style: {
@@ -9621,7 +9968,7 @@ function ChainSelectorPanel({
9621
9968
  children: "Popular"
9622
9969
  }
9623
9970
  ) }),
9624
- popularChains.map((chain, idx) => /* @__PURE__ */ jsx20(
9971
+ popularChains.map((chain, idx) => /* @__PURE__ */ jsx21(
9625
9972
  ChainItem,
9626
9973
  {
9627
9974
  chain,
@@ -9634,15 +9981,15 @@ function ChainSelectorPanel({
9634
9981
  )
9635
9982
  ))
9636
9983
  ] }),
9637
- otherChains.length > 0 && /* @__PURE__ */ jsxs17("div", { children: [
9638
- popularChains.length > 0 && /* @__PURE__ */ jsx20(
9984
+ otherChains.length > 0 && /* @__PURE__ */ jsxs18("div", { children: [
9985
+ popularChains.length > 0 && /* @__PURE__ */ jsx21(
9639
9986
  "div",
9640
9987
  {
9641
9988
  style: {
9642
9989
  padding: `${spacing[1.5]} ${spacing[3]}`,
9643
9990
  marginTop: spacing[2]
9644
9991
  },
9645
- children: /* @__PURE__ */ jsx20(
9992
+ children: /* @__PURE__ */ jsx21(
9646
9993
  "span",
9647
9994
  {
9648
9995
  style: {
@@ -9657,7 +10004,7 @@ function ChainSelectorPanel({
9657
10004
  )
9658
10005
  }
9659
10006
  ),
9660
- otherChains.map((chain, idx) => /* @__PURE__ */ jsx20(
10007
+ otherChains.map((chain, idx) => /* @__PURE__ */ jsx21(
9661
10008
  ChainItem,
9662
10009
  {
9663
10010
  chain,
@@ -9670,14 +10017,14 @@ function ChainSelectorPanel({
9670
10017
  )
9671
10018
  ))
9672
10019
  ] }),
9673
- popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ jsx20(
10020
+ popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ jsx21(
9674
10021
  "div",
9675
10022
  {
9676
10023
  style: {
9677
10024
  padding: `${spacing[3]} ${spacing[4]}`,
9678
10025
  textAlign: "center"
9679
10026
  },
9680
- children: /* @__PURE__ */ jsx20(
10027
+ children: /* @__PURE__ */ jsx21(
9681
10028
  "p",
9682
10029
  {
9683
10030
  style: {
@@ -9698,13 +10045,13 @@ function ChainSelectorPanel({
9698
10045
  }
9699
10046
 
9700
10047
  // src/widget/features/token-selection/components/TokenSearchInput.tsx
9701
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
10048
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
9702
10049
  function TokenSearchInput({
9703
10050
  searchQuery,
9704
10051
  setSearchQuery
9705
10052
  }) {
9706
- return /* @__PURE__ */ jsxs18("div", { style: { position: "relative" }, children: [
9707
- /* @__PURE__ */ jsxs18(
10053
+ return /* @__PURE__ */ jsxs19("div", { style: { position: "relative" }, children: [
10054
+ /* @__PURE__ */ jsxs19(
9708
10055
  "svg",
9709
10056
  {
9710
10057
  style: {
@@ -9721,12 +10068,12 @@ function TokenSearchInput({
9721
10068
  stroke: "currentColor",
9722
10069
  strokeWidth: 2,
9723
10070
  children: [
9724
- /* @__PURE__ */ jsx21("circle", { cx: "11", cy: "11", r: "8" }),
9725
- /* @__PURE__ */ jsx21("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
10071
+ /* @__PURE__ */ jsx22("circle", { cx: "11", cy: "11", r: "8" }),
10072
+ /* @__PURE__ */ jsx22("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
9726
10073
  ]
9727
10074
  }
9728
10075
  ),
9729
- /* @__PURE__ */ jsx21(
10076
+ /* @__PURE__ */ jsx22(
9730
10077
  "input",
9731
10078
  {
9732
10079
  type: "text",
@@ -9749,7 +10096,7 @@ function TokenSearchInput({
9749
10096
  }
9750
10097
  }
9751
10098
  ),
9752
- searchQuery ? /* @__PURE__ */ jsx21(
10099
+ searchQuery ? /* @__PURE__ */ jsx22(
9753
10100
  "button",
9754
10101
  {
9755
10102
  type: "button",
@@ -9767,7 +10114,7 @@ function TokenSearchInput({
9767
10114
  transition: "background-color 0.2s"
9768
10115
  },
9769
10116
  "aria-label": "Clear search",
9770
- children: /* @__PURE__ */ jsx21(
10117
+ children: /* @__PURE__ */ jsx22(
9771
10118
  "svg",
9772
10119
  {
9773
10120
  style: {
@@ -9779,7 +10126,7 @@ function TokenSearchInput({
9779
10126
  fill: "none",
9780
10127
  stroke: "currentColor",
9781
10128
  strokeWidth: 2,
9782
- children: /* @__PURE__ */ jsx21("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
10129
+ children: /* @__PURE__ */ jsx22("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
9783
10130
  }
9784
10131
  )
9785
10132
  }
@@ -9788,7 +10135,7 @@ function TokenSearchInput({
9788
10135
  }
9789
10136
 
9790
10137
  // src/widget/features/token-selection/components/TokenSelectorStateView.tsx
9791
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
10138
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
9792
10139
  function TokenSelectorStateView({
9793
10140
  isLoadingTokens,
9794
10141
  searchQuery,
@@ -9797,7 +10144,7 @@ function TokenSelectorStateView({
9797
10144
  tokensError
9798
10145
  }) {
9799
10146
  if (isLoadingTokens) {
9800
- return /* @__PURE__ */ jsx22(
10147
+ return /* @__PURE__ */ jsx23(
9801
10148
  "div",
9802
10149
  {
9803
10150
  style: {
@@ -9806,7 +10153,7 @@ function TokenSelectorStateView({
9806
10153
  gap: spacing[2],
9807
10154
  padding: `0 ${spacing[2]}`
9808
10155
  },
9809
- children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsxs19(
10156
+ children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsxs20(
9810
10157
  "div",
9811
10158
  {
9812
10159
  style: {
@@ -9816,7 +10163,7 @@ function TokenSelectorStateView({
9816
10163
  padding: `${spacing[2.5]} ${spacing[2]}`
9817
10164
  },
9818
10165
  children: [
9819
- /* @__PURE__ */ jsx22(
10166
+ /* @__PURE__ */ jsx23(
9820
10167
  "div",
9821
10168
  {
9822
10169
  style: {
@@ -9828,8 +10175,8 @@ function TokenSelectorStateView({
9828
10175
  className: "tw-animate-pulse"
9829
10176
  }
9830
10177
  ),
9831
- /* @__PURE__ */ jsxs19("div", { style: { flex: 1 }, children: [
9832
- /* @__PURE__ */ jsx22(
10178
+ /* @__PURE__ */ jsxs20("div", { style: { flex: 1 }, children: [
10179
+ /* @__PURE__ */ jsx23(
9833
10180
  "div",
9834
10181
  {
9835
10182
  style: {
@@ -9842,7 +10189,7 @@ function TokenSelectorStateView({
9842
10189
  className: "tw-animate-pulse"
9843
10190
  }
9844
10191
  ),
9845
- /* @__PURE__ */ jsx22(
10192
+ /* @__PURE__ */ jsx23(
9846
10193
  "div",
9847
10194
  {
9848
10195
  style: {
@@ -9855,7 +10202,7 @@ function TokenSelectorStateView({
9855
10202
  }
9856
10203
  )
9857
10204
  ] }),
9858
- /* @__PURE__ */ jsx22(
10205
+ /* @__PURE__ */ jsx23(
9859
10206
  "div",
9860
10207
  {
9861
10208
  style: {
@@ -9875,7 +10222,7 @@ function TokenSelectorStateView({
9875
10222
  );
9876
10223
  }
9877
10224
  if (state === "no-chain") {
9878
- return /* @__PURE__ */ jsx22(
10225
+ return /* @__PURE__ */ jsx23(
9879
10226
  "div",
9880
10227
  {
9881
10228
  style: {
@@ -9885,8 +10232,8 @@ function TokenSelectorStateView({
9885
10232
  justifyContent: "center",
9886
10233
  padding: `0 ${spacing[4]}`
9887
10234
  },
9888
- children: /* @__PURE__ */ jsxs19("div", { style: { textAlign: "center" }, children: [
9889
- /* @__PURE__ */ jsx22(
10235
+ children: /* @__PURE__ */ jsxs20("div", { style: { textAlign: "center" }, children: [
10236
+ /* @__PURE__ */ jsx23(
9890
10237
  "svg",
9891
10238
  {
9892
10239
  style: {
@@ -9899,7 +10246,7 @@ function TokenSelectorStateView({
9899
10246
  fill: "none",
9900
10247
  stroke: "currentColor",
9901
10248
  strokeWidth: 1.5,
9902
- children: /* @__PURE__ */ jsx22(
10249
+ children: /* @__PURE__ */ jsx23(
9903
10250
  "path",
9904
10251
  {
9905
10252
  strokeLinecap: "round",
@@ -9909,7 +10256,7 @@ function TokenSelectorStateView({
9909
10256
  )
9910
10257
  }
9911
10258
  ),
9912
- /* @__PURE__ */ jsx22(
10259
+ /* @__PURE__ */ jsx23(
9913
10260
  "p",
9914
10261
  {
9915
10262
  style: {
@@ -9924,7 +10271,7 @@ function TokenSelectorStateView({
9924
10271
  );
9925
10272
  }
9926
10273
  if (state === "error") {
9927
- return /* @__PURE__ */ jsx22(
10274
+ return /* @__PURE__ */ jsx23(
9928
10275
  "div",
9929
10276
  {
9930
10277
  style: {
@@ -9934,8 +10281,8 @@ function TokenSelectorStateView({
9934
10281
  justifyContent: "center",
9935
10282
  padding: `0 ${spacing[4]}`
9936
10283
  },
9937
- children: /* @__PURE__ */ jsxs19("div", { style: { textAlign: "center" }, children: [
9938
- /* @__PURE__ */ jsxs19(
10284
+ children: /* @__PURE__ */ jsxs20("div", { style: { textAlign: "center" }, children: [
10285
+ /* @__PURE__ */ jsxs20(
9939
10286
  "svg",
9940
10287
  {
9941
10288
  style: {
@@ -9949,12 +10296,12 @@ function TokenSelectorStateView({
9949
10296
  stroke: "currentColor",
9950
10297
  strokeWidth: 2,
9951
10298
  children: [
9952
- /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "10" }),
9953
- /* @__PURE__ */ jsx22("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
10299
+ /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
10300
+ /* @__PURE__ */ jsx23("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
9954
10301
  ]
9955
10302
  }
9956
10303
  ),
9957
- /* @__PURE__ */ jsx22(
10304
+ /* @__PURE__ */ jsx23(
9958
10305
  "p",
9959
10306
  {
9960
10307
  style: {
@@ -9965,7 +10312,7 @@ function TokenSelectorStateView({
9965
10312
  children: tokensError
9966
10313
  }
9967
10314
  ),
9968
- /* @__PURE__ */ jsx22(
10315
+ /* @__PURE__ */ jsx23(
9969
10316
  "button",
9970
10317
  {
9971
10318
  type: "button",
@@ -9986,7 +10333,7 @@ function TokenSelectorStateView({
9986
10333
  }
9987
10334
  );
9988
10335
  }
9989
- return /* @__PURE__ */ jsx22(
10336
+ return /* @__PURE__ */ jsx23(
9990
10337
  "div",
9991
10338
  {
9992
10339
  style: {
@@ -9996,8 +10343,8 @@ function TokenSelectorStateView({
9996
10343
  justifyContent: "center",
9997
10344
  padding: `0 ${spacing[4]}`
9998
10345
  },
9999
- children: /* @__PURE__ */ jsxs19("div", { style: { textAlign: "center" }, children: [
10000
- /* @__PURE__ */ jsxs19(
10346
+ children: /* @__PURE__ */ jsxs20("div", { style: { textAlign: "center" }, children: [
10347
+ /* @__PURE__ */ jsxs20(
10001
10348
  "svg",
10002
10349
  {
10003
10350
  style: {
@@ -10010,13 +10357,13 @@ function TokenSelectorStateView({
10010
10357
  stroke: "currentColor",
10011
10358
  strokeWidth: 1.5,
10012
10359
  children: [
10013
- /* @__PURE__ */ jsx22("circle", { cx: "11", cy: "11", r: "8" }),
10014
- /* @__PURE__ */ jsx22("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
10015
- /* @__PURE__ */ jsx22("path", { strokeLinecap: "round", d: "M8 11h6" })
10360
+ /* @__PURE__ */ jsx23("circle", { cx: "11", cy: "11", r: "8" }),
10361
+ /* @__PURE__ */ jsx23("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
10362
+ /* @__PURE__ */ jsx23("path", { strokeLinecap: "round", d: "M8 11h6" })
10016
10363
  ]
10017
10364
  }
10018
10365
  ),
10019
- /* @__PURE__ */ jsx22(
10366
+ /* @__PURE__ */ jsx23(
10020
10367
  "p",
10021
10368
  {
10022
10369
  style: {
@@ -10026,7 +10373,7 @@ function TokenSelectorStateView({
10026
10373
  children: searchQuery ? `No tokens matching "${searchQuery}"` : "No tokens available"
10027
10374
  }
10028
10375
  ),
10029
- searchQuery ? /* @__PURE__ */ jsx22(
10376
+ searchQuery ? /* @__PURE__ */ jsx23(
10030
10377
  "button",
10031
10378
  {
10032
10379
  type: "button",
@@ -10049,13 +10396,13 @@ function TokenSelectorStateView({
10049
10396
  }
10050
10397
 
10051
10398
  // src/widget/features/token-selection/components/WalletTokenListItem.tsx
10052
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
10399
+ import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
10053
10400
  function WalletTokenListItem({
10054
10401
  onSelect,
10055
10402
  token
10056
10403
  }) {
10057
10404
  const logoUrl = token.iconUrl || token.logo_url;
10058
- return /* @__PURE__ */ jsxs20(
10405
+ return /* @__PURE__ */ jsxs21(
10059
10406
  "button",
10060
10407
  {
10061
10408
  type: "button",
@@ -10073,8 +10420,8 @@ function WalletTokenListItem({
10073
10420
  cursor: "pointer"
10074
10421
  },
10075
10422
  children: [
10076
- /* @__PURE__ */ jsxs20("div", { style: { position: "relative" }, children: [
10077
- logoUrl ? /* @__PURE__ */ jsx23(
10423
+ /* @__PURE__ */ jsxs21("div", { style: { position: "relative" }, children: [
10424
+ logoUrl ? /* @__PURE__ */ jsx24(
10078
10425
  "img",
10079
10426
  {
10080
10427
  src: logoUrl,
@@ -10087,7 +10434,7 @@ function WalletTokenListItem({
10087
10434
  flexShrink: 0
10088
10435
  }
10089
10436
  }
10090
- ) : /* @__PURE__ */ jsx23(
10437
+ ) : /* @__PURE__ */ jsx24(
10091
10438
  "div",
10092
10439
  {
10093
10440
  style: {
@@ -10097,7 +10444,7 @@ function WalletTokenListItem({
10097
10444
  objectFit: "cover",
10098
10445
  flexShrink: 0
10099
10446
  },
10100
- children: /* @__PURE__ */ jsx23(
10447
+ children: /* @__PURE__ */ jsx24(
10101
10448
  "span",
10102
10449
  {
10103
10450
  style: {
@@ -10113,7 +10460,7 @@ function WalletTokenListItem({
10113
10460
  )
10114
10461
  }
10115
10462
  ),
10116
- /* @__PURE__ */ jsx23(
10463
+ /* @__PURE__ */ jsx24(
10117
10464
  "div",
10118
10465
  {
10119
10466
  style: {
@@ -10129,7 +10476,7 @@ function WalletTokenListItem({
10129
10476
  alignItems: "center",
10130
10477
  justifyContent: "center"
10131
10478
  },
10132
- children: /* @__PURE__ */ jsx23(
10479
+ children: /* @__PURE__ */ jsx24(
10133
10480
  "img",
10134
10481
  {
10135
10482
  src: token.chainIconURI,
@@ -10144,8 +10491,8 @@ function WalletTokenListItem({
10144
10491
  }
10145
10492
  )
10146
10493
  ] }),
10147
- /* @__PURE__ */ jsxs20("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
10148
- /* @__PURE__ */ jsx23(
10494
+ /* @__PURE__ */ jsxs21("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
10495
+ /* @__PURE__ */ jsx24(
10149
10496
  "div",
10150
10497
  {
10151
10498
  style: {
@@ -10153,7 +10500,7 @@ function WalletTokenListItem({
10153
10500
  alignItems: "center",
10154
10501
  gap: spacing[1.5]
10155
10502
  },
10156
- children: /* @__PURE__ */ jsx23(
10503
+ children: /* @__PURE__ */ jsx24(
10157
10504
  "span",
10158
10505
  {
10159
10506
  style: {
@@ -10169,7 +10516,7 @@ function WalletTokenListItem({
10169
10516
  )
10170
10517
  }
10171
10518
  ),
10172
- /* @__PURE__ */ jsxs20(
10519
+ /* @__PURE__ */ jsxs21(
10173
10520
  "span",
10174
10521
  {
10175
10522
  style: {
@@ -10194,7 +10541,7 @@ function WalletTokenListItem({
10194
10541
  }
10195
10542
 
10196
10543
  // src/widget/features/token-selection/components/TokenSelectorPanel.tsx
10197
- import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
10544
+ import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
10198
10545
  function TokenSelectorPanel({
10199
10546
  filteredTokens,
10200
10547
  filteredWalletTokens,
@@ -10210,7 +10557,7 @@ function TokenSelectorPanel({
10210
10557
  tokensError,
10211
10558
  walletAddress
10212
10559
  }) {
10213
- return /* @__PURE__ */ jsxs21(
10560
+ return /* @__PURE__ */ jsxs22(
10214
10561
  "div",
10215
10562
  {
10216
10563
  style: {
@@ -10220,7 +10567,7 @@ function TokenSelectorPanel({
10220
10567
  overflow: "hidden"
10221
10568
  },
10222
10569
  children: [
10223
- /* @__PURE__ */ jsxs21(
10570
+ /* @__PURE__ */ jsxs22(
10224
10571
  "div",
10225
10572
  {
10226
10573
  style: {
@@ -10228,7 +10575,7 @@ function TokenSelectorPanel({
10228
10575
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
10229
10576
  },
10230
10577
  children: [
10231
- /* @__PURE__ */ jsxs21(
10578
+ /* @__PURE__ */ jsxs22(
10232
10579
  "div",
10233
10580
  {
10234
10581
  style: {
@@ -10238,7 +10585,7 @@ function TokenSelectorPanel({
10238
10585
  marginBottom: spacing[2]
10239
10586
  },
10240
10587
  children: [
10241
- /* @__PURE__ */ jsx24(
10588
+ /* @__PURE__ */ jsx25(
10242
10589
  "span",
10243
10590
  {
10244
10591
  style: {
@@ -10251,7 +10598,7 @@ function TokenSelectorPanel({
10251
10598
  children: "Token"
10252
10599
  }
10253
10600
  ),
10254
- walletAddress && /* @__PURE__ */ jsx24(
10601
+ walletAddress && /* @__PURE__ */ jsx25(
10255
10602
  "span",
10256
10603
  {
10257
10604
  style: {
@@ -10267,7 +10614,7 @@ function TokenSelectorPanel({
10267
10614
  ]
10268
10615
  }
10269
10616
  ),
10270
- selectedChain ? /* @__PURE__ */ jsx24(
10617
+ selectedChain ? /* @__PURE__ */ jsx25(
10271
10618
  TokenSearchInput,
10272
10619
  {
10273
10620
  searchQuery,
@@ -10277,7 +10624,7 @@ function TokenSelectorPanel({
10277
10624
  ]
10278
10625
  }
10279
10626
  ),
10280
- /* @__PURE__ */ jsx24(
10627
+ /* @__PURE__ */ jsx25(
10281
10628
  "div",
10282
10629
  {
10283
10630
  style: {
@@ -10285,7 +10632,7 @@ function TokenSelectorPanel({
10285
10632
  overflowY: "auto",
10286
10633
  padding: `${spacing[2]} ${spacing[1]}`
10287
10634
  },
10288
- children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ jsx24(
10635
+ children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ jsx25(
10289
10636
  TokenSelectorStateView,
10290
10637
  {
10291
10638
  isLoadingTokens,
@@ -10294,7 +10641,7 @@ function TokenSelectorPanel({
10294
10641
  state: !selectedChain ? "no-chain" : tokensError ? "error" : "empty",
10295
10642
  tokensError
10296
10643
  }
10297
- ) : /* @__PURE__ */ jsxs21(
10644
+ ) : /* @__PURE__ */ jsxs22(
10298
10645
  "div",
10299
10646
  {
10300
10647
  style: {
@@ -10303,7 +10650,7 @@ function TokenSelectorPanel({
10303
10650
  gap: spacing[0.5]
10304
10651
  },
10305
10652
  children: [
10306
- filteredWalletTokens.length > 0 ? /* @__PURE__ */ jsx24(
10653
+ filteredWalletTokens.length > 0 ? /* @__PURE__ */ jsx25(
10307
10654
  "div",
10308
10655
  {
10309
10656
  style: {
@@ -10314,7 +10661,7 @@ function TokenSelectorPanel({
10314
10661
  paddingRight: "0.5rem",
10315
10662
  marginBottom: spacing[2]
10316
10663
  },
10317
- children: /* @__PURE__ */ jsx24(
10664
+ children: /* @__PURE__ */ jsx25(
10318
10665
  "span",
10319
10666
  {
10320
10667
  style: {
@@ -10327,7 +10674,7 @@ function TokenSelectorPanel({
10327
10674
  )
10328
10675
  }
10329
10676
  ) : null,
10330
- filteredWalletTokens.map((token, i) => /* @__PURE__ */ jsx24(
10677
+ filteredWalletTokens.map((token, i) => /* @__PURE__ */ jsx25(
10331
10678
  WalletTokenListItem,
10332
10679
  {
10333
10680
  token,
@@ -10335,7 +10682,7 @@ function TokenSelectorPanel({
10335
10682
  },
10336
10683
  `${token.address}-${i}`
10337
10684
  )),
10338
- /* @__PURE__ */ jsx24(
10685
+ /* @__PURE__ */ jsx25(
10339
10686
  "div",
10340
10687
  {
10341
10688
  style: {
@@ -10346,7 +10693,7 @@ function TokenSelectorPanel({
10346
10693
  paddingRight: "0.5rem",
10347
10694
  marginBottom: spacing[2]
10348
10695
  },
10349
- children: /* @__PURE__ */ jsx24(
10696
+ children: /* @__PURE__ */ jsx25(
10350
10697
  "span",
10351
10698
  {
10352
10699
  style: {
@@ -10359,7 +10706,7 @@ function TokenSelectorPanel({
10359
10706
  )
10360
10707
  }
10361
10708
  ),
10362
- filteredTokens.map((token, i) => /* @__PURE__ */ jsx24(
10709
+ filteredTokens.map((token, i) => /* @__PURE__ */ jsx25(
10363
10710
  AvailableTokenListItem,
10364
10711
  {
10365
10712
  token,
@@ -10367,7 +10714,7 @@ function TokenSelectorPanel({
10367
10714
  },
10368
10715
  `${token.address}-${i}`
10369
10716
  )),
10370
- hasNextPage ? /* @__PURE__ */ jsx24(
10717
+ hasNextPage ? /* @__PURE__ */ jsx25(
10371
10718
  "button",
10372
10719
  {
10373
10720
  type: "button",
@@ -10400,7 +10747,7 @@ function TokenSelectorPanel({
10400
10747
  }
10401
10748
 
10402
10749
  // src/widget/features/token-selection/hooks/useOrderedWalletTokens.ts
10403
- import { useCallback as useCallback11, useMemo as useMemo11 } from "react";
10750
+ import { useCallback as useCallback12, useMemo as useMemo12 } from "react";
10404
10751
  function useOrderedWalletTokens({
10405
10752
  amount,
10406
10753
  amountInputMode,
@@ -10409,7 +10756,7 @@ function useOrderedWalletTokens({
10409
10756
  setSelectedToken,
10410
10757
  yourWalletTokens
10411
10758
  }) {
10412
- const handleTokenChange = useCallback11(
10759
+ const handleTokenChange = useCallback12(
10413
10760
  async (token) => {
10414
10761
  if (token) {
10415
10762
  setSelectedToken(token);
@@ -10418,7 +10765,7 @@ function useOrderedWalletTokens({
10418
10765
  },
10419
10766
  [setSelectedChain, setSelectedToken]
10420
10767
  );
10421
- const orderedTokens = useMemo11(() => {
10768
+ const orderedTokens = useMemo12(() => {
10422
10769
  const selectedTokenChainType = selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType;
10423
10770
  const index = yourWalletTokens.findIndex(
10424
10771
  (token) => normalizeAddress2(
@@ -10487,7 +10834,7 @@ function filterTokenAmountCompatibleTokens(tokens, parsedAmount) {
10487
10834
  }
10488
10835
 
10489
10836
  // src/widget/features/token-selection/hooks/useSelectTokenModel.ts
10490
- import { useCallback as useCallback12, useMemo as useMemo12 } from "react";
10837
+ import { useCallback as useCallback13, useMemo as useMemo13 } from "react";
10491
10838
  function useSelectTokenModel({
10492
10839
  goBack,
10493
10840
  searchQuery,
@@ -10511,7 +10858,7 @@ function useSelectTokenModel({
10511
10858
  explorerUrl: chain.blockExplorerUrls?.[0]
10512
10859
  });
10513
10860
  };
10514
- const handleTokenSelect = useCallback12(
10861
+ const handleTokenSelect = useCallback13(
10515
10862
  async (token) => {
10516
10863
  if (token.balance !== void 0) {
10517
10864
  setSelectedToken(token);
@@ -10535,7 +10882,7 @@ function useSelectTokenModel({
10535
10882
  },
10536
10883
  [goBack, selectedChain, setSelectedToken, walletAddress]
10537
10884
  );
10538
- const handleYourTokenSelect = useCallback12(
10885
+ const handleYourTokenSelect = useCallback13(
10539
10886
  (token) => {
10540
10887
  setSelectedToken(token);
10541
10888
  setSelectedChain(token.chainData);
@@ -10557,7 +10904,7 @@ function useSelectTokenModel({
10557
10904
  const address = token.address?.toLowerCase() ?? "";
10558
10905
  return symbol.includes(normalizedSearchQuery) || name.includes(normalizedSearchQuery) || address.includes(normalizedSearchQuery);
10559
10906
  };
10560
- const filteredWalletTokens = useMemo12(() => {
10907
+ const filteredWalletTokens = useMemo13(() => {
10561
10908
  if (!selectedChain?.chainId) {
10562
10909
  return [];
10563
10910
  }
@@ -10650,7 +10997,7 @@ var feeSummaryValueStyle = {
10650
10997
  };
10651
10998
 
10652
10999
  // src/widget/features/amount/components/AmountBalanceRow.tsx
10653
- import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
11000
+ import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
10654
11001
  function formatBalanceLabel({
10655
11002
  amountInputMode,
10656
11003
  hasUsdPrice,
@@ -10681,8 +11028,8 @@ function AmountBalanceRow({
10681
11028
  selectedTokenSymbol,
10682
11029
  tokenPriceUSD
10683
11030
  }) {
10684
- return /* @__PURE__ */ jsxs22("div", { style: balanceRowStyle, children: [
10685
- /* @__PURE__ */ jsx25(
11031
+ return /* @__PURE__ */ jsxs23("div", { style: balanceRowStyle, children: [
11032
+ /* @__PURE__ */ jsx26(
10686
11033
  "span",
10687
11034
  {
10688
11035
  style: {
@@ -10700,7 +11047,7 @@ function AmountBalanceRow({
10700
11047
  })
10701
11048
  }
10702
11049
  ),
10703
- /* @__PURE__ */ jsx25(
11050
+ /* @__PURE__ */ jsx26(
10704
11051
  "button",
10705
11052
  {
10706
11053
  type: "button",
@@ -10714,7 +11061,7 @@ function AmountBalanceRow({
10714
11061
  }
10715
11062
 
10716
11063
  // src/widget/features/amount/components/AmountConversionRow.tsx
10717
- import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
11064
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
10718
11065
  function formatTokenAmount(value) {
10719
11066
  const amount = Number(value ?? 0);
10720
11067
  if (amount <= 0) return "0";
@@ -10738,22 +11085,22 @@ function AmountConversionRow({
10738
11085
  selectedTokenSymbol,
10739
11086
  setAmountInputMode
10740
11087
  }) {
10741
- return /* @__PURE__ */ jsxs23("div", { style: tokenConversionRowStyle, children: [
10742
- /* @__PURE__ */ jsx26(
11088
+ return /* @__PURE__ */ jsxs24("div", { style: tokenConversionRowStyle, children: [
11089
+ /* @__PURE__ */ jsx27(
10743
11090
  "span",
10744
11091
  {
10745
11092
  style: {
10746
11093
  fontSize: fontSize.lg,
10747
11094
  color: colors.mutedForeground
10748
11095
  },
10749
- children: amountInputMode === "usd" ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
11096
+ children: amountInputMode === "usd" ? /* @__PURE__ */ jsxs24(Fragment4, { children: [
10750
11097
  formatTokenAmount(amountComputation.tokenAmount),
10751
11098
  " ",
10752
11099
  selectedTokenSymbol
10753
- ] }) : /* @__PURE__ */ jsx26(Fragment4, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
11100
+ ] }) : /* @__PURE__ */ jsx27(Fragment4, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
10754
11101
  }
10755
11102
  ),
10756
- /* @__PURE__ */ jsx26(
11103
+ /* @__PURE__ */ jsx27(
10757
11104
  "svg",
10758
11105
  {
10759
11106
  style: {
@@ -10770,7 +11117,7 @@ function AmountConversionRow({
10770
11117
  if (isFixedAmount) return;
10771
11118
  setAmountInputMode((mode) => mode === "usd" ? "token" : "usd");
10772
11119
  },
10773
- children: /* @__PURE__ */ jsx26(
11120
+ children: /* @__PURE__ */ jsx27(
10774
11121
  "path",
10775
11122
  {
10776
11123
  strokeLinecap: "round",
@@ -10784,7 +11131,7 @@ function AmountConversionRow({
10784
11131
  }
10785
11132
 
10786
11133
  // src/widget/features/amount/components/AmountFeeSummary.tsx
10787
- import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
11134
+ import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
10788
11135
  function formatEstimatedReceive(estimatedReceive, parsedAmount) {
10789
11136
  if (estimatedReceive) {
10790
11137
  return `~$${parseFloat(estimatedReceive).toLocaleString(void 0, {
@@ -10805,8 +11152,8 @@ function AmountFeeSummary({
10805
11152
  parsedAmount,
10806
11153
  selectedTokenDecimals
10807
11154
  }) {
10808
- return /* @__PURE__ */ jsx27("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ jsxs24("div", { style: loadingFeeSummaryStyle, children: [
10809
- /* @__PURE__ */ jsxs24(
11155
+ return /* @__PURE__ */ jsx28("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ jsxs25("div", { style: loadingFeeSummaryStyle, children: [
11156
+ /* @__PURE__ */ jsxs25(
10810
11157
  "svg",
10811
11158
  {
10812
11159
  style: {
@@ -10818,7 +11165,7 @@ function AmountFeeSummary({
10818
11165
  fill: "none",
10819
11166
  className: "tw-animate-spin",
10820
11167
  children: [
10821
- /* @__PURE__ */ jsx27(
11168
+ /* @__PURE__ */ jsx28(
10822
11169
  "circle",
10823
11170
  {
10824
11171
  style: { opacity: 0.25 },
@@ -10829,7 +11176,7 @@ function AmountFeeSummary({
10829
11176
  strokeWidth: "4"
10830
11177
  }
10831
11178
  ),
10832
- /* @__PURE__ */ jsx27(
11179
+ /* @__PURE__ */ jsx28(
10833
11180
  "path",
10834
11181
  {
10835
11182
  style: { opacity: 0.75 },
@@ -10840,7 +11187,7 @@ function AmountFeeSummary({
10840
11187
  ]
10841
11188
  }
10842
11189
  ),
10843
- /* @__PURE__ */ jsx27(
11190
+ /* @__PURE__ */ jsx28(
10844
11191
  "span",
10845
11192
  {
10846
11193
  style: {
@@ -10851,7 +11198,7 @@ function AmountFeeSummary({
10851
11198
  children: "Calculating fees..."
10852
11199
  }
10853
11200
  )
10854
- ] }) : !amount.trim() ? /* @__PURE__ */ jsx27("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ jsx27(
11201
+ ] }) : !amount.trim() ? /* @__PURE__ */ jsx28("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ jsx28(
10855
11202
  "p",
10856
11203
  {
10857
11204
  style: {
@@ -10860,10 +11207,10 @@ function AmountFeeSummary({
10860
11207
  },
10861
11208
  children: "Enter an amount to continue."
10862
11209
  }
10863
- ) }) : /* @__PURE__ */ jsxs24(Fragment5, { children: [
10864
- /* @__PURE__ */ jsxs24("div", { style: feeSummaryRowStyle, children: [
10865
- /* @__PURE__ */ jsx27("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
10866
- /* @__PURE__ */ jsxs24("span", { style: feeSummaryValueStyle, children: [
11210
+ ) }) : /* @__PURE__ */ jsxs25(Fragment5, { children: [
11211
+ /* @__PURE__ */ jsxs25("div", { style: feeSummaryRowStyle, children: [
11212
+ /* @__PURE__ */ jsx28("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
11213
+ /* @__PURE__ */ jsxs25("span", { style: feeSummaryValueStyle, children: [
10867
11214
  weiToDecimalString(
10868
11215
  gasReservationWei,
10869
11216
  selectedTokenDecimals ?? 0,
@@ -10872,9 +11219,9 @@ function AmountFeeSummary({
10872
11219
  " "
10873
11220
  ] })
10874
11221
  ] }),
10875
- /* @__PURE__ */ jsx27("div", { style: feeSummaryDividerStyle }),
10876
- /* @__PURE__ */ jsxs24("div", { style: feeSummaryRowStyle, children: [
10877
- /* @__PURE__ */ jsx27(
11222
+ /* @__PURE__ */ jsx28("div", { style: feeSummaryDividerStyle }),
11223
+ /* @__PURE__ */ jsxs25("div", { style: feeSummaryRowStyle, children: [
11224
+ /* @__PURE__ */ jsx28(
10878
11225
  "span",
10879
11226
  {
10880
11227
  style: {
@@ -10884,7 +11231,7 @@ function AmountFeeSummary({
10884
11231
  children: "You'll receive"
10885
11232
  }
10886
11233
  ),
10887
- /* @__PURE__ */ jsx27(
11234
+ /* @__PURE__ */ jsx28(
10888
11235
  "span",
10889
11236
  {
10890
11237
  style: {
@@ -10899,7 +11246,7 @@ function AmountFeeSummary({
10899
11246
  }
10900
11247
 
10901
11248
  // src/widget/features/amount/components/CryptoPayAmountSection.tsx
10902
- import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
11249
+ import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
10903
11250
  function CryptoPayAmountSection({
10904
11251
  amount,
10905
11252
  amountComputation,
@@ -10926,8 +11273,8 @@ function CryptoPayAmountSection({
10926
11273
  walletAddress,
10927
11274
  yourWalletTokensLength
10928
11275
  }) {
10929
- return /* @__PURE__ */ jsxs25("div", { style: amountSectionContainerStyle, children: [
10930
- /* @__PURE__ */ jsx28(
11276
+ return /* @__PURE__ */ jsxs26("div", { style: amountSectionContainerStyle, children: [
11277
+ /* @__PURE__ */ jsx29(
10931
11278
  "p",
10932
11279
  {
10933
11280
  style: {
@@ -10939,7 +11286,7 @@ function CryptoPayAmountSection({
10939
11286
  children: "Enter an amount"
10940
11287
  }
10941
11288
  ),
10942
- /* @__PURE__ */ jsx28(
11289
+ /* @__PURE__ */ jsx29(
10943
11290
  AmountInputDisplay,
10944
11291
  {
10945
11292
  amount,
@@ -10951,7 +11298,7 @@ function CryptoPayAmountSection({
10951
11298
  style: { marginBottom: spacing[4] }
10952
11299
  }
10953
11300
  ),
10954
- selectedToken ? /* @__PURE__ */ jsx28(
11301
+ selectedToken ? /* @__PURE__ */ jsx29(
10955
11302
  AmountConversionRow,
10956
11303
  {
10957
11304
  amountComputation,
@@ -10962,7 +11309,7 @@ function CryptoPayAmountSection({
10962
11309
  setAmountInputMode
10963
11310
  }
10964
11311
  ) : null,
10965
- selectedToken?.balance ? /* @__PURE__ */ jsx28(
11312
+ selectedToken?.balance ? /* @__PURE__ */ jsx29(
10966
11313
  AmountBalanceRow,
10967
11314
  {
10968
11315
  amountInputMode,
@@ -10975,7 +11322,7 @@ function CryptoPayAmountSection({
10975
11322
  tokenPriceUSD
10976
11323
  }
10977
11324
  ) : null,
10978
- selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ jsx28("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ jsx28(
11325
+ selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ jsx29("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ jsx29(
10979
11326
  TokenSwipePill,
10980
11327
  {
10981
11328
  tokens: orderedTokens,
@@ -10986,8 +11333,8 @@ function CryptoPayAmountSection({
10986
11333
  walletAddress
10987
11334
  }
10988
11335
  ) }) : null,
10989
- !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ jsxs25("div", { style: amountSliderContainerStyle, children: [
10990
- /* @__PURE__ */ jsxs25(
11336
+ !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ jsxs26("div", { style: amountSliderContainerStyle, children: [
11337
+ /* @__PURE__ */ jsxs26(
10991
11338
  "p",
10992
11339
  {
10993
11340
  style: {
@@ -11003,7 +11350,7 @@ function CryptoPayAmountSection({
11003
11350
  ]
11004
11351
  }
11005
11352
  ),
11006
- /* @__PURE__ */ jsx28(
11353
+ /* @__PURE__ */ jsx29(
11007
11354
  AmountSlider,
11008
11355
  {
11009
11356
  value: Math.min(parsedAmount, effectiveSliderMax),
@@ -11014,7 +11361,7 @@ function CryptoPayAmountSection({
11014
11361
  }
11015
11362
  )
11016
11363
  ] }) : null,
11017
- showFeeSummary ? /* @__PURE__ */ jsx28(
11364
+ showFeeSummary ? /* @__PURE__ */ jsx29(
11018
11365
  AmountFeeSummary,
11019
11366
  {
11020
11367
  amount,
@@ -11029,7 +11376,7 @@ function CryptoPayAmountSection({
11029
11376
  }
11030
11377
 
11031
11378
  // src/widget/features/amount/hooks/useDepositAmountModel.ts
11032
- import { useEffect as useEffect18, useMemo as useMemo13 } from "react";
11379
+ import { useEffect as useEffect20, useMemo as useMemo14 } from "react";
11033
11380
  var BALANCE_TOLERANCE = 1e-9;
11034
11381
  function useDepositAmountModel({
11035
11382
  amount,
@@ -11044,14 +11391,14 @@ function useDepositAmountModel({
11044
11391
  }) {
11045
11392
  const tokenPriceUSD = typeof selectedToken?.usdPrice === "number" && Number.isFinite(selectedToken.usdPrice) && selectedToken.usdPrice > 0 ? selectedToken.usdPrice : 0;
11046
11393
  const hasUsdPrice = typeof tokenPriceUSD === "number" && Number.isFinite(tokenPriceUSD) && tokenPriceUSD > 0;
11047
- const normalizedTokenBalance = useMemo13(() => {
11394
+ const normalizedTokenBalance = useMemo14(() => {
11048
11395
  if (!selectedToken?.balance) return 0;
11049
11396
  const normalized = Number(
11050
11397
  rawToDecimal(selectedToken.balance, selectedToken.decimals ?? 18)
11051
11398
  );
11052
11399
  return Number.isFinite(normalized) ? normalized : 0;
11053
11400
  }, [selectedToken?.balance, selectedToken?.decimals]);
11054
- useEffect18(() => {
11401
+ useEffect20(() => {
11055
11402
  if (fixedFromAmountString) return;
11056
11403
  if (isReady && !hasUsdPrice && amountInputMode === "usd") {
11057
11404
  setAmountInputMode("token");
@@ -11063,7 +11410,7 @@ function useDepositAmountModel({
11063
11410
  isReady,
11064
11411
  setAmountInputMode
11065
11412
  ]);
11066
- useEffect18(() => {
11413
+ useEffect20(() => {
11067
11414
  if (!fixedFromAmountString) return;
11068
11415
  if (amount !== fixedFromAmountString) {
11069
11416
  setAmount(fixedFromAmountString);
@@ -11078,7 +11425,7 @@ function useDepositAmountModel({
11078
11425
  setAmount,
11079
11426
  setAmountInputMode
11080
11427
  ]);
11081
- const amountComputation = useMemo13(() => {
11428
+ const amountComputation = useMemo14(() => {
11082
11429
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
11083
11430
  if (!rawAmount) {
11084
11431
  return {
@@ -11145,11 +11492,11 @@ function useDepositAmountModel({
11145
11492
  selectedToken?.decimals,
11146
11493
  tokenPriceUSD
11147
11494
  ]);
11148
- const requestedTokenAmount = useMemo13(() => {
11495
+ const requestedTokenAmount = useMemo14(() => {
11149
11496
  const tokenAmount = Number(amountComputation.tokenAmount);
11150
11497
  return Number.isFinite(tokenAmount) ? tokenAmount : 0;
11151
11498
  }, [amountComputation.tokenAmount]);
11152
- const amountValidationError = useMemo13(() => {
11499
+ const amountValidationError = useMemo14(() => {
11153
11500
  if (amountComputation.parseError) {
11154
11501
  return amountComputation.parseError;
11155
11502
  }
@@ -11182,15 +11529,15 @@ function useDepositAmountModel({
11182
11529
  ]);
11183
11530
  const amountWei = amountValidationError ? 0n : amountComputation.fromAmountWei ?? 0n;
11184
11531
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11185
- const maxTokenAmount = useMemo13(
11532
+ const maxTokenAmount = useMemo14(
11186
11533
  () => Math.min(normalizedTokenBalance, 1e4),
11187
11534
  [normalizedTokenBalance]
11188
11535
  );
11189
- const maxUsdAmount = useMemo13(() => {
11536
+ const maxUsdAmount = useMemo14(() => {
11190
11537
  if (!hasUsdPrice) return void 0;
11191
11538
  return Math.min(maxTokenAmount * tokenPriceUSD, 1e4);
11192
11539
  }, [hasUsdPrice, maxTokenAmount, tokenPriceUSD]);
11193
- const minAmountForMode = useMemo13(() => {
11540
+ const minAmountForMode = useMemo14(() => {
11194
11541
  if (minAmountUsd == null) return 0;
11195
11542
  if (amountInputMode === "usd") {
11196
11543
  return minAmountUsd;
@@ -11199,11 +11546,11 @@ function useDepositAmountModel({
11199
11546
  return minAmountUsd / tokenPriceUSD;
11200
11547
  }, [amountInputMode, hasUsdPrice, minAmountUsd, tokenPriceUSD]);
11201
11548
  const sliderMax = amountInputMode === "usd" ? maxUsdAmount : maxTokenAmount;
11202
- const effectiveSliderMax = useMemo13(() => {
11549
+ const effectiveSliderMax = useMemo14(() => {
11203
11550
  if (sliderMax == null || !Number.isFinite(sliderMax)) return void 0;
11204
11551
  return Math.max(sliderMax, 0);
11205
11552
  }, [sliderMax]);
11206
- const effectiveSliderMin = useMemo13(() => {
11553
+ const effectiveSliderMin = useMemo14(() => {
11207
11554
  if (effectiveSliderMax == null || !Number.isFinite(effectiveSliderMax) || effectiveSliderMax <= 0) {
11208
11555
  return 0;
11209
11556
  }
@@ -11230,7 +11577,7 @@ function useDepositAmountModel({
11230
11577
  }
11231
11578
 
11232
11579
  // src/widget/features/amount/hooks/useHomeAmountModel.ts
11233
- import { useEffect as useEffect19, useMemo as useMemo14 } from "react";
11580
+ import { useEffect as useEffect21, useMemo as useMemo15 } from "react";
11234
11581
  function useHomeAmountModel({
11235
11582
  amount,
11236
11583
  setAmount,
@@ -11241,7 +11588,7 @@ function useHomeAmountModel({
11241
11588
  minAmountUsd,
11242
11589
  maxAmountUsd
11243
11590
  }) {
11244
- useEffect19(() => {
11591
+ useEffect21(() => {
11245
11592
  if (!fixedFromAmountString) return;
11246
11593
  if (amount !== fixedFromAmountString) {
11247
11594
  setAmount(fixedFromAmountString);
@@ -11257,7 +11604,7 @@ function useHomeAmountModel({
11257
11604
  setAmountInputMode
11258
11605
  ]);
11259
11606
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11260
- const amountValidationMessage = useMemo14(() => {
11607
+ const amountValidationMessage = useMemo15(() => {
11261
11608
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
11262
11609
  if (!rawAmount) return null;
11263
11610
  if (!/^\d*\.?\d*$/.test(rawAmount)) {
@@ -11348,7 +11695,7 @@ var mutedOrDividerStyle = (isDarkTheme) => ({
11348
11695
  });
11349
11696
 
11350
11697
  // src/widget/features/wallet/components/PaymentOptionRow.tsx
11351
- import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
11698
+ import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
11352
11699
  function PaymentOptionRow({
11353
11700
  disabled = false,
11354
11701
  icon,
@@ -11356,7 +11703,7 @@ function PaymentOptionRow({
11356
11703
  onClick,
11357
11704
  trailing
11358
11705
  }) {
11359
- return /* @__PURE__ */ jsxs26(
11706
+ return /* @__PURE__ */ jsxs27(
11360
11707
  "button",
11361
11708
  {
11362
11709
  type: "button",
@@ -11379,7 +11726,7 @@ function PaymentOptionRow({
11379
11726
  opacity: disabled ? 0.5 : 1
11380
11727
  },
11381
11728
  children: [
11382
- /* @__PURE__ */ jsxs26(
11729
+ /* @__PURE__ */ jsxs27(
11383
11730
  "div",
11384
11731
  {
11385
11732
  style: {
@@ -11389,7 +11736,7 @@ function PaymentOptionRow({
11389
11736
  },
11390
11737
  children: [
11391
11738
  icon,
11392
- /* @__PURE__ */ jsx29(
11739
+ /* @__PURE__ */ jsx30(
11393
11740
  "span",
11394
11741
  {
11395
11742
  style: {
@@ -11403,24 +11750,24 @@ function PaymentOptionRow({
11403
11750
  ]
11404
11751
  }
11405
11752
  ),
11406
- trailing ?? /* @__PURE__ */ jsx29("div", { style: selectionRingStyle })
11753
+ trailing ?? /* @__PURE__ */ jsx30("div", { style: selectionRingStyle })
11407
11754
  ]
11408
11755
  }
11409
11756
  );
11410
11757
  }
11411
11758
 
11412
11759
  // src/widget/features/wallet/components/DetectedWalletRow.tsx
11413
- import { jsx as jsx30 } from "react/jsx-runtime";
11760
+ import { jsx as jsx31 } from "react/jsx-runtime";
11414
11761
  function DetectedWalletRow({
11415
11762
  onSelect,
11416
11763
  wallet
11417
11764
  }) {
11418
- return /* @__PURE__ */ jsx30(
11765
+ return /* @__PURE__ */ jsx31(
11419
11766
  PaymentOptionRow,
11420
11767
  {
11421
11768
  onClick: () => void onSelect(wallet),
11422
11769
  label: wallet.meta.name,
11423
- icon: wallet.meta.logo ? /* @__PURE__ */ jsx30(
11770
+ icon: wallet.meta.logo ? /* @__PURE__ */ jsx31(
11424
11771
  "img",
11425
11772
  {
11426
11773
  src: wallet.meta.logo,
@@ -11432,7 +11779,7 @@ function DetectedWalletRow({
11432
11779
  objectFit: "cover"
11433
11780
  }
11434
11781
  }
11435
- ) : /* @__PURE__ */ jsx30(
11782
+ ) : /* @__PURE__ */ jsx31(
11436
11783
  "div",
11437
11784
  {
11438
11785
  style: {
@@ -11444,7 +11791,7 @@ function DetectedWalletRow({
11444
11791
  alignItems: "center",
11445
11792
  justifyContent: "center"
11446
11793
  },
11447
- children: /* @__PURE__ */ jsx30(
11794
+ children: /* @__PURE__ */ jsx31(
11448
11795
  "span",
11449
11796
  {
11450
11797
  style: {
@@ -11462,16 +11809,16 @@ function DetectedWalletRow({
11462
11809
  }
11463
11810
 
11464
11811
  // src/widget/features/wallet/components/WalletConnectRow.tsx
11465
- import { jsx as jsx31 } from "react/jsx-runtime";
11812
+ import { jsx as jsx32 } from "react/jsx-runtime";
11466
11813
  function WalletConnectRow({
11467
11814
  onClick
11468
11815
  }) {
11469
- return /* @__PURE__ */ jsx31(
11816
+ return /* @__PURE__ */ jsx32(
11470
11817
  PaymentOptionRow,
11471
11818
  {
11472
11819
  onClick: () => void onClick(),
11473
11820
  label: "WalletConnect",
11474
- icon: /* @__PURE__ */ jsx31("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ jsx31(
11821
+ icon: /* @__PURE__ */ jsx32("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ jsx32(
11475
11822
  "svg",
11476
11823
  {
11477
11824
  style: {
@@ -11481,10 +11828,10 @@ function WalletConnectRow({
11481
11828
  },
11482
11829
  viewBox: "0 0 24 24",
11483
11830
  fill: "currentColor",
11484
- children: /* @__PURE__ */ jsx31("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" })
11831
+ children: /* @__PURE__ */ jsx32("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" })
11485
11832
  }
11486
11833
  ) }),
11487
- trailing: /* @__PURE__ */ jsx31(
11834
+ trailing: /* @__PURE__ */ jsx32(
11488
11835
  "svg",
11489
11836
  {
11490
11837
  style: {
@@ -11496,7 +11843,7 @@ function WalletConnectRow({
11496
11843
  fill: "none",
11497
11844
  stroke: "currentColor",
11498
11845
  strokeWidth: 2,
11499
- children: /* @__PURE__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11846
+ children: /* @__PURE__ */ jsx32("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11500
11847
  }
11501
11848
  )
11502
11849
  }
@@ -11504,9 +11851,9 @@ function WalletConnectRow({
11504
11851
  }
11505
11852
 
11506
11853
  // src/widget/features/wallet/components/WalletDropdownEmptyState.tsx
11507
- import { jsx as jsx32 } from "react/jsx-runtime";
11854
+ import { jsx as jsx33 } from "react/jsx-runtime";
11508
11855
  function WalletDropdownEmptyState() {
11509
- return /* @__PURE__ */ jsx32(
11856
+ return /* @__PURE__ */ jsx33(
11510
11857
  "p",
11511
11858
  {
11512
11859
  style: {
@@ -11521,13 +11868,13 @@ function WalletDropdownEmptyState() {
11521
11868
  }
11522
11869
 
11523
11870
  // src/widget/features/wallet/components/CryptoWalletDropdownContent.tsx
11524
- import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
11871
+ import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
11525
11872
  function CryptoWalletDropdownContent({
11526
11873
  browserWallets,
11527
11874
  handleWalletConnect,
11528
11875
  handleWalletSelect
11529
11876
  }) {
11530
- return /* @__PURE__ */ jsxs27(
11877
+ return /* @__PURE__ */ jsxs28(
11531
11878
  "div",
11532
11879
  {
11533
11880
  style: {
@@ -11544,10 +11891,10 @@ function CryptoWalletDropdownContent({
11544
11891
  scrollbarColor: `${colors.muted} transparent`
11545
11892
  },
11546
11893
  children: [
11547
- /* @__PURE__ */ jsxs27("div", { style: { padding: spacing[3] }, children: [
11548
- /* @__PURE__ */ jsxs27("div", { style: dropdownSectionHeadingStyle, children: [
11549
- /* @__PURE__ */ jsx33("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11550
- /* @__PURE__ */ jsx33(
11894
+ /* @__PURE__ */ jsxs28("div", { style: { padding: spacing[3] }, children: [
11895
+ /* @__PURE__ */ jsxs28("div", { style: dropdownSectionHeadingStyle, children: [
11896
+ /* @__PURE__ */ jsx34("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11897
+ /* @__PURE__ */ jsx34(
11551
11898
  "span",
11552
11899
  {
11553
11900
  style: {
@@ -11559,7 +11906,7 @@ function CryptoWalletDropdownContent({
11559
11906
  }
11560
11907
  )
11561
11908
  ] }),
11562
- browserWallets.length > 0 ? /* @__PURE__ */ jsx33(
11909
+ browserWallets.length > 0 ? /* @__PURE__ */ jsx34(
11563
11910
  "div",
11564
11911
  {
11565
11912
  style: {
@@ -11567,7 +11914,7 @@ function CryptoWalletDropdownContent({
11567
11914
  flexDirection: "column",
11568
11915
  gap: spacing[1]
11569
11916
  },
11570
- children: browserWallets.map((wallet) => /* @__PURE__ */ jsx33(
11917
+ children: browserWallets.map((wallet) => /* @__PURE__ */ jsx34(
11571
11918
  DetectedWalletRow,
11572
11919
  {
11573
11920
  wallet,
@@ -11576,19 +11923,19 @@ function CryptoWalletDropdownContent({
11576
11923
  wallet.meta.id
11577
11924
  ))
11578
11925
  }
11579
- ) : /* @__PURE__ */ jsx33(WalletDropdownEmptyState, {})
11926
+ ) : /* @__PURE__ */ jsx34(WalletDropdownEmptyState, {})
11580
11927
  ] }),
11581
- /* @__PURE__ */ jsx33("div", { style: dividerBorderStyle }),
11582
- /* @__PURE__ */ jsx33("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ jsx33(WalletConnectRow, { onClick: handleWalletConnect }) })
11928
+ /* @__PURE__ */ jsx34("div", { style: dividerBorderStyle }),
11929
+ /* @__PURE__ */ jsx34("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ jsx34(WalletConnectRow, { onClick: handleWalletConnect }) })
11583
11930
  ]
11584
11931
  }
11585
11932
  );
11586
11933
  }
11587
11934
 
11588
11935
  // src/widget/features/wallet/components/FiatComingSoonBanner.tsx
11589
- import { jsx as jsx34 } from "react/jsx-runtime";
11936
+ import { jsx as jsx35 } from "react/jsx-runtime";
11590
11937
  function FiatComingSoonBanner() {
11591
- return /* @__PURE__ */ jsx34(
11938
+ return /* @__PURE__ */ jsx35(
11592
11939
  "div",
11593
11940
  {
11594
11941
  style: {
@@ -11596,7 +11943,7 @@ function FiatComingSoonBanner() {
11596
11943
  backgroundColor: "rgba(245, 158, 11, 0.1)",
11597
11944
  borderBottom: "1px solid rgba(245, 158, 11, 0.2)"
11598
11945
  },
11599
- children: /* @__PURE__ */ jsx34(
11946
+ children: /* @__PURE__ */ jsx35(
11600
11947
  "p",
11601
11948
  {
11602
11949
  style: {
@@ -11613,29 +11960,29 @@ function FiatComingSoonBanner() {
11613
11960
  }
11614
11961
 
11615
11962
  // src/widget/features/wallet/components/FiatMethodRow.tsx
11616
- import { jsx as jsx35 } from "react/jsx-runtime";
11963
+ import { jsx as jsx36 } from "react/jsx-runtime";
11617
11964
  function FiatMethodRow({
11618
11965
  method,
11619
11966
  onSelect
11620
11967
  }) {
11621
- return /* @__PURE__ */ jsx35(
11968
+ return /* @__PURE__ */ jsx36(
11622
11969
  PaymentOptionRow,
11623
11970
  {
11624
11971
  onClick: onSelect,
11625
11972
  disabled: true,
11626
11973
  label: method.name,
11627
- icon: /* @__PURE__ */ jsx35("span", { style: { color: colors.mutedForeground }, children: method.icon })
11974
+ icon: /* @__PURE__ */ jsx36("span", { style: { color: colors.mutedForeground }, children: method.icon })
11628
11975
  }
11629
11976
  );
11630
11977
  }
11631
11978
 
11632
11979
  // src/widget/features/wallet/components/FiatPaymentDropdownContent.tsx
11633
- import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
11980
+ import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
11634
11981
  function FiatPaymentDropdownContent({
11635
11982
  fiatOptions: fiatOptions2,
11636
11983
  handleFiatSelect
11637
11984
  }) {
11638
- return /* @__PURE__ */ jsxs28(
11985
+ return /* @__PURE__ */ jsxs29(
11639
11986
  "div",
11640
11987
  {
11641
11988
  style: {
@@ -11649,11 +11996,11 @@ function FiatPaymentDropdownContent({
11649
11996
  animation: "tw-fade-in 0.2s ease-out"
11650
11997
  },
11651
11998
  children: [
11652
- /* @__PURE__ */ jsx36(FiatComingSoonBanner, {}),
11653
- /* @__PURE__ */ jsxs28("div", { style: { padding: spacing[3] }, children: [
11654
- /* @__PURE__ */ jsxs28("div", { style: dropdownSectionHeadingStyle, children: [
11655
- /* @__PURE__ */ jsx36("div", { style: dropdownStatusDotStyle(colors.primary) }),
11656
- /* @__PURE__ */ jsx36(
11999
+ /* @__PURE__ */ jsx37(FiatComingSoonBanner, {}),
12000
+ /* @__PURE__ */ jsxs29("div", { style: { padding: spacing[3] }, children: [
12001
+ /* @__PURE__ */ jsxs29("div", { style: dropdownSectionHeadingStyle, children: [
12002
+ /* @__PURE__ */ jsx37("div", { style: dropdownStatusDotStyle(colors.primary) }),
12003
+ /* @__PURE__ */ jsx37(
11657
12004
  "span",
11658
12005
  {
11659
12006
  style: {
@@ -11665,7 +12012,7 @@ function FiatPaymentDropdownContent({
11665
12012
  }
11666
12013
  )
11667
12014
  ] }),
11668
- /* @__PURE__ */ jsx36(
12015
+ /* @__PURE__ */ jsx37(
11669
12016
  "div",
11670
12017
  {
11671
12018
  style: {
@@ -11673,7 +12020,7 @@ function FiatPaymentDropdownContent({
11673
12020
  flexDirection: "column",
11674
12021
  gap: spacing[1]
11675
12022
  },
11676
- children: fiatOptions2.map((method) => /* @__PURE__ */ jsx36(
12023
+ children: fiatOptions2.map((method) => /* @__PURE__ */ jsx37(
11677
12024
  FiatMethodRow,
11678
12025
  {
11679
12026
  method,
@@ -11690,9 +12037,9 @@ function FiatPaymentDropdownContent({
11690
12037
  }
11691
12038
 
11692
12039
  // src/widget/features/wallet/components/paymentOptionIcons.tsx
11693
- import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
12040
+ import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
11694
12041
  function CryptoPaymentIcon() {
11695
- return /* @__PURE__ */ jsx37(
12042
+ return /* @__PURE__ */ jsx38(
11696
12043
  "svg",
11697
12044
  {
11698
12045
  style: {
@@ -11704,7 +12051,7 @@ function CryptoPaymentIcon() {
11704
12051
  fill: "none",
11705
12052
  stroke: "currentColor",
11706
12053
  strokeWidth: 2,
11707
- children: /* @__PURE__ */ jsx37(
12054
+ children: /* @__PURE__ */ jsx38(
11708
12055
  "path",
11709
12056
  {
11710
12057
  strokeLinecap: "round",
@@ -11716,7 +12063,7 @@ function CryptoPaymentIcon() {
11716
12063
  );
11717
12064
  }
11718
12065
  function FiatPaymentIcon() {
11719
- return /* @__PURE__ */ jsxs29(
12066
+ return /* @__PURE__ */ jsxs30(
11720
12067
  "svg",
11721
12068
  {
11722
12069
  style: {
@@ -11729,94 +12076,94 @@ function FiatPaymentIcon() {
11729
12076
  stroke: "currentColor",
11730
12077
  strokeWidth: 2,
11731
12078
  children: [
11732
- /* @__PURE__ */ jsx37("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
11733
- /* @__PURE__ */ jsx37("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
12079
+ /* @__PURE__ */ jsx38("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
12080
+ /* @__PURE__ */ jsx38("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
11734
12081
  ]
11735
12082
  }
11736
12083
  );
11737
12084
  }
11738
12085
  function ApplePayIcon() {
11739
- return /* @__PURE__ */ jsxs29(
12086
+ return /* @__PURE__ */ jsxs30(
11740
12087
  "svg",
11741
12088
  {
11742
12089
  style: { width: "2rem", height: "1.25rem" },
11743
12090
  viewBox: "0 0 50 20",
11744
12091
  fill: "currentColor",
11745
12092
  children: [
11746
- /* @__PURE__ */ jsx37("path", { d: "M9.6 4.8c-.6.7-1.5 1.3-2.4 1.2-.1-.9.3-1.9.9-2.5.6-.7 1.6-1.2 2.4-1.2.1 1-.3 1.9-.9 2.5zm.9 1.3c-1.3-.1-2.5.8-3.1.8-.6 0-1.6-.7-2.7-.7-1.4 0-2.6.8-3.4 2-.7 1.2-.5 3.5.6 5.5.5.9 1.2 1.9 2.1 1.9.8 0 1.2-.5 2.3-.5s1.4.5 2.4.5c.9 0 1.5-.9 2-1.8.4-.6.5-1.2.7-1.8-1.6-.6-2-2.6-1.4-4-.4-.5-1-1.3-1.5-1.9z" }),
11747
- /* @__PURE__ */ jsx37("path", { d: "M18.4 2.1c2.3 0 4 1.6 4 3.9s-1.7 3.9-4.1 3.9h-2.6v4h-1.8V2.1h4.5zm-2.7 6.2h2.2c1.6 0 2.5-.9 2.5-2.4s-.9-2.4-2.5-2.4h-2.2v4.8zm6.4 3.2c0-1.5 1.2-2.5 3.3-2.6l2.4-.1v-.7c0-1-.7-1.6-1.8-1.6-1 0-1.7.5-1.8 1.3h-1.6c.1-1.5 1.4-2.7 3.5-2.7 2.1 0 3.4 1.1 3.4 2.9v6h-1.6v-1.4c-.5 1-1.5 1.6-2.7 1.6-1.7 0-2.9-1-2.9-2.7h-.2zm5.7-.8v-.7l-2.2.1c-1.1.1-1.8.6-1.8 1.4 0 .8.6 1.3 1.6 1.3 1.3 0 2.4-.9 2.4-2.1zm3.2 5.8v-1.4c.1 0 .5.1.7.1 1 0 1.5-.4 1.8-1.5l.2-.6-3.1-8.6h1.9l2.2 6.9 2.2-6.9h1.8l-3.2 9c-.7 2-1.5 2.7-3.3 2.7-.2 0-.6 0-.8-.1l-.4.4z" })
12093
+ /* @__PURE__ */ jsx38("path", { d: "M9.6 4.8c-.6.7-1.5 1.3-2.4 1.2-.1-.9.3-1.9.9-2.5.6-.7 1.6-1.2 2.4-1.2.1 1-.3 1.9-.9 2.5zm.9 1.3c-1.3-.1-2.5.8-3.1.8-.6 0-1.6-.7-2.7-.7-1.4 0-2.6.8-3.4 2-.7 1.2-.5 3.5.6 5.5.5.9 1.2 1.9 2.1 1.9.8 0 1.2-.5 2.3-.5s1.4.5 2.4.5c.9 0 1.5-.9 2-1.8.4-.6.5-1.2.7-1.8-1.6-.6-2-2.6-1.4-4-.4-.5-1-1.3-1.5-1.9z" }),
12094
+ /* @__PURE__ */ jsx38("path", { d: "M18.4 2.1c2.3 0 4 1.6 4 3.9s-1.7 3.9-4.1 3.9h-2.6v4h-1.8V2.1h4.5zm-2.7 6.2h2.2c1.6 0 2.5-.9 2.5-2.4s-.9-2.4-2.5-2.4h-2.2v4.8zm6.4 3.2c0-1.5 1.2-2.5 3.3-2.6l2.4-.1v-.7c0-1-.7-1.6-1.8-1.6-1 0-1.7.5-1.8 1.3h-1.6c.1-1.5 1.4-2.7 3.5-2.7 2.1 0 3.4 1.1 3.4 2.9v6h-1.6v-1.4c-.5 1-1.5 1.6-2.7 1.6-1.7 0-2.9-1-2.9-2.7h-.2zm5.7-.8v-.7l-2.2.1c-1.1.1-1.8.6-1.8 1.4 0 .8.6 1.3 1.6 1.3 1.3 0 2.4-.9 2.4-2.1zm3.2 5.8v-1.4c.1 0 .5.1.7.1 1 0 1.5-.4 1.8-1.5l.2-.6-3.1-8.6h1.9l2.2 6.9 2.2-6.9h1.8l-3.2 9c-.7 2-1.5 2.7-3.3 2.7-.2 0-.6 0-.8-.1l-.4.4z" })
11748
12095
  ]
11749
12096
  }
11750
12097
  );
11751
12098
  }
11752
12099
  function MPesaIcon() {
11753
- return /* @__PURE__ */ jsx37(
12100
+ return /* @__PURE__ */ jsx38(
11754
12101
  "svg",
11755
12102
  {
11756
12103
  style: { width: "2rem", height: "1.25rem" },
11757
12104
  viewBox: "0 0 24 24",
11758
12105
  fill: "currentColor",
11759
- children: /* @__PURE__ */ jsx37("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" })
12106
+ children: /* @__PURE__ */ jsx38("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" })
11760
12107
  }
11761
12108
  );
11762
12109
  }
11763
12110
  function VenmoIcon() {
11764
- return /* @__PURE__ */ jsx37(
12111
+ return /* @__PURE__ */ jsx38(
11765
12112
  "svg",
11766
12113
  {
11767
12114
  style: { width: "2rem", height: "1.25rem" },
11768
12115
  viewBox: "0 0 24 24",
11769
12116
  fill: "currentColor",
11770
- children: /* @__PURE__ */ jsx37("path", { d: "M19.5 3h-15C3.12 3 2 4.12 2 5.5v13C2 19.88 3.12 21 4.5 21h15c1.38 0 2.5-1.12 2.5-2.5v-13C22 4.12 20.88 3 19.5 3zm-4.77 11.58c-.64 1.56-2.13 3.42-3.86 3.42H8.69l-.61-3.55 1.13-.21.28 1.64c.25.14.52.22.79.22.68 0 1.31-.48 1.74-1.34.33-.67.44-1.34.44-1.92 0-.45-.11-.82-.38-1.06-.24-.22-.58-.33-.98-.33-.64 0-1.29.28-1.86.61l-.05-.02.61-4.04h4.13l-.16 1.11H11l-.21 1.4c.41-.13.85-.19 1.28-.19.71 0 1.31.2 1.73.61.46.44.67 1.08.67 1.88 0 .68-.15 1.35-.48 2.01z" })
12117
+ children: /* @__PURE__ */ jsx38("path", { d: "M19.5 3h-15C3.12 3 2 4.12 2 5.5v13C2 19.88 3.12 21 4.5 21h15c1.38 0 2.5-1.12 2.5-2.5v-13C22 4.12 20.88 3 19.5 3zm-4.77 11.58c-.64 1.56-2.13 3.42-3.86 3.42H8.69l-.61-3.55 1.13-.21.28 1.64c.25.14.52.22.79.22.68 0 1.31-.48 1.74-1.34.33-.67.44-1.34.44-1.92 0-.45-.11-.82-.38-1.06-.24-.22-.58-.33-.98-.33-.64 0-1.29.28-1.86.61l-.05-.02.61-4.04h4.13l-.16 1.11H11l-.21 1.4c.41-.13.85-.19 1.28-.19.71 0 1.31.2 1.73.61.46.44.67 1.08.67 1.88 0 .68-.15 1.35-.48 2.01z" })
11771
12118
  }
11772
12119
  );
11773
12120
  }
11774
12121
  function ZelleIcon() {
11775
- return /* @__PURE__ */ jsx37(
12122
+ return /* @__PURE__ */ jsx38(
11776
12123
  "svg",
11777
12124
  {
11778
12125
  style: { width: "2rem", height: "1.25rem" },
11779
12126
  viewBox: "0 0 24 24",
11780
12127
  fill: "currentColor",
11781
- children: /* @__PURE__ */ jsx37("path", { d: "M13.25 4H5.5C4.67 4 4 4.67 4 5.5v13c0 .83.67 1.5 1.5 1.5h13c.83 0 1.5-.67 1.5-1.5v-7.75h-2v6.25H6V7h7.25V4zm3.91 2.83L9.83 14.17l-1.42-1.41 7.33-7.34L13.83 3.5h6.67v6.67l-1.92-1.92-1.42-1.42z" })
12128
+ children: /* @__PURE__ */ jsx38("path", { d: "M13.25 4H5.5C4.67 4 4 4.67 4 5.5v13c0 .83.67 1.5 1.5 1.5h13c.83 0 1.5-.67 1.5-1.5v-7.75h-2v6.25H6V7h7.25V4zm3.91 2.83L9.83 14.17l-1.42-1.41 7.33-7.34L13.83 3.5h6.67v6.67l-1.92-1.92-1.42-1.42z" })
11782
12129
  }
11783
12130
  );
11784
12131
  }
11785
12132
 
11786
12133
  // src/widget/features/wallet/components/fiatOptions.tsx
11787
- import { jsx as jsx38 } from "react/jsx-runtime";
12134
+ import { jsx as jsx39 } from "react/jsx-runtime";
11788
12135
  var fiatOptions = [
11789
12136
  {
11790
12137
  id: "applepay",
11791
12138
  name: "Apple Pay",
11792
- icon: /* @__PURE__ */ jsx38(ApplePayIcon, {})
12139
+ icon: /* @__PURE__ */ jsx39(ApplePayIcon, {})
11793
12140
  },
11794
12141
  {
11795
12142
  id: "mpesa",
11796
12143
  name: "M-Pesa",
11797
- icon: /* @__PURE__ */ jsx38(MPesaIcon, {})
12144
+ icon: /* @__PURE__ */ jsx39(MPesaIcon, {})
11798
12145
  },
11799
12146
  {
11800
12147
  id: "venmo",
11801
12148
  name: "Venmo",
11802
- icon: /* @__PURE__ */ jsx38(VenmoIcon, {})
12149
+ icon: /* @__PURE__ */ jsx39(VenmoIcon, {})
11803
12150
  },
11804
12151
  {
11805
12152
  id: "zelle",
11806
12153
  name: "Zelle",
11807
- icon: /* @__PURE__ */ jsx38(ZelleIcon, {})
12154
+ icon: /* @__PURE__ */ jsx39(ZelleIcon, {})
11808
12155
  }
11809
12156
  ];
11810
12157
 
11811
12158
  // src/widget/features/wallet/components/PaymentDropdownButton.tsx
11812
- import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
12159
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
11813
12160
  function PaymentDropdownButton({
11814
12161
  icon,
11815
12162
  isOpen,
11816
12163
  label,
11817
12164
  onClick
11818
12165
  }) {
11819
- return /* @__PURE__ */ jsxs30(
12166
+ return /* @__PURE__ */ jsxs31(
11820
12167
  "button",
11821
12168
  {
11822
12169
  type: "button",
@@ -11842,7 +12189,7 @@ function PaymentDropdownButton({
11842
12189
  },
11843
12190
  children: [
11844
12191
  icon,
11845
- /* @__PURE__ */ jsx39(
12192
+ /* @__PURE__ */ jsx40(
11846
12193
  "span",
11847
12194
  {
11848
12195
  style: {
@@ -11855,7 +12202,7 @@ function PaymentDropdownButton({
11855
12202
  children: label
11856
12203
  }
11857
12204
  ),
11858
- /* @__PURE__ */ jsx39(
12205
+ /* @__PURE__ */ jsx40(
11859
12206
  "svg",
11860
12207
  {
11861
12208
  style: {
@@ -11869,7 +12216,7 @@ function PaymentDropdownButton({
11869
12216
  fill: "none",
11870
12217
  stroke: "currentColor",
11871
12218
  strokeWidth: 2,
11872
- children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
12219
+ children: /* @__PURE__ */ jsx40("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
11873
12220
  }
11874
12221
  )
11875
12222
  ]
@@ -11878,7 +12225,7 @@ function PaymentDropdownButton({
11878
12225
  }
11879
12226
 
11880
12227
  // src/widget/features/wallet/components/HomePaymentOptions.tsx
11881
- import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
12228
+ import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
11882
12229
  function HomePaymentOptions({
11883
12230
  browserWallets,
11884
12231
  cryptoDropdownRef,
@@ -11892,7 +12239,7 @@ function HomePaymentOptions({
11892
12239
  setIsCryptoDropdownOpen,
11893
12240
  setIsFiatDropdownOpen
11894
12241
  }) {
11895
- return /* @__PURE__ */ jsxs31(
12242
+ return /* @__PURE__ */ jsxs32(
11896
12243
  "div",
11897
12244
  {
11898
12245
  style: {
@@ -11905,16 +12252,16 @@ function HomePaymentOptions({
11905
12252
  minHeight: "6rem"
11906
12253
  },
11907
12254
  children: [
11908
- /* @__PURE__ */ jsxs31(
12255
+ /* @__PURE__ */ jsxs32(
11909
12256
  "div",
11910
12257
  {
11911
12258
  style: isCryptoDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11912
12259
  ref: cryptoDropdownRef,
11913
12260
  children: [
11914
- /* @__PURE__ */ jsx40(
12261
+ /* @__PURE__ */ jsx41(
11915
12262
  PaymentDropdownButton,
11916
12263
  {
11917
- icon: /* @__PURE__ */ jsx40(CryptoPaymentIcon, {}),
12264
+ icon: /* @__PURE__ */ jsx41(CryptoPaymentIcon, {}),
11918
12265
  isOpen: isCryptoDropdownOpen,
11919
12266
  label: "Pay with crypto",
11920
12267
  onClick: () => {
@@ -11923,7 +12270,7 @@ function HomePaymentOptions({
11923
12270
  }
11924
12271
  }
11925
12272
  ),
11926
- isCryptoDropdownOpen ? /* @__PURE__ */ jsx40(
12273
+ isCryptoDropdownOpen ? /* @__PURE__ */ jsx41(
11927
12274
  CryptoWalletDropdownContent,
11928
12275
  {
11929
12276
  browserWallets,
@@ -11934,9 +12281,9 @@ function HomePaymentOptions({
11934
12281
  ]
11935
12282
  }
11936
12283
  ),
11937
- /* @__PURE__ */ jsxs31("div", { style: dividerRowStyle, children: [
11938
- /* @__PURE__ */ jsx40("div", { style: mutedOrDividerStyle(isDarkTheme) }),
11939
- /* @__PURE__ */ jsx40(
12284
+ /* @__PURE__ */ jsxs32("div", { style: dividerRowStyle, children: [
12285
+ /* @__PURE__ */ jsx41("div", { style: mutedOrDividerStyle(isDarkTheme) }),
12286
+ /* @__PURE__ */ jsx41(
11940
12287
  "span",
11941
12288
  {
11942
12289
  style: {
@@ -11947,18 +12294,18 @@ function HomePaymentOptions({
11947
12294
  children: "Or"
11948
12295
  }
11949
12296
  ),
11950
- /* @__PURE__ */ jsx40("div", { style: mutedOrDividerStyle(isDarkTheme) })
12297
+ /* @__PURE__ */ jsx41("div", { style: mutedOrDividerStyle(isDarkTheme) })
11951
12298
  ] }),
11952
- /* @__PURE__ */ jsxs31(
12299
+ /* @__PURE__ */ jsxs32(
11953
12300
  "div",
11954
12301
  {
11955
12302
  style: isFiatDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11956
12303
  ref: fiatDropdownRef,
11957
12304
  children: [
11958
- /* @__PURE__ */ jsx40(
12305
+ /* @__PURE__ */ jsx41(
11959
12306
  PaymentDropdownButton,
11960
12307
  {
11961
- icon: /* @__PURE__ */ jsx40(FiatPaymentIcon, {}),
12308
+ icon: /* @__PURE__ */ jsx41(FiatPaymentIcon, {}),
11962
12309
  isOpen: isFiatDropdownOpen,
11963
12310
  label: "Pay with fiat",
11964
12311
  onClick: () => {
@@ -11967,7 +12314,7 @@ function HomePaymentOptions({
11967
12314
  }
11968
12315
  }
11969
12316
  ),
11970
- isFiatDropdownOpen ? /* @__PURE__ */ jsx40(
12317
+ isFiatDropdownOpen ? /* @__PURE__ */ jsx41(
11971
12318
  FiatPaymentDropdownContent,
11972
12319
  {
11973
12320
  fiatOptions,
@@ -11983,7 +12330,7 @@ function HomePaymentOptions({
11983
12330
  }
11984
12331
 
11985
12332
  // src/widget/features/wallet/hooks/useHomeWalletActions.ts
11986
- import { useEffect as useEffect20, useRef as useRef8, useState as useState20 } from "react";
12333
+ import { useEffect as useEffect22, useRef as useRef10, useState as useState21 } from "react";
11987
12334
 
11988
12335
  // src/config/walletconnect.ts
11989
12336
  init_store();
@@ -12106,12 +12453,12 @@ function useHomeWalletActions({
12106
12453
  detectedWallets,
12107
12454
  setCurrentStep
12108
12455
  }) {
12109
- const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = useState20(false);
12110
- const [isFiatDropdownOpen, setIsFiatDropdownOpen] = useState20(false);
12111
- const [universalConnector, setUniversalConnector] = useState20();
12112
- const cryptoDropdownRef = useRef8(null);
12113
- const fiatDropdownRef = useRef8(null);
12114
- useEffect20(() => {
12456
+ const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = useState21(false);
12457
+ const [isFiatDropdownOpen, setIsFiatDropdownOpen] = useState21(false);
12458
+ const [universalConnector, setUniversalConnector] = useState21();
12459
+ const cryptoDropdownRef = useRef10(null);
12460
+ const fiatDropdownRef = useRef10(null);
12461
+ useEffect22(() => {
12115
12462
  const handleClickOutside = (event) => {
12116
12463
  if (cryptoDropdownRef.current && !cryptoDropdownRef.current.contains(event.target)) {
12117
12464
  setIsCryptoDropdownOpen(false);
@@ -12123,7 +12470,7 @@ function useHomeWalletActions({
12123
12470
  document.addEventListener("mousedown", handleClickOutside);
12124
12471
  return () => document.removeEventListener("mousedown", handleClickOutside);
12125
12472
  }, []);
12126
- useEffect20(() => {
12473
+ useEffect22(() => {
12127
12474
  getUniversalConnector().then(setUniversalConnector);
12128
12475
  }, []);
12129
12476
  const handleWalletSelect = async (wallet) => {
@@ -12164,7 +12511,7 @@ function useHomeWalletActions({
12164
12511
  }
12165
12512
 
12166
12513
  // src/widget/pages/Home.tsx
12167
- import { jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
12514
+ import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
12168
12515
  function Home({ style: _style }) {
12169
12516
  const { amount, setAmount, amountInputMode, setAmountInputMode } = useDepositForm();
12170
12517
  const { setCurrentStep } = useDepositNavigation();
@@ -12198,7 +12545,7 @@ function Home({ style: _style }) {
12198
12545
  detectedWallets,
12199
12546
  setCurrentStep
12200
12547
  });
12201
- return /* @__PURE__ */ jsxs32(
12548
+ return /* @__PURE__ */ jsxs33(
12202
12549
  "div",
12203
12550
  {
12204
12551
  style: {
@@ -12207,7 +12554,7 @@ function Home({ style: _style }) {
12207
12554
  minHeight: "500px"
12208
12555
  },
12209
12556
  children: [
12210
- /* @__PURE__ */ jsx41(
12557
+ /* @__PURE__ */ jsx42(
12211
12558
  "div",
12212
12559
  {
12213
12560
  style: {
@@ -12217,7 +12564,7 @@ function Home({ style: _style }) {
12217
12564
  padding: `${spacing[4]} ${spacing[4]}`,
12218
12565
  borderBottom: `1px solid ${colors.border}`
12219
12566
  },
12220
- children: /* @__PURE__ */ jsx41(
12567
+ children: /* @__PURE__ */ jsx42(
12221
12568
  "h1",
12222
12569
  {
12223
12570
  style: {
@@ -12230,7 +12577,7 @@ function Home({ style: _style }) {
12230
12577
  )
12231
12578
  }
12232
12579
  ),
12233
- /* @__PURE__ */ jsxs32(
12580
+ /* @__PURE__ */ jsxs33(
12234
12581
  "div",
12235
12582
  {
12236
12583
  style: {
@@ -12244,7 +12591,7 @@ function Home({ style: _style }) {
12244
12591
  position: "relative"
12245
12592
  },
12246
12593
  children: [
12247
- /* @__PURE__ */ jsx41(
12594
+ /* @__PURE__ */ jsx42(
12248
12595
  "p",
12249
12596
  {
12250
12597
  style: {
@@ -12255,7 +12602,7 @@ function Home({ style: _style }) {
12255
12602
  children: "Enter an amount"
12256
12603
  }
12257
12604
  ),
12258
- /* @__PURE__ */ jsx41(
12605
+ /* @__PURE__ */ jsx42(
12259
12606
  AmountInputDisplay,
12260
12607
  {
12261
12608
  amount,
@@ -12266,7 +12613,7 @@ function Home({ style: _style }) {
12266
12613
  style: { marginBottom: spacing[8] }
12267
12614
  }
12268
12615
  ),
12269
- amountValidationMessage ? /* @__PURE__ */ jsx41(
12616
+ amountValidationMessage ? /* @__PURE__ */ jsx42(
12270
12617
  "p",
12271
12618
  {
12272
12619
  style: {
@@ -12279,7 +12626,7 @@ function Home({ style: _style }) {
12279
12626
  },
12280
12627
  children: amountValidationMessage
12281
12628
  }
12282
- ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ jsx41(
12629
+ ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ jsx42(
12283
12630
  "p",
12284
12631
  {
12285
12632
  style: {
@@ -12295,7 +12642,7 @@ function Home({ style: _style }) {
12295
12642
  ].filter(Boolean).join(" \u2022 ")
12296
12643
  }
12297
12644
  ) : null,
12298
- /* @__PURE__ */ jsx41(
12645
+ /* @__PURE__ */ jsx42(
12299
12646
  HomePaymentOptions,
12300
12647
  {
12301
12648
  browserWallets,
@@ -12314,14 +12661,14 @@ function Home({ style: _style }) {
12314
12661
  ]
12315
12662
  }
12316
12663
  ),
12317
- /* @__PURE__ */ jsx41(WidgetSecurityFooter, {})
12664
+ /* @__PURE__ */ jsx42(WidgetSecurityFooter, {})
12318
12665
  ]
12319
12666
  }
12320
12667
  );
12321
12668
  }
12322
12669
 
12323
12670
  // src/widget/pages/SelectToken.tsx
12324
- import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
12671
+ import { jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
12325
12672
  function SelectToken({ style }) {
12326
12673
  const { selectedChain, setSelectedChain, setSelectedToken } = useDepositForm();
12327
12674
  const { goBack } = useDepositNavigation();
@@ -12352,7 +12699,7 @@ function SelectToken({ style }) {
12352
12699
  walletAddress,
12353
12700
  yourWalletTokens
12354
12701
  });
12355
- return /* @__PURE__ */ jsxs33(
12702
+ return /* @__PURE__ */ jsxs34(
12356
12703
  "div",
12357
12704
  {
12358
12705
  style: {
@@ -12363,7 +12710,7 @@ function SelectToken({ style }) {
12363
12710
  ...style
12364
12711
  },
12365
12712
  children: [
12366
- /* @__PURE__ */ jsxs33(
12713
+ /* @__PURE__ */ jsxs34(
12367
12714
  "div",
12368
12715
  {
12369
12716
  style: {
@@ -12373,7 +12720,7 @@ function SelectToken({ style }) {
12373
12720
  borderBottom: `1px solid ${colors.border}`
12374
12721
  },
12375
12722
  children: [
12376
- /* @__PURE__ */ jsx42(
12723
+ /* @__PURE__ */ jsx43(
12377
12724
  "button",
12378
12725
  {
12379
12726
  type: "button",
@@ -12388,7 +12735,7 @@ function SelectToken({ style }) {
12388
12735
  cursor: "pointer"
12389
12736
  },
12390
12737
  "aria-label": "Go back",
12391
- children: /* @__PURE__ */ jsx42(
12738
+ children: /* @__PURE__ */ jsx43(
12392
12739
  "svg",
12393
12740
  {
12394
12741
  style: {
@@ -12400,7 +12747,7 @@ function SelectToken({ style }) {
12400
12747
  fill: "none",
12401
12748
  stroke: "currentColor",
12402
12749
  strokeWidth: 2,
12403
- children: /* @__PURE__ */ jsx42(
12750
+ children: /* @__PURE__ */ jsx43(
12404
12751
  "path",
12405
12752
  {
12406
12753
  strokeLinecap: "round",
@@ -12412,7 +12759,7 @@ function SelectToken({ style }) {
12412
12759
  )
12413
12760
  }
12414
12761
  ),
12415
- /* @__PURE__ */ jsx42(
12762
+ /* @__PURE__ */ jsx43(
12416
12763
  "h1",
12417
12764
  {
12418
12765
  style: {
@@ -12429,7 +12776,7 @@ function SelectToken({ style }) {
12429
12776
  ]
12430
12777
  }
12431
12778
  ),
12432
- /* @__PURE__ */ jsxs33(
12779
+ /* @__PURE__ */ jsxs34(
12433
12780
  "div",
12434
12781
  {
12435
12782
  style: {
@@ -12438,7 +12785,7 @@ function SelectToken({ style }) {
12438
12785
  overflow: "hidden"
12439
12786
  },
12440
12787
  children: [
12441
- /* @__PURE__ */ jsx42(
12788
+ /* @__PURE__ */ jsx43(
12442
12789
  ChainSelectorPanel,
12443
12790
  {
12444
12791
  error,
@@ -12449,7 +12796,7 @@ function SelectToken({ style }) {
12449
12796
  popularChains
12450
12797
  }
12451
12798
  ),
12452
- /* @__PURE__ */ jsx42(
12799
+ /* @__PURE__ */ jsx43(
12453
12800
  TokenSelectorPanel,
12454
12801
  {
12455
12802
  filteredTokens,
@@ -12470,17 +12817,17 @@ function SelectToken({ style }) {
12470
12817
  ]
12471
12818
  }
12472
12819
  ),
12473
- /* @__PURE__ */ jsx42(WidgetSecurityFooter, {})
12820
+ /* @__PURE__ */ jsx43(WidgetSecurityFooter, {})
12474
12821
  ]
12475
12822
  }
12476
12823
  );
12477
12824
  }
12478
12825
 
12479
12826
  // src/widget/pages/CryptoPay.tsx
12480
- import { useEffect as useEffect22, useMemo as useMemo17 } from "react";
12827
+ import { useEffect as useEffect24, useMemo as useMemo18 } from "react";
12481
12828
 
12482
12829
  // src/widget/features/route-preview/hooks/useRoutePreviewModel.ts
12483
- import { useMemo as useMemo15 } from "react";
12830
+ import { useMemo as useMemo16 } from "react";
12484
12831
  function useRoutePreviewModel({
12485
12832
  amountUsd,
12486
12833
  amountValidationError,
@@ -12493,7 +12840,7 @@ function useRoutePreviewModel({
12493
12840
  walletAddress
12494
12841
  }) {
12495
12842
  const { chains } = useChains();
12496
- const destinationConfig = useMemo15(
12843
+ const destinationConfig = useMemo16(
12497
12844
  () => ({
12498
12845
  dappName: config.messages?.title || "DApp",
12499
12846
  toChain: config.routes.toChain,
@@ -12507,7 +12854,7 @@ function useRoutePreviewModel({
12507
12854
  config.routes.toToken
12508
12855
  ]
12509
12856
  );
12510
- const routeConfig = useMemo15(() => {
12857
+ const routeConfig = useMemo16(() => {
12511
12858
  const toChainId = config.routes.toChain;
12512
12859
  const toChainKey = normalizeChainKey2(toChainId);
12513
12860
  const toChain = toChainKey ? chains.find(
@@ -12541,7 +12888,7 @@ function useRoutePreviewModel({
12541
12888
  walletAddress
12542
12889
  ]);
12543
12890
  const routeBuilderState = useRouteBuilder(routeConfig);
12544
- const routePrerequisiteError = useMemo15(() => {
12891
+ const routePrerequisiteError = useMemo16(() => {
12545
12892
  if (!isReady) return;
12546
12893
  if (!selectedChain) {
12547
12894
  return "Select a source chain to fetch a route.";
@@ -12581,7 +12928,7 @@ function useRoutePreviewModel({
12581
12928
  }
12582
12929
 
12583
12930
  // src/widget/features/transaction/components/CryptoPaySwipeSection.tsx
12584
- import { jsx as jsx43 } from "react/jsx-runtime";
12931
+ import { jsx as jsx44 } from "react/jsx-runtime";
12585
12932
  function CryptoPaySwipeSection({
12586
12933
  actionErrorMessage,
12587
12934
  canSwipe,
@@ -12597,13 +12944,13 @@ function CryptoPaySwipeSection({
12597
12944
  swipeResetKey
12598
12945
  }) {
12599
12946
  const swipeText = actionErrorMessage ? actionErrorMessage : !isWalletConnected ? "Connect your wallet to deposit" : isLoadingRoute ? "Loading route..." : isApproving ? "Approving..." : isReadingAllowance ? "Checking allowance..." : needsApproval ? "Swipe to approve" : "Swipe to confirm";
12600
- return /* @__PURE__ */ jsx43(
12947
+ return /* @__PURE__ */ jsx44(
12601
12948
  "div",
12602
12949
  {
12603
12950
  style: {
12604
12951
  padding: `${spacing[4]} ${spacing[6]}`
12605
12952
  },
12606
- children: selectedToken?.chainData ? /* @__PURE__ */ jsx43(
12953
+ children: selectedToken?.chainData ? /* @__PURE__ */ jsx44(
12607
12954
  SwipeToConfirmTokens,
12608
12955
  {
12609
12956
  text: swipeText,
@@ -12623,7 +12970,7 @@ function CryptoPaySwipeSection({
12623
12970
  }
12624
12971
 
12625
12972
  // src/widget/features/transaction/components/ErrorRecoveryCard.tsx
12626
- import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
12973
+ import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
12627
12974
  function ErrorRecoveryCard({
12628
12975
  errorMessage,
12629
12976
  errorSuggestion,
@@ -12634,7 +12981,7 @@ function ErrorRecoveryCard({
12634
12981
  renderErrorIcon,
12635
12982
  transactionHash
12636
12983
  }) {
12637
- return /* @__PURE__ */ jsxs34(
12984
+ return /* @__PURE__ */ jsxs35(
12638
12985
  "div",
12639
12986
  {
12640
12987
  style: {
@@ -12646,7 +12993,7 @@ function ErrorRecoveryCard({
12646
12993
  padding: `${spacing[8]} ${spacing[6]}`
12647
12994
  },
12648
12995
  children: [
12649
- /* @__PURE__ */ jsx44(
12996
+ /* @__PURE__ */ jsx45(
12650
12997
  "div",
12651
12998
  {
12652
12999
  style: {
@@ -12662,7 +13009,7 @@ function ErrorRecoveryCard({
12662
13009
  children: renderErrorIcon()
12663
13010
  }
12664
13011
  ),
12665
- /* @__PURE__ */ jsx44(
13012
+ /* @__PURE__ */ jsx45(
12666
13013
  "h2",
12667
13014
  {
12668
13015
  style: {
@@ -12675,7 +13022,7 @@ function ErrorRecoveryCard({
12675
13022
  children: errorTitle
12676
13023
  }
12677
13024
  ),
12678
- errorMessage ? /* @__PURE__ */ jsx44(
13025
+ errorMessage ? /* @__PURE__ */ jsx45(
12679
13026
  "p",
12680
13027
  {
12681
13028
  style: {
@@ -12687,7 +13034,7 @@ function ErrorRecoveryCard({
12687
13034
  children: errorMessage
12688
13035
  }
12689
13036
  ) : null,
12690
- /* @__PURE__ */ jsx44(
13037
+ /* @__PURE__ */ jsx45(
12691
13038
  "p",
12692
13039
  {
12693
13040
  style: {
@@ -12700,13 +13047,13 @@ function ErrorRecoveryCard({
12700
13047
  children: errorSuggestion
12701
13048
  }
12702
13049
  ),
12703
- explorerUrl && transactionHash ? /* @__PURE__ */ jsx44(
13050
+ explorerUrl && transactionHash ? /* @__PURE__ */ jsx45(
12704
13051
  "div",
12705
13052
  {
12706
13053
  style: {
12707
13054
  marginBottom: spacing[6]
12708
13055
  },
12709
- children: /* @__PURE__ */ jsx44(
13056
+ children: /* @__PURE__ */ jsx45(
12710
13057
  TransactionHashLink,
12711
13058
  {
12712
13059
  explorerUrl,
@@ -12716,7 +13063,7 @@ function ErrorRecoveryCard({
12716
13063
  )
12717
13064
  }
12718
13065
  ) : null,
12719
- /* @__PURE__ */ jsxs34(
13066
+ /* @__PURE__ */ jsxs35(
12720
13067
  "div",
12721
13068
  {
12722
13069
  style: {
@@ -12727,7 +13074,7 @@ function ErrorRecoveryCard({
12727
13074
  maxWidth: "20rem"
12728
13075
  },
12729
13076
  children: [
12730
- /* @__PURE__ */ jsx44(
13077
+ /* @__PURE__ */ jsx45(
12731
13078
  "button",
12732
13079
  {
12733
13080
  type: "button",
@@ -12747,7 +13094,7 @@ function ErrorRecoveryCard({
12747
13094
  children: "Try Again"
12748
13095
  }
12749
13096
  ),
12750
- /* @__PURE__ */ jsx44(
13097
+ /* @__PURE__ */ jsx45(
12751
13098
  "button",
12752
13099
  {
12753
13100
  type: "button",
@@ -12776,7 +13123,7 @@ function ErrorRecoveryCard({
12776
13123
  }
12777
13124
 
12778
13125
  // src/widget/features/transaction/components/SuccessSummaryCard.tsx
12779
- import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
13126
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
12780
13127
  function SuccessSummaryCard({
12781
13128
  amount,
12782
13129
  explorerUrl,
@@ -12786,7 +13133,7 @@ function SuccessSummaryCard({
12786
13133
  selectedTokenSymbol,
12787
13134
  transactionHash
12788
13135
  }) {
12789
- return /* @__PURE__ */ jsxs35(
13136
+ return /* @__PURE__ */ jsxs36(
12790
13137
  "div",
12791
13138
  {
12792
13139
  style: {
@@ -12800,7 +13147,7 @@ function SuccessSummaryCard({
12800
13147
  animation: "fade-in 0.3s ease-out"
12801
13148
  },
12802
13149
  children: [
12803
- /* @__PURE__ */ jsxs35(
13150
+ /* @__PURE__ */ jsxs36(
12804
13151
  "div",
12805
13152
  {
12806
13153
  style: {
@@ -12810,7 +13157,7 @@ function SuccessSummaryCard({
12810
13157
  marginBottom: "2rem"
12811
13158
  },
12812
13159
  children: [
12813
- /* @__PURE__ */ jsx45(
13160
+ /* @__PURE__ */ jsx46(
12814
13161
  "div",
12815
13162
  {
12816
13163
  style: {
@@ -12824,7 +13171,7 @@ function SuccessSummaryCard({
12824
13171
  animation: "scale-in 0.3s ease-out",
12825
13172
  marginBottom: "0.75rem"
12826
13173
  },
12827
- children: /* @__PURE__ */ jsx45(
13174
+ children: /* @__PURE__ */ jsx46(
12828
13175
  "svg",
12829
13176
  {
12830
13177
  style: {
@@ -12837,7 +13184,7 @@ function SuccessSummaryCard({
12837
13184
  stroke: "currentColor",
12838
13185
  strokeWidth: 2.5,
12839
13186
  "aria-hidden": "true",
12840
- children: /* @__PURE__ */ jsx45(
13187
+ children: /* @__PURE__ */ jsx46(
12841
13188
  "path",
12842
13189
  {
12843
13190
  strokeLinecap: "round",
@@ -12849,7 +13196,7 @@ function SuccessSummaryCard({
12849
13196
  )
12850
13197
  }
12851
13198
  ),
12852
- /* @__PURE__ */ jsx45(
13199
+ /* @__PURE__ */ jsx46(
12853
13200
  "div",
12854
13201
  {
12855
13202
  style: {
@@ -12863,7 +13210,7 @@ function SuccessSummaryCard({
12863
13210
  ]
12864
13211
  }
12865
13212
  ),
12866
- /* @__PURE__ */ jsxs35(
13213
+ /* @__PURE__ */ jsxs36(
12867
13214
  "div",
12868
13215
  {
12869
13216
  style: {
@@ -12873,7 +13220,7 @@ function SuccessSummaryCard({
12873
13220
  marginBottom: "2rem"
12874
13221
  },
12875
13222
  children: [
12876
- /* @__PURE__ */ jsxs35(
13223
+ /* @__PURE__ */ jsxs36(
12877
13224
  "div",
12878
13225
  {
12879
13226
  style: {
@@ -12890,7 +13237,7 @@ function SuccessSummaryCard({
12890
13237
  ]
12891
13238
  }
12892
13239
  ),
12893
- selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ jsxs35(
13240
+ selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ jsxs36(
12894
13241
  "div",
12895
13242
  {
12896
13243
  style: {
@@ -12900,7 +13247,7 @@ function SuccessSummaryCard({
12900
13247
  marginTop: "0.375rem"
12901
13248
  },
12902
13249
  children: [
12903
- /* @__PURE__ */ jsx45(
13250
+ /* @__PURE__ */ jsx46(
12904
13251
  "img",
12905
13252
  {
12906
13253
  src: selectedTokenIconUrl,
@@ -12912,7 +13259,7 @@ function SuccessSummaryCard({
12912
13259
  }
12913
13260
  }
12914
13261
  ),
12915
- /* @__PURE__ */ jsxs35(
13262
+ /* @__PURE__ */ jsxs36(
12916
13263
  "span",
12917
13264
  {
12918
13265
  style: {
@@ -12931,13 +13278,13 @@ function SuccessSummaryCard({
12931
13278
  ]
12932
13279
  }
12933
13280
  ),
12934
- transactionHash ? /* @__PURE__ */ jsx45(
13281
+ transactionHash ? /* @__PURE__ */ jsx46(
12935
13282
  "div",
12936
13283
  {
12937
13284
  style: {
12938
13285
  marginBottom: "2rem"
12939
13286
  },
12940
- children: /* @__PURE__ */ jsx45(
13287
+ children: /* @__PURE__ */ jsx46(
12941
13288
  TransactionHashLink,
12942
13289
  {
12943
13290
  explorerUrl,
@@ -12947,14 +13294,14 @@ function SuccessSummaryCard({
12947
13294
  )
12948
13295
  }
12949
13296
  ) : null,
12950
- /* @__PURE__ */ jsx45(
13297
+ /* @__PURE__ */ jsx46(
12951
13298
  "div",
12952
13299
  {
12953
13300
  style: {
12954
13301
  width: "100%",
12955
13302
  padding: "1rem"
12956
13303
  },
12957
- children: /* @__PURE__ */ jsx45(
13304
+ children: /* @__PURE__ */ jsx46(
12958
13305
  "button",
12959
13306
  {
12960
13307
  type: "button",
@@ -12980,8 +13327,9 @@ function SuccessSummaryCard({
12980
13327
  }
12981
13328
 
12982
13329
  // src/widget/features/transaction/hooks/useTransactionActionModel.ts
12983
- import { useCallback as useCallback13, useEffect as useEffect21, useMemo as useMemo16, useRef as useRef9, useState as useState21 } from "react";
13330
+ import { useCallback as useCallback14, useEffect as useEffect23, useMemo as useMemo17, useRef as useRef11, useState as useState22 } from "react";
12984
13331
  import { encodeFunctionData, erc20Abi } from "viem";
13332
+ init_constants();
12985
13333
  function normalizeTokenAddressForCompare(chain, addr) {
12986
13334
  const chainType = (chain.type ?? chain.chainType ?? "").toLowerCase();
12987
13335
  const value = (addr ?? "").trim();
@@ -13002,12 +13350,20 @@ function useTransactionActionModel({
13002
13350
  walletAddress,
13003
13351
  walletStatus
13004
13352
  }) {
13005
- const feeDataCacheRef = useRef9({});
13353
+ const feeDataCacheRef = useRef11({});
13006
13354
  const { isSubmitting, submitTransaction } = useTransactionSubmit();
13355
+ const { trackEvent } = useGTM(GTM_ID);
13356
+ const destinationConfig = (() => {
13357
+ try {
13358
+ return Trustware.getConfig();
13359
+ } catch {
13360
+ return void 0;
13361
+ }
13362
+ })();
13007
13363
  const chainType = selectedChain?.type ?? selectedChain?.chainType;
13008
13364
  const chainTypeNormalized = (chainType ?? "").toLowerCase();
13009
13365
  const isEvm = chainTypeNormalized === "evm";
13010
- const backendChainId2 = useMemo16(() => {
13366
+ const backendChainId2 = useMemo17(() => {
13011
13367
  const chainRef = routeResult?.txReq?.chainId ?? selectedChain?.networkIdentifier ?? selectedChain?.chainId ?? selectedChain?.id;
13012
13368
  if (chainRef == null) return null;
13013
13369
  return String(chainRef);
@@ -13017,23 +13373,23 @@ function useTransactionActionModel({
13017
13373
  selectedChain?.id,
13018
13374
  selectedChain?.networkIdentifier
13019
13375
  ]);
13020
- const isNativeSelected = useMemo16(() => {
13376
+ const isNativeSelected = useMemo17(() => {
13021
13377
  const address = selectedToken?.address;
13022
13378
  return isNativeTokenAddress(address, chainType) || isZeroAddrLike(address, chainType) || normalizeTokenAddressForCompare(selectedChain, address) === normalizeTokenAddressForCompare(
13023
13379
  selectedChain,
13024
13380
  getNativeTokenAddress2(chainType)
13025
13381
  );
13026
13382
  }, [chainType, selectedChain, selectedToken?.address]);
13027
- const spender = useMemo16(() => {
13383
+ const spender = useMemo17(() => {
13028
13384
  const txReq = routeResult?.txReq;
13029
13385
  const addr = txReq?.to ?? txReq?.target;
13030
13386
  return addr ?? null;
13031
13387
  }, [routeResult?.txReq]);
13032
- const [allowanceWei, setAllowanceWei] = useState21(0n);
13033
- const [isReadingAllowance, setIsReadingAllowance] = useState21(false);
13034
- const [isApproving, setIsApproving] = useState21(false);
13035
- const [gasReservationWei, setGasReservationWei] = useState21(0n);
13036
- const readAllowance = useCallback13(async () => {
13388
+ const [allowanceWei, setAllowanceWei] = useState22(0n);
13389
+ const [isReadingAllowance, setIsReadingAllowance] = useState22(false);
13390
+ const [isApproving, setIsApproving] = useState22(false);
13391
+ const [gasReservationWei, setGasReservationWei] = useState22(0n);
13392
+ const readAllowance = useCallback14(async () => {
13037
13393
  if (!isEvm || isNativeSelected || !backendChainId2 || !walletAddress || !spender || !selectedToken?.address) {
13038
13394
  setAllowanceWei(0n);
13039
13395
  return;
@@ -13060,11 +13416,11 @@ function useTransactionActionModel({
13060
13416
  spender,
13061
13417
  walletAddress
13062
13418
  ]);
13063
- useEffect21(() => {
13419
+ useEffect23(() => {
13064
13420
  void readAllowance();
13065
13421
  }, [readAllowance]);
13066
13422
  const needsApproval = isEvm && !isNativeSelected && !!walletAddress && !!spender && amountWei > 0n && allowanceWei < amountWei;
13067
- const waitForApprovalConfirmation = useCallback13(
13423
+ const waitForApprovalConfirmation = useCallback14(
13068
13424
  async (chainId, txHash) => {
13069
13425
  const timeoutMs = 12e4;
13070
13426
  const intervalMs = 2e3;
@@ -13083,7 +13439,7 @@ function useTransactionActionModel({
13083
13439
  },
13084
13440
  []
13085
13441
  );
13086
- const handleApproveExact = useCallback13(async () => {
13442
+ const handleApproveExact = useCallback14(async () => {
13087
13443
  if (isApproving || amountWei <= 0n || !walletAddress || !spender || !selectedToken?.address) {
13088
13444
  return;
13089
13445
  }
@@ -13091,6 +13447,13 @@ function useTransactionActionModel({
13091
13447
  if (!wallet || wallet.ecosystem !== "evm") {
13092
13448
  return;
13093
13449
  }
13450
+ trackEvent("token_approval_initiated", {
13451
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13452
+ from_token: selectedToken?.symbol,
13453
+ to_chain: destinationConfig?.routes.toChain,
13454
+ to_token: destinationConfig?.routes.toToken,
13455
+ domain: window.origin
13456
+ });
13094
13457
  setIsApproving(true);
13095
13458
  try {
13096
13459
  const targetChain = Number(
@@ -13148,17 +13511,23 @@ function useTransactionActionModel({
13148
13511
  }, [
13149
13512
  amountWei,
13150
13513
  backendChainId2,
13514
+ destinationConfig?.routes.toChain,
13515
+ destinationConfig?.routes.toToken,
13151
13516
  isApproving,
13152
13517
  readAllowance,
13153
13518
  routeResult?.txReq?.chainId,
13519
+ selectedChain?.axelarChainName,
13154
13520
  selectedChain?.chainId,
13155
13521
  selectedChain?.id,
13522
+ selectedChain?.networkName,
13156
13523
  selectedToken?.address,
13524
+ selectedToken?.symbol,
13157
13525
  spender,
13526
+ trackEvent,
13158
13527
  waitForApprovalConfirmation,
13159
13528
  walletAddress
13160
13529
  ]);
13161
- const getCachedFeeData = useCallback13(async () => {
13530
+ const getCachedFeeData = useCallback14(async () => {
13162
13531
  if (!backendChainId2) return {};
13163
13532
  const now = Date.now();
13164
13533
  const cache = feeDataCacheRef.current;
@@ -13181,7 +13550,7 @@ function useTransactionActionModel({
13181
13550
  }
13182
13551
  return cache.inflight;
13183
13552
  }, [backendChainId2]);
13184
- const estimateGasReservationWei = useCallback13(async () => {
13553
+ const estimateGasReservationWei = useCallback14(async () => {
13185
13554
  if (!isNativeSelected) {
13186
13555
  setGasReservationWei(0n);
13187
13556
  return 0n;
@@ -13245,18 +13614,35 @@ function useTransactionActionModel({
13245
13614
  routeResult?.txReq,
13246
13615
  walletAddress
13247
13616
  ]);
13248
- useEffect21(() => {
13617
+ useEffect23(() => {
13249
13618
  if (routeResult) {
13250
13619
  void estimateGasReservationWei();
13251
13620
  }
13252
13621
  }, [estimateGasReservationWei, routeResult]);
13253
- const handleConfirm = useCallback13(async () => {
13622
+ const handleConfirm = useCallback14(async () => {
13254
13623
  if (!routeResult) {
13255
13624
  return;
13256
13625
  }
13626
+ trackEvent("payment_initiated", {
13627
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13628
+ from_token: selectedToken?.symbol,
13629
+ to_chain: destinationConfig?.routes.toChain,
13630
+ to_token: destinationConfig?.routes.toToken,
13631
+ domain: window.origin
13632
+ });
13257
13633
  await submitTransaction(routeResult);
13258
- }, [routeResult, submitTransaction]);
13259
- const handleSwipeConfirm = useCallback13(async () => {
13634
+ }, [
13635
+ destinationConfig?.routes.toChain,
13636
+ destinationConfig?.routes.toToken,
13637
+ routeResult,
13638
+ selectedChain?.axelarChainName,
13639
+ selectedChain?.chainId,
13640
+ selectedChain?.networkName,
13641
+ selectedToken?.symbol,
13642
+ submitTransaction,
13643
+ trackEvent
13644
+ ]);
13645
+ const handleSwipeConfirm = useCallback14(async () => {
13260
13646
  if (needsApproval) {
13261
13647
  await handleApproveExact();
13262
13648
  return;
@@ -13265,7 +13651,7 @@ function useTransactionActionModel({
13265
13651
  }, [handleApproveExact, handleConfirm, needsApproval]);
13266
13652
  const isWalletConnected = walletStatus === "connected";
13267
13653
  const canSwipe = parsedAmount > 0 && !!selectedToken && isWalletConnected && !isLoadingRoute && !isSubmitting && !!routeResult && !actionErrorMessage && !isApproving && !isReadingAllowance;
13268
- const swipeResetKey = useMemo16(() => {
13654
+ const swipeResetKey = useMemo17(() => {
13269
13655
  const tokenAddress = selectedToken ? normalizeAddress2(
13270
13656
  selectedToken.address,
13271
13657
  selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType
@@ -13292,7 +13678,7 @@ function useTransactionActionModel({
13292
13678
  }
13293
13679
 
13294
13680
  // src/widget/pages/CryptoPay.tsx
13295
- import { Fragment as Fragment6, jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
13681
+ import { Fragment as Fragment6, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
13296
13682
  var SHOW_FEE_SUMMARY = false;
13297
13683
  function CryptoPay({ style: _style }) {
13298
13684
  const {
@@ -13309,12 +13695,12 @@ function CryptoPay({ style: _style }) {
13309
13695
  const { goBack, setCurrentStep, currentStep } = useDepositNavigation();
13310
13696
  const config = useTrustwareConfig();
13311
13697
  const { fixedFromAmountString, isFixedAmount, minAmountUsd, maxAmountUsd } = useAmountConstraints();
13312
- const routeRefreshMs = useMemo17(() => {
13698
+ const routeRefreshMs = useMemo18(() => {
13313
13699
  const raw = config.routes?.options?.routeRefreshMs;
13314
13700
  const n = Number(raw);
13315
13701
  return Number.isFinite(n) && n > 0 ? n : void 0;
13316
13702
  }, [config.routes?.options?.routeRefreshMs]);
13317
- const isReady = useMemo17(() => {
13703
+ const isReady = useMemo18(() => {
13318
13704
  if (selectedToken !== null && yourWalletTokens.length > 0 && selectedToken?.chainData !== void 0) {
13319
13705
  return true;
13320
13706
  }
@@ -13389,7 +13775,7 @@ function CryptoPay({ style: _style }) {
13389
13775
  });
13390
13776
  const { emitError } = useTrustware();
13391
13777
  const readySelectedToken = isReady ? selectedToken : null;
13392
- useEffect22(() => {
13778
+ useEffect24(() => {
13393
13779
  if (currentStep !== "crypto-pay" || !actionErrorMessage) return;
13394
13780
  emitError?.(
13395
13781
  new TrustwareError({
@@ -13421,7 +13807,7 @@ function CryptoPay({ style: _style }) {
13421
13807
  const handleExpandTokens = () => {
13422
13808
  setCurrentStep("select-token");
13423
13809
  };
13424
- return /* @__PURE__ */ jsxs36(
13810
+ return /* @__PURE__ */ jsxs37(
13425
13811
  "div",
13426
13812
  {
13427
13813
  style: {
@@ -13430,9 +13816,9 @@ function CryptoPay({ style: _style }) {
13430
13816
  minHeight: "500px"
13431
13817
  },
13432
13818
  children: [
13433
- /* @__PURE__ */ jsx46(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13434
- isReady ? /* @__PURE__ */ jsxs36(Fragment6, { children: [
13435
- /* @__PURE__ */ jsx46(
13819
+ /* @__PURE__ */ jsx47(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13820
+ isReady ? /* @__PURE__ */ jsxs37(Fragment6, { children: [
13821
+ /* @__PURE__ */ jsx47(
13436
13822
  CryptoPayAmountSection,
13437
13823
  {
13438
13824
  amount,
@@ -13461,7 +13847,7 @@ function CryptoPay({ style: _style }) {
13461
13847
  yourWalletTokensLength: yourWalletTokens.length
13462
13848
  }
13463
13849
  ),
13464
- /* @__PURE__ */ jsx46(
13850
+ /* @__PURE__ */ jsx47(
13465
13851
  CryptoPaySwipeSection,
13466
13852
  {
13467
13853
  actionErrorMessage,
@@ -13478,8 +13864,8 @@ function CryptoPay({ style: _style }) {
13478
13864
  swipeResetKey
13479
13865
  }
13480
13866
  ),
13481
- /* @__PURE__ */ jsx46(WidgetSecurityFooter, {})
13482
- ] }) : /* @__PURE__ */ jsx46(
13867
+ /* @__PURE__ */ jsx47(WidgetSecurityFooter, {})
13868
+ ] }) : /* @__PURE__ */ jsx47(
13483
13869
  "div",
13484
13870
  {
13485
13871
  style: {
@@ -13488,7 +13874,7 @@ function CryptoPay({ style: _style }) {
13488
13874
  alignItems: "center",
13489
13875
  justifyContent: "center"
13490
13876
  },
13491
- children: /* @__PURE__ */ jsx46(LoadingSkeleton, {})
13877
+ children: /* @__PURE__ */ jsx47(LoadingSkeleton, {})
13492
13878
  }
13493
13879
  )
13494
13880
  ]
@@ -13497,8 +13883,8 @@ function CryptoPay({ style: _style }) {
13497
13883
  }
13498
13884
 
13499
13885
  // src/widget/pages/Processing.tsx
13500
- import { useEffect as useEffect23, useMemo as useMemo18, useRef as useRef10 } from "react";
13501
- import { jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
13886
+ import { useEffect as useEffect25, useMemo as useMemo19, useRef as useRef12 } from "react";
13887
+ import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
13502
13888
  function getProgressFromStatus(status) {
13503
13889
  switch (status) {
13504
13890
  case "confirming":
@@ -13536,27 +13922,27 @@ function Processing({ style }) {
13536
13922
  const { resetState, setCurrentStep } = useDepositNavigation();
13537
13923
  const { transactionStatus, transactionHash, intentId } = useDepositTransaction();
13538
13924
  const { transaction, startPolling, isPolling } = useTransactionPolling();
13539
- const hasStartedPolling = useRef10(false);
13540
- useEffect23(() => {
13925
+ const hasStartedPolling = useRef12(false);
13926
+ useEffect25(() => {
13541
13927
  return () => {
13542
13928
  hasStartedPolling.current = false;
13543
13929
  };
13544
13930
  }, []);
13545
- useEffect23(() => {
13931
+ useEffect25(() => {
13546
13932
  if (intentId && transactionHash && !isPolling && !hasStartedPolling.current && transactionStatus !== "success" && transactionStatus !== "error") {
13547
13933
  hasStartedPolling.current = true;
13548
13934
  startPolling(intentId, transactionHash);
13549
13935
  }
13550
13936
  }, [intentId, transactionHash, isPolling, transactionStatus, startPolling]);
13551
- const progress = useMemo18(
13937
+ const progress = useMemo19(
13552
13938
  () => getProgressFromStatus(transactionStatus),
13553
13939
  [transactionStatus]
13554
13940
  );
13555
- const stepText = useMemo18(
13941
+ const stepText = useMemo19(
13556
13942
  () => getStepText(transactionStatus),
13557
13943
  [transactionStatus]
13558
13944
  );
13559
- const explorerUrl = useMemo18(() => {
13945
+ const explorerUrl = useMemo19(() => {
13560
13946
  if (transaction?.fromChainTxUrl) {
13561
13947
  return transaction.fromChainTxUrl;
13562
13948
  }
@@ -13574,7 +13960,7 @@ function Processing({ style }) {
13574
13960
  };
13575
13961
  const isIndeterminate = transactionStatus === "confirming" || transactionStatus === "idle";
13576
13962
  const headerTitle = transactionStatus === "success" ? "Complete" : transactionStatus === "error" ? "Failed" : "Processing";
13577
- return /* @__PURE__ */ jsxs37(
13963
+ return /* @__PURE__ */ jsxs38(
13578
13964
  "div",
13579
13965
  {
13580
13966
  style: {
@@ -13584,8 +13970,8 @@ function Processing({ style }) {
13584
13970
  ...style
13585
13971
  },
13586
13972
  children: [
13587
- /* @__PURE__ */ jsx47(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
13588
- /* @__PURE__ */ jsxs37(
13973
+ /* @__PURE__ */ jsx48(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
13974
+ /* @__PURE__ */ jsxs38(
13589
13975
  "div",
13590
13976
  {
13591
13977
  style: {
@@ -13597,13 +13983,13 @@ function Processing({ style }) {
13597
13983
  padding: `${spacing[8]} ${spacing[6]}`
13598
13984
  },
13599
13985
  children: [
13600
- /* @__PURE__ */ jsx47(
13986
+ /* @__PURE__ */ jsx48(
13601
13987
  "div",
13602
13988
  {
13603
13989
  style: {
13604
13990
  marginBottom: spacing[6]
13605
13991
  },
13606
- children: /* @__PURE__ */ jsx47(
13992
+ children: /* @__PURE__ */ jsx48(
13607
13993
  CircularProgress,
13608
13994
  {
13609
13995
  progress,
@@ -13615,7 +14001,7 @@ function Processing({ style }) {
13615
14001
  )
13616
14002
  }
13617
14003
  ),
13618
- /* @__PURE__ */ jsx47(
14004
+ /* @__PURE__ */ jsx48(
13619
14005
  "p",
13620
14006
  {
13621
14007
  style: {
@@ -13628,7 +14014,7 @@ function Processing({ style }) {
13628
14014
  children: stepText
13629
14015
  }
13630
14016
  ),
13631
- selectedToken && parsedAmount > 0 && /* @__PURE__ */ jsxs37(
14017
+ selectedToken && parsedAmount > 0 && /* @__PURE__ */ jsxs38(
13632
14018
  "p",
13633
14019
  {
13634
14020
  style: {
@@ -13645,7 +14031,7 @@ function Processing({ style }) {
13645
14031
  ]
13646
14032
  }
13647
14033
  ),
13648
- /* @__PURE__ */ jsx47(
14034
+ /* @__PURE__ */ jsx48(
13649
14035
  TransactionSteps,
13650
14036
  {
13651
14037
  transactionStatus,
@@ -13656,7 +14042,7 @@ function Processing({ style }) {
13656
14042
  }
13657
14043
  }
13658
14044
  ),
13659
- transactionHash ? /* @__PURE__ */ jsx47(
14045
+ transactionHash ? /* @__PURE__ */ jsx48(
13660
14046
  TransactionHashLink,
13661
14047
  {
13662
14048
  explorerUrl,
@@ -13664,7 +14050,7 @@ function Processing({ style }) {
13664
14050
  label: "Transaction"
13665
14051
  }
13666
14052
  ) : null,
13667
- transactionStatus === "error" && /* @__PURE__ */ jsx47(
14053
+ transactionStatus === "error" && /* @__PURE__ */ jsx48(
13668
14054
  "button",
13669
14055
  {
13670
14056
  type: "button",
@@ -13686,23 +14072,23 @@ function Processing({ style }) {
13686
14072
  ]
13687
14073
  }
13688
14074
  ),
13689
- /* @__PURE__ */ jsx47(WidgetSecurityFooter, {})
14075
+ /* @__PURE__ */ jsx48(WidgetSecurityFooter, {})
13690
14076
  ]
13691
14077
  }
13692
14078
  );
13693
14079
  }
13694
14080
 
13695
14081
  // src/widget/pages/Success.tsx
13696
- import { lazy, Suspense, useMemo as useMemo19 } from "react";
13697
- import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
14082
+ import { lazy, Suspense, useMemo as useMemo20 } from "react";
14083
+ import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
13698
14084
  var ConfettiEffect2 = lazy(() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports)));
13699
14085
  function Success({ style }) {
13700
14086
  const { selectedToken, selectedChain, amount } = useDepositForm();
13701
14087
  const { resetState } = useDepositNavigation();
13702
14088
  const { transactionHash } = useDepositTransaction();
13703
14089
  const { transaction } = useTransactionPolling();
13704
- const parsedAmount = useMemo19(() => parseFloat(amount) || 0, [amount]);
13705
- const explorerUrl = useMemo19(() => {
14090
+ const parsedAmount = useMemo20(() => parseFloat(amount) || 0, [amount]);
14091
+ const explorerUrl = useMemo20(() => {
13706
14092
  if (transaction?.toChainTxUrl) {
13707
14093
  return transaction.toChainTxUrl;
13708
14094
  }
@@ -13717,7 +14103,7 @@ function Success({ style }) {
13717
14103
  const handleDone = () => {
13718
14104
  resetState();
13719
14105
  };
13720
- return /* @__PURE__ */ jsxs38(
14106
+ return /* @__PURE__ */ jsxs39(
13721
14107
  "div",
13722
14108
  {
13723
14109
  style: {
@@ -13730,9 +14116,9 @@ function Success({ style }) {
13730
14116
  ...style
13731
14117
  },
13732
14118
  children: [
13733
- /* @__PURE__ */ jsx48(Suspense, { fallback: null, children: /* @__PURE__ */ jsx48(ConfettiEffect2, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
13734
- /* @__PURE__ */ jsx48(WidgetPageHeader, { title: "Deposit Complete" }),
13735
- /* @__PURE__ */ jsx48(
14119
+ /* @__PURE__ */ jsx49(Suspense, { fallback: null, children: /* @__PURE__ */ jsx49(ConfettiEffect2, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
14120
+ /* @__PURE__ */ jsx49(WidgetPageHeader, { title: "Deposit Complete" }),
14121
+ /* @__PURE__ */ jsx49(
13736
14122
  "div",
13737
14123
  {
13738
14124
  style: {
@@ -13744,7 +14130,7 @@ function Success({ style }) {
13744
14130
  flexDirection: "column",
13745
14131
  alignItems: "center"
13746
14132
  },
13747
- children: /* @__PURE__ */ jsx48(
14133
+ children: /* @__PURE__ */ jsx49(
13748
14134
  SuccessSummaryCard,
13749
14135
  {
13750
14136
  amount: parsedAmount,
@@ -13758,16 +14144,16 @@ function Success({ style }) {
13758
14144
  )
13759
14145
  }
13760
14146
  ),
13761
- /* @__PURE__ */ jsx48(WidgetSecurityFooter, {})
14147
+ /* @__PURE__ */ jsx49(WidgetSecurityFooter, {})
13762
14148
  ]
13763
14149
  }
13764
14150
  );
13765
14151
  }
13766
14152
 
13767
14153
  // src/widget/pages/Error.tsx
13768
- import { useMemo as useMemo20, useEffect as useEffect24 } from "react";
14154
+ import { useMemo as useMemo21, useEffect as useEffect26 } from "react";
13769
14155
  init_store();
13770
- import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
14156
+ import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
13771
14157
  function categorizeError(errorMessage) {
13772
14158
  if (!errorMessage) return "unknown";
13773
14159
  const msg = errorMessage.toLowerCase();
@@ -13854,20 +14240,20 @@ function Error2({ style }) {
13854
14240
  setErrorMessage,
13855
14241
  transactionHash
13856
14242
  } = useDepositTransaction();
13857
- const errorCategory = useMemo20(
14243
+ const errorCategory = useMemo21(
13858
14244
  () => categorizeError(errorMessage),
13859
14245
  [errorMessage]
13860
14246
  );
13861
- const errorTitle = useMemo20(
14247
+ const errorTitle = useMemo21(
13862
14248
  () => getErrorTitle(errorCategory),
13863
14249
  [errorCategory]
13864
14250
  );
13865
- const errorSuggestion = useMemo20(
14251
+ const errorSuggestion = useMemo21(
13866
14252
  () => getErrorSuggestion(errorCategory),
13867
14253
  [errorCategory]
13868
14254
  );
13869
- const retryStep = useMemo20(() => getRetryStep(errorCategory), [errorCategory]);
13870
- useEffect24(() => {
14255
+ const retryStep = useMemo21(() => getRetryStep(errorCategory), [errorCategory]);
14256
+ useEffect26(() => {
13871
14257
  if (errorMessage) {
13872
14258
  try {
13873
14259
  const config = TrustwareConfigStore.get();
@@ -13889,7 +14275,7 @@ function Error2({ style }) {
13889
14275
  const handleStartOver = () => {
13890
14276
  resetState();
13891
14277
  };
13892
- const explorerUrl = useMemo20(() => {
14278
+ const explorerUrl = useMemo21(() => {
13893
14279
  if (transactionHash && selectedChain?.blockExplorerUrls?.length) {
13894
14280
  return `${selectedChain.blockExplorerUrls[0].replace(/\/+$/, "")}/tx/${transactionHash}`;
13895
14281
  }
@@ -13897,7 +14283,7 @@ function Error2({ style }) {
13897
14283
  }, [transactionHash, selectedChain]);
13898
14284
  const renderErrorIcon = () => {
13899
14285
  if (errorCategory === "wallet_rejected") {
13900
- return /* @__PURE__ */ jsx49(
14286
+ return /* @__PURE__ */ jsx50(
13901
14287
  "svg",
13902
14288
  {
13903
14289
  style: {
@@ -13910,7 +14296,7 @@ function Error2({ style }) {
13910
14296
  stroke: "currentColor",
13911
14297
  strokeWidth: 2.5,
13912
14298
  "aria-hidden": "true",
13913
- children: /* @__PURE__ */ jsx49(
14299
+ children: /* @__PURE__ */ jsx50(
13914
14300
  "path",
13915
14301
  {
13916
14302
  strokeLinecap: "round",
@@ -13922,7 +14308,7 @@ function Error2({ style }) {
13922
14308
  );
13923
14309
  }
13924
14310
  if (errorCategory === "network_error") {
13925
- return /* @__PURE__ */ jsx49(
14311
+ return /* @__PURE__ */ jsx50(
13926
14312
  "svg",
13927
14313
  {
13928
14314
  style: {
@@ -13935,7 +14321,7 @@ function Error2({ style }) {
13935
14321
  stroke: "currentColor",
13936
14322
  strokeWidth: 2,
13937
14323
  "aria-hidden": "true",
13938
- children: /* @__PURE__ */ jsx49(
14324
+ children: /* @__PURE__ */ jsx50(
13939
14325
  "path",
13940
14326
  {
13941
14327
  strokeLinecap: "round",
@@ -13946,7 +14332,7 @@ function Error2({ style }) {
13946
14332
  }
13947
14333
  );
13948
14334
  }
13949
- return /* @__PURE__ */ jsx49(
14335
+ return /* @__PURE__ */ jsx50(
13950
14336
  "svg",
13951
14337
  {
13952
14338
  style: {
@@ -13959,7 +14345,7 @@ function Error2({ style }) {
13959
14345
  stroke: "currentColor",
13960
14346
  strokeWidth: 2,
13961
14347
  "aria-hidden": "true",
13962
- children: /* @__PURE__ */ jsx49(
14348
+ children: /* @__PURE__ */ jsx50(
13963
14349
  "path",
13964
14350
  {
13965
14351
  strokeLinecap: "round",
@@ -13970,7 +14356,7 @@ function Error2({ style }) {
13970
14356
  }
13971
14357
  );
13972
14358
  };
13973
- return /* @__PURE__ */ jsxs39(
14359
+ return /* @__PURE__ */ jsxs40(
13974
14360
  "div",
13975
14361
  {
13976
14362
  style: {
@@ -13980,8 +14366,8 @@ function Error2({ style }) {
13980
14366
  ...style
13981
14367
  },
13982
14368
  children: [
13983
- /* @__PURE__ */ jsx49(WidgetPageHeader, { title: errorTitle }),
13984
- /* @__PURE__ */ jsx49(
14369
+ /* @__PURE__ */ jsx50(WidgetPageHeader, { title: errorTitle }),
14370
+ /* @__PURE__ */ jsx50(
13985
14371
  ErrorRecoveryCard,
13986
14372
  {
13987
14373
  errorMessage,
@@ -13994,7 +14380,7 @@ function Error2({ style }) {
13994
14380
  transactionHash
13995
14381
  }
13996
14382
  ),
13997
- /* @__PURE__ */ jsx49(WidgetSecurityFooter, {})
14383
+ /* @__PURE__ */ jsx50(WidgetSecurityFooter, {})
13998
14384
  ]
13999
14385
  }
14000
14386
  );
@@ -14016,7 +14402,7 @@ var ACTIVE_TRANSACTION_STATUSES = [
14016
14402
  ];
14017
14403
 
14018
14404
  // src/widget/app/WidgetRouter.tsx
14019
- import { jsx as jsx50 } from "react/jsx-runtime";
14405
+ import { jsx as jsx51 } from "react/jsx-runtime";
14020
14406
  var pageContainerBaseStyle = {
14021
14407
  width: "100%",
14022
14408
  height: "100%",
@@ -14027,26 +14413,26 @@ function WidgetRouter({
14027
14413
  navigationDirection,
14028
14414
  stepHistory
14029
14415
  }) {
14030
- const PageComponent = useMemo21(
14416
+ const PageComponent = useMemo22(
14031
14417
  () => PAGE_COMPONENTS[currentStep],
14032
14418
  [currentStep]
14033
14419
  );
14034
- const animationClass = useMemo21(() => {
14420
+ const animationClass = useMemo22(() => {
14035
14421
  return navigationDirection === "forward" ? "tw-animate-slide-in-right" : "tw-animate-slide-in-left";
14036
14422
  }, [navigationDirection]);
14037
- return /* @__PURE__ */ jsx50(
14423
+ return /* @__PURE__ */ jsx51(
14038
14424
  "div",
14039
14425
  {
14040
14426
  className: animationClass,
14041
14427
  style: mergeStyles(pageContainerBaseStyle),
14042
- children: /* @__PURE__ */ jsx50(PageComponent, {})
14428
+ children: /* @__PURE__ */ jsx51(PageComponent, {})
14043
14429
  },
14044
14430
  `${currentStep}-${stepHistory.length}`
14045
14431
  );
14046
14432
  }
14047
14433
 
14048
14434
  // src/widget/TrustwareWidgetV2.tsx
14049
- import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
14435
+ import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
14050
14436
  var widgetContentContainerStyle = {
14051
14437
  position: "relative",
14052
14438
  width: "100%",
@@ -14068,7 +14454,7 @@ function WidgetContent({
14068
14454
  const { amount, selectedChain, selectedToken } = useDepositForm();
14069
14455
  const { transactionHash, transactionStatus } = useDepositTransaction();
14070
14456
  const { resolvedTheme, toggleTheme } = useDepositUi();
14071
- useEffect25(() => {
14457
+ useEffect27(() => {
14072
14458
  const state = {
14073
14459
  currentStep,
14074
14460
  amount,
@@ -14088,9 +14474,9 @@ function WidgetContent({
14088
14474
  transactionStatus,
14089
14475
  onStateChange
14090
14476
  ]);
14091
- return /* @__PURE__ */ jsxs40("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
14092
- showThemeToggle && /* @__PURE__ */ jsx51("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx51(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
14093
- /* @__PURE__ */ jsx51(
14477
+ return /* @__PURE__ */ jsxs41("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
14478
+ showThemeToggle && /* @__PURE__ */ jsx52("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ jsx52(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
14479
+ /* @__PURE__ */ jsx52(
14094
14480
  WidgetRouter,
14095
14481
  {
14096
14482
  currentStep,
@@ -14111,8 +14497,8 @@ function WidgetInner({
14111
14497
  const { transactionStatus } = useDepositTransaction();
14112
14498
  const { resolvedTheme } = useDepositUi();
14113
14499
  const { status, revalidate } = useTrustware();
14114
- const [showConfirmDialog, setShowConfirmDialog] = useState22(false);
14115
- const handleCloseRequest = useCallback14(() => {
14500
+ const [showConfirmDialog, setShowConfirmDialog] = useState23(false);
14501
+ const handleCloseRequest = useCallback15(() => {
14116
14502
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
14117
14503
  setShowConfirmDialog(true);
14118
14504
  } else {
@@ -14123,32 +14509,32 @@ function WidgetInner({
14123
14509
  onClose?.();
14124
14510
  }
14125
14511
  }, [transactionStatus, onClose, resetState]);
14126
- useEffect25(() => {
14512
+ useEffect27(() => {
14127
14513
  closeRequestRef.current = handleCloseRequest;
14128
14514
  }, [handleCloseRequest, closeRequestRef]);
14129
- const handleConfirmClose = useCallback14(() => {
14515
+ const handleConfirmClose = useCallback15(() => {
14130
14516
  setShowConfirmDialog(false);
14131
14517
  onClose?.();
14132
14518
  }, [onClose]);
14133
- const handleCancelClose = useCallback14(() => {
14519
+ const handleCancelClose = useCallback15(() => {
14134
14520
  setShowConfirmDialog(false);
14135
14521
  }, []);
14136
14522
  const effectiveTheme = resolvedTheme;
14137
14523
  const isRefreshing = status === "initializing";
14138
14524
  const initBlocked = status === "error";
14139
- const handleRefresh = useCallback14(() => {
14525
+ const handleRefresh = useCallback15(() => {
14140
14526
  revalidate?.();
14141
14527
  }, [revalidate]);
14142
- return /* @__PURE__ */ jsxs40(Fragment7, { children: [
14143
- /* @__PURE__ */ jsxs40(WidgetContainer, { theme: effectiveTheme, style, children: [
14144
- /* @__PURE__ */ jsx51(
14528
+ return /* @__PURE__ */ jsxs41(Fragment7, { children: [
14529
+ /* @__PURE__ */ jsxs41(WidgetContainer, { theme: effectiveTheme, style, children: [
14530
+ /* @__PURE__ */ jsx52(
14145
14531
  WidgetContent,
14146
14532
  {
14147
14533
  onStateChange,
14148
14534
  showThemeToggle
14149
14535
  }
14150
14536
  ),
14151
- /* @__PURE__ */ jsx51(
14537
+ /* @__PURE__ */ jsx52(
14152
14538
  InitErrorOverlay,
14153
14539
  {
14154
14540
  open: initBlocked,
@@ -14158,7 +14544,7 @@ function WidgetInner({
14158
14544
  }
14159
14545
  )
14160
14546
  ] }),
14161
- /* @__PURE__ */ jsx51(
14547
+ /* @__PURE__ */ jsx52(
14162
14548
  ConfirmCloseDialog,
14163
14549
  {
14164
14550
  open: showConfirmDialog,
@@ -14178,14 +14564,14 @@ var TrustwareWidgetV2 = forwardRef(function TrustwareWidgetV22({
14178
14564
  onOpen,
14179
14565
  showThemeToggle = true
14180
14566
  }, ref) {
14181
- const [isOpen, setIsOpen] = useState22(defaultOpen);
14182
- const closeRequestRef = useRef11(null);
14567
+ const [isOpen, setIsOpen] = useState23(defaultOpen);
14568
+ const closeRequestRef = useRef13(null);
14183
14569
  const effectiveInitialStep = initialStep;
14184
- const open = useCallback14(() => {
14570
+ const open = useCallback15(() => {
14185
14571
  setIsOpen(true);
14186
14572
  onOpen?.();
14187
14573
  }, [onOpen]);
14188
- const close = useCallback14(() => {
14574
+ const close = useCallback15(() => {
14189
14575
  if (closeRequestRef.current) {
14190
14576
  closeRequestRef.current();
14191
14577
  } else {
@@ -14193,7 +14579,7 @@ var TrustwareWidgetV2 = forwardRef(function TrustwareWidgetV22({
14193
14579
  onClose?.();
14194
14580
  }
14195
14581
  }, [onClose]);
14196
- const handleClose = useCallback14(() => {
14582
+ const handleClose = useCallback15(() => {
14197
14583
  setIsOpen(false);
14198
14584
  onClose?.();
14199
14585
  }, [onClose]);
@@ -14209,7 +14595,7 @@ var TrustwareWidgetV2 = forwardRef(function TrustwareWidgetV22({
14209
14595
  if (!isOpen) {
14210
14596
  return null;
14211
14597
  }
14212
- return /* @__PURE__ */ jsx51(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx51(
14598
+ return /* @__PURE__ */ jsx52(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ jsx52(
14213
14599
  WidgetInner,
14214
14600
  {
14215
14601
  theme,
@@ -14253,6 +14639,7 @@ export {
14253
14639
  DEFAULT_RETRY_CONFIG,
14254
14640
  DEFAULT_SLIPPAGE2 as DEFAULT_SLIPPAGE,
14255
14641
  DEFAULT_THEME2 as DEFAULT_THEME,
14642
+ GTM_ID,
14256
14643
  IdentityStore,
14257
14644
  RateLimitError,
14258
14645
  SDK_NAME,