@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.cjs CHANGED
@@ -69,19 +69,21 @@ var init_config = __esm({
69
69
  };
70
70
  DEFAULT_FEATURE_FLAGS = {
71
71
  tokensPagination: false,
72
- balanceStreaming: false
72
+ balanceStreaming: false,
73
+ shouldAllowGA4: true
73
74
  };
74
75
  }
75
76
  });
76
77
 
77
78
  // src/constants.ts
78
- var SDK_NAME, SDK_VERSION, API_ROOT, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
79
+ var SDK_NAME, SDK_VERSION, API_ROOT, GTM_ID, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
79
80
  var init_constants = __esm({
80
81
  "src/constants.ts"() {
81
82
  "use strict";
82
83
  SDK_NAME = "@trustware/sdk";
83
- SDK_VERSION = "1.1.3-staging.20";
84
+ SDK_VERSION = "1.1.3-staging.31";
84
85
  API_ROOT = "https://bv-staging-api.trustware.io";
86
+ GTM_ID = "";
85
87
  API_PREFIX = "/api";
86
88
  ASSETS_BASE_URL = "https://app.trustware.io";
87
89
  WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
@@ -173,7 +175,8 @@ function resolveConfig(input) {
173
175
  const walletConnect = resolveWalletConnectConfig(input.walletConnect);
174
176
  const features = {
175
177
  tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
176
- balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming
178
+ balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
179
+ shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4
177
180
  };
178
181
  return {
179
182
  apiKey: input.apiKey,
@@ -837,8 +840,8 @@ function ConfettiEffect({
837
840
  clearDelay = 3e3,
838
841
  pieceCount = 50
839
842
  }) {
840
- const [pieces, setPieces] = (0, import_react19.useState)([]);
841
- (0, import_react19.useEffect)(() => {
843
+ const [pieces, setPieces] = (0, import_react20.useState)([]);
844
+ (0, import_react20.useEffect)(() => {
842
845
  if (isActive) {
843
846
  const colors2 = [
844
847
  "#10b981",
@@ -914,11 +917,11 @@ function ConfettiEffect({
914
917
  }
915
918
  );
916
919
  }
917
- var import_react19, import_jsx_runtime6, ConfettiEffect_default;
920
+ var import_react20, import_jsx_runtime6, ConfettiEffect_default;
918
921
  var init_ConfettiEffect = __esm({
919
922
  "src/widget/components/ConfettiEffect.tsx"() {
920
923
  "use strict";
921
- import_react19 = require("react");
924
+ import_react20 = require("react");
922
925
  import_jsx_runtime6 = require("react/jsx-runtime");
923
926
  ConfettiEffect_default = ConfettiEffect;
924
927
  }
@@ -936,6 +939,7 @@ __export(index_exports, {
936
939
  DEFAULT_RETRY_CONFIG: () => DEFAULT_RETRY_CONFIG,
937
940
  DEFAULT_SLIPPAGE: () => DEFAULT_SLIPPAGE2,
938
941
  DEFAULT_THEME: () => DEFAULT_THEME2,
942
+ GTM_ID: () => GTM_ID,
939
943
  IdentityStore: () => IdentityStore,
940
944
  RateLimitError: () => RateLimitError,
941
945
  SDK_NAME: () => SDK_NAME,
@@ -4278,6 +4282,26 @@ var Trustware = {
4278
4282
  });
4279
4283
  return Trustware;
4280
4284
  },
4285
+ setDestinationChain(chain) {
4286
+ const prev = TrustwareConfigStore.get();
4287
+ TrustwareConfigStore.update({
4288
+ routes: {
4289
+ ...prev.routes,
4290
+ toChain: chain
4291
+ }
4292
+ });
4293
+ return Trustware;
4294
+ },
4295
+ setDestinationToken(token) {
4296
+ const prev = TrustwareConfigStore.get();
4297
+ TrustwareConfigStore.update({
4298
+ routes: {
4299
+ ...prev.routes,
4300
+ toToken: token
4301
+ }
4302
+ });
4303
+ return Trustware;
4304
+ },
4281
4305
  /** Read active wallet */
4282
4306
  getWallet() {
4283
4307
  return walletManager.wallet;
@@ -4320,7 +4344,7 @@ var Trustware = {
4320
4344
  init_http();
4321
4345
 
4322
4346
  // src/widget/TrustwareWidgetV2.tsx
4323
- var import_react38 = require("react");
4347
+ var import_react40 = require("react");
4324
4348
 
4325
4349
  // src/widget/lib/utils.ts
4326
4350
  function mergeStyles(...styles) {
@@ -4800,7 +4824,7 @@ var ANIMATION_CLASSES = `
4800
4824
  var ALL_ANIMATION_STYLES = KEYFRAMES + ANIMATION_CLASSES;
4801
4825
 
4802
4826
  // src/widget/context/DepositContext.tsx
4803
- var import_react16 = __toESM(require("react"), 1);
4827
+ var import_react17 = __toESM(require("react"), 1);
4804
4828
 
4805
4829
  // src/provider.tsx
4806
4830
  var import_react5 = require("react");
@@ -5049,7 +5073,7 @@ function useWalletSessionState() {
5049
5073
  }
5050
5074
 
5051
5075
  // src/widget/state/deposit/useWalletTokenState.ts
5052
- var import_react15 = require("react");
5076
+ var import_react16 = require("react");
5053
5077
 
5054
5078
  // src/widget/hooks/useRouteBuilder.ts
5055
5079
  var import_react10 = require("react");
@@ -5348,7 +5372,8 @@ function useTrustwareConfig() {
5348
5372
  },
5349
5373
  features: {
5350
5374
  tokensPagination: false,
5351
- balanceStreaming: false
5375
+ balanceStreaming: false,
5376
+ shouldAllowGA4: true
5352
5377
  }
5353
5378
  };
5354
5379
  }
@@ -5552,7 +5577,144 @@ function mapTransactionError(err) {
5552
5577
  }
5553
5578
 
5554
5579
  // src/widget/hooks/useTransactionPolling.ts
5580
+ var import_react15 = require("react");
5581
+ init_constants();
5582
+
5583
+ // src/hooks/useGTM.ts
5555
5584
  var import_react14 = require("react");
5585
+ function useGTM(gtmId) {
5586
+ const isInitialized = (0, import_react14.useRef)(false);
5587
+ const scriptRef = (0, import_react14.useRef)(null);
5588
+ const isGA4Allowed = (0, import_react14.useCallback)(() => {
5589
+ try {
5590
+ return Trustware.getConfig().features.shouldAllowGA4;
5591
+ } catch {
5592
+ return false;
5593
+ }
5594
+ }, []);
5595
+ (0, import_react14.useEffect)(() => {
5596
+ if (!isGA4Allowed()) {
5597
+ console.warn(
5598
+ "useGTM: GA4 tracking is disabled or Trustware config not initialized."
5599
+ );
5600
+ return;
5601
+ }
5602
+ if (!gtmId || typeof gtmId !== "string") {
5603
+ console.error(
5604
+ "useGTM: A valid GTM Container ID is required (format: GTM-XXXXX)."
5605
+ );
5606
+ return;
5607
+ }
5608
+ if (isInitialized.current) return;
5609
+ const alreadyLoaded = document.querySelector(
5610
+ `script[src*="googletagmanager.com/gtm.js?id=${gtmId}"]`
5611
+ );
5612
+ if (alreadyLoaded) {
5613
+ window.dataLayer = window.dataLayer || [];
5614
+ isInitialized.current = true;
5615
+ return;
5616
+ }
5617
+ window.dataLayer = window.dataLayer || [];
5618
+ window.dataLayer.push({
5619
+ "gtm.start": (/* @__PURE__ */ new Date()).getTime(),
5620
+ event: "gtm.js"
5621
+ });
5622
+ const firstScript = document.getElementsByTagName("script")[0];
5623
+ const script = document.createElement("script");
5624
+ script.async = true;
5625
+ script.src = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`;
5626
+ firstScript.parentNode?.insertBefore(script, firstScript);
5627
+ scriptRef.current = script;
5628
+ isInitialized.current = true;
5629
+ return () => {
5630
+ if (scriptRef.current) {
5631
+ scriptRef.current.parentNode?.removeChild(scriptRef.current);
5632
+ scriptRef.current = null;
5633
+ }
5634
+ isInitialized.current = false;
5635
+ };
5636
+ }, [gtmId, isGA4Allowed]);
5637
+ const addNoscriptIframe = (0, import_react14.useCallback)(() => {
5638
+ if (!isGA4Allowed()) return;
5639
+ if (document.querySelector('iframe[src*="googletagmanager.com/ns.html"]'))
5640
+ return;
5641
+ const noscript = document.createElement("noscript");
5642
+ const iframe = document.createElement("iframe");
5643
+ iframe.src = `https://www.googletagmanager.com/ns.html?id=${gtmId}`;
5644
+ iframe.height = "0";
5645
+ iframe.width = "0";
5646
+ iframe.style.display = "none";
5647
+ iframe.style.visibility = "hidden";
5648
+ noscript.appendChild(iframe);
5649
+ document.body.insertBefore(noscript, document.body.firstChild);
5650
+ }, [gtmId, isGA4Allowed]);
5651
+ const trackEvent = (0, import_react14.useCallback)(
5652
+ (eventName, eventParams = {}) => {
5653
+ if (!isInitialized.current) {
5654
+ console.warn(
5655
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5656
+ );
5657
+ return;
5658
+ }
5659
+ if (!eventName || typeof eventName !== "string") {
5660
+ console.error("useGTM: A valid event name is required.");
5661
+ return;
5662
+ }
5663
+ const payload = { event: eventName, ...eventParams };
5664
+ window.dataLayer.push(payload);
5665
+ },
5666
+ []
5667
+ );
5668
+ const trackPageView = (0, import_react14.useCallback)(
5669
+ (pagePath, pageTitle = document.title) => {
5670
+ trackEvent("page_view", {
5671
+ page_path: pagePath,
5672
+ page_title: pageTitle,
5673
+ page_location: window.location.href
5674
+ });
5675
+ },
5676
+ [trackEvent]
5677
+ );
5678
+ const setUserProperty = (0, import_react14.useCallback)(
5679
+ (propertyName, value) => {
5680
+ if (!isInitialized.current) {
5681
+ console.warn(
5682
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5683
+ );
5684
+ return;
5685
+ }
5686
+ const payload = {
5687
+ event: "user_property",
5688
+ user_property_name: propertyName,
5689
+ user_property_value: value
5690
+ };
5691
+ window.dataLayer.push(payload);
5692
+ },
5693
+ []
5694
+ );
5695
+ const directGtag = (0, import_react14.useCallback)(
5696
+ (command, ...args) => {
5697
+ if (!isGA4Allowed()) return;
5698
+ if (!window.gtag) {
5699
+ console.warn(
5700
+ "useGTM: window.gtag is not available. Load gtag.js separately to use this method."
5701
+ );
5702
+ return;
5703
+ }
5704
+ window.gtag(command, ...args);
5705
+ },
5706
+ [isGA4Allowed]
5707
+ );
5708
+ return {
5709
+ trackEvent,
5710
+ trackPageView,
5711
+ setUserProperty,
5712
+ directGtag,
5713
+ addNoscriptIframe
5714
+ };
5715
+ }
5716
+
5717
+ // src/widget/hooks/useTransactionPolling.ts
5556
5718
  var FAST_POLL_INTERVAL_MS = 1500;
5557
5719
  var NORMAL_POLL_INTERVAL_MS = 2500;
5558
5720
  var POLL_TIMEOUT_MS = 5 * 60 * 1e3;
@@ -5560,19 +5722,28 @@ function useTransactionPolling() {
5560
5722
  const { setCurrentStep } = useDepositNavigation();
5561
5723
  const { setTransactionStatus, setErrorMessage } = useDepositTransaction();
5562
5724
  const { emitSuccess } = useTrustware();
5563
- const [state, setState] = (0, import_react14.useState)({
5725
+ const { selectedChain, selectedToken } = useDepositForm();
5726
+ const destinationConfig = (() => {
5727
+ try {
5728
+ return Trustware.getConfig();
5729
+ } catch {
5730
+ return void 0;
5731
+ }
5732
+ })();
5733
+ const { trackEvent } = useGTM(GTM_ID);
5734
+ const [state, setState] = (0, import_react15.useState)({
5564
5735
  isPolling: false,
5565
5736
  apiStatus: null,
5566
5737
  error: null,
5567
5738
  transaction: null,
5568
5739
  receiptSubmitted: false
5569
5740
  });
5570
- const pollingRef = (0, import_react14.useRef)(null);
5571
- const timeoutRef = (0, import_react14.useRef)(null);
5572
- const abortRef = (0, import_react14.useRef)(false);
5573
- const startTimeRef = (0, import_react14.useRef)(0);
5574
- const pollCountRef = (0, import_react14.useRef)(0);
5575
- const clearPolling = (0, import_react14.useCallback)(() => {
5741
+ const pollingRef = (0, import_react15.useRef)(null);
5742
+ const timeoutRef = (0, import_react15.useRef)(null);
5743
+ const abortRef = (0, import_react15.useRef)(false);
5744
+ const startTimeRef = (0, import_react15.useRef)(0);
5745
+ const pollCountRef = (0, import_react15.useRef)(0);
5746
+ const clearPolling = (0, import_react15.useCallback)(() => {
5576
5747
  abortRef.current = true;
5577
5748
  if (pollingRef.current) {
5578
5749
  clearTimeout(pollingRef.current);
@@ -5583,7 +5754,7 @@ function useTransactionPolling() {
5583
5754
  timeoutRef.current = null;
5584
5755
  }
5585
5756
  }, []);
5586
- const startPolling = (0, import_react14.useCallback)(
5757
+ const startPolling = (0, import_react15.useCallback)(
5587
5758
  async (intentId, _txHash) => {
5588
5759
  clearPolling();
5589
5760
  abortRef.current = false;
@@ -5630,6 +5801,13 @@ function useTransactionPolling() {
5630
5801
  }));
5631
5802
  setTransactionStatus("success");
5632
5803
  setCurrentStep("success");
5804
+ trackEvent("payment_completed", {
5805
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId ?? "unknown",
5806
+ from_token: selectedToken?.symbol ?? "unknown",
5807
+ to_chain: destinationConfig?.routes?.toChain ?? "unknown",
5808
+ to_token: destinationConfig?.routes?.toToken ?? "unknown",
5809
+ domain: window.origin
5810
+ });
5633
5811
  emitSuccess?.(tx);
5634
5812
  return;
5635
5813
  }
@@ -5692,20 +5870,27 @@ function useTransactionPolling() {
5692
5870
  },
5693
5871
  [
5694
5872
  clearPolling,
5873
+ destinationConfig?.routes.toChain,
5874
+ destinationConfig?.routes.toToken,
5695
5875
  emitSuccess,
5696
- setTransactionStatus,
5876
+ selectedChain?.axelarChainName,
5877
+ selectedChain?.chainId,
5878
+ selectedChain?.networkName,
5879
+ selectedToken?.symbol,
5697
5880
  setCurrentStep,
5698
- setErrorMessage
5881
+ setErrorMessage,
5882
+ setTransactionStatus,
5883
+ trackEvent
5699
5884
  ]
5700
5885
  );
5701
- const stopPolling = (0, import_react14.useCallback)(() => {
5886
+ const stopPolling = (0, import_react15.useCallback)(() => {
5702
5887
  clearPolling();
5703
5888
  setState((prev) => ({
5704
5889
  ...prev,
5705
5890
  isPolling: false
5706
5891
  }));
5707
5892
  }, [clearPolling]);
5708
- const resetPolling = (0, import_react14.useCallback)(() => {
5893
+ const resetPolling = (0, import_react15.useCallback)(() => {
5709
5894
  clearPolling();
5710
5895
  setState({
5711
5896
  isPolling: false,
@@ -5715,9 +5900,9 @@ function useTransactionPolling() {
5715
5900
  receiptSubmitted: false
5716
5901
  });
5717
5902
  }, [clearPolling]);
5718
- const clearPollingRef = (0, import_react14.useRef)(clearPolling);
5903
+ const clearPollingRef = (0, import_react15.useRef)(clearPolling);
5719
5904
  clearPollingRef.current = clearPolling;
5720
- (0, import_react14.useEffect)(() => {
5905
+ (0, import_react15.useEffect)(() => {
5721
5906
  return () => {
5722
5907
  clearPollingRef.current();
5723
5908
  };
@@ -5786,12 +5971,12 @@ function useWalletTokenState({
5786
5971
  selectedToken,
5787
5972
  setSelectedToken
5788
5973
  }) {
5789
- const [yourWalletTokens, setYourWalletTokens] = (0, import_react15.useState)([]);
5790
- const [walletTokensReloadNonce, setWalletTokensReloadNonce] = (0, import_react15.useState)(0);
5791
- const lastLoadedWalletRef = (0, import_react15.useRef)(null);
5974
+ const [yourWalletTokens, setYourWalletTokens] = (0, import_react16.useState)([]);
5975
+ const [walletTokensReloadNonce, setWalletTokensReloadNonce] = (0, import_react16.useState)(0);
5976
+ const lastLoadedWalletRef = (0, import_react16.useRef)(null);
5792
5977
  const { tokens } = useTokens(null);
5793
5978
  const { chains } = useChains();
5794
- (0, import_react15.useEffect)(() => {
5979
+ (0, import_react16.useEffect)(() => {
5795
5980
  if (!walletAddress || chains.length === 0 || tokens.length === 0) {
5796
5981
  setYourWalletTokens([]);
5797
5982
  if (!walletAddress) {
@@ -6010,14 +6195,14 @@ function mapWalletTokens(balances, chains, tokens) {
6010
6195
 
6011
6196
  // src/widget/context/DepositContext.tsx
6012
6197
  var import_jsx_runtime2 = require("react/jsx-runtime");
6013
- var DepositContext = (0, import_react16.createContext)(
6198
+ var DepositContext = (0, import_react17.createContext)(
6014
6199
  void 0
6015
6200
  );
6016
- var DepositNavigationContext = (0, import_react16.createContext)(void 0);
6017
- var DepositWalletContext = (0, import_react16.createContext)(void 0);
6018
- var DepositFormContext = (0, import_react16.createContext)(void 0);
6019
- var DepositTransactionContext = (0, import_react16.createContext)(void 0);
6020
- var DepositUiContext = (0, import_react16.createContext)(void 0);
6201
+ var DepositNavigationContext = (0, import_react17.createContext)(void 0);
6202
+ var DepositWalletContext = (0, import_react17.createContext)(void 0);
6203
+ var DepositFormContext = (0, import_react17.createContext)(void 0);
6204
+ var DepositTransactionContext = (0, import_react17.createContext)(void 0);
6205
+ var DepositUiContext = (0, import_react17.createContext)(void 0);
6021
6206
  function DepositProvider({
6022
6207
  children,
6023
6208
  initialStep = "home"
@@ -6039,12 +6224,12 @@ function DepositProvider({
6039
6224
  connectWallet,
6040
6225
  disconnectWallet
6041
6226
  } = useWalletSessionState();
6042
- const [amountInputMode, setAmountInputMode] = (0, import_react16.useState)(
6227
+ const [amountInputMode, setAmountInputMode] = (0, import_react17.useState)(
6043
6228
  "usd"
6044
6229
  );
6045
- const [selectedToken, setSelectedToken] = (0, import_react16.useState)(null);
6046
- const [selectedChain, setSelectedChain] = (0, import_react16.useState)(null);
6047
- const [amount, setAmount] = (0, import_react16.useState)("");
6230
+ const [selectedToken, setSelectedToken] = (0, import_react17.useState)(null);
6231
+ const [selectedChain, setSelectedChain] = (0, import_react17.useState)(null);
6232
+ const [amount, setAmount] = (0, import_react17.useState)("");
6048
6233
  const { yourWalletTokens, setYourWalletTokens, reloadWalletTokens } = useWalletTokenState({
6049
6234
  walletAddress,
6050
6235
  selectedChain,
@@ -6052,12 +6237,12 @@ function DepositProvider({
6052
6237
  selectedToken,
6053
6238
  setSelectedToken
6054
6239
  });
6055
- const [transactionStatus, setTransactionStatus] = (0, import_react16.useState)("idle");
6056
- const [transactionHash, setTransactionHash] = (0, import_react16.useState)(null);
6057
- const [errorMessage, setErrorMessage] = (0, import_react16.useState)(null);
6058
- const [intentId, setIntentId] = (0, import_react16.useState)(null);
6059
- const [paymentMethod, setPaymentMethod] = (0, import_react16.useState)("crypto");
6060
- const resetState = import_react16.default.useCallback(() => {
6240
+ const [transactionStatus, setTransactionStatus] = (0, import_react17.useState)("idle");
6241
+ const [transactionHash, setTransactionHash] = (0, import_react17.useState)(null);
6242
+ const [errorMessage, setErrorMessage] = (0, import_react17.useState)(null);
6243
+ const [intentId, setIntentId] = (0, import_react17.useState)(null);
6244
+ const [paymentMethod, setPaymentMethod] = (0, import_react17.useState)("crypto");
6245
+ const resetState = import_react17.default.useCallback(() => {
6061
6246
  resetNavigation();
6062
6247
  setSelectedToken(null);
6063
6248
  setSelectedChain(null);
@@ -6070,7 +6255,7 @@ function DepositProvider({
6070
6255
  setPaymentMethod("crypto");
6071
6256
  reloadWalletTokens();
6072
6257
  }, [reloadWalletTokens, resetNavigation]);
6073
- const navigationValue = (0, import_react16.useMemo)(
6258
+ const navigationValue = (0, import_react17.useMemo)(
6074
6259
  () => ({
6075
6260
  currentStep,
6076
6261
  setCurrentStep,
@@ -6088,7 +6273,7 @@ function DepositProvider({
6088
6273
  stepHistory
6089
6274
  ]
6090
6275
  );
6091
- const walletValue = (0, import_react16.useMemo)(
6276
+ const walletValue = (0, import_react17.useMemo)(
6092
6277
  () => ({
6093
6278
  selectedWallet,
6094
6279
  walletAddress,
@@ -6108,7 +6293,7 @@ function DepositProvider({
6108
6293
  yourWalletTokens
6109
6294
  ]
6110
6295
  );
6111
- const formValue = (0, import_react16.useMemo)(
6296
+ const formValue = (0, import_react17.useMemo)(
6112
6297
  () => ({
6113
6298
  selectedToken,
6114
6299
  setSelectedToken,
@@ -6130,7 +6315,7 @@ function DepositProvider({
6130
6315
  setPaymentMethod
6131
6316
  ]
6132
6317
  );
6133
- const transactionValue = (0, import_react16.useMemo)(
6318
+ const transactionValue = (0, import_react17.useMemo)(
6134
6319
  () => ({
6135
6320
  transactionStatus,
6136
6321
  setTransactionStatus,
@@ -6143,14 +6328,14 @@ function DepositProvider({
6143
6328
  }),
6144
6329
  [errorMessage, intentId, transactionHash, transactionStatus]
6145
6330
  );
6146
- const uiValue = (0, import_react16.useMemo)(
6331
+ const uiValue = (0, import_react17.useMemo)(
6147
6332
  () => ({
6148
6333
  resolvedTheme,
6149
6334
  toggleTheme
6150
6335
  }),
6151
6336
  [resolvedTheme, toggleTheme]
6152
6337
  );
6153
- const value = (0, import_react16.useMemo)(
6338
+ const value = (0, import_react17.useMemo)(
6154
6339
  () => ({
6155
6340
  ...navigationValue,
6156
6341
  ...walletValue,
@@ -6163,7 +6348,7 @@ function DepositProvider({
6163
6348
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositNavigationContext.Provider, { value: navigationValue, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositWalletContext.Provider, { value: walletValue, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositFormContext.Provider, { value: formValue, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositTransactionContext.Provider, { value: transactionValue, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositUiContext.Provider, { value: uiValue, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DepositContext.Provider, { value, children }) }) }) }) }) });
6164
6349
  }
6165
6350
  function useRequiredContext(context, name) {
6166
- const value = (0, import_react16.useContext)(context);
6351
+ const value = (0, import_react17.useContext)(context);
6167
6352
  if (value === void 0) {
6168
6353
  throw new Error(`${name} must be used within a DepositProvider`);
6169
6354
  }
@@ -6186,7 +6371,7 @@ function useDepositUi() {
6186
6371
  }
6187
6372
 
6188
6373
  // src/widget/components/AmountSlider.tsx
6189
- var import_react17 = require("react");
6374
+ var import_react18 = require("react");
6190
6375
  var import_jsx_runtime3 = require("react/jsx-runtime");
6191
6376
  var roundToNiceNumber = (value, range) => {
6192
6377
  let roundingFactor;
@@ -6236,7 +6421,7 @@ function AmountSlider({
6236
6421
  style,
6237
6422
  disabled = false
6238
6423
  }) {
6239
- const generateTickMarks = (0, import_react17.useCallback)(
6424
+ const generateTickMarks = (0, import_react18.useCallback)(
6240
6425
  (minValue, maxValue) => {
6241
6426
  const range = maxValue - minValue;
6242
6427
  if (range <= 0) {
@@ -6284,25 +6469,25 @@ function AmountSlider({
6284
6469
  },
6285
6470
  []
6286
6471
  );
6287
- const tickMarks = (0, import_react17.useMemo)(
6472
+ const tickMarks = (0, import_react18.useMemo)(
6288
6473
  () => generateTickMarks(min, max),
6289
6474
  [generateTickMarks, min, max]
6290
6475
  );
6291
- const getPercentage = (0, import_react17.useCallback)(() => {
6476
+ const getPercentage = (0, import_react18.useCallback)(() => {
6292
6477
  const range = max - min;
6293
6478
  if (range <= 0) return 0;
6294
6479
  const clampedValue = Math.min(Math.max(value, min), max);
6295
6480
  return (clampedValue - min) / range * 100;
6296
6481
  }, [max, min, value]);
6297
- const percentage = (0, import_react17.useMemo)(() => getPercentage(), [getPercentage]);
6298
- const handleChange = (0, import_react17.useCallback)(
6482
+ const percentage = (0, import_react18.useMemo)(() => getPercentage(), [getPercentage]);
6483
+ const handleChange = (0, import_react18.useCallback)(
6299
6484
  (e2) => {
6300
6485
  const newValue = Math.min(Math.max(Number(e2.target.value), min), max);
6301
6486
  onChange(newValue);
6302
6487
  },
6303
6488
  [onChange, min, max]
6304
6489
  );
6305
- const handleTickClick = (0, import_react17.useCallback)(
6490
+ const handleTickClick = (0, import_react18.useCallback)(
6306
6491
  (tickValue) => {
6307
6492
  if (disabled) return;
6308
6493
  onChange(tickValue);
@@ -6520,7 +6705,7 @@ function AmountSlider({
6520
6705
  }
6521
6706
 
6522
6707
  // src/widget/components/AmountInputDisplay.tsx
6523
- var import_react18 = require("react");
6708
+ var import_react19 = require("react");
6524
6709
  var import_jsx_runtime4 = require("react/jsx-runtime");
6525
6710
  function formatDisplayAmount(value) {
6526
6711
  if (!Number.isFinite(value) || value <= 0) return "0";
@@ -6559,8 +6744,8 @@ function AmountInputDisplay({
6559
6744
  style,
6560
6745
  inputAriaLabel = "Deposit amount"
6561
6746
  }) {
6562
- const [isEditing, setIsEditing] = (0, import_react18.useState)(false);
6563
- const inputRef = (0, import_react18.useRef)(null);
6747
+ const [isEditing, setIsEditing] = (0, import_react19.useState)(false);
6748
+ const inputRef = (0, import_react19.useRef)(null);
6564
6749
  const handleAmountClick = () => {
6565
6750
  if (isFixedAmount) return;
6566
6751
  const isZeroish = !amount || parseFloat(amount) === 0;
@@ -6775,7 +6960,7 @@ function CircularProgress({
6775
6960
  }
6776
6961
 
6777
6962
  // src/widget/components/Dialog.tsx
6778
- var import_react20 = require("react");
6963
+ var import_react21 = require("react");
6779
6964
  var import_jsx_runtime7 = require("react/jsx-runtime");
6780
6965
  var Dialog = ({
6781
6966
  open,
@@ -6787,11 +6972,11 @@ var Dialog = ({
6787
6972
  confirmText = "Close Anyway",
6788
6973
  isDark = false
6789
6974
  }) => {
6790
- const dialogRef = (0, import_react20.useRef)(null);
6791
- const overlayRef = (0, import_react20.useRef)(null);
6792
- const firstButtonRef = (0, import_react20.useRef)(null);
6793
- const lastButtonRef = (0, import_react20.useRef)(null);
6794
- (0, import_react20.useEffect)(() => {
6975
+ const dialogRef = (0, import_react21.useRef)(null);
6976
+ const overlayRef = (0, import_react21.useRef)(null);
6977
+ const firstButtonRef = (0, import_react21.useRef)(null);
6978
+ const lastButtonRef = (0, import_react21.useRef)(null);
6979
+ (0, import_react21.useEffect)(() => {
6795
6980
  const handleEscape = (e2) => {
6796
6981
  if (e2.key === "Escape" && open) {
6797
6982
  e2.preventDefault();
@@ -6805,7 +6990,7 @@ var Dialog = ({
6805
6990
  document.removeEventListener("keydown", handleEscape);
6806
6991
  };
6807
6992
  }, [open, onCancel]);
6808
- (0, import_react20.useEffect)(() => {
6993
+ (0, import_react21.useEffect)(() => {
6809
6994
  const handleTabKey = (e2) => {
6810
6995
  if (!open) return;
6811
6996
  if (e2.key === "Tab") {
@@ -6829,7 +7014,7 @@ var Dialog = ({
6829
7014
  document.removeEventListener("keydown", handleTabKey);
6830
7015
  };
6831
7016
  }, [open]);
6832
- (0, import_react20.useEffect)(() => {
7017
+ (0, import_react21.useEffect)(() => {
6833
7018
  if (open) {
6834
7019
  const originalStyle = window.getComputedStyle(document.body).overflow;
6835
7020
  document.body.style.overflow = "hidden";
@@ -7127,7 +7312,7 @@ function TransactionHashLink({
7127
7312
  }
7128
7313
 
7129
7314
  // src/widget/components/SwipeToConfirmTokens.tsx
7130
- var import_react21 = require("react");
7315
+ var import_react22 = require("react");
7131
7316
  var import_jsx_runtime9 = require("react/jsx-runtime");
7132
7317
  function SwipeToConfirmTokens({
7133
7318
  fromToken,
@@ -7142,33 +7327,33 @@ function SwipeToConfirmTokens({
7142
7327
  style,
7143
7328
  text
7144
7329
  }) {
7145
- const [dragX, setDragX] = (0, import_react21.useState)(0);
7146
- const [isDragging, setIsDragging] = (0, import_react21.useState)(false);
7147
- const [isComplete, setIsComplete] = (0, import_react21.useState)(false);
7148
- const trackRef = (0, import_react21.useRef)(null);
7149
- const thumbRef = (0, import_react21.useRef)(null);
7150
- const [isLongPressing, setIsLongPressing] = (0, import_react21.useState)(false);
7151
- const [longPressProgress, setLongPressProgress] = (0, import_react21.useState)(0);
7152
- const longPressTimerRef = (0, import_react21.useRef)(null);
7153
- const longPressStartRef = (0, import_react21.useRef)(null);
7154
- const longPressAnimationRef = (0, import_react21.useRef)(null);
7330
+ const [dragX, setDragX] = (0, import_react22.useState)(0);
7331
+ const [isDragging, setIsDragging] = (0, import_react22.useState)(false);
7332
+ const [isComplete, setIsComplete] = (0, import_react22.useState)(false);
7333
+ const trackRef = (0, import_react22.useRef)(null);
7334
+ const thumbRef = (0, import_react22.useRef)(null);
7335
+ const [isLongPressing, setIsLongPressing] = (0, import_react22.useState)(false);
7336
+ const [longPressProgress, setLongPressProgress] = (0, import_react22.useState)(0);
7337
+ const longPressTimerRef = (0, import_react22.useRef)(null);
7338
+ const longPressStartRef = (0, import_react22.useRef)(null);
7339
+ const longPressAnimationRef = (0, import_react22.useRef)(null);
7155
7340
  const LONG_PRESS_DURATION = 1500;
7156
7341
  const thumbSize = 48;
7157
7342
  const padding = 4;
7158
7343
  const threshold = 0.8;
7159
- const getMaxDrag = (0, import_react21.useCallback)(() => {
7344
+ const getMaxDrag = (0, import_react22.useCallback)(() => {
7160
7345
  if (!trackRef.current) return 0;
7161
7346
  return trackRef.current.offsetWidth - thumbSize - padding * 2;
7162
7347
  }, []);
7163
- const getProgress = (0, import_react21.useCallback)(() => {
7348
+ const getProgress = (0, import_react22.useCallback)(() => {
7164
7349
  const maxDrag = getMaxDrag();
7165
7350
  return maxDrag > 0 ? dragX / maxDrag : 0;
7166
7351
  }, [dragX, getMaxDrag]);
7167
- const handleDragStart = (0, import_react21.useCallback)(() => {
7352
+ const handleDragStart = (0, import_react22.useCallback)(() => {
7168
7353
  if (disabled || isComplete) return;
7169
7354
  setIsDragging(true);
7170
7355
  }, [disabled, isComplete]);
7171
- const handleDragMove = (0, import_react21.useCallback)(
7356
+ const handleDragMove = (0, import_react22.useCallback)(
7172
7357
  (clientX) => {
7173
7358
  if (!isDragging || !trackRef.current || isComplete) return;
7174
7359
  const rect = trackRef.current.getBoundingClientRect();
@@ -7179,7 +7364,7 @@ function SwipeToConfirmTokens({
7179
7364
  },
7180
7365
  [isDragging, isComplete, getMaxDrag]
7181
7366
  );
7182
- const handleDragEnd = (0, import_react21.useCallback)(() => {
7367
+ const handleDragEnd = (0, import_react22.useCallback)(() => {
7183
7368
  if (!isDragging) return;
7184
7369
  setIsDragging(false);
7185
7370
  const progress2 = getProgress();
@@ -7192,14 +7377,14 @@ function SwipeToConfirmTokens({
7192
7377
  setDragX(0);
7193
7378
  }
7194
7379
  }, [isDragging, getProgress, getMaxDrag, onConfirm]);
7195
- const triggerConfirmation = (0, import_react21.useCallback)(() => {
7380
+ const triggerConfirmation = (0, import_react22.useCallback)(() => {
7196
7381
  if (isComplete) return;
7197
7382
  setDragX(getMaxDrag());
7198
7383
  setIsComplete(true);
7199
7384
  if (navigator.vibrate) navigator.vibrate(50);
7200
7385
  setTimeout(() => onConfirm(), 150);
7201
7386
  }, [isComplete, getMaxDrag, onConfirm]);
7202
- const cancelLongPress = (0, import_react21.useCallback)(() => {
7387
+ const cancelLongPress = (0, import_react22.useCallback)(() => {
7203
7388
  setIsLongPressing(false);
7204
7389
  setLongPressProgress(0);
7205
7390
  longPressStartRef.current = null;
@@ -7212,7 +7397,7 @@ function SwipeToConfirmTokens({
7212
7397
  longPressAnimationRef.current = null;
7213
7398
  }
7214
7399
  }, []);
7215
- const startLongPress = (0, import_react21.useCallback)(() => {
7400
+ const startLongPress = (0, import_react22.useCallback)(() => {
7216
7401
  if (disabled || isComplete || isDragging) return;
7217
7402
  setIsLongPressing(true);
7218
7403
  longPressStartRef.current = Date.now();
@@ -7230,7 +7415,7 @@ function SwipeToConfirmTokens({
7230
7415
  };
7231
7416
  longPressAnimationRef.current = requestAnimationFrame(animateProgress);
7232
7417
  }, [disabled, isComplete, isDragging, triggerConfirmation, cancelLongPress]);
7233
- const handleKeyDown = (0, import_react21.useCallback)(
7418
+ const handleKeyDown = (0, import_react22.useCallback)(
7234
7419
  (e2) => {
7235
7420
  if (disabled || isComplete) return;
7236
7421
  if (e2.key === "Enter" || e2.key === " ") {
@@ -7240,7 +7425,7 @@ function SwipeToConfirmTokens({
7240
7425
  },
7241
7426
  [disabled, isComplete, startLongPress]
7242
7427
  );
7243
- const handleKeyUp = (0, import_react21.useCallback)(
7428
+ const handleKeyUp = (0, import_react22.useCallback)(
7244
7429
  (e2) => {
7245
7430
  if (e2.key === "Enter" || e2.key === " ") {
7246
7431
  e2.preventDefault();
@@ -7249,7 +7434,7 @@ function SwipeToConfirmTokens({
7249
7434
  },
7250
7435
  [cancelLongPress]
7251
7436
  );
7252
- (0, import_react21.useEffect)(() => {
7437
+ (0, import_react22.useEffect)(() => {
7253
7438
  return () => {
7254
7439
  if (longPressTimerRef.current) clearTimeout(longPressTimerRef.current);
7255
7440
  if (longPressAnimationRef.current)
@@ -7260,15 +7445,15 @@ function SwipeToConfirmTokens({
7260
7445
  e2.preventDefault();
7261
7446
  handleDragStart();
7262
7447
  };
7263
- const handleMouseMove = (0, import_react21.useCallback)(
7448
+ const handleMouseMove = (0, import_react22.useCallback)(
7264
7449
  (e2) => handleDragMove(e2.clientX),
7265
7450
  [handleDragMove]
7266
7451
  );
7267
- const handleMouseUp = (0, import_react21.useCallback)(() => handleDragEnd(), [handleDragEnd]);
7452
+ const handleMouseUp = (0, import_react22.useCallback)(() => handleDragEnd(), [handleDragEnd]);
7268
7453
  const handleTouchStart = () => handleDragStart();
7269
7454
  const handleTouchMove = (e2) => handleDragMove(e2.touches[0].clientX);
7270
7455
  const handleTouchEnd = () => handleDragEnd();
7271
- (0, import_react21.useEffect)(() => {
7456
+ (0, import_react22.useEffect)(() => {
7272
7457
  if (isDragging) {
7273
7458
  window.addEventListener("mousemove", handleMouseMove);
7274
7459
  window.addEventListener("mouseup", handleMouseUp);
@@ -7280,7 +7465,29 @@ function SwipeToConfirmTokens({
7280
7465
  }, [isDragging, handleMouseMove, handleMouseUp]);
7281
7466
  const progress = getProgress();
7282
7467
  const effectiveProgress = isLongPressing ? longPressProgress : progress;
7283
- const getTokenInitials = (symbol) => symbol?.slice(0, 2).toUpperCase();
7468
+ const [blinkOpacity, setBlinkOpacity] = (0, import_react22.useState)(1);
7469
+ (0, import_react22.useEffect)(() => {
7470
+ if (disabled || isComplete || isDragging || isLongPressing) {
7471
+ setBlinkOpacity(1);
7472
+ return;
7473
+ }
7474
+ let direction = -1;
7475
+ const interval = setInterval(() => {
7476
+ setBlinkOpacity((prev) => {
7477
+ const newVal = prev + direction * 0.8;
7478
+ if (newVal <= 0.2) {
7479
+ direction = 1;
7480
+ return 0.2;
7481
+ }
7482
+ if (newVal >= 1) {
7483
+ direction = -1;
7484
+ return 1;
7485
+ }
7486
+ return newVal;
7487
+ });
7488
+ }, 700);
7489
+ return () => clearInterval(interval);
7490
+ }, [disabled, isComplete, isDragging, isLongPressing]);
7284
7491
  const getAriaLabel = () => {
7285
7492
  if (!isWalletConnected) return "Connect your wallet to deposit";
7286
7493
  if (isComplete) return "Transaction confirmed";
@@ -7500,27 +7707,52 @@ function SwipeToConfirmTokens({
7500
7707
  onTouchStart: handleTouchStart,
7501
7708
  onTouchMove: handleTouchMove,
7502
7709
  onTouchEnd: handleTouchEnd,
7503
- children: fromToken.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7504
- "img",
7710
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7711
+ ImageLoader,
7505
7712
  {
7506
- src: fromToken.iconUrl,
7713
+ src: fromToken.iconUrl || "",
7507
7714
  alt: fromToken.symbol,
7508
- style: {
7715
+ imgStyle: {
7509
7716
  width: "2.5rem",
7510
7717
  height: "2.5rem",
7511
7718
  objectFit: "contain",
7512
7719
  borderRadius: "9999px"
7513
- }
7514
- }
7515
- ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7516
- "span",
7517
- {
7518
- style: {
7519
- fontSize: fontSize.sm,
7520
- fontWeight: fontWeight.bold,
7521
- color: colors.white
7522
7720
  },
7523
- children: getTokenInitials(fromToken.symbol)
7721
+ retry: 1,
7722
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7723
+ "span",
7724
+ {
7725
+ style: {
7726
+ fontSize: fontSize.sm,
7727
+ fontWeight: fontWeight.bold,
7728
+ color: colors.white,
7729
+ opacity: blinkOpacity,
7730
+ transition: "opacity 0.5s ease-in-out"
7731
+ },
7732
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7733
+ "svg",
7734
+ {
7735
+ style: {
7736
+ width: "2rem",
7737
+ height: "2rem",
7738
+ color: colors.zinc[500]
7739
+ },
7740
+ fill: "none",
7741
+ stroke: "currentColor",
7742
+ viewBox: "0 0 24 24",
7743
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7744
+ "path",
7745
+ {
7746
+ strokeLinecap: "round",
7747
+ strokeLinejoin: "round",
7748
+ strokeWidth: 2,
7749
+ d: "M9 5l7 7-7 7"
7750
+ }
7751
+ )
7752
+ }
7753
+ )
7754
+ }
7755
+ )
7524
7756
  }
7525
7757
  )
7526
7758
  }
@@ -7556,47 +7788,6 @@ function SwipeToConfirmTokens({
7556
7788
  }
7557
7789
  )
7558
7790
  }
7559
- ),
7560
- !toTokenIcon && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7561
- "div",
7562
- {
7563
- style: {
7564
- position: "absolute",
7565
- top: "50%",
7566
- transform: "translateY(-50%)",
7567
- width: "3rem",
7568
- height: "3rem",
7569
- borderRadius: "9999px",
7570
- display: "flex",
7571
- alignItems: "center",
7572
- justifyContent: "center",
7573
- transition: "opacity 0.2s",
7574
- right: `${padding}px`,
7575
- opacity: 0.3 + effectiveProgress * 0.7
7576
- },
7577
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7578
- "svg",
7579
- {
7580
- style: {
7581
- width: "1.5rem",
7582
- height: "1.5rem",
7583
- color: colors.white
7584
- },
7585
- fill: "none",
7586
- stroke: "currentColor",
7587
- viewBox: "0 0 24 24",
7588
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7589
- "path",
7590
- {
7591
- strokeLinecap: "round",
7592
- strokeLinejoin: "round",
7593
- strokeWidth: 2,
7594
- d: "M9 5l7 7-7 7"
7595
- }
7596
- )
7597
- }
7598
- )
7599
- }
7600
7791
  )
7601
7792
  ]
7602
7793
  }
@@ -7709,7 +7900,7 @@ function ThemeToggle({
7709
7900
  }
7710
7901
 
7711
7902
  // src/widget/components/Toast.tsx
7712
- var import_react22 = require("react");
7903
+ var import_react23 = require("react");
7713
7904
  var import_jsx_runtime11 = require("react/jsx-runtime");
7714
7905
  var variantStyles = {
7715
7906
  default: {
@@ -7739,14 +7930,14 @@ function ToastItem({
7739
7930
  duration = 4e3,
7740
7931
  onDismiss
7741
7932
  }) {
7742
- const [isExiting, setIsExiting] = (0, import_react22.useState)(false);
7743
- (0, import_react22.useEffect)(() => {
7933
+ const [isExiting, setIsExiting] = (0, import_react23.useState)(false);
7934
+ (0, import_react23.useEffect)(() => {
7744
7935
  const timer = setTimeout(() => {
7745
7936
  setIsExiting(true);
7746
7937
  }, duration);
7747
7938
  return () => clearTimeout(timer);
7748
7939
  }, [duration]);
7749
- (0, import_react22.useEffect)(() => {
7940
+ (0, import_react23.useEffect)(() => {
7750
7941
  if (isExiting) {
7751
7942
  const exitTimer = setTimeout(() => {
7752
7943
  onDismiss(id);
@@ -7950,8 +8141,8 @@ function toast(data) {
7950
8141
  toast.error = (title, description) => toast({ title, description, variant: "destructive" });
7951
8142
  toast.success = (title, description) => toast({ title, description, variant: "success" });
7952
8143
  function ToastContainer() {
7953
- const [activeToasts, setActiveToasts] = (0, import_react22.useState)([]);
7954
- (0, import_react22.useEffect)(() => {
8144
+ const [activeToasts, setActiveToasts] = (0, import_react23.useState)([]);
8145
+ (0, import_react23.useEffect)(() => {
7955
8146
  const listener = (newToasts) => {
7956
8147
  setActiveToasts(newToasts);
7957
8148
  };
@@ -7963,7 +8154,7 @@ function ToastContainer() {
7963
8154
  }
7964
8155
  };
7965
8156
  }, []);
7966
- const handleDismiss = (0, import_react22.useCallback)((id) => {
8157
+ const handleDismiss = (0, import_react23.useCallback)((id) => {
7967
8158
  toasts = toasts.filter((t) => t.id !== id);
7968
8159
  notifyListeners();
7969
8160
  }, []);
@@ -8000,7 +8191,7 @@ function ToastContainer() {
8000
8191
  }
8001
8192
 
8002
8193
  // src/widget/components/TokenSwipePill.tsx
8003
- var import_react23 = __toESM(require("react"), 1);
8194
+ var import_react24 = __toESM(require("react"), 1);
8004
8195
  var import_jsx_runtime12 = require("react/jsx-runtime");
8005
8196
  var MAX_VISIBLE_DOTS = 5;
8006
8197
  function TokenSwipePill({
@@ -8012,10 +8203,10 @@ function TokenSwipePill({
8012
8203
  walletAddress,
8013
8204
  style
8014
8205
  }) {
8015
- const [isDragging, setIsDragging] = (0, import_react23.useState)(false);
8016
- const [dragOffset, setDragOffset] = (0, import_react23.useState)(0);
8017
- const startXRef = (0, import_react23.useRef)(0);
8018
- const containerRef = (0, import_react23.useRef)(null);
8206
+ const [isDragging, setIsDragging] = (0, import_react24.useState)(false);
8207
+ const [dragOffset, setDragOffset] = (0, import_react24.useState)(0);
8208
+ const startXRef = (0, import_react24.useRef)(0);
8209
+ const containerRef = (0, import_react24.useRef)(null);
8019
8210
  const currentIndex = tokens.findIndex(
8020
8211
  (t) => normalizeAddress2(
8021
8212
  t.address,
@@ -8036,11 +8227,11 @@ function TokenSwipePill({
8036
8227
  }
8037
8228
  return pos;
8038
8229
  };
8039
- const handleDragStart = (0, import_react23.useCallback)((clientX) => {
8230
+ const handleDragStart = (0, import_react24.useCallback)((clientX) => {
8040
8231
  setIsDragging(true);
8041
8232
  startXRef.current = clientX;
8042
8233
  }, []);
8043
- const handleDragMove = (0, import_react23.useCallback)(
8234
+ const handleDragMove = (0, import_react24.useCallback)(
8044
8235
  (clientX) => {
8045
8236
  if (!isDragging) return;
8046
8237
  const delta = startXRef.current - clientX;
@@ -8048,7 +8239,7 @@ function TokenSwipePill({
8048
8239
  },
8049
8240
  [isDragging]
8050
8241
  );
8051
- const handleDragEnd = (0, import_react23.useCallback)(() => {
8242
+ const handleDragEnd = (0, import_react24.useCallback)(() => {
8052
8243
  if (!isDragging) return;
8053
8244
  setIsDragging(false);
8054
8245
  if (Math.abs(dragOffset) > swipeThreshold) {
@@ -8066,13 +8257,13 @@ function TokenSwipePill({
8066
8257
  e2.preventDefault();
8067
8258
  handleDragStart(e2.clientX);
8068
8259
  };
8069
- const handleMouseMove = (0, import_react23.useCallback)(
8260
+ const handleMouseMove = (0, import_react24.useCallback)(
8070
8261
  (e2) => {
8071
8262
  handleDragMove(e2.clientX);
8072
8263
  },
8073
8264
  [handleDragMove]
8074
8265
  );
8075
- const handleMouseUp = (0, import_react23.useCallback)(() => {
8266
+ const handleMouseUp = (0, import_react24.useCallback)(() => {
8076
8267
  handleDragEnd();
8077
8268
  }, [handleDragEnd]);
8078
8269
  const handleTouchStart = (e2) => {
@@ -8086,7 +8277,7 @@ function TokenSwipePill({
8086
8277
  const handleTouchEnd = () => {
8087
8278
  handleDragEnd();
8088
8279
  };
8089
- (0, import_react23.useEffect)(() => {
8280
+ (0, import_react24.useEffect)(() => {
8090
8281
  if (isDragging) {
8091
8282
  window.addEventListener("mousemove", handleMouseMove);
8092
8283
  window.addEventListener("mouseup", handleMouseUp);
@@ -8097,10 +8288,10 @@ function TokenSwipePill({
8097
8288
  }
8098
8289
  }, [isDragging, handleMouseMove, handleMouseUp]);
8099
8290
  const visualOffset = Math.max(-40, Math.min(40, dragOffset * 0.5));
8100
- const getTokenInitials = (symbol) => {
8101
- return symbol?.slice(0, 2).toUpperCase();
8291
+ const getChainInitials = (chain) => {
8292
+ return chain?.slice(0, 2).toUpperCase();
8102
8293
  };
8103
- const chainBadge = (0, import_react23.useMemo)(() => {
8294
+ const chainBadge = (0, import_react24.useMemo)(() => {
8104
8295
  const url = selectedToken.chainData?.chainIconURI || selectedToken.chainData?.iconUrl;
8105
8296
  return url?.toString();
8106
8297
  }, [selectedToken]);
@@ -8125,6 +8316,7 @@ function TokenSwipePill({
8125
8316
  alignItems: "flex-start",
8126
8317
  gap: spacing[2],
8127
8318
  padding: `${spacing[1.5]} ${spacing[4]}`,
8319
+ minWidth: "16.875rem",
8128
8320
  backgroundColor: colors.background,
8129
8321
  borderRadius: borderRadius.full,
8130
8322
  border: `1px solid ${colors.border}`,
@@ -8145,7 +8337,8 @@ function TokenSwipePill({
8145
8337
  style: {
8146
8338
  display: "flex",
8147
8339
  flexDirection: "column",
8148
- alignItems: "center"
8340
+ alignItems: "center",
8341
+ width: "70%"
8149
8342
  },
8150
8343
  children: [
8151
8344
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -8225,26 +8418,31 @@ function TokenSwipePill({
8225
8418
  alignItems: "center",
8226
8419
  justifyContent: "center"
8227
8420
  },
8228
- children: validateIconUrl(token.iconUrl, isCenter) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8229
- "img",
8421
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8422
+ ImageLoader,
8230
8423
  {
8231
8424
  src: validateIconUrl(token.iconUrl, isCenter),
8232
8425
  alt: token.symbol,
8233
- style: {
8426
+ imgStyle: {
8234
8427
  width: "2rem",
8235
8428
  height: "2rem",
8236
8429
  objectFit: "contain"
8237
- }
8238
- }
8239
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8240
- "span",
8241
- {
8242
- style: {
8243
- fontSize: fontSize.xs,
8244
- fontWeight: fontWeight.bold,
8245
- color: colors.zinc[800]
8246
8430
  },
8247
- children: getTokenInitials(token.symbol)
8431
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8432
+ "span",
8433
+ {
8434
+ style: {
8435
+ fontSize: fontSize.xs,
8436
+ fontWeight: fontWeight.bold,
8437
+ color: colors.zinc[800],
8438
+ width: "2rem",
8439
+ height: "2rem",
8440
+ objectFit: "contain",
8441
+ textAlign: "center"
8442
+ },
8443
+ children: token.symbol
8444
+ }
8445
+ )
8248
8446
  }
8249
8447
  )
8250
8448
  }
@@ -8267,16 +8465,27 @@ function TokenSwipePill({
8267
8465
  overflow: "hidden"
8268
8466
  },
8269
8467
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8270
- "img",
8468
+ ImageLoader,
8271
8469
  {
8272
- src: chainBadge,
8470
+ src: chainBadge || "",
8273
8471
  alt: selectedToken.chainData?.networkName,
8274
- style: {
8472
+ imgStyle: {
8275
8473
  width: "0.75rem",
8276
8474
  height: "0.75rem",
8277
8475
  borderRadius: "9999px",
8278
8476
  objectFit: "cover"
8279
- }
8477
+ },
8478
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8479
+ "span",
8480
+ {
8481
+ style: {
8482
+ fontSize: "10px"
8483
+ },
8484
+ children: getChainInitials(
8485
+ selectedToken.chainData?.networkName
8486
+ )
8487
+ }
8488
+ )
8280
8489
  }
8281
8490
  )
8282
8491
  }
@@ -8368,7 +8577,7 @@ function TokenSwipePill({
8368
8577
  const token = tokens[index];
8369
8578
  const prevIndex = uniqueIndices[i - 1];
8370
8579
  const showGap = i > 0 && index - prevIndex > 1;
8371
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react23.default.Fragment, { children: [
8580
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react24.default.Fragment, { children: [
8372
8581
  showGap && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8373
8582
  "span",
8374
8583
  {
@@ -8550,7 +8759,7 @@ function TokenSwipePill({
8550
8759
  }
8551
8760
 
8552
8761
  // src/widget/components/TransactionSteps.tsx
8553
- var import_react24 = require("react");
8762
+ var import_react25 = require("react");
8554
8763
  var import_jsx_runtime13 = require("react/jsx-runtime");
8555
8764
  var DEFAULT_LABELS = {
8556
8765
  confirming: "Confirming in wallet",
@@ -8590,14 +8799,14 @@ function TransactionSteps({
8590
8799
  style,
8591
8800
  stepLabels
8592
8801
  }) {
8593
- const labels = (0, import_react24.useMemo)(
8802
+ const labels = (0, import_react25.useMemo)(
8594
8803
  () => ({
8595
8804
  ...DEFAULT_LABELS,
8596
8805
  ...stepLabels
8597
8806
  }),
8598
8807
  [stepLabels]
8599
8808
  );
8600
- const steps = (0, import_react24.useMemo)(
8809
+ const steps = (0, import_react25.useMemo)(
8601
8810
  () => getSteps(transactionStatus, labels),
8602
8811
  [transactionStatus, labels]
8603
8812
  );
@@ -8756,7 +8965,7 @@ function TransactionSteps({
8756
8965
  }
8757
8966
 
8758
8967
  // src/widget/components/WidgetContainer.tsx
8759
- var import_react25 = require("react");
8968
+ var import_react26 = require("react");
8760
8969
  var import_jsx_runtime14 = require("react/jsx-runtime");
8761
8970
  var INJECTED_STYLES = ALL_THEME_STYLES + ALL_ANIMATION_STYLES;
8762
8971
  function WidgetContainer({
@@ -8765,8 +8974,8 @@ function WidgetContainer({
8765
8974
  className,
8766
8975
  style
8767
8976
  }) {
8768
- const [resolvedTheme, setResolvedTheme] = (0, import_react25.useState)("light");
8769
- (0, import_react25.useEffect)(() => {
8977
+ const [resolvedTheme, setResolvedTheme] = (0, import_react26.useState)("light");
8978
+ (0, import_react26.useEffect)(() => {
8770
8979
  if (theme === "system") {
8771
8980
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
8772
8981
  setResolvedTheme(mediaQuery.matches ? "dark" : "light");
@@ -9009,8 +9218,147 @@ function WidgetSecurityFooter({
9009
9218
  );
9010
9219
  }
9011
9220
 
9012
- // src/widget/components/Skeletons/LoadingSkeleton.tsx
9221
+ // src/widget/components/ImageLoader.tsx
9222
+ var import_react27 = require("react");
9013
9223
  var import_jsx_runtime17 = require("react/jsx-runtime");
9224
+ function Skeleton({
9225
+ background,
9226
+ height,
9227
+ borderRadius: borderRadius2
9228
+ }) {
9229
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9230
+ "div",
9231
+ {
9232
+ style: {
9233
+ background: background || "#eee",
9234
+ height: height || "50px",
9235
+ borderRadius: borderRadius2 || "100%"
9236
+ }
9237
+ }
9238
+ );
9239
+ }
9240
+ function ImageLoader({
9241
+ src,
9242
+ alt = "",
9243
+ retry = 0,
9244
+ retryDelay = 1e3,
9245
+ lazy: lazy2 = true,
9246
+ Fallback = null,
9247
+ // skeleton = null,
9248
+ imgStyle,
9249
+ onLoad,
9250
+ onError
9251
+ }) {
9252
+ const [status, setStatus] = (0, import_react27.useState)("idle");
9253
+ const [attempt, setAttempt] = (0, import_react27.useState)(0);
9254
+ const [srcIsEmpty, setSrcIsEmpty] = (0, import_react27.useState)(false);
9255
+ const imgRef = (0, import_react27.useRef)(null);
9256
+ const observerRef = (0, import_react27.useRef)(null);
9257
+ (0, import_react27.useEffect)(() => {
9258
+ if (status === "error" && attempt < retry) {
9259
+ const timer = setTimeout(() => {
9260
+ setAttempt((prev) => prev + 1);
9261
+ setStatus("loading");
9262
+ }, retryDelay);
9263
+ return () => clearTimeout(timer);
9264
+ }
9265
+ }, [status, attempt, retry, retryDelay]);
9266
+ const loadImage = () => {
9267
+ if (!src) {
9268
+ setSrcIsEmpty(true);
9269
+ return;
9270
+ }
9271
+ setStatus("loading");
9272
+ const img = new Image();
9273
+ img.src = src;
9274
+ img.onload = () => {
9275
+ setStatus("success");
9276
+ onLoad?.();
9277
+ };
9278
+ img.onerror = () => {
9279
+ setStatus("error");
9280
+ onError?.();
9281
+ };
9282
+ };
9283
+ (0, import_react27.useEffect)(() => {
9284
+ if (!lazy2) {
9285
+ setTimeout(() => {
9286
+ loadImage();
9287
+ }, 0);
9288
+ return;
9289
+ }
9290
+ observerRef.current = new IntersectionObserver(
9291
+ (entries) => {
9292
+ entries.forEach((entry) => {
9293
+ if (entry.isIntersecting) {
9294
+ loadImage();
9295
+ observerRef.current?.disconnect();
9296
+ }
9297
+ });
9298
+ },
9299
+ { threshold: 0.1 }
9300
+ );
9301
+ if (imgRef.current) {
9302
+ observerRef.current.observe(imgRef.current);
9303
+ }
9304
+ return () => observerRef.current?.disconnect();
9305
+ }, [lazy2, src, loadImage]);
9306
+ const showFallback = (0, import_react27.useMemo)(() => {
9307
+ return (status === "error" && attempt >= retry || srcIsEmpty) && Fallback;
9308
+ }, [status, attempt, retry, srcIsEmpty, Fallback]);
9309
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: imgRef, style: { position: "relative" }, children: [
9310
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9311
+ Skeleton,
9312
+ {
9313
+ height: imgStyle?.height,
9314
+ borderRadius: imgStyle?.borderRadius
9315
+ }
9316
+ ),
9317
+ status === "success" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9318
+ "img",
9319
+ {
9320
+ src,
9321
+ alt,
9322
+ style: {
9323
+ // Css guards to prevent external styles from interfering with image rendering
9324
+ all: "revert",
9325
+ // Undo any inherited/global resets (e.g. Tailwind, normalize.css)
9326
+ display: "block",
9327
+ // Prevent inline baseline gap
9328
+ width: "100%",
9329
+ // Restore intended sizing
9330
+ maxWidth: "100%",
9331
+ // Prevent overflow
9332
+ height: "auto",
9333
+ // Maintain aspect ratio
9334
+ border: "none",
9335
+ // Strip any border resets
9336
+ padding: 0,
9337
+ // Strip padding resets
9338
+ margin: 0,
9339
+ // Strip margin resets
9340
+ objectFit: "cover",
9341
+ // Preserve visual intent
9342
+ verticalAlign: "middle",
9343
+ // Guard against inline stripping
9344
+ filter: "none",
9345
+ // Prevent inherited filter washes
9346
+ opacity: 1,
9347
+ // Prevent inherited opacity stripping
9348
+ mixBlendMode: "normal",
9349
+ // Prevent blend mode interference
9350
+ colorScheme: "normal",
9351
+ // Prevent dark-mode inversion
9352
+ ...imgStyle
9353
+ }
9354
+ }
9355
+ ),
9356
+ showFallback && Fallback
9357
+ ] });
9358
+ }
9359
+
9360
+ // src/widget/components/Skeletons/LoadingSkeleton.tsx
9361
+ var import_jsx_runtime18 = require("react/jsx-runtime");
9014
9362
  var containerStyle = {
9015
9363
  display: "flex",
9016
9364
  flexDirection: "column",
@@ -9046,11 +9394,11 @@ var lineSmStyle = {
9046
9394
  function LoadingSkeleton({
9047
9395
  style
9048
9396
  }) {
9049
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { ...containerStyle, ...style }, children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: rowStyle, children: [
9050
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: circleStyle, className: "tw-animate-pulse" }),
9051
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1 }, children: [
9052
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
9053
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9397
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { ...containerStyle, ...style }, children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: rowStyle, children: [
9398
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: circleStyle, className: "tw-animate-pulse" }),
9399
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { flex: 1 }, children: [
9400
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
9401
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9054
9402
  "div",
9055
9403
  {
9056
9404
  style: { ...lineSmStyle, marginTop: spacing[2] },
@@ -9077,14 +9425,14 @@ function clearPersistedState() {
9077
9425
  }
9078
9426
 
9079
9427
  // src/widget/app/WidgetShellOverlays.tsx
9080
- var import_jsx_runtime18 = require("react/jsx-runtime");
9428
+ var import_jsx_runtime19 = require("react/jsx-runtime");
9081
9429
  function ConfirmCloseDialog({
9082
9430
  open,
9083
9431
  onConfirm,
9084
9432
  onCancel,
9085
9433
  theme
9086
9434
  }) {
9087
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9435
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9088
9436
  Dialog,
9089
9437
  {
9090
9438
  open,
@@ -9103,7 +9451,7 @@ function InitErrorOverlay({
9103
9451
  onRefresh
9104
9452
  }) {
9105
9453
  if (!open) return null;
9106
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9454
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9107
9455
  "div",
9108
9456
  {
9109
9457
  role: "dialog",
@@ -9121,7 +9469,7 @@ function InitErrorOverlay({
9121
9469
  padding: spacing[6],
9122
9470
  borderRadius: "20px"
9123
9471
  },
9124
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
9472
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
9125
9473
  "div",
9126
9474
  {
9127
9475
  style: {
@@ -9136,7 +9484,7 @@ function InitErrorOverlay({
9136
9484
  border: `1px solid ${colors.border}`
9137
9485
  },
9138
9486
  children: [
9139
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9487
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9140
9488
  "h2",
9141
9489
  {
9142
9490
  id: "init-error-title",
@@ -9148,7 +9496,7 @@ function InitErrorOverlay({
9148
9496
  children: "API key validation failed"
9149
9497
  }
9150
9498
  ),
9151
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9499
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9152
9500
  "p",
9153
9501
  {
9154
9502
  id: "init-error-description",
@@ -9160,7 +9508,7 @@ function InitErrorOverlay({
9160
9508
  children: "We could not validate your Trustware API key. Please refresh to retry."
9161
9509
  }
9162
9510
  ),
9163
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9511
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9164
9512
  "button",
9165
9513
  {
9166
9514
  onClick: onRefresh,
@@ -9191,7 +9539,7 @@ function InitErrorOverlay({
9191
9539
  }
9192
9540
 
9193
9541
  // src/widget/app/WidgetRouter.tsx
9194
- var import_react37 = require("react");
9542
+ var import_react39 = require("react");
9195
9543
 
9196
9544
  // src/widget/helpers/tokenAmount.ts
9197
9545
  function rawToDecimal(rawAmount, decimals) {
@@ -9254,12 +9602,12 @@ function resolveChainLabel(chain) {
9254
9602
  }
9255
9603
 
9256
9604
  // src/widget/features/token-selection/components/AvailableTokenListItem.tsx
9257
- var import_jsx_runtime19 = require("react/jsx-runtime");
9605
+ var import_jsx_runtime20 = require("react/jsx-runtime");
9258
9606
  function AvailableTokenListItem({
9259
9607
  onSelect,
9260
9608
  token
9261
9609
  }) {
9262
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
9610
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9263
9611
  "button",
9264
9612
  {
9265
9613
  type: "button",
@@ -9277,7 +9625,7 @@ function AvailableTokenListItem({
9277
9625
  cursor: "pointer"
9278
9626
  },
9279
9627
  children: [
9280
- token.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9628
+ token.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9281
9629
  "img",
9282
9630
  {
9283
9631
  src: token.iconUrl,
@@ -9298,7 +9646,7 @@ function AvailableTokenListItem({
9298
9646
  }
9299
9647
  }
9300
9648
  ) : null,
9301
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9649
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9302
9650
  "div",
9303
9651
  {
9304
9652
  style: {
@@ -9311,7 +9659,7 @@ function AvailableTokenListItem({
9311
9659
  flexShrink: 0,
9312
9660
  display: token.iconUrl ? "none" : "flex"
9313
9661
  },
9314
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9662
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9315
9663
  "span",
9316
9664
  {
9317
9665
  style: {
@@ -9324,8 +9672,8 @@ function AvailableTokenListItem({
9324
9672
  )
9325
9673
  }
9326
9674
  ),
9327
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9328
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9675
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9676
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9329
9677
  "div",
9330
9678
  {
9331
9679
  style: {
@@ -9333,7 +9681,7 @@ function AvailableTokenListItem({
9333
9681
  alignItems: "center",
9334
9682
  gap: spacing[1.5]
9335
9683
  },
9336
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9684
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9337
9685
  "span",
9338
9686
  {
9339
9687
  style: {
@@ -9349,7 +9697,7 @@ function AvailableTokenListItem({
9349
9697
  )
9350
9698
  }
9351
9699
  ),
9352
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9700
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9353
9701
  "span",
9354
9702
  {
9355
9703
  style: {
@@ -9364,7 +9712,7 @@ function AvailableTokenListItem({
9364
9712
  }
9365
9713
  )
9366
9714
  ] }),
9367
- token.balance !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9715
+ token.balance !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9368
9716
  "span",
9369
9717
  {
9370
9718
  style: {
@@ -9375,7 +9723,7 @@ function AvailableTokenListItem({
9375
9723
  children: formatTokenBalance(token.balance, token.decimals)
9376
9724
  }
9377
9725
  ) }) : null,
9378
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9726
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9379
9727
  "svg",
9380
9728
  {
9381
9729
  style: {
@@ -9388,7 +9736,7 @@ function AvailableTokenListItem({
9388
9736
  fill: "none",
9389
9737
  stroke: "currentColor",
9390
9738
  strokeWidth: 2,
9391
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9739
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9392
9740
  }
9393
9741
  )
9394
9742
  ]
@@ -9397,7 +9745,7 @@ function AvailableTokenListItem({
9397
9745
  }
9398
9746
 
9399
9747
  // src/widget/features/token-selection/components/ChainSelectorPanel.tsx
9400
- var import_jsx_runtime20 = require("react/jsx-runtime");
9748
+ var import_jsx_runtime21 = require("react/jsx-runtime");
9401
9749
  function ChainItem({
9402
9750
  chain,
9403
9751
  index,
@@ -9406,7 +9754,7 @@ function ChainItem({
9406
9754
  }) {
9407
9755
  const key = chain.id ?? chain.chainId ?? chain.networkIdentifier ?? `chain-${index}`;
9408
9756
  const label = resolveChainLabel(chain);
9409
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9757
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9410
9758
  "button",
9411
9759
  {
9412
9760
  type: "button",
@@ -9428,7 +9776,7 @@ function ChainItem({
9428
9776
  }
9429
9777
  },
9430
9778
  children: [
9431
- chain.chainIconURI ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9779
+ chain.chainIconURI ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9432
9780
  "img",
9433
9781
  {
9434
9782
  src: chain.chainIconURI,
@@ -9441,7 +9789,7 @@ function ChainItem({
9441
9789
  flexShrink: 0
9442
9790
  }
9443
9791
  }
9444
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9792
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9445
9793
  "div",
9446
9794
  {
9447
9795
  style: {
@@ -9454,7 +9802,7 @@ function ChainItem({
9454
9802
  justifyContent: "center",
9455
9803
  flexShrink: 0
9456
9804
  },
9457
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9805
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9458
9806
  "span",
9459
9807
  {
9460
9808
  style: {
@@ -9467,7 +9815,7 @@ function ChainItem({
9467
9815
  )
9468
9816
  }
9469
9817
  ),
9470
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9818
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9471
9819
  "span",
9472
9820
  {
9473
9821
  style: {
@@ -9482,7 +9830,7 @@ function ChainItem({
9482
9830
  children: label
9483
9831
  }
9484
9832
  ) }),
9485
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9833
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9486
9834
  "div",
9487
9835
  {
9488
9836
  style: {
@@ -9495,7 +9843,7 @@ function ChainItem({
9495
9843
  justifyContent: "center",
9496
9844
  flexShrink: 0
9497
9845
  },
9498
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9846
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9499
9847
  "svg",
9500
9848
  {
9501
9849
  style: {
@@ -9507,7 +9855,7 @@ function ChainItem({
9507
9855
  fill: "none",
9508
9856
  stroke: "currentColor",
9509
9857
  strokeWidth: 3,
9510
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9858
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9511
9859
  "path",
9512
9860
  {
9513
9861
  strokeLinecap: "round",
@@ -9532,7 +9880,7 @@ function ChainSelectorPanel({
9532
9880
  otherChains,
9533
9881
  popularChains
9534
9882
  }) {
9535
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9883
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9536
9884
  "div",
9537
9885
  {
9538
9886
  style: {
@@ -9543,14 +9891,14 @@ function ChainSelectorPanel({
9543
9891
  overflow: "hidden"
9544
9892
  },
9545
9893
  children: [
9546
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9894
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9547
9895
  "div",
9548
9896
  {
9549
9897
  style: {
9550
9898
  padding: `${spacing[2]} ${spacing[3]}`,
9551
9899
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
9552
9900
  },
9553
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9901
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9554
9902
  "span",
9555
9903
  {
9556
9904
  style: {
@@ -9565,7 +9913,7 @@ function ChainSelectorPanel({
9565
9913
  )
9566
9914
  }
9567
9915
  ),
9568
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9916
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9569
9917
  "div",
9570
9918
  {
9571
9919
  style: {
@@ -9573,7 +9921,7 @@ function ChainSelectorPanel({
9573
9921
  overflowY: "auto",
9574
9922
  padding: `${spacing[2]} ${spacing[1]}`
9575
9923
  },
9576
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9924
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9577
9925
  "div",
9578
9926
  {
9579
9927
  style: {
@@ -9582,7 +9930,7 @@ function ChainSelectorPanel({
9582
9930
  gap: spacing[2],
9583
9931
  padding: `0 ${spacing[2]}`
9584
9932
  },
9585
- children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9933
+ children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9586
9934
  "div",
9587
9935
  {
9588
9936
  style: {
@@ -9592,7 +9940,7 @@ function ChainSelectorPanel({
9592
9940
  padding: `${spacing[2]} 0`
9593
9941
  },
9594
9942
  children: [
9595
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9943
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9596
9944
  "div",
9597
9945
  {
9598
9946
  style: {
@@ -9604,7 +9952,7 @@ function ChainSelectorPanel({
9604
9952
  className: "tw-animate-pulse"
9605
9953
  }
9606
9954
  ),
9607
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9955
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9608
9956
  "div",
9609
9957
  {
9610
9958
  style: {
@@ -9621,7 +9969,7 @@ function ChainSelectorPanel({
9621
9969
  i
9622
9970
  ))
9623
9971
  }
9624
- ) : error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9972
+ ) : error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9625
9973
  "div",
9626
9974
  {
9627
9975
  style: {
@@ -9629,8 +9977,8 @@ function ChainSelectorPanel({
9629
9977
  textAlign: "center"
9630
9978
  },
9631
9979
  children: [
9632
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9633
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9980
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9981
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9634
9982
  "button",
9635
9983
  {
9636
9984
  type: "button",
@@ -9649,9 +9997,9 @@ function ChainSelectorPanel({
9649
9997
  )
9650
9998
  ]
9651
9999
  }
9652
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
9653
- popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: spacing[2] }, children: [
9654
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10000
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
10001
+ popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { marginBottom: spacing[2] }, children: [
10002
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9655
10003
  "span",
9656
10004
  {
9657
10005
  style: {
@@ -9664,7 +10012,7 @@ function ChainSelectorPanel({
9664
10012
  children: "Popular"
9665
10013
  }
9666
10014
  ) }),
9667
- popularChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10015
+ popularChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9668
10016
  ChainItem,
9669
10017
  {
9670
10018
  chain,
@@ -9677,15 +10025,15 @@ function ChainSelectorPanel({
9677
10025
  )
9678
10026
  ))
9679
10027
  ] }),
9680
- otherChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
9681
- popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10028
+ otherChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
10029
+ popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9682
10030
  "div",
9683
10031
  {
9684
10032
  style: {
9685
10033
  padding: `${spacing[1.5]} ${spacing[3]}`,
9686
10034
  marginTop: spacing[2]
9687
10035
  },
9688
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10036
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9689
10037
  "span",
9690
10038
  {
9691
10039
  style: {
@@ -9700,7 +10048,7 @@ function ChainSelectorPanel({
9700
10048
  )
9701
10049
  }
9702
10050
  ),
9703
- otherChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10051
+ otherChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9704
10052
  ChainItem,
9705
10053
  {
9706
10054
  chain,
@@ -9713,14 +10061,14 @@ function ChainSelectorPanel({
9713
10061
  )
9714
10062
  ))
9715
10063
  ] }),
9716
- popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10064
+ popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9717
10065
  "div",
9718
10066
  {
9719
10067
  style: {
9720
10068
  padding: `${spacing[3]} ${spacing[4]}`,
9721
10069
  textAlign: "center"
9722
10070
  },
9723
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
10071
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9724
10072
  "p",
9725
10073
  {
9726
10074
  style: {
@@ -9741,13 +10089,13 @@ function ChainSelectorPanel({
9741
10089
  }
9742
10090
 
9743
10091
  // src/widget/features/token-selection/components/TokenSearchInput.tsx
9744
- var import_jsx_runtime21 = require("react/jsx-runtime");
10092
+ var import_jsx_runtime22 = require("react/jsx-runtime");
9745
10093
  function TokenSearchInput({
9746
10094
  searchQuery,
9747
10095
  setSearchQuery
9748
10096
  }) {
9749
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { position: "relative" }, children: [
9750
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
10097
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { position: "relative" }, children: [
10098
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
9751
10099
  "svg",
9752
10100
  {
9753
10101
  style: {
@@ -9764,12 +10112,12 @@ function TokenSearchInput({
9764
10112
  stroke: "currentColor",
9765
10113
  strokeWidth: 2,
9766
10114
  children: [
9767
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
9768
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
10115
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
10116
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
9769
10117
  ]
9770
10118
  }
9771
10119
  ),
9772
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
10120
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9773
10121
  "input",
9774
10122
  {
9775
10123
  type: "text",
@@ -9792,7 +10140,7 @@ function TokenSearchInput({
9792
10140
  }
9793
10141
  }
9794
10142
  ),
9795
- searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
10143
+ searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9796
10144
  "button",
9797
10145
  {
9798
10146
  type: "button",
@@ -9810,7 +10158,7 @@ function TokenSearchInput({
9810
10158
  transition: "background-color 0.2s"
9811
10159
  },
9812
10160
  "aria-label": "Clear search",
9813
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
10161
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9814
10162
  "svg",
9815
10163
  {
9816
10164
  style: {
@@ -9822,7 +10170,7 @@ function TokenSearchInput({
9822
10170
  fill: "none",
9823
10171
  stroke: "currentColor",
9824
10172
  strokeWidth: 2,
9825
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
10173
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
9826
10174
  }
9827
10175
  )
9828
10176
  }
@@ -9831,7 +10179,7 @@ function TokenSearchInput({
9831
10179
  }
9832
10180
 
9833
10181
  // src/widget/features/token-selection/components/TokenSelectorStateView.tsx
9834
- var import_jsx_runtime22 = require("react/jsx-runtime");
10182
+ var import_jsx_runtime23 = require("react/jsx-runtime");
9835
10183
  function TokenSelectorStateView({
9836
10184
  isLoadingTokens,
9837
10185
  searchQuery,
@@ -9840,7 +10188,7 @@ function TokenSelectorStateView({
9840
10188
  tokensError
9841
10189
  }) {
9842
10190
  if (isLoadingTokens) {
9843
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10191
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9844
10192
  "div",
9845
10193
  {
9846
10194
  style: {
@@ -9849,7 +10197,7 @@ function TokenSelectorStateView({
9849
10197
  gap: spacing[2],
9850
10198
  padding: `0 ${spacing[2]}`
9851
10199
  },
9852
- children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10200
+ children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9853
10201
  "div",
9854
10202
  {
9855
10203
  style: {
@@ -9859,7 +10207,7 @@ function TokenSelectorStateView({
9859
10207
  padding: `${spacing[2.5]} ${spacing[2]}`
9860
10208
  },
9861
10209
  children: [
9862
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10210
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9863
10211
  "div",
9864
10212
  {
9865
10213
  style: {
@@ -9871,8 +10219,8 @@ function TokenSelectorStateView({
9871
10219
  className: "tw-animate-pulse"
9872
10220
  }
9873
10221
  ),
9874
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1 }, children: [
9875
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10222
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1 }, children: [
10223
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9876
10224
  "div",
9877
10225
  {
9878
10226
  style: {
@@ -9885,7 +10233,7 @@ function TokenSelectorStateView({
9885
10233
  className: "tw-animate-pulse"
9886
10234
  }
9887
10235
  ),
9888
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10236
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9889
10237
  "div",
9890
10238
  {
9891
10239
  style: {
@@ -9898,7 +10246,7 @@ function TokenSelectorStateView({
9898
10246
  }
9899
10247
  )
9900
10248
  ] }),
9901
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10249
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9902
10250
  "div",
9903
10251
  {
9904
10252
  style: {
@@ -9918,7 +10266,7 @@ function TokenSelectorStateView({
9918
10266
  );
9919
10267
  }
9920
10268
  if (state === "no-chain") {
9921
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10269
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9922
10270
  "div",
9923
10271
  {
9924
10272
  style: {
@@ -9928,8 +10276,8 @@ function TokenSelectorStateView({
9928
10276
  justifyContent: "center",
9929
10277
  padding: `0 ${spacing[4]}`
9930
10278
  },
9931
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
9932
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10279
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10280
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9933
10281
  "svg",
9934
10282
  {
9935
10283
  style: {
@@ -9942,7 +10290,7 @@ function TokenSelectorStateView({
9942
10290
  fill: "none",
9943
10291
  stroke: "currentColor",
9944
10292
  strokeWidth: 1.5,
9945
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10293
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9946
10294
  "path",
9947
10295
  {
9948
10296
  strokeLinecap: "round",
@@ -9952,7 +10300,7 @@ function TokenSelectorStateView({
9952
10300
  )
9953
10301
  }
9954
10302
  ),
9955
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10303
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9956
10304
  "p",
9957
10305
  {
9958
10306
  style: {
@@ -9967,7 +10315,7 @@ function TokenSelectorStateView({
9967
10315
  );
9968
10316
  }
9969
10317
  if (state === "error") {
9970
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10318
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9971
10319
  "div",
9972
10320
  {
9973
10321
  style: {
@@ -9977,8 +10325,8 @@ function TokenSelectorStateView({
9977
10325
  justifyContent: "center",
9978
10326
  padding: `0 ${spacing[4]}`
9979
10327
  },
9980
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
9981
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10328
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10329
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9982
10330
  "svg",
9983
10331
  {
9984
10332
  style: {
@@ -9992,12 +10340,12 @@ function TokenSelectorStateView({
9992
10340
  stroke: "currentColor",
9993
10341
  strokeWidth: 2,
9994
10342
  children: [
9995
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
9996
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
10343
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
10344
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
9997
10345
  ]
9998
10346
  }
9999
10347
  ),
10000
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10348
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10001
10349
  "p",
10002
10350
  {
10003
10351
  style: {
@@ -10008,7 +10356,7 @@ function TokenSelectorStateView({
10008
10356
  children: tokensError
10009
10357
  }
10010
10358
  ),
10011
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10359
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10012
10360
  "button",
10013
10361
  {
10014
10362
  type: "button",
@@ -10029,7 +10377,7 @@ function TokenSelectorStateView({
10029
10377
  }
10030
10378
  );
10031
10379
  }
10032
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10380
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10033
10381
  "div",
10034
10382
  {
10035
10383
  style: {
@@ -10039,8 +10387,8 @@ function TokenSelectorStateView({
10039
10387
  justifyContent: "center",
10040
10388
  padding: `0 ${spacing[4]}`
10041
10389
  },
10042
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
10043
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10390
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10391
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10044
10392
  "svg",
10045
10393
  {
10046
10394
  style: {
@@ -10053,13 +10401,13 @@ function TokenSelectorStateView({
10053
10401
  stroke: "currentColor",
10054
10402
  strokeWidth: 1.5,
10055
10403
  children: [
10056
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
10057
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
10058
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M8 11h6" })
10404
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
10405
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
10406
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "M8 11h6" })
10059
10407
  ]
10060
10408
  }
10061
10409
  ),
10062
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10410
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10063
10411
  "p",
10064
10412
  {
10065
10413
  style: {
@@ -10069,7 +10417,7 @@ function TokenSelectorStateView({
10069
10417
  children: searchQuery ? `No tokens matching "${searchQuery}"` : "No tokens available"
10070
10418
  }
10071
10419
  ),
10072
- searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10420
+ searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10073
10421
  "button",
10074
10422
  {
10075
10423
  type: "button",
@@ -10092,13 +10440,13 @@ function TokenSelectorStateView({
10092
10440
  }
10093
10441
 
10094
10442
  // src/widget/features/token-selection/components/WalletTokenListItem.tsx
10095
- var import_jsx_runtime23 = require("react/jsx-runtime");
10443
+ var import_jsx_runtime24 = require("react/jsx-runtime");
10096
10444
  function WalletTokenListItem({
10097
10445
  onSelect,
10098
10446
  token
10099
10447
  }) {
10100
10448
  const logoUrl = token.iconUrl || token.logo_url;
10101
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10449
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10102
10450
  "button",
10103
10451
  {
10104
10452
  type: "button",
@@ -10116,8 +10464,8 @@ function WalletTokenListItem({
10116
10464
  cursor: "pointer"
10117
10465
  },
10118
10466
  children: [
10119
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { position: "relative" }, children: [
10120
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10467
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { position: "relative" }, children: [
10468
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10121
10469
  "img",
10122
10470
  {
10123
10471
  src: logoUrl,
@@ -10130,7 +10478,7 @@ function WalletTokenListItem({
10130
10478
  flexShrink: 0
10131
10479
  }
10132
10480
  }
10133
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10481
+ ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10134
10482
  "div",
10135
10483
  {
10136
10484
  style: {
@@ -10140,7 +10488,7 @@ function WalletTokenListItem({
10140
10488
  objectFit: "cover",
10141
10489
  flexShrink: 0
10142
10490
  },
10143
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10491
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10144
10492
  "span",
10145
10493
  {
10146
10494
  style: {
@@ -10156,7 +10504,7 @@ function WalletTokenListItem({
10156
10504
  )
10157
10505
  }
10158
10506
  ),
10159
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10507
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10160
10508
  "div",
10161
10509
  {
10162
10510
  style: {
@@ -10172,7 +10520,7 @@ function WalletTokenListItem({
10172
10520
  alignItems: "center",
10173
10521
  justifyContent: "center"
10174
10522
  },
10175
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10523
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10176
10524
  "img",
10177
10525
  {
10178
10526
  src: token.chainIconURI,
@@ -10187,8 +10535,8 @@ function WalletTokenListItem({
10187
10535
  }
10188
10536
  )
10189
10537
  ] }),
10190
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
10191
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10538
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
10539
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10192
10540
  "div",
10193
10541
  {
10194
10542
  style: {
@@ -10196,7 +10544,7 @@ function WalletTokenListItem({
10196
10544
  alignItems: "center",
10197
10545
  gap: spacing[1.5]
10198
10546
  },
10199
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10547
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10200
10548
  "span",
10201
10549
  {
10202
10550
  style: {
@@ -10212,7 +10560,7 @@ function WalletTokenListItem({
10212
10560
  )
10213
10561
  }
10214
10562
  ),
10215
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10563
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10216
10564
  "span",
10217
10565
  {
10218
10566
  style: {
@@ -10237,7 +10585,7 @@ function WalletTokenListItem({
10237
10585
  }
10238
10586
 
10239
10587
  // src/widget/features/token-selection/components/TokenSelectorPanel.tsx
10240
- var import_jsx_runtime24 = require("react/jsx-runtime");
10588
+ var import_jsx_runtime25 = require("react/jsx-runtime");
10241
10589
  function TokenSelectorPanel({
10242
10590
  filteredTokens,
10243
10591
  filteredWalletTokens,
@@ -10253,7 +10601,7 @@ function TokenSelectorPanel({
10253
10601
  tokensError,
10254
10602
  walletAddress
10255
10603
  }) {
10256
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10604
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10257
10605
  "div",
10258
10606
  {
10259
10607
  style: {
@@ -10263,7 +10611,7 @@ function TokenSelectorPanel({
10263
10611
  overflow: "hidden"
10264
10612
  },
10265
10613
  children: [
10266
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10614
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10267
10615
  "div",
10268
10616
  {
10269
10617
  style: {
@@ -10271,7 +10619,7 @@ function TokenSelectorPanel({
10271
10619
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
10272
10620
  },
10273
10621
  children: [
10274
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10622
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10275
10623
  "div",
10276
10624
  {
10277
10625
  style: {
@@ -10281,7 +10629,7 @@ function TokenSelectorPanel({
10281
10629
  marginBottom: spacing[2]
10282
10630
  },
10283
10631
  children: [
10284
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10632
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10285
10633
  "span",
10286
10634
  {
10287
10635
  style: {
@@ -10294,7 +10642,7 @@ function TokenSelectorPanel({
10294
10642
  children: "Token"
10295
10643
  }
10296
10644
  ),
10297
- walletAddress && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10645
+ walletAddress && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10298
10646
  "span",
10299
10647
  {
10300
10648
  style: {
@@ -10310,7 +10658,7 @@ function TokenSelectorPanel({
10310
10658
  ]
10311
10659
  }
10312
10660
  ),
10313
- selectedChain ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10661
+ selectedChain ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10314
10662
  TokenSearchInput,
10315
10663
  {
10316
10664
  searchQuery,
@@ -10320,7 +10668,7 @@ function TokenSelectorPanel({
10320
10668
  ]
10321
10669
  }
10322
10670
  ),
10323
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10671
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10324
10672
  "div",
10325
10673
  {
10326
10674
  style: {
@@ -10328,7 +10676,7 @@ function TokenSelectorPanel({
10328
10676
  overflowY: "auto",
10329
10677
  padding: `${spacing[2]} ${spacing[1]}`
10330
10678
  },
10331
- children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10679
+ children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10332
10680
  TokenSelectorStateView,
10333
10681
  {
10334
10682
  isLoadingTokens,
@@ -10337,7 +10685,7 @@ function TokenSelectorPanel({
10337
10685
  state: !selectedChain ? "no-chain" : tokensError ? "error" : "empty",
10338
10686
  tokensError
10339
10687
  }
10340
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10688
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10341
10689
  "div",
10342
10690
  {
10343
10691
  style: {
@@ -10346,7 +10694,7 @@ function TokenSelectorPanel({
10346
10694
  gap: spacing[0.5]
10347
10695
  },
10348
10696
  children: [
10349
- filteredWalletTokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10697
+ filteredWalletTokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10350
10698
  "div",
10351
10699
  {
10352
10700
  style: {
@@ -10357,7 +10705,7 @@ function TokenSelectorPanel({
10357
10705
  paddingRight: "0.5rem",
10358
10706
  marginBottom: spacing[2]
10359
10707
  },
10360
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10708
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10361
10709
  "span",
10362
10710
  {
10363
10711
  style: {
@@ -10370,7 +10718,7 @@ function TokenSelectorPanel({
10370
10718
  )
10371
10719
  }
10372
10720
  ) : null,
10373
- filteredWalletTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10721
+ filteredWalletTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10374
10722
  WalletTokenListItem,
10375
10723
  {
10376
10724
  token,
@@ -10378,7 +10726,7 @@ function TokenSelectorPanel({
10378
10726
  },
10379
10727
  `${token.address}-${i}`
10380
10728
  )),
10381
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10729
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10382
10730
  "div",
10383
10731
  {
10384
10732
  style: {
@@ -10389,7 +10737,7 @@ function TokenSelectorPanel({
10389
10737
  paddingRight: "0.5rem",
10390
10738
  marginBottom: spacing[2]
10391
10739
  },
10392
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10740
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10393
10741
  "span",
10394
10742
  {
10395
10743
  style: {
@@ -10402,7 +10750,7 @@ function TokenSelectorPanel({
10402
10750
  )
10403
10751
  }
10404
10752
  ),
10405
- filteredTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10753
+ filteredTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10406
10754
  AvailableTokenListItem,
10407
10755
  {
10408
10756
  token,
@@ -10410,7 +10758,7 @@ function TokenSelectorPanel({
10410
10758
  },
10411
10759
  `${token.address}-${i}`
10412
10760
  )),
10413
- hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10761
+ hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10414
10762
  "button",
10415
10763
  {
10416
10764
  type: "button",
@@ -10443,7 +10791,7 @@ function TokenSelectorPanel({
10443
10791
  }
10444
10792
 
10445
10793
  // src/widget/features/token-selection/hooks/useOrderedWalletTokens.ts
10446
- var import_react26 = require("react");
10794
+ var import_react28 = require("react");
10447
10795
  function useOrderedWalletTokens({
10448
10796
  amount,
10449
10797
  amountInputMode,
@@ -10452,7 +10800,7 @@ function useOrderedWalletTokens({
10452
10800
  setSelectedToken,
10453
10801
  yourWalletTokens
10454
10802
  }) {
10455
- const handleTokenChange = (0, import_react26.useCallback)(
10803
+ const handleTokenChange = (0, import_react28.useCallback)(
10456
10804
  async (token) => {
10457
10805
  if (token) {
10458
10806
  setSelectedToken(token);
@@ -10461,7 +10809,7 @@ function useOrderedWalletTokens({
10461
10809
  },
10462
10810
  [setSelectedChain, setSelectedToken]
10463
10811
  );
10464
- const orderedTokens = (0, import_react26.useMemo)(() => {
10812
+ const orderedTokens = (0, import_react28.useMemo)(() => {
10465
10813
  const selectedTokenChainType = selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType;
10466
10814
  const index = yourWalletTokens.findIndex(
10467
10815
  (token) => normalizeAddress2(
@@ -10530,7 +10878,7 @@ function filterTokenAmountCompatibleTokens(tokens, parsedAmount) {
10530
10878
  }
10531
10879
 
10532
10880
  // src/widget/features/token-selection/hooks/useSelectTokenModel.ts
10533
- var import_react27 = require("react");
10881
+ var import_react29 = require("react");
10534
10882
  function useSelectTokenModel({
10535
10883
  goBack,
10536
10884
  searchQuery,
@@ -10554,7 +10902,7 @@ function useSelectTokenModel({
10554
10902
  explorerUrl: chain.blockExplorerUrls?.[0]
10555
10903
  });
10556
10904
  };
10557
- const handleTokenSelect = (0, import_react27.useCallback)(
10905
+ const handleTokenSelect = (0, import_react29.useCallback)(
10558
10906
  async (token) => {
10559
10907
  if (token.balance !== void 0) {
10560
10908
  setSelectedToken(token);
@@ -10578,7 +10926,7 @@ function useSelectTokenModel({
10578
10926
  },
10579
10927
  [goBack, selectedChain, setSelectedToken, walletAddress]
10580
10928
  );
10581
- const handleYourTokenSelect = (0, import_react27.useCallback)(
10929
+ const handleYourTokenSelect = (0, import_react29.useCallback)(
10582
10930
  (token) => {
10583
10931
  setSelectedToken(token);
10584
10932
  setSelectedChain(token.chainData);
@@ -10600,7 +10948,7 @@ function useSelectTokenModel({
10600
10948
  const address = token.address?.toLowerCase() ?? "";
10601
10949
  return symbol.includes(normalizedSearchQuery) || name.includes(normalizedSearchQuery) || address.includes(normalizedSearchQuery);
10602
10950
  };
10603
- const filteredWalletTokens = (0, import_react27.useMemo)(() => {
10951
+ const filteredWalletTokens = (0, import_react29.useMemo)(() => {
10604
10952
  if (!selectedChain?.chainId) {
10605
10953
  return [];
10606
10954
  }
@@ -10693,7 +11041,7 @@ var feeSummaryValueStyle = {
10693
11041
  };
10694
11042
 
10695
11043
  // src/widget/features/amount/components/AmountBalanceRow.tsx
10696
- var import_jsx_runtime25 = require("react/jsx-runtime");
11044
+ var import_jsx_runtime26 = require("react/jsx-runtime");
10697
11045
  function formatBalanceLabel({
10698
11046
  amountInputMode,
10699
11047
  hasUsdPrice,
@@ -10724,8 +11072,8 @@ function AmountBalanceRow({
10724
11072
  selectedTokenSymbol,
10725
11073
  tokenPriceUSD
10726
11074
  }) {
10727
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: balanceRowStyle, children: [
10728
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11075
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: balanceRowStyle, children: [
11076
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10729
11077
  "span",
10730
11078
  {
10731
11079
  style: {
@@ -10743,7 +11091,7 @@ function AmountBalanceRow({
10743
11091
  })
10744
11092
  }
10745
11093
  ),
10746
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11094
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10747
11095
  "button",
10748
11096
  {
10749
11097
  type: "button",
@@ -10757,7 +11105,7 @@ function AmountBalanceRow({
10757
11105
  }
10758
11106
 
10759
11107
  // src/widget/features/amount/components/AmountConversionRow.tsx
10760
- var import_jsx_runtime26 = require("react/jsx-runtime");
11108
+ var import_jsx_runtime27 = require("react/jsx-runtime");
10761
11109
  function formatTokenAmount(value) {
10762
11110
  const amount = Number(value ?? 0);
10763
11111
  if (amount <= 0) return "0";
@@ -10781,22 +11129,22 @@ function AmountConversionRow({
10781
11129
  selectedTokenSymbol,
10782
11130
  setAmountInputMode
10783
11131
  }) {
10784
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: tokenConversionRowStyle, children: [
10785
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11132
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: tokenConversionRowStyle, children: [
11133
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10786
11134
  "span",
10787
11135
  {
10788
11136
  style: {
10789
11137
  fontSize: fontSize.lg,
10790
11138
  color: colors.mutedForeground
10791
11139
  },
10792
- children: amountInputMode === "usd" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
11140
+ children: amountInputMode === "usd" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10793
11141
  formatTokenAmount(amountComputation.tokenAmount),
10794
11142
  " ",
10795
11143
  selectedTokenSymbol
10796
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
11144
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
10797
11145
  }
10798
11146
  ),
10799
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11147
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10800
11148
  "svg",
10801
11149
  {
10802
11150
  style: {
@@ -10813,7 +11161,7 @@ function AmountConversionRow({
10813
11161
  if (isFixedAmount) return;
10814
11162
  setAmountInputMode((mode) => mode === "usd" ? "token" : "usd");
10815
11163
  },
10816
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11164
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10817
11165
  "path",
10818
11166
  {
10819
11167
  strokeLinecap: "round",
@@ -10827,7 +11175,7 @@ function AmountConversionRow({
10827
11175
  }
10828
11176
 
10829
11177
  // src/widget/features/amount/components/AmountFeeSummary.tsx
10830
- var import_jsx_runtime27 = require("react/jsx-runtime");
11178
+ var import_jsx_runtime28 = require("react/jsx-runtime");
10831
11179
  function formatEstimatedReceive(estimatedReceive, parsedAmount) {
10832
11180
  if (estimatedReceive) {
10833
11181
  return `~$${parseFloat(estimatedReceive).toLocaleString(void 0, {
@@ -10848,8 +11196,8 @@ function AmountFeeSummary({
10848
11196
  parsedAmount,
10849
11197
  selectedTokenDecimals
10850
11198
  }) {
10851
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: loadingFeeSummaryStyle, children: [
10852
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
11199
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: loadingFeeSummaryStyle, children: [
11200
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
10853
11201
  "svg",
10854
11202
  {
10855
11203
  style: {
@@ -10861,7 +11209,7 @@ function AmountFeeSummary({
10861
11209
  fill: "none",
10862
11210
  className: "tw-animate-spin",
10863
11211
  children: [
10864
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11212
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10865
11213
  "circle",
10866
11214
  {
10867
11215
  style: { opacity: 0.25 },
@@ -10872,7 +11220,7 @@ function AmountFeeSummary({
10872
11220
  strokeWidth: "4"
10873
11221
  }
10874
11222
  ),
10875
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11223
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10876
11224
  "path",
10877
11225
  {
10878
11226
  style: { opacity: 0.75 },
@@ -10883,7 +11231,7 @@ function AmountFeeSummary({
10883
11231
  ]
10884
11232
  }
10885
11233
  ),
10886
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11234
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10887
11235
  "span",
10888
11236
  {
10889
11237
  style: {
@@ -10894,7 +11242,7 @@ function AmountFeeSummary({
10894
11242
  children: "Calculating fees..."
10895
11243
  }
10896
11244
  )
10897
- ] }) : !amount.trim() ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11245
+ ] }) : !amount.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10898
11246
  "p",
10899
11247
  {
10900
11248
  style: {
@@ -10903,10 +11251,10 @@ function AmountFeeSummary({
10903
11251
  },
10904
11252
  children: "Enter an amount to continue."
10905
11253
  }
10906
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10907
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: feeSummaryRowStyle, children: [
10908
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
10909
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { style: feeSummaryValueStyle, children: [
11254
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
11255
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: feeSummaryRowStyle, children: [
11256
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
11257
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { style: feeSummaryValueStyle, children: [
10910
11258
  weiToDecimalString(
10911
11259
  gasReservationWei,
10912
11260
  selectedTokenDecimals ?? 0,
@@ -10915,9 +11263,9 @@ function AmountFeeSummary({
10915
11263
  " "
10916
11264
  ] })
10917
11265
  ] }),
10918
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: feeSummaryDividerStyle }),
10919
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: feeSummaryRowStyle, children: [
10920
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11266
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: feeSummaryDividerStyle }),
11267
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: feeSummaryRowStyle, children: [
11268
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10921
11269
  "span",
10922
11270
  {
10923
11271
  style: {
@@ -10927,7 +11275,7 @@ function AmountFeeSummary({
10927
11275
  children: "You'll receive"
10928
11276
  }
10929
11277
  ),
10930
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11278
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10931
11279
  "span",
10932
11280
  {
10933
11281
  style: {
@@ -10942,7 +11290,7 @@ function AmountFeeSummary({
10942
11290
  }
10943
11291
 
10944
11292
  // src/widget/features/amount/components/CryptoPayAmountSection.tsx
10945
- var import_jsx_runtime28 = require("react/jsx-runtime");
11293
+ var import_jsx_runtime29 = require("react/jsx-runtime");
10946
11294
  function CryptoPayAmountSection({
10947
11295
  amount,
10948
11296
  amountComputation,
@@ -10969,8 +11317,8 @@ function CryptoPayAmountSection({
10969
11317
  walletAddress,
10970
11318
  yourWalletTokensLength
10971
11319
  }) {
10972
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: amountSectionContainerStyle, children: [
10973
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11320
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: amountSectionContainerStyle, children: [
11321
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10974
11322
  "p",
10975
11323
  {
10976
11324
  style: {
@@ -10982,7 +11330,7 @@ function CryptoPayAmountSection({
10982
11330
  children: "Enter an amount"
10983
11331
  }
10984
11332
  ),
10985
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11333
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10986
11334
  AmountInputDisplay,
10987
11335
  {
10988
11336
  amount,
@@ -10994,7 +11342,7 @@ function CryptoPayAmountSection({
10994
11342
  style: { marginBottom: spacing[4] }
10995
11343
  }
10996
11344
  ),
10997
- selectedToken ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11345
+ selectedToken ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10998
11346
  AmountConversionRow,
10999
11347
  {
11000
11348
  amountComputation,
@@ -11005,7 +11353,7 @@ function CryptoPayAmountSection({
11005
11353
  setAmountInputMode
11006
11354
  }
11007
11355
  ) : null,
11008
- selectedToken?.balance ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11356
+ selectedToken?.balance ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11009
11357
  AmountBalanceRow,
11010
11358
  {
11011
11359
  amountInputMode,
@@ -11018,7 +11366,7 @@ function CryptoPayAmountSection({
11018
11366
  tokenPriceUSD
11019
11367
  }
11020
11368
  ) : null,
11021
- selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11369
+ selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11022
11370
  TokenSwipePill,
11023
11371
  {
11024
11372
  tokens: orderedTokens,
@@ -11029,8 +11377,8 @@ function CryptoPayAmountSection({
11029
11377
  walletAddress
11030
11378
  }
11031
11379
  ) }) : null,
11032
- !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: amountSliderContainerStyle, children: [
11033
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
11380
+ !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: amountSliderContainerStyle, children: [
11381
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11034
11382
  "p",
11035
11383
  {
11036
11384
  style: {
@@ -11046,7 +11394,7 @@ function CryptoPayAmountSection({
11046
11394
  ]
11047
11395
  }
11048
11396
  ),
11049
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11397
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11050
11398
  AmountSlider,
11051
11399
  {
11052
11400
  value: Math.min(parsedAmount, effectiveSliderMax),
@@ -11057,7 +11405,7 @@ function CryptoPayAmountSection({
11057
11405
  }
11058
11406
  )
11059
11407
  ] }) : null,
11060
- showFeeSummary ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11408
+ showFeeSummary ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11061
11409
  AmountFeeSummary,
11062
11410
  {
11063
11411
  amount,
@@ -11072,7 +11420,7 @@ function CryptoPayAmountSection({
11072
11420
  }
11073
11421
 
11074
11422
  // src/widget/features/amount/hooks/useDepositAmountModel.ts
11075
- var import_react28 = require("react");
11423
+ var import_react30 = require("react");
11076
11424
  var BALANCE_TOLERANCE = 1e-9;
11077
11425
  function useDepositAmountModel({
11078
11426
  amount,
@@ -11087,14 +11435,14 @@ function useDepositAmountModel({
11087
11435
  }) {
11088
11436
  const tokenPriceUSD = typeof selectedToken?.usdPrice === "number" && Number.isFinite(selectedToken.usdPrice) && selectedToken.usdPrice > 0 ? selectedToken.usdPrice : 0;
11089
11437
  const hasUsdPrice = typeof tokenPriceUSD === "number" && Number.isFinite(tokenPriceUSD) && tokenPriceUSD > 0;
11090
- const normalizedTokenBalance = (0, import_react28.useMemo)(() => {
11438
+ const normalizedTokenBalance = (0, import_react30.useMemo)(() => {
11091
11439
  if (!selectedToken?.balance) return 0;
11092
11440
  const normalized = Number(
11093
11441
  rawToDecimal(selectedToken.balance, selectedToken.decimals ?? 18)
11094
11442
  );
11095
11443
  return Number.isFinite(normalized) ? normalized : 0;
11096
11444
  }, [selectedToken?.balance, selectedToken?.decimals]);
11097
- (0, import_react28.useEffect)(() => {
11445
+ (0, import_react30.useEffect)(() => {
11098
11446
  if (fixedFromAmountString) return;
11099
11447
  if (isReady && !hasUsdPrice && amountInputMode === "usd") {
11100
11448
  setAmountInputMode("token");
@@ -11106,7 +11454,7 @@ function useDepositAmountModel({
11106
11454
  isReady,
11107
11455
  setAmountInputMode
11108
11456
  ]);
11109
- (0, import_react28.useEffect)(() => {
11457
+ (0, import_react30.useEffect)(() => {
11110
11458
  if (!fixedFromAmountString) return;
11111
11459
  if (amount !== fixedFromAmountString) {
11112
11460
  setAmount(fixedFromAmountString);
@@ -11121,7 +11469,7 @@ function useDepositAmountModel({
11121
11469
  setAmount,
11122
11470
  setAmountInputMode
11123
11471
  ]);
11124
- const amountComputation = (0, import_react28.useMemo)(() => {
11472
+ const amountComputation = (0, import_react30.useMemo)(() => {
11125
11473
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
11126
11474
  if (!rawAmount) {
11127
11475
  return {
@@ -11188,11 +11536,11 @@ function useDepositAmountModel({
11188
11536
  selectedToken?.decimals,
11189
11537
  tokenPriceUSD
11190
11538
  ]);
11191
- const requestedTokenAmount = (0, import_react28.useMemo)(() => {
11539
+ const requestedTokenAmount = (0, import_react30.useMemo)(() => {
11192
11540
  const tokenAmount = Number(amountComputation.tokenAmount);
11193
11541
  return Number.isFinite(tokenAmount) ? tokenAmount : 0;
11194
11542
  }, [amountComputation.tokenAmount]);
11195
- const amountValidationError = (0, import_react28.useMemo)(() => {
11543
+ const amountValidationError = (0, import_react30.useMemo)(() => {
11196
11544
  if (amountComputation.parseError) {
11197
11545
  return amountComputation.parseError;
11198
11546
  }
@@ -11225,15 +11573,15 @@ function useDepositAmountModel({
11225
11573
  ]);
11226
11574
  const amountWei = amountValidationError ? 0n : amountComputation.fromAmountWei ?? 0n;
11227
11575
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11228
- const maxTokenAmount = (0, import_react28.useMemo)(
11576
+ const maxTokenAmount = (0, import_react30.useMemo)(
11229
11577
  () => Math.min(normalizedTokenBalance, 1e4),
11230
11578
  [normalizedTokenBalance]
11231
11579
  );
11232
- const maxUsdAmount = (0, import_react28.useMemo)(() => {
11580
+ const maxUsdAmount = (0, import_react30.useMemo)(() => {
11233
11581
  if (!hasUsdPrice) return void 0;
11234
11582
  return Math.min(maxTokenAmount * tokenPriceUSD, 1e4);
11235
11583
  }, [hasUsdPrice, maxTokenAmount, tokenPriceUSD]);
11236
- const minAmountForMode = (0, import_react28.useMemo)(() => {
11584
+ const minAmountForMode = (0, import_react30.useMemo)(() => {
11237
11585
  if (minAmountUsd == null) return 0;
11238
11586
  if (amountInputMode === "usd") {
11239
11587
  return minAmountUsd;
@@ -11242,11 +11590,11 @@ function useDepositAmountModel({
11242
11590
  return minAmountUsd / tokenPriceUSD;
11243
11591
  }, [amountInputMode, hasUsdPrice, minAmountUsd, tokenPriceUSD]);
11244
11592
  const sliderMax = amountInputMode === "usd" ? maxUsdAmount : maxTokenAmount;
11245
- const effectiveSliderMax = (0, import_react28.useMemo)(() => {
11593
+ const effectiveSliderMax = (0, import_react30.useMemo)(() => {
11246
11594
  if (sliderMax == null || !Number.isFinite(sliderMax)) return void 0;
11247
11595
  return Math.max(sliderMax, 0);
11248
11596
  }, [sliderMax]);
11249
- const effectiveSliderMin = (0, import_react28.useMemo)(() => {
11597
+ const effectiveSliderMin = (0, import_react30.useMemo)(() => {
11250
11598
  if (effectiveSliderMax == null || !Number.isFinite(effectiveSliderMax) || effectiveSliderMax <= 0) {
11251
11599
  return 0;
11252
11600
  }
@@ -11273,7 +11621,7 @@ function useDepositAmountModel({
11273
11621
  }
11274
11622
 
11275
11623
  // src/widget/features/amount/hooks/useHomeAmountModel.ts
11276
- var import_react29 = require("react");
11624
+ var import_react31 = require("react");
11277
11625
  function useHomeAmountModel({
11278
11626
  amount,
11279
11627
  setAmount,
@@ -11284,7 +11632,7 @@ function useHomeAmountModel({
11284
11632
  minAmountUsd,
11285
11633
  maxAmountUsd
11286
11634
  }) {
11287
- (0, import_react29.useEffect)(() => {
11635
+ (0, import_react31.useEffect)(() => {
11288
11636
  if (!fixedFromAmountString) return;
11289
11637
  if (amount !== fixedFromAmountString) {
11290
11638
  setAmount(fixedFromAmountString);
@@ -11300,7 +11648,7 @@ function useHomeAmountModel({
11300
11648
  setAmountInputMode
11301
11649
  ]);
11302
11650
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11303
- const amountValidationMessage = (0, import_react29.useMemo)(() => {
11651
+ const amountValidationMessage = (0, import_react31.useMemo)(() => {
11304
11652
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
11305
11653
  if (!rawAmount) return null;
11306
11654
  if (!/^\d*\.?\d*$/.test(rawAmount)) {
@@ -11391,7 +11739,7 @@ var mutedOrDividerStyle = (isDarkTheme) => ({
11391
11739
  });
11392
11740
 
11393
11741
  // src/widget/features/wallet/components/PaymentOptionRow.tsx
11394
- var import_jsx_runtime29 = require("react/jsx-runtime");
11742
+ var import_jsx_runtime30 = require("react/jsx-runtime");
11395
11743
  function PaymentOptionRow({
11396
11744
  disabled = false,
11397
11745
  icon,
@@ -11399,7 +11747,7 @@ function PaymentOptionRow({
11399
11747
  onClick,
11400
11748
  trailing
11401
11749
  }) {
11402
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11750
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11403
11751
  "button",
11404
11752
  {
11405
11753
  type: "button",
@@ -11422,7 +11770,7 @@ function PaymentOptionRow({
11422
11770
  opacity: disabled ? 0.5 : 1
11423
11771
  },
11424
11772
  children: [
11425
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11773
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11426
11774
  "div",
11427
11775
  {
11428
11776
  style: {
@@ -11432,7 +11780,7 @@ function PaymentOptionRow({
11432
11780
  },
11433
11781
  children: [
11434
11782
  icon,
11435
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11783
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11436
11784
  "span",
11437
11785
  {
11438
11786
  style: {
@@ -11446,24 +11794,24 @@ function PaymentOptionRow({
11446
11794
  ]
11447
11795
  }
11448
11796
  ),
11449
- trailing ?? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: selectionRingStyle })
11797
+ trailing ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: selectionRingStyle })
11450
11798
  ]
11451
11799
  }
11452
11800
  );
11453
11801
  }
11454
11802
 
11455
11803
  // src/widget/features/wallet/components/DetectedWalletRow.tsx
11456
- var import_jsx_runtime30 = require("react/jsx-runtime");
11804
+ var import_jsx_runtime31 = require("react/jsx-runtime");
11457
11805
  function DetectedWalletRow({
11458
11806
  onSelect,
11459
11807
  wallet
11460
11808
  }) {
11461
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11809
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11462
11810
  PaymentOptionRow,
11463
11811
  {
11464
11812
  onClick: () => void onSelect(wallet),
11465
11813
  label: wallet.meta.name,
11466
- icon: wallet.meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11814
+ icon: wallet.meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11467
11815
  "img",
11468
11816
  {
11469
11817
  src: wallet.meta.logo,
@@ -11475,7 +11823,7 @@ function DetectedWalletRow({
11475
11823
  objectFit: "cover"
11476
11824
  }
11477
11825
  }
11478
- ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11826
+ ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11479
11827
  "div",
11480
11828
  {
11481
11829
  style: {
@@ -11487,7 +11835,7 @@ function DetectedWalletRow({
11487
11835
  alignItems: "center",
11488
11836
  justifyContent: "center"
11489
11837
  },
11490
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11838
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11491
11839
  "span",
11492
11840
  {
11493
11841
  style: {
@@ -11505,16 +11853,16 @@ function DetectedWalletRow({
11505
11853
  }
11506
11854
 
11507
11855
  // src/widget/features/wallet/components/WalletConnectRow.tsx
11508
- var import_jsx_runtime31 = require("react/jsx-runtime");
11856
+ var import_jsx_runtime32 = require("react/jsx-runtime");
11509
11857
  function WalletConnectRow({
11510
11858
  onClick
11511
11859
  }) {
11512
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11860
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11513
11861
  PaymentOptionRow,
11514
11862
  {
11515
11863
  onClick: () => void onClick(),
11516
11864
  label: "WalletConnect",
11517
- icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11865
+ icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11518
11866
  "svg",
11519
11867
  {
11520
11868
  style: {
@@ -11524,10 +11872,10 @@ function WalletConnectRow({
11524
11872
  },
11525
11873
  viewBox: "0 0 24 24",
11526
11874
  fill: "currentColor",
11527
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("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" })
11875
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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" })
11528
11876
  }
11529
11877
  ) }),
11530
- trailing: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11878
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11531
11879
  "svg",
11532
11880
  {
11533
11881
  style: {
@@ -11539,7 +11887,7 @@ function WalletConnectRow({
11539
11887
  fill: "none",
11540
11888
  stroke: "currentColor",
11541
11889
  strokeWidth: 2,
11542
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11890
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11543
11891
  }
11544
11892
  )
11545
11893
  }
@@ -11547,9 +11895,9 @@ function WalletConnectRow({
11547
11895
  }
11548
11896
 
11549
11897
  // src/widget/features/wallet/components/WalletDropdownEmptyState.tsx
11550
- var import_jsx_runtime32 = require("react/jsx-runtime");
11898
+ var import_jsx_runtime33 = require("react/jsx-runtime");
11551
11899
  function WalletDropdownEmptyState() {
11552
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11900
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11553
11901
  "p",
11554
11902
  {
11555
11903
  style: {
@@ -11564,13 +11912,13 @@ function WalletDropdownEmptyState() {
11564
11912
  }
11565
11913
 
11566
11914
  // src/widget/features/wallet/components/CryptoWalletDropdownContent.tsx
11567
- var import_jsx_runtime33 = require("react/jsx-runtime");
11915
+ var import_jsx_runtime34 = require("react/jsx-runtime");
11568
11916
  function CryptoWalletDropdownContent({
11569
11917
  browserWallets,
11570
11918
  handleWalletConnect,
11571
11919
  handleWalletSelect
11572
11920
  }) {
11573
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
11921
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
11574
11922
  "div",
11575
11923
  {
11576
11924
  style: {
@@ -11587,10 +11935,10 @@ function CryptoWalletDropdownContent({
11587
11935
  scrollbarColor: `${colors.muted} transparent`
11588
11936
  },
11589
11937
  children: [
11590
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { padding: spacing[3] }, children: [
11591
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11592
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11593
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11938
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { padding: spacing[3] }, children: [
11939
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11940
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11941
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11594
11942
  "span",
11595
11943
  {
11596
11944
  style: {
@@ -11602,7 +11950,7 @@ function CryptoWalletDropdownContent({
11602
11950
  }
11603
11951
  )
11604
11952
  ] }),
11605
- browserWallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11953
+ browserWallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11606
11954
  "div",
11607
11955
  {
11608
11956
  style: {
@@ -11610,7 +11958,7 @@ function CryptoWalletDropdownContent({
11610
11958
  flexDirection: "column",
11611
11959
  gap: spacing[1]
11612
11960
  },
11613
- children: browserWallets.map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11961
+ children: browserWallets.map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11614
11962
  DetectedWalletRow,
11615
11963
  {
11616
11964
  wallet,
@@ -11619,19 +11967,19 @@ function CryptoWalletDropdownContent({
11619
11967
  wallet.meta.id
11620
11968
  ))
11621
11969
  }
11622
- ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(WalletDropdownEmptyState, {})
11970
+ ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(WalletDropdownEmptyState, {})
11623
11971
  ] }),
11624
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: dividerBorderStyle }),
11625
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(WalletConnectRow, { onClick: handleWalletConnect }) })
11972
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: dividerBorderStyle }),
11973
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(WalletConnectRow, { onClick: handleWalletConnect }) })
11626
11974
  ]
11627
11975
  }
11628
11976
  );
11629
11977
  }
11630
11978
 
11631
11979
  // src/widget/features/wallet/components/FiatComingSoonBanner.tsx
11632
- var import_jsx_runtime34 = require("react/jsx-runtime");
11980
+ var import_jsx_runtime35 = require("react/jsx-runtime");
11633
11981
  function FiatComingSoonBanner() {
11634
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11982
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11635
11983
  "div",
11636
11984
  {
11637
11985
  style: {
@@ -11639,7 +11987,7 @@ function FiatComingSoonBanner() {
11639
11987
  backgroundColor: "rgba(245, 158, 11, 0.1)",
11640
11988
  borderBottom: "1px solid rgba(245, 158, 11, 0.2)"
11641
11989
  },
11642
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11990
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11643
11991
  "p",
11644
11992
  {
11645
11993
  style: {
@@ -11656,29 +12004,29 @@ function FiatComingSoonBanner() {
11656
12004
  }
11657
12005
 
11658
12006
  // src/widget/features/wallet/components/FiatMethodRow.tsx
11659
- var import_jsx_runtime35 = require("react/jsx-runtime");
12007
+ var import_jsx_runtime36 = require("react/jsx-runtime");
11660
12008
  function FiatMethodRow({
11661
12009
  method,
11662
12010
  onSelect
11663
12011
  }) {
11664
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
12012
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11665
12013
  PaymentOptionRow,
11666
12014
  {
11667
12015
  onClick: onSelect,
11668
12016
  disabled: true,
11669
12017
  label: method.name,
11670
- icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { color: colors.mutedForeground }, children: method.icon })
12018
+ icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: colors.mutedForeground }, children: method.icon })
11671
12019
  }
11672
12020
  );
11673
12021
  }
11674
12022
 
11675
12023
  // src/widget/features/wallet/components/FiatPaymentDropdownContent.tsx
11676
- var import_jsx_runtime36 = require("react/jsx-runtime");
12024
+ var import_jsx_runtime37 = require("react/jsx-runtime");
11677
12025
  function FiatPaymentDropdownContent({
11678
12026
  fiatOptions: fiatOptions2,
11679
12027
  handleFiatSelect
11680
12028
  }) {
11681
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
12029
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11682
12030
  "div",
11683
12031
  {
11684
12032
  style: {
@@ -11692,11 +12040,11 @@ function FiatPaymentDropdownContent({
11692
12040
  animation: "tw-fade-in 0.2s ease-out"
11693
12041
  },
11694
12042
  children: [
11695
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FiatComingSoonBanner, {}),
11696
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { padding: spacing[3] }, children: [
11697
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11698
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: dropdownStatusDotStyle(colors.primary) }),
11699
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12043
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FiatComingSoonBanner, {}),
12044
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { padding: spacing[3] }, children: [
12045
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
12046
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { style: dropdownStatusDotStyle(colors.primary) }),
12047
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11700
12048
  "span",
11701
12049
  {
11702
12050
  style: {
@@ -11708,7 +12056,7 @@ function FiatPaymentDropdownContent({
11708
12056
  }
11709
12057
  )
11710
12058
  ] }),
11711
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12059
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11712
12060
  "div",
11713
12061
  {
11714
12062
  style: {
@@ -11716,7 +12064,7 @@ function FiatPaymentDropdownContent({
11716
12064
  flexDirection: "column",
11717
12065
  gap: spacing[1]
11718
12066
  },
11719
- children: fiatOptions2.map((method) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
12067
+ children: fiatOptions2.map((method) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11720
12068
  FiatMethodRow,
11721
12069
  {
11722
12070
  method,
@@ -11733,9 +12081,9 @@ function FiatPaymentDropdownContent({
11733
12081
  }
11734
12082
 
11735
12083
  // src/widget/features/wallet/components/paymentOptionIcons.tsx
11736
- var import_jsx_runtime37 = require("react/jsx-runtime");
12084
+ var import_jsx_runtime38 = require("react/jsx-runtime");
11737
12085
  function CryptoPaymentIcon() {
11738
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12086
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11739
12087
  "svg",
11740
12088
  {
11741
12089
  style: {
@@ -11747,7 +12095,7 @@ function CryptoPaymentIcon() {
11747
12095
  fill: "none",
11748
12096
  stroke: "currentColor",
11749
12097
  strokeWidth: 2,
11750
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12098
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11751
12099
  "path",
11752
12100
  {
11753
12101
  strokeLinecap: "round",
@@ -11759,7 +12107,7 @@ function CryptoPaymentIcon() {
11759
12107
  );
11760
12108
  }
11761
12109
  function FiatPaymentIcon() {
11762
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12110
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11763
12111
  "svg",
11764
12112
  {
11765
12113
  style: {
@@ -11772,94 +12120,94 @@ function FiatPaymentIcon() {
11772
12120
  stroke: "currentColor",
11773
12121
  strokeWidth: 2,
11774
12122
  children: [
11775
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
11776
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
12123
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
12124
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
11777
12125
  ]
11778
12126
  }
11779
12127
  );
11780
12128
  }
11781
12129
  function ApplePayIcon() {
11782
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12130
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11783
12131
  "svg",
11784
12132
  {
11785
12133
  style: { width: "2rem", height: "1.25rem" },
11786
12134
  viewBox: "0 0 50 20",
11787
12135
  fill: "currentColor",
11788
12136
  children: [
11789
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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" }),
11790
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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" })
12137
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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" }),
12138
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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" })
11791
12139
  ]
11792
12140
  }
11793
12141
  );
11794
12142
  }
11795
12143
  function MPesaIcon() {
11796
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12144
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11797
12145
  "svg",
11798
12146
  {
11799
12147
  style: { width: "2rem", height: "1.25rem" },
11800
12148
  viewBox: "0 0 24 24",
11801
12149
  fill: "currentColor",
11802
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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" })
12150
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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" })
11803
12151
  }
11804
12152
  );
11805
12153
  }
11806
12154
  function VenmoIcon() {
11807
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12155
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11808
12156
  "svg",
11809
12157
  {
11810
12158
  style: { width: "2rem", height: "1.25rem" },
11811
12159
  viewBox: "0 0 24 24",
11812
12160
  fill: "currentColor",
11813
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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" })
12161
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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" })
11814
12162
  }
11815
12163
  );
11816
12164
  }
11817
12165
  function ZelleIcon() {
11818
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
12166
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11819
12167
  "svg",
11820
12168
  {
11821
12169
  style: { width: "2rem", height: "1.25rem" },
11822
12170
  viewBox: "0 0 24 24",
11823
12171
  fill: "currentColor",
11824
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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" })
12172
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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" })
11825
12173
  }
11826
12174
  );
11827
12175
  }
11828
12176
 
11829
12177
  // src/widget/features/wallet/components/fiatOptions.tsx
11830
- var import_jsx_runtime38 = require("react/jsx-runtime");
12178
+ var import_jsx_runtime39 = require("react/jsx-runtime");
11831
12179
  var fiatOptions = [
11832
12180
  {
11833
12181
  id: "applepay",
11834
12182
  name: "Apple Pay",
11835
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ApplePayIcon, {})
12183
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ApplePayIcon, {})
11836
12184
  },
11837
12185
  {
11838
12186
  id: "mpesa",
11839
12187
  name: "M-Pesa",
11840
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MPesaIcon, {})
12188
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MPesaIcon, {})
11841
12189
  },
11842
12190
  {
11843
12191
  id: "venmo",
11844
12192
  name: "Venmo",
11845
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(VenmoIcon, {})
12193
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VenmoIcon, {})
11846
12194
  },
11847
12195
  {
11848
12196
  id: "zelle",
11849
12197
  name: "Zelle",
11850
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ZelleIcon, {})
12198
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ZelleIcon, {})
11851
12199
  }
11852
12200
  ];
11853
12201
 
11854
12202
  // src/widget/features/wallet/components/PaymentDropdownButton.tsx
11855
- var import_jsx_runtime39 = require("react/jsx-runtime");
12203
+ var import_jsx_runtime40 = require("react/jsx-runtime");
11856
12204
  function PaymentDropdownButton({
11857
12205
  icon,
11858
12206
  isOpen,
11859
12207
  label,
11860
12208
  onClick
11861
12209
  }) {
11862
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
12210
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11863
12211
  "button",
11864
12212
  {
11865
12213
  type: "button",
@@ -11885,7 +12233,7 @@ function PaymentDropdownButton({
11885
12233
  },
11886
12234
  children: [
11887
12235
  icon,
11888
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12236
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11889
12237
  "span",
11890
12238
  {
11891
12239
  style: {
@@ -11898,7 +12246,7 @@ function PaymentDropdownButton({
11898
12246
  children: label
11899
12247
  }
11900
12248
  ),
11901
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12249
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11902
12250
  "svg",
11903
12251
  {
11904
12252
  style: {
@@ -11912,7 +12260,7 @@ function PaymentDropdownButton({
11912
12260
  fill: "none",
11913
12261
  stroke: "currentColor",
11914
12262
  strokeWidth: 2,
11915
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
12263
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
11916
12264
  }
11917
12265
  )
11918
12266
  ]
@@ -11921,7 +12269,7 @@ function PaymentDropdownButton({
11921
12269
  }
11922
12270
 
11923
12271
  // src/widget/features/wallet/components/HomePaymentOptions.tsx
11924
- var import_jsx_runtime40 = require("react/jsx-runtime");
12272
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11925
12273
  function HomePaymentOptions({
11926
12274
  browserWallets,
11927
12275
  cryptoDropdownRef,
@@ -11935,7 +12283,7 @@ function HomePaymentOptions({
11935
12283
  setIsCryptoDropdownOpen,
11936
12284
  setIsFiatDropdownOpen
11937
12285
  }) {
11938
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12286
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11939
12287
  "div",
11940
12288
  {
11941
12289
  style: {
@@ -11948,16 +12296,16 @@ function HomePaymentOptions({
11948
12296
  minHeight: "6rem"
11949
12297
  },
11950
12298
  children: [
11951
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12299
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11952
12300
  "div",
11953
12301
  {
11954
12302
  style: isCryptoDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11955
12303
  ref: cryptoDropdownRef,
11956
12304
  children: [
11957
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12305
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11958
12306
  PaymentDropdownButton,
11959
12307
  {
11960
- icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CryptoPaymentIcon, {}),
12308
+ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CryptoPaymentIcon, {}),
11961
12309
  isOpen: isCryptoDropdownOpen,
11962
12310
  label: "Pay with crypto",
11963
12311
  onClick: () => {
@@ -11966,7 +12314,7 @@ function HomePaymentOptions({
11966
12314
  }
11967
12315
  }
11968
12316
  ),
11969
- isCryptoDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12317
+ isCryptoDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11970
12318
  CryptoWalletDropdownContent,
11971
12319
  {
11972
12320
  browserWallets,
@@ -11977,9 +12325,9 @@ function HomePaymentOptions({
11977
12325
  ]
11978
12326
  }
11979
12327
  ),
11980
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: dividerRowStyle, children: [
11981
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) }),
11982
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12328
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { style: dividerRowStyle, children: [
12329
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) }),
12330
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11983
12331
  "span",
11984
12332
  {
11985
12333
  style: {
@@ -11990,18 +12338,18 @@ function HomePaymentOptions({
11990
12338
  children: "Or"
11991
12339
  }
11992
12340
  ),
11993
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) })
12341
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) })
11994
12342
  ] }),
11995
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12343
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11996
12344
  "div",
11997
12345
  {
11998
12346
  style: isFiatDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11999
12347
  ref: fiatDropdownRef,
12000
12348
  children: [
12001
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12349
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12002
12350
  PaymentDropdownButton,
12003
12351
  {
12004
- icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FiatPaymentIcon, {}),
12352
+ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(FiatPaymentIcon, {}),
12005
12353
  isOpen: isFiatDropdownOpen,
12006
12354
  label: "Pay with fiat",
12007
12355
  onClick: () => {
@@ -12010,7 +12358,7 @@ function HomePaymentOptions({
12010
12358
  }
12011
12359
  }
12012
12360
  ),
12013
- isFiatDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12361
+ isFiatDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12014
12362
  FiatPaymentDropdownContent,
12015
12363
  {
12016
12364
  fiatOptions,
@@ -12026,7 +12374,7 @@ function HomePaymentOptions({
12026
12374
  }
12027
12375
 
12028
12376
  // src/widget/features/wallet/hooks/useHomeWalletActions.ts
12029
- var import_react30 = require("react");
12377
+ var import_react32 = require("react");
12030
12378
 
12031
12379
  // src/config/walletconnect.ts
12032
12380
  var import_appkit_universal_connector = require("@reown/appkit-universal-connector");
@@ -12149,12 +12497,12 @@ function useHomeWalletActions({
12149
12497
  detectedWallets,
12150
12498
  setCurrentStep
12151
12499
  }) {
12152
- const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = (0, import_react30.useState)(false);
12153
- const [isFiatDropdownOpen, setIsFiatDropdownOpen] = (0, import_react30.useState)(false);
12154
- const [universalConnector, setUniversalConnector] = (0, import_react30.useState)();
12155
- const cryptoDropdownRef = (0, import_react30.useRef)(null);
12156
- const fiatDropdownRef = (0, import_react30.useRef)(null);
12157
- (0, import_react30.useEffect)(() => {
12500
+ const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = (0, import_react32.useState)(false);
12501
+ const [isFiatDropdownOpen, setIsFiatDropdownOpen] = (0, import_react32.useState)(false);
12502
+ const [universalConnector, setUniversalConnector] = (0, import_react32.useState)();
12503
+ const cryptoDropdownRef = (0, import_react32.useRef)(null);
12504
+ const fiatDropdownRef = (0, import_react32.useRef)(null);
12505
+ (0, import_react32.useEffect)(() => {
12158
12506
  const handleClickOutside = (event) => {
12159
12507
  if (cryptoDropdownRef.current && !cryptoDropdownRef.current.contains(event.target)) {
12160
12508
  setIsCryptoDropdownOpen(false);
@@ -12166,7 +12514,7 @@ function useHomeWalletActions({
12166
12514
  document.addEventListener("mousedown", handleClickOutside);
12167
12515
  return () => document.removeEventListener("mousedown", handleClickOutside);
12168
12516
  }, []);
12169
- (0, import_react30.useEffect)(() => {
12517
+ (0, import_react32.useEffect)(() => {
12170
12518
  getUniversalConnector().then(setUniversalConnector);
12171
12519
  }, []);
12172
12520
  const handleWalletSelect = async (wallet) => {
@@ -12207,7 +12555,7 @@ function useHomeWalletActions({
12207
12555
  }
12208
12556
 
12209
12557
  // src/widget/pages/Home.tsx
12210
- var import_jsx_runtime41 = require("react/jsx-runtime");
12558
+ var import_jsx_runtime42 = require("react/jsx-runtime");
12211
12559
  function Home({ style: _style }) {
12212
12560
  const { amount, setAmount, amountInputMode, setAmountInputMode } = useDepositForm();
12213
12561
  const { setCurrentStep } = useDepositNavigation();
@@ -12241,7 +12589,7 @@ function Home({ style: _style }) {
12241
12589
  detectedWallets,
12242
12590
  setCurrentStep
12243
12591
  });
12244
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12592
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12245
12593
  "div",
12246
12594
  {
12247
12595
  style: {
@@ -12250,7 +12598,7 @@ function Home({ style: _style }) {
12250
12598
  minHeight: "500px"
12251
12599
  },
12252
12600
  children: [
12253
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12601
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12254
12602
  "div",
12255
12603
  {
12256
12604
  style: {
@@ -12260,7 +12608,7 @@ function Home({ style: _style }) {
12260
12608
  padding: `${spacing[4]} ${spacing[4]}`,
12261
12609
  borderBottom: `1px solid ${colors.border}`
12262
12610
  },
12263
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12611
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12264
12612
  "h1",
12265
12613
  {
12266
12614
  style: {
@@ -12273,7 +12621,7 @@ function Home({ style: _style }) {
12273
12621
  )
12274
12622
  }
12275
12623
  ),
12276
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12624
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12277
12625
  "div",
12278
12626
  {
12279
12627
  style: {
@@ -12287,7 +12635,7 @@ function Home({ style: _style }) {
12287
12635
  position: "relative"
12288
12636
  },
12289
12637
  children: [
12290
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12638
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12291
12639
  "p",
12292
12640
  {
12293
12641
  style: {
@@ -12298,7 +12646,7 @@ function Home({ style: _style }) {
12298
12646
  children: "Enter an amount"
12299
12647
  }
12300
12648
  ),
12301
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12649
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12302
12650
  AmountInputDisplay,
12303
12651
  {
12304
12652
  amount,
@@ -12309,7 +12657,7 @@ function Home({ style: _style }) {
12309
12657
  style: { marginBottom: spacing[8] }
12310
12658
  }
12311
12659
  ),
12312
- amountValidationMessage ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12660
+ amountValidationMessage ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12313
12661
  "p",
12314
12662
  {
12315
12663
  style: {
@@ -12322,7 +12670,7 @@ function Home({ style: _style }) {
12322
12670
  },
12323
12671
  children: amountValidationMessage
12324
12672
  }
12325
- ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12673
+ ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12326
12674
  "p",
12327
12675
  {
12328
12676
  style: {
@@ -12338,7 +12686,7 @@ function Home({ style: _style }) {
12338
12686
  ].filter(Boolean).join(" \u2022 ")
12339
12687
  }
12340
12688
  ) : null,
12341
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12689
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12342
12690
  HomePaymentOptions,
12343
12691
  {
12344
12692
  browserWallets,
@@ -12357,14 +12705,14 @@ function Home({ style: _style }) {
12357
12705
  ]
12358
12706
  }
12359
12707
  ),
12360
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(WidgetSecurityFooter, {})
12708
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(WidgetSecurityFooter, {})
12361
12709
  ]
12362
12710
  }
12363
12711
  );
12364
12712
  }
12365
12713
 
12366
12714
  // src/widget/pages/SelectToken.tsx
12367
- var import_jsx_runtime42 = require("react/jsx-runtime");
12715
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12368
12716
  function SelectToken({ style }) {
12369
12717
  const { selectedChain, setSelectedChain, setSelectedToken } = useDepositForm();
12370
12718
  const { goBack } = useDepositNavigation();
@@ -12395,7 +12743,7 @@ function SelectToken({ style }) {
12395
12743
  walletAddress,
12396
12744
  yourWalletTokens
12397
12745
  });
12398
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12746
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12399
12747
  "div",
12400
12748
  {
12401
12749
  style: {
@@ -12406,7 +12754,7 @@ function SelectToken({ style }) {
12406
12754
  ...style
12407
12755
  },
12408
12756
  children: [
12409
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12757
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12410
12758
  "div",
12411
12759
  {
12412
12760
  style: {
@@ -12416,7 +12764,7 @@ function SelectToken({ style }) {
12416
12764
  borderBottom: `1px solid ${colors.border}`
12417
12765
  },
12418
12766
  children: [
12419
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12767
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12420
12768
  "button",
12421
12769
  {
12422
12770
  type: "button",
@@ -12431,7 +12779,7 @@ function SelectToken({ style }) {
12431
12779
  cursor: "pointer"
12432
12780
  },
12433
12781
  "aria-label": "Go back",
12434
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12782
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12435
12783
  "svg",
12436
12784
  {
12437
12785
  style: {
@@ -12443,7 +12791,7 @@ function SelectToken({ style }) {
12443
12791
  fill: "none",
12444
12792
  stroke: "currentColor",
12445
12793
  strokeWidth: 2,
12446
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12794
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12447
12795
  "path",
12448
12796
  {
12449
12797
  strokeLinecap: "round",
@@ -12455,7 +12803,7 @@ function SelectToken({ style }) {
12455
12803
  )
12456
12804
  }
12457
12805
  ),
12458
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12806
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12459
12807
  "h1",
12460
12808
  {
12461
12809
  style: {
@@ -12472,7 +12820,7 @@ function SelectToken({ style }) {
12472
12820
  ]
12473
12821
  }
12474
12822
  ),
12475
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12823
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12476
12824
  "div",
12477
12825
  {
12478
12826
  style: {
@@ -12481,7 +12829,7 @@ function SelectToken({ style }) {
12481
12829
  overflow: "hidden"
12482
12830
  },
12483
12831
  children: [
12484
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12832
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12485
12833
  ChainSelectorPanel,
12486
12834
  {
12487
12835
  error,
@@ -12492,7 +12840,7 @@ function SelectToken({ style }) {
12492
12840
  popularChains
12493
12841
  }
12494
12842
  ),
12495
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12843
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12496
12844
  TokenSelectorPanel,
12497
12845
  {
12498
12846
  filteredTokens,
@@ -12513,17 +12861,17 @@ function SelectToken({ style }) {
12513
12861
  ]
12514
12862
  }
12515
12863
  ),
12516
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(WidgetSecurityFooter, {})
12864
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(WidgetSecurityFooter, {})
12517
12865
  ]
12518
12866
  }
12519
12867
  );
12520
12868
  }
12521
12869
 
12522
12870
  // src/widget/pages/CryptoPay.tsx
12523
- var import_react33 = require("react");
12871
+ var import_react35 = require("react");
12524
12872
 
12525
12873
  // src/widget/features/route-preview/hooks/useRoutePreviewModel.ts
12526
- var import_react31 = require("react");
12874
+ var import_react33 = require("react");
12527
12875
  function useRoutePreviewModel({
12528
12876
  amountUsd,
12529
12877
  amountValidationError,
@@ -12536,7 +12884,7 @@ function useRoutePreviewModel({
12536
12884
  walletAddress
12537
12885
  }) {
12538
12886
  const { chains } = useChains();
12539
- const destinationConfig = (0, import_react31.useMemo)(
12887
+ const destinationConfig = (0, import_react33.useMemo)(
12540
12888
  () => ({
12541
12889
  dappName: config.messages?.title || "DApp",
12542
12890
  toChain: config.routes.toChain,
@@ -12550,7 +12898,7 @@ function useRoutePreviewModel({
12550
12898
  config.routes.toToken
12551
12899
  ]
12552
12900
  );
12553
- const routeConfig = (0, import_react31.useMemo)(() => {
12901
+ const routeConfig = (0, import_react33.useMemo)(() => {
12554
12902
  const toChainId = config.routes.toChain;
12555
12903
  const toChainKey = normalizeChainKey2(toChainId);
12556
12904
  const toChain = toChainKey ? chains.find(
@@ -12584,7 +12932,7 @@ function useRoutePreviewModel({
12584
12932
  walletAddress
12585
12933
  ]);
12586
12934
  const routeBuilderState = useRouteBuilder(routeConfig);
12587
- const routePrerequisiteError = (0, import_react31.useMemo)(() => {
12935
+ const routePrerequisiteError = (0, import_react33.useMemo)(() => {
12588
12936
  if (!isReady) return;
12589
12937
  if (!selectedChain) {
12590
12938
  return "Select a source chain to fetch a route.";
@@ -12624,7 +12972,7 @@ function useRoutePreviewModel({
12624
12972
  }
12625
12973
 
12626
12974
  // src/widget/features/transaction/components/CryptoPaySwipeSection.tsx
12627
- var import_jsx_runtime43 = require("react/jsx-runtime");
12975
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12628
12976
  function CryptoPaySwipeSection({
12629
12977
  actionErrorMessage,
12630
12978
  canSwipe,
@@ -12640,13 +12988,13 @@ function CryptoPaySwipeSection({
12640
12988
  swipeResetKey
12641
12989
  }) {
12642
12990
  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";
12643
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12991
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12644
12992
  "div",
12645
12993
  {
12646
12994
  style: {
12647
12995
  padding: `${spacing[4]} ${spacing[6]}`
12648
12996
  },
12649
- children: selectedToken?.chainData ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12997
+ children: selectedToken?.chainData ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12650
12998
  SwipeToConfirmTokens,
12651
12999
  {
12652
13000
  text: swipeText,
@@ -12666,7 +13014,7 @@ function CryptoPaySwipeSection({
12666
13014
  }
12667
13015
 
12668
13016
  // src/widget/features/transaction/components/ErrorRecoveryCard.tsx
12669
- var import_jsx_runtime44 = require("react/jsx-runtime");
13017
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12670
13018
  function ErrorRecoveryCard({
12671
13019
  errorMessage,
12672
13020
  errorSuggestion,
@@ -12677,7 +13025,7 @@ function ErrorRecoveryCard({
12677
13025
  renderErrorIcon,
12678
13026
  transactionHash
12679
13027
  }) {
12680
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
13028
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12681
13029
  "div",
12682
13030
  {
12683
13031
  style: {
@@ -12689,7 +13037,7 @@ function ErrorRecoveryCard({
12689
13037
  padding: `${spacing[8]} ${spacing[6]}`
12690
13038
  },
12691
13039
  children: [
12692
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13040
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12693
13041
  "div",
12694
13042
  {
12695
13043
  style: {
@@ -12705,7 +13053,7 @@ function ErrorRecoveryCard({
12705
13053
  children: renderErrorIcon()
12706
13054
  }
12707
13055
  ),
12708
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13056
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12709
13057
  "h2",
12710
13058
  {
12711
13059
  style: {
@@ -12718,7 +13066,7 @@ function ErrorRecoveryCard({
12718
13066
  children: errorTitle
12719
13067
  }
12720
13068
  ),
12721
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13069
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12722
13070
  "p",
12723
13071
  {
12724
13072
  style: {
@@ -12730,7 +13078,7 @@ function ErrorRecoveryCard({
12730
13078
  children: errorMessage
12731
13079
  }
12732
13080
  ) : null,
12733
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13081
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12734
13082
  "p",
12735
13083
  {
12736
13084
  style: {
@@ -12743,13 +13091,13 @@ function ErrorRecoveryCard({
12743
13091
  children: errorSuggestion
12744
13092
  }
12745
13093
  ),
12746
- explorerUrl && transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13094
+ explorerUrl && transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12747
13095
  "div",
12748
13096
  {
12749
13097
  style: {
12750
13098
  marginBottom: spacing[6]
12751
13099
  },
12752
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13100
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12753
13101
  TransactionHashLink,
12754
13102
  {
12755
13103
  explorerUrl,
@@ -12759,7 +13107,7 @@ function ErrorRecoveryCard({
12759
13107
  )
12760
13108
  }
12761
13109
  ) : null,
12762
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
13110
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12763
13111
  "div",
12764
13112
  {
12765
13113
  style: {
@@ -12770,7 +13118,7 @@ function ErrorRecoveryCard({
12770
13118
  maxWidth: "20rem"
12771
13119
  },
12772
13120
  children: [
12773
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13121
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12774
13122
  "button",
12775
13123
  {
12776
13124
  type: "button",
@@ -12790,7 +13138,7 @@ function ErrorRecoveryCard({
12790
13138
  children: "Try Again"
12791
13139
  }
12792
13140
  ),
12793
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13141
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12794
13142
  "button",
12795
13143
  {
12796
13144
  type: "button",
@@ -12819,7 +13167,7 @@ function ErrorRecoveryCard({
12819
13167
  }
12820
13168
 
12821
13169
  // src/widget/features/transaction/components/SuccessSummaryCard.tsx
12822
- var import_jsx_runtime45 = require("react/jsx-runtime");
13170
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12823
13171
  function SuccessSummaryCard({
12824
13172
  amount,
12825
13173
  explorerUrl,
@@ -12829,7 +13177,7 @@ function SuccessSummaryCard({
12829
13177
  selectedTokenSymbol,
12830
13178
  transactionHash
12831
13179
  }) {
12832
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13180
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12833
13181
  "div",
12834
13182
  {
12835
13183
  style: {
@@ -12843,7 +13191,7 @@ function SuccessSummaryCard({
12843
13191
  animation: "fade-in 0.3s ease-out"
12844
13192
  },
12845
13193
  children: [
12846
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13194
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12847
13195
  "div",
12848
13196
  {
12849
13197
  style: {
@@ -12853,7 +13201,7 @@ function SuccessSummaryCard({
12853
13201
  marginBottom: "2rem"
12854
13202
  },
12855
13203
  children: [
12856
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13204
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12857
13205
  "div",
12858
13206
  {
12859
13207
  style: {
@@ -12867,7 +13215,7 @@ function SuccessSummaryCard({
12867
13215
  animation: "scale-in 0.3s ease-out",
12868
13216
  marginBottom: "0.75rem"
12869
13217
  },
12870
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13218
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12871
13219
  "svg",
12872
13220
  {
12873
13221
  style: {
@@ -12880,7 +13228,7 @@ function SuccessSummaryCard({
12880
13228
  stroke: "currentColor",
12881
13229
  strokeWidth: 2.5,
12882
13230
  "aria-hidden": "true",
12883
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13231
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12884
13232
  "path",
12885
13233
  {
12886
13234
  strokeLinecap: "round",
@@ -12892,7 +13240,7 @@ function SuccessSummaryCard({
12892
13240
  )
12893
13241
  }
12894
13242
  ),
12895
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13243
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12896
13244
  "div",
12897
13245
  {
12898
13246
  style: {
@@ -12906,7 +13254,7 @@ function SuccessSummaryCard({
12906
13254
  ]
12907
13255
  }
12908
13256
  ),
12909
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13257
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12910
13258
  "div",
12911
13259
  {
12912
13260
  style: {
@@ -12916,7 +13264,7 @@ function SuccessSummaryCard({
12916
13264
  marginBottom: "2rem"
12917
13265
  },
12918
13266
  children: [
12919
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13267
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12920
13268
  "div",
12921
13269
  {
12922
13270
  style: {
@@ -12933,7 +13281,7 @@ function SuccessSummaryCard({
12933
13281
  ]
12934
13282
  }
12935
13283
  ),
12936
- selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13284
+ selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12937
13285
  "div",
12938
13286
  {
12939
13287
  style: {
@@ -12943,7 +13291,7 @@ function SuccessSummaryCard({
12943
13291
  marginTop: "0.375rem"
12944
13292
  },
12945
13293
  children: [
12946
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13294
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12947
13295
  "img",
12948
13296
  {
12949
13297
  src: selectedTokenIconUrl,
@@ -12955,7 +13303,7 @@ function SuccessSummaryCard({
12955
13303
  }
12956
13304
  }
12957
13305
  ),
12958
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13306
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12959
13307
  "span",
12960
13308
  {
12961
13309
  style: {
@@ -12974,13 +13322,13 @@ function SuccessSummaryCard({
12974
13322
  ]
12975
13323
  }
12976
13324
  ),
12977
- transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13325
+ transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12978
13326
  "div",
12979
13327
  {
12980
13328
  style: {
12981
13329
  marginBottom: "2rem"
12982
13330
  },
12983
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13331
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12984
13332
  TransactionHashLink,
12985
13333
  {
12986
13334
  explorerUrl,
@@ -12990,14 +13338,14 @@ function SuccessSummaryCard({
12990
13338
  )
12991
13339
  }
12992
13340
  ) : null,
12993
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13341
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12994
13342
  "div",
12995
13343
  {
12996
13344
  style: {
12997
13345
  width: "100%",
12998
13346
  padding: "1rem"
12999
13347
  },
13000
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13348
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13001
13349
  "button",
13002
13350
  {
13003
13351
  type: "button",
@@ -13023,8 +13371,9 @@ function SuccessSummaryCard({
13023
13371
  }
13024
13372
 
13025
13373
  // src/widget/features/transaction/hooks/useTransactionActionModel.ts
13026
- var import_react32 = require("react");
13374
+ var import_react34 = require("react");
13027
13375
  var import_viem2 = require("viem");
13376
+ init_constants();
13028
13377
  function normalizeTokenAddressForCompare(chain, addr) {
13029
13378
  const chainType = (chain.type ?? chain.chainType ?? "").toLowerCase();
13030
13379
  const value = (addr ?? "").trim();
@@ -13045,12 +13394,20 @@ function useTransactionActionModel({
13045
13394
  walletAddress,
13046
13395
  walletStatus
13047
13396
  }) {
13048
- const feeDataCacheRef = (0, import_react32.useRef)({});
13397
+ const feeDataCacheRef = (0, import_react34.useRef)({});
13049
13398
  const { isSubmitting, submitTransaction } = useTransactionSubmit();
13399
+ const { trackEvent } = useGTM(GTM_ID);
13400
+ const destinationConfig = (() => {
13401
+ try {
13402
+ return Trustware.getConfig();
13403
+ } catch {
13404
+ return void 0;
13405
+ }
13406
+ })();
13050
13407
  const chainType = selectedChain?.type ?? selectedChain?.chainType;
13051
13408
  const chainTypeNormalized = (chainType ?? "").toLowerCase();
13052
13409
  const isEvm = chainTypeNormalized === "evm";
13053
- const backendChainId2 = (0, import_react32.useMemo)(() => {
13410
+ const backendChainId2 = (0, import_react34.useMemo)(() => {
13054
13411
  const chainRef = routeResult?.txReq?.chainId ?? selectedChain?.networkIdentifier ?? selectedChain?.chainId ?? selectedChain?.id;
13055
13412
  if (chainRef == null) return null;
13056
13413
  return String(chainRef);
@@ -13060,23 +13417,23 @@ function useTransactionActionModel({
13060
13417
  selectedChain?.id,
13061
13418
  selectedChain?.networkIdentifier
13062
13419
  ]);
13063
- const isNativeSelected = (0, import_react32.useMemo)(() => {
13420
+ const isNativeSelected = (0, import_react34.useMemo)(() => {
13064
13421
  const address = selectedToken?.address;
13065
13422
  return isNativeTokenAddress(address, chainType) || isZeroAddrLike(address, chainType) || normalizeTokenAddressForCompare(selectedChain, address) === normalizeTokenAddressForCompare(
13066
13423
  selectedChain,
13067
13424
  getNativeTokenAddress2(chainType)
13068
13425
  );
13069
13426
  }, [chainType, selectedChain, selectedToken?.address]);
13070
- const spender = (0, import_react32.useMemo)(() => {
13427
+ const spender = (0, import_react34.useMemo)(() => {
13071
13428
  const txReq = routeResult?.txReq;
13072
13429
  const addr = txReq?.to ?? txReq?.target;
13073
13430
  return addr ?? null;
13074
13431
  }, [routeResult?.txReq]);
13075
- const [allowanceWei, setAllowanceWei] = (0, import_react32.useState)(0n);
13076
- const [isReadingAllowance, setIsReadingAllowance] = (0, import_react32.useState)(false);
13077
- const [isApproving, setIsApproving] = (0, import_react32.useState)(false);
13078
- const [gasReservationWei, setGasReservationWei] = (0, import_react32.useState)(0n);
13079
- const readAllowance = (0, import_react32.useCallback)(async () => {
13432
+ const [allowanceWei, setAllowanceWei] = (0, import_react34.useState)(0n);
13433
+ const [isReadingAllowance, setIsReadingAllowance] = (0, import_react34.useState)(false);
13434
+ const [isApproving, setIsApproving] = (0, import_react34.useState)(false);
13435
+ const [gasReservationWei, setGasReservationWei] = (0, import_react34.useState)(0n);
13436
+ const readAllowance = (0, import_react34.useCallback)(async () => {
13080
13437
  if (!isEvm || isNativeSelected || !backendChainId2 || !walletAddress || !spender || !selectedToken?.address) {
13081
13438
  setAllowanceWei(0n);
13082
13439
  return;
@@ -13103,11 +13460,11 @@ function useTransactionActionModel({
13103
13460
  spender,
13104
13461
  walletAddress
13105
13462
  ]);
13106
- (0, import_react32.useEffect)(() => {
13463
+ (0, import_react34.useEffect)(() => {
13107
13464
  void readAllowance();
13108
13465
  }, [readAllowance]);
13109
13466
  const needsApproval = isEvm && !isNativeSelected && !!walletAddress && !!spender && amountWei > 0n && allowanceWei < amountWei;
13110
- const waitForApprovalConfirmation = (0, import_react32.useCallback)(
13467
+ const waitForApprovalConfirmation = (0, import_react34.useCallback)(
13111
13468
  async (chainId, txHash) => {
13112
13469
  const timeoutMs = 12e4;
13113
13470
  const intervalMs = 2e3;
@@ -13126,7 +13483,7 @@ function useTransactionActionModel({
13126
13483
  },
13127
13484
  []
13128
13485
  );
13129
- const handleApproveExact = (0, import_react32.useCallback)(async () => {
13486
+ const handleApproveExact = (0, import_react34.useCallback)(async () => {
13130
13487
  if (isApproving || amountWei <= 0n || !walletAddress || !spender || !selectedToken?.address) {
13131
13488
  return;
13132
13489
  }
@@ -13134,6 +13491,13 @@ function useTransactionActionModel({
13134
13491
  if (!wallet || wallet.ecosystem !== "evm") {
13135
13492
  return;
13136
13493
  }
13494
+ trackEvent("token_approval_initiated", {
13495
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13496
+ from_token: selectedToken?.symbol,
13497
+ to_chain: destinationConfig?.routes.toChain,
13498
+ to_token: destinationConfig?.routes.toToken,
13499
+ domain: window.origin
13500
+ });
13137
13501
  setIsApproving(true);
13138
13502
  try {
13139
13503
  const targetChain = Number(
@@ -13191,17 +13555,23 @@ function useTransactionActionModel({
13191
13555
  }, [
13192
13556
  amountWei,
13193
13557
  backendChainId2,
13558
+ destinationConfig?.routes.toChain,
13559
+ destinationConfig?.routes.toToken,
13194
13560
  isApproving,
13195
13561
  readAllowance,
13196
13562
  routeResult?.txReq?.chainId,
13563
+ selectedChain?.axelarChainName,
13197
13564
  selectedChain?.chainId,
13198
13565
  selectedChain?.id,
13566
+ selectedChain?.networkName,
13199
13567
  selectedToken?.address,
13568
+ selectedToken?.symbol,
13200
13569
  spender,
13570
+ trackEvent,
13201
13571
  waitForApprovalConfirmation,
13202
13572
  walletAddress
13203
13573
  ]);
13204
- const getCachedFeeData = (0, import_react32.useCallback)(async () => {
13574
+ const getCachedFeeData = (0, import_react34.useCallback)(async () => {
13205
13575
  if (!backendChainId2) return {};
13206
13576
  const now = Date.now();
13207
13577
  const cache = feeDataCacheRef.current;
@@ -13224,7 +13594,7 @@ function useTransactionActionModel({
13224
13594
  }
13225
13595
  return cache.inflight;
13226
13596
  }, [backendChainId2]);
13227
- const estimateGasReservationWei = (0, import_react32.useCallback)(async () => {
13597
+ const estimateGasReservationWei = (0, import_react34.useCallback)(async () => {
13228
13598
  if (!isNativeSelected) {
13229
13599
  setGasReservationWei(0n);
13230
13600
  return 0n;
@@ -13288,18 +13658,35 @@ function useTransactionActionModel({
13288
13658
  routeResult?.txReq,
13289
13659
  walletAddress
13290
13660
  ]);
13291
- (0, import_react32.useEffect)(() => {
13661
+ (0, import_react34.useEffect)(() => {
13292
13662
  if (routeResult) {
13293
13663
  void estimateGasReservationWei();
13294
13664
  }
13295
13665
  }, [estimateGasReservationWei, routeResult]);
13296
- const handleConfirm = (0, import_react32.useCallback)(async () => {
13666
+ const handleConfirm = (0, import_react34.useCallback)(async () => {
13297
13667
  if (!routeResult) {
13298
13668
  return;
13299
13669
  }
13670
+ trackEvent("payment_initiated", {
13671
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13672
+ from_token: selectedToken?.symbol,
13673
+ to_chain: destinationConfig?.routes.toChain,
13674
+ to_token: destinationConfig?.routes.toToken,
13675
+ domain: window.origin
13676
+ });
13300
13677
  await submitTransaction(routeResult);
13301
- }, [routeResult, submitTransaction]);
13302
- const handleSwipeConfirm = (0, import_react32.useCallback)(async () => {
13678
+ }, [
13679
+ destinationConfig?.routes.toChain,
13680
+ destinationConfig?.routes.toToken,
13681
+ routeResult,
13682
+ selectedChain?.axelarChainName,
13683
+ selectedChain?.chainId,
13684
+ selectedChain?.networkName,
13685
+ selectedToken?.symbol,
13686
+ submitTransaction,
13687
+ trackEvent
13688
+ ]);
13689
+ const handleSwipeConfirm = (0, import_react34.useCallback)(async () => {
13303
13690
  if (needsApproval) {
13304
13691
  await handleApproveExact();
13305
13692
  return;
@@ -13308,7 +13695,7 @@ function useTransactionActionModel({
13308
13695
  }, [handleApproveExact, handleConfirm, needsApproval]);
13309
13696
  const isWalletConnected = walletStatus === "connected";
13310
13697
  const canSwipe = parsedAmount > 0 && !!selectedToken && isWalletConnected && !isLoadingRoute && !isSubmitting && !!routeResult && !actionErrorMessage && !isApproving && !isReadingAllowance;
13311
- const swipeResetKey = (0, import_react32.useMemo)(() => {
13698
+ const swipeResetKey = (0, import_react34.useMemo)(() => {
13312
13699
  const tokenAddress = selectedToken ? normalizeAddress2(
13313
13700
  selectedToken.address,
13314
13701
  selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType
@@ -13335,7 +13722,7 @@ function useTransactionActionModel({
13335
13722
  }
13336
13723
 
13337
13724
  // src/widget/pages/CryptoPay.tsx
13338
- var import_jsx_runtime46 = require("react/jsx-runtime");
13725
+ var import_jsx_runtime47 = require("react/jsx-runtime");
13339
13726
  var SHOW_FEE_SUMMARY = false;
13340
13727
  function CryptoPay({ style: _style }) {
13341
13728
  const {
@@ -13352,12 +13739,12 @@ function CryptoPay({ style: _style }) {
13352
13739
  const { goBack, setCurrentStep, currentStep } = useDepositNavigation();
13353
13740
  const config = useTrustwareConfig();
13354
13741
  const { fixedFromAmountString, isFixedAmount, minAmountUsd, maxAmountUsd } = useAmountConstraints();
13355
- const routeRefreshMs = (0, import_react33.useMemo)(() => {
13742
+ const routeRefreshMs = (0, import_react35.useMemo)(() => {
13356
13743
  const raw = config.routes?.options?.routeRefreshMs;
13357
13744
  const n = Number(raw);
13358
13745
  return Number.isFinite(n) && n > 0 ? n : void 0;
13359
13746
  }, [config.routes?.options?.routeRefreshMs]);
13360
- const isReady = (0, import_react33.useMemo)(() => {
13747
+ const isReady = (0, import_react35.useMemo)(() => {
13361
13748
  if (selectedToken !== null && yourWalletTokens.length > 0 && selectedToken?.chainData !== void 0) {
13362
13749
  return true;
13363
13750
  }
@@ -13432,7 +13819,7 @@ function CryptoPay({ style: _style }) {
13432
13819
  });
13433
13820
  const { emitError } = useTrustware();
13434
13821
  const readySelectedToken = isReady ? selectedToken : null;
13435
- (0, import_react33.useEffect)(() => {
13822
+ (0, import_react35.useEffect)(() => {
13436
13823
  if (currentStep !== "crypto-pay" || !actionErrorMessage) return;
13437
13824
  emitError?.(
13438
13825
  new TrustwareError({
@@ -13464,7 +13851,7 @@ function CryptoPay({ style: _style }) {
13464
13851
  const handleExpandTokens = () => {
13465
13852
  setCurrentStep("select-token");
13466
13853
  };
13467
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13854
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13468
13855
  "div",
13469
13856
  {
13470
13857
  style: {
@@ -13473,9 +13860,9 @@ function CryptoPay({ style: _style }) {
13473
13860
  minHeight: "500px"
13474
13861
  },
13475
13862
  children: [
13476
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13477
- isReady ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
13478
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13863
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13864
+ isReady ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
13865
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13479
13866
  CryptoPayAmountSection,
13480
13867
  {
13481
13868
  amount,
@@ -13504,7 +13891,7 @@ function CryptoPay({ style: _style }) {
13504
13891
  yourWalletTokensLength: yourWalletTokens.length
13505
13892
  }
13506
13893
  ),
13507
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13894
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13508
13895
  CryptoPaySwipeSection,
13509
13896
  {
13510
13897
  actionErrorMessage,
@@ -13521,8 +13908,8 @@ function CryptoPay({ style: _style }) {
13521
13908
  swipeResetKey
13522
13909
  }
13523
13910
  ),
13524
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WidgetSecurityFooter, {})
13525
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13911
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetSecurityFooter, {})
13912
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13526
13913
  "div",
13527
13914
  {
13528
13915
  style: {
@@ -13531,7 +13918,7 @@ function CryptoPay({ style: _style }) {
13531
13918
  alignItems: "center",
13532
13919
  justifyContent: "center"
13533
13920
  },
13534
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LoadingSkeleton, {})
13921
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingSkeleton, {})
13535
13922
  }
13536
13923
  )
13537
13924
  ]
@@ -13540,8 +13927,8 @@ function CryptoPay({ style: _style }) {
13540
13927
  }
13541
13928
 
13542
13929
  // src/widget/pages/Processing.tsx
13543
- var import_react34 = require("react");
13544
- var import_jsx_runtime47 = require("react/jsx-runtime");
13930
+ var import_react36 = require("react");
13931
+ var import_jsx_runtime48 = require("react/jsx-runtime");
13545
13932
  function getProgressFromStatus(status) {
13546
13933
  switch (status) {
13547
13934
  case "confirming":
@@ -13579,27 +13966,27 @@ function Processing({ style }) {
13579
13966
  const { resetState, setCurrentStep } = useDepositNavigation();
13580
13967
  const { transactionStatus, transactionHash, intentId } = useDepositTransaction();
13581
13968
  const { transaction, startPolling, isPolling } = useTransactionPolling();
13582
- const hasStartedPolling = (0, import_react34.useRef)(false);
13583
- (0, import_react34.useEffect)(() => {
13969
+ const hasStartedPolling = (0, import_react36.useRef)(false);
13970
+ (0, import_react36.useEffect)(() => {
13584
13971
  return () => {
13585
13972
  hasStartedPolling.current = false;
13586
13973
  };
13587
13974
  }, []);
13588
- (0, import_react34.useEffect)(() => {
13975
+ (0, import_react36.useEffect)(() => {
13589
13976
  if (intentId && transactionHash && !isPolling && !hasStartedPolling.current && transactionStatus !== "success" && transactionStatus !== "error") {
13590
13977
  hasStartedPolling.current = true;
13591
13978
  startPolling(intentId, transactionHash);
13592
13979
  }
13593
13980
  }, [intentId, transactionHash, isPolling, transactionStatus, startPolling]);
13594
- const progress = (0, import_react34.useMemo)(
13981
+ const progress = (0, import_react36.useMemo)(
13595
13982
  () => getProgressFromStatus(transactionStatus),
13596
13983
  [transactionStatus]
13597
13984
  );
13598
- const stepText = (0, import_react34.useMemo)(
13985
+ const stepText = (0, import_react36.useMemo)(
13599
13986
  () => getStepText(transactionStatus),
13600
13987
  [transactionStatus]
13601
13988
  );
13602
- const explorerUrl = (0, import_react34.useMemo)(() => {
13989
+ const explorerUrl = (0, import_react36.useMemo)(() => {
13603
13990
  if (transaction?.fromChainTxUrl) {
13604
13991
  return transaction.fromChainTxUrl;
13605
13992
  }
@@ -13617,7 +14004,7 @@ function Processing({ style }) {
13617
14004
  };
13618
14005
  const isIndeterminate = transactionStatus === "confirming" || transactionStatus === "idle";
13619
14006
  const headerTitle = transactionStatus === "success" ? "Complete" : transactionStatus === "error" ? "Failed" : "Processing";
13620
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
14007
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13621
14008
  "div",
13622
14009
  {
13623
14010
  style: {
@@ -13627,8 +14014,8 @@ function Processing({ style }) {
13627
14014
  ...style
13628
14015
  },
13629
14016
  children: [
13630
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
13631
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
14017
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
14018
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13632
14019
  "div",
13633
14020
  {
13634
14021
  style: {
@@ -13640,13 +14027,13 @@ function Processing({ style }) {
13640
14027
  padding: `${spacing[8]} ${spacing[6]}`
13641
14028
  },
13642
14029
  children: [
13643
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14030
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13644
14031
  "div",
13645
14032
  {
13646
14033
  style: {
13647
14034
  marginBottom: spacing[6]
13648
14035
  },
13649
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14036
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13650
14037
  CircularProgress,
13651
14038
  {
13652
14039
  progress,
@@ -13658,7 +14045,7 @@ function Processing({ style }) {
13658
14045
  )
13659
14046
  }
13660
14047
  ),
13661
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14048
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13662
14049
  "p",
13663
14050
  {
13664
14051
  style: {
@@ -13671,7 +14058,7 @@ function Processing({ style }) {
13671
14058
  children: stepText
13672
14059
  }
13673
14060
  ),
13674
- selectedToken && parsedAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
14061
+ selectedToken && parsedAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13675
14062
  "p",
13676
14063
  {
13677
14064
  style: {
@@ -13688,7 +14075,7 @@ function Processing({ style }) {
13688
14075
  ]
13689
14076
  }
13690
14077
  ),
13691
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14078
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13692
14079
  TransactionSteps,
13693
14080
  {
13694
14081
  transactionStatus,
@@ -13699,7 +14086,7 @@ function Processing({ style }) {
13699
14086
  }
13700
14087
  }
13701
14088
  ),
13702
- transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14089
+ transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13703
14090
  TransactionHashLink,
13704
14091
  {
13705
14092
  explorerUrl,
@@ -13707,7 +14094,7 @@ function Processing({ style }) {
13707
14094
  label: "Transaction"
13708
14095
  }
13709
14096
  ) : null,
13710
- transactionStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14097
+ transactionStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13711
14098
  "button",
13712
14099
  {
13713
14100
  type: "button",
@@ -13729,23 +14116,23 @@ function Processing({ style }) {
13729
14116
  ]
13730
14117
  }
13731
14118
  ),
13732
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetSecurityFooter, {})
14119
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetSecurityFooter, {})
13733
14120
  ]
13734
14121
  }
13735
14122
  );
13736
14123
  }
13737
14124
 
13738
14125
  // src/widget/pages/Success.tsx
13739
- var import_react35 = require("react");
13740
- var import_jsx_runtime48 = require("react/jsx-runtime");
13741
- var ConfettiEffect2 = (0, import_react35.lazy)(() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports)));
14126
+ var import_react37 = require("react");
14127
+ var import_jsx_runtime49 = require("react/jsx-runtime");
14128
+ var ConfettiEffect2 = (0, import_react37.lazy)(() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports)));
13742
14129
  function Success({ style }) {
13743
14130
  const { selectedToken, selectedChain, amount } = useDepositForm();
13744
14131
  const { resetState } = useDepositNavigation();
13745
14132
  const { transactionHash } = useDepositTransaction();
13746
14133
  const { transaction } = useTransactionPolling();
13747
- const parsedAmount = (0, import_react35.useMemo)(() => parseFloat(amount) || 0, [amount]);
13748
- const explorerUrl = (0, import_react35.useMemo)(() => {
14134
+ const parsedAmount = (0, import_react37.useMemo)(() => parseFloat(amount) || 0, [amount]);
14135
+ const explorerUrl = (0, import_react37.useMemo)(() => {
13749
14136
  if (transaction?.toChainTxUrl) {
13750
14137
  return transaction.toChainTxUrl;
13751
14138
  }
@@ -13760,7 +14147,7 @@ function Success({ style }) {
13760
14147
  const handleDone = () => {
13761
14148
  resetState();
13762
14149
  };
13763
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
14150
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
13764
14151
  "div",
13765
14152
  {
13766
14153
  style: {
@@ -13773,9 +14160,9 @@ function Success({ style }) {
13773
14160
  ...style
13774
14161
  },
13775
14162
  children: [
13776
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react35.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ConfettiEffect2, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
13777
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetPageHeader, { title: "Deposit Complete" }),
13778
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
14163
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react37.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ConfettiEffect2, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
14164
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetPageHeader, { title: "Deposit Complete" }),
14165
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13779
14166
  "div",
13780
14167
  {
13781
14168
  style: {
@@ -13787,7 +14174,7 @@ function Success({ style }) {
13787
14174
  flexDirection: "column",
13788
14175
  alignItems: "center"
13789
14176
  },
13790
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
14177
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13791
14178
  SuccessSummaryCard,
13792
14179
  {
13793
14180
  amount: parsedAmount,
@@ -13801,16 +14188,16 @@ function Success({ style }) {
13801
14188
  )
13802
14189
  }
13803
14190
  ),
13804
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetSecurityFooter, {})
14191
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetSecurityFooter, {})
13805
14192
  ]
13806
14193
  }
13807
14194
  );
13808
14195
  }
13809
14196
 
13810
14197
  // src/widget/pages/Error.tsx
13811
- var import_react36 = require("react");
14198
+ var import_react38 = require("react");
13812
14199
  init_store();
13813
- var import_jsx_runtime49 = require("react/jsx-runtime");
14200
+ var import_jsx_runtime50 = require("react/jsx-runtime");
13814
14201
  function categorizeError(errorMessage) {
13815
14202
  if (!errorMessage) return "unknown";
13816
14203
  const msg = errorMessage.toLowerCase();
@@ -13897,20 +14284,20 @@ function Error2({ style }) {
13897
14284
  setErrorMessage,
13898
14285
  transactionHash
13899
14286
  } = useDepositTransaction();
13900
- const errorCategory = (0, import_react36.useMemo)(
14287
+ const errorCategory = (0, import_react38.useMemo)(
13901
14288
  () => categorizeError(errorMessage),
13902
14289
  [errorMessage]
13903
14290
  );
13904
- const errorTitle = (0, import_react36.useMemo)(
14291
+ const errorTitle = (0, import_react38.useMemo)(
13905
14292
  () => getErrorTitle(errorCategory),
13906
14293
  [errorCategory]
13907
14294
  );
13908
- const errorSuggestion = (0, import_react36.useMemo)(
14295
+ const errorSuggestion = (0, import_react38.useMemo)(
13909
14296
  () => getErrorSuggestion(errorCategory),
13910
14297
  [errorCategory]
13911
14298
  );
13912
- const retryStep = (0, import_react36.useMemo)(() => getRetryStep(errorCategory), [errorCategory]);
13913
- (0, import_react36.useEffect)(() => {
14299
+ const retryStep = (0, import_react38.useMemo)(() => getRetryStep(errorCategory), [errorCategory]);
14300
+ (0, import_react38.useEffect)(() => {
13914
14301
  if (errorMessage) {
13915
14302
  try {
13916
14303
  const config = TrustwareConfigStore.get();
@@ -13932,7 +14319,7 @@ function Error2({ style }) {
13932
14319
  const handleStartOver = () => {
13933
14320
  resetState();
13934
14321
  };
13935
- const explorerUrl = (0, import_react36.useMemo)(() => {
14322
+ const explorerUrl = (0, import_react38.useMemo)(() => {
13936
14323
  if (transactionHash && selectedChain?.blockExplorerUrls?.length) {
13937
14324
  return `${selectedChain.blockExplorerUrls[0].replace(/\/+$/, "")}/tx/${transactionHash}`;
13938
14325
  }
@@ -13940,7 +14327,7 @@ function Error2({ style }) {
13940
14327
  }, [transactionHash, selectedChain]);
13941
14328
  const renderErrorIcon = () => {
13942
14329
  if (errorCategory === "wallet_rejected") {
13943
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14330
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13944
14331
  "svg",
13945
14332
  {
13946
14333
  style: {
@@ -13953,7 +14340,7 @@ function Error2({ style }) {
13953
14340
  stroke: "currentColor",
13954
14341
  strokeWidth: 2.5,
13955
14342
  "aria-hidden": "true",
13956
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14343
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13957
14344
  "path",
13958
14345
  {
13959
14346
  strokeLinecap: "round",
@@ -13965,7 +14352,7 @@ function Error2({ style }) {
13965
14352
  );
13966
14353
  }
13967
14354
  if (errorCategory === "network_error") {
13968
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14355
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13969
14356
  "svg",
13970
14357
  {
13971
14358
  style: {
@@ -13978,7 +14365,7 @@ function Error2({ style }) {
13978
14365
  stroke: "currentColor",
13979
14366
  strokeWidth: 2,
13980
14367
  "aria-hidden": "true",
13981
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14368
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13982
14369
  "path",
13983
14370
  {
13984
14371
  strokeLinecap: "round",
@@ -13989,7 +14376,7 @@ function Error2({ style }) {
13989
14376
  }
13990
14377
  );
13991
14378
  }
13992
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14379
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13993
14380
  "svg",
13994
14381
  {
13995
14382
  style: {
@@ -14002,7 +14389,7 @@ function Error2({ style }) {
14002
14389
  stroke: "currentColor",
14003
14390
  strokeWidth: 2,
14004
14391
  "aria-hidden": "true",
14005
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14392
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14006
14393
  "path",
14007
14394
  {
14008
14395
  strokeLinecap: "round",
@@ -14013,7 +14400,7 @@ function Error2({ style }) {
14013
14400
  }
14014
14401
  );
14015
14402
  };
14016
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14403
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14017
14404
  "div",
14018
14405
  {
14019
14406
  style: {
@@ -14023,8 +14410,8 @@ function Error2({ style }) {
14023
14410
  ...style
14024
14411
  },
14025
14412
  children: [
14026
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetPageHeader, { title: errorTitle }),
14027
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14413
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WidgetPageHeader, { title: errorTitle }),
14414
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14028
14415
  ErrorRecoveryCard,
14029
14416
  {
14030
14417
  errorMessage,
@@ -14037,7 +14424,7 @@ function Error2({ style }) {
14037
14424
  transactionHash
14038
14425
  }
14039
14426
  ),
14040
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetSecurityFooter, {})
14427
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WidgetSecurityFooter, {})
14041
14428
  ]
14042
14429
  }
14043
14430
  );
@@ -14059,7 +14446,7 @@ var ACTIVE_TRANSACTION_STATUSES = [
14059
14446
  ];
14060
14447
 
14061
14448
  // src/widget/app/WidgetRouter.tsx
14062
- var import_jsx_runtime50 = require("react/jsx-runtime");
14449
+ var import_jsx_runtime51 = require("react/jsx-runtime");
14063
14450
  var pageContainerBaseStyle = {
14064
14451
  width: "100%",
14065
14452
  height: "100%",
@@ -14070,26 +14457,26 @@ function WidgetRouter({
14070
14457
  navigationDirection,
14071
14458
  stepHistory
14072
14459
  }) {
14073
- const PageComponent = (0, import_react37.useMemo)(
14460
+ const PageComponent = (0, import_react39.useMemo)(
14074
14461
  () => PAGE_COMPONENTS[currentStep],
14075
14462
  [currentStep]
14076
14463
  );
14077
- const animationClass = (0, import_react37.useMemo)(() => {
14464
+ const animationClass = (0, import_react39.useMemo)(() => {
14078
14465
  return navigationDirection === "forward" ? "tw-animate-slide-in-right" : "tw-animate-slide-in-left";
14079
14466
  }, [navigationDirection]);
14080
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14467
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14081
14468
  "div",
14082
14469
  {
14083
14470
  className: animationClass,
14084
14471
  style: mergeStyles(pageContainerBaseStyle),
14085
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PageComponent, {})
14472
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PageComponent, {})
14086
14473
  },
14087
14474
  `${currentStep}-${stepHistory.length}`
14088
14475
  );
14089
14476
  }
14090
14477
 
14091
14478
  // src/widget/TrustwareWidgetV2.tsx
14092
- var import_jsx_runtime51 = require("react/jsx-runtime");
14479
+ var import_jsx_runtime52 = require("react/jsx-runtime");
14093
14480
  var widgetContentContainerStyle = {
14094
14481
  position: "relative",
14095
14482
  width: "100%",
@@ -14111,7 +14498,7 @@ function WidgetContent({
14111
14498
  const { amount, selectedChain, selectedToken } = useDepositForm();
14112
14499
  const { transactionHash, transactionStatus } = useDepositTransaction();
14113
14500
  const { resolvedTheme, toggleTheme } = useDepositUi();
14114
- (0, import_react38.useEffect)(() => {
14501
+ (0, import_react40.useEffect)(() => {
14115
14502
  const state = {
14116
14503
  currentStep,
14117
14504
  amount,
@@ -14131,9 +14518,9 @@ function WidgetContent({
14131
14518
  transactionStatus,
14132
14519
  onStateChange
14133
14520
  ]);
14134
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
14135
- showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
14136
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14521
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
14522
+ showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
14523
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14137
14524
  WidgetRouter,
14138
14525
  {
14139
14526
  currentStep,
@@ -14154,8 +14541,8 @@ function WidgetInner({
14154
14541
  const { transactionStatus } = useDepositTransaction();
14155
14542
  const { resolvedTheme } = useDepositUi();
14156
14543
  const { status, revalidate } = useTrustware();
14157
- const [showConfirmDialog, setShowConfirmDialog] = (0, import_react38.useState)(false);
14158
- const handleCloseRequest = (0, import_react38.useCallback)(() => {
14544
+ const [showConfirmDialog, setShowConfirmDialog] = (0, import_react40.useState)(false);
14545
+ const handleCloseRequest = (0, import_react40.useCallback)(() => {
14159
14546
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
14160
14547
  setShowConfirmDialog(true);
14161
14548
  } else {
@@ -14166,32 +14553,32 @@ function WidgetInner({
14166
14553
  onClose?.();
14167
14554
  }
14168
14555
  }, [transactionStatus, onClose, resetState]);
14169
- (0, import_react38.useEffect)(() => {
14556
+ (0, import_react40.useEffect)(() => {
14170
14557
  closeRequestRef.current = handleCloseRequest;
14171
14558
  }, [handleCloseRequest, closeRequestRef]);
14172
- const handleConfirmClose = (0, import_react38.useCallback)(() => {
14559
+ const handleConfirmClose = (0, import_react40.useCallback)(() => {
14173
14560
  setShowConfirmDialog(false);
14174
14561
  onClose?.();
14175
14562
  }, [onClose]);
14176
- const handleCancelClose = (0, import_react38.useCallback)(() => {
14563
+ const handleCancelClose = (0, import_react40.useCallback)(() => {
14177
14564
  setShowConfirmDialog(false);
14178
14565
  }, []);
14179
14566
  const effectiveTheme = resolvedTheme;
14180
14567
  const isRefreshing = status === "initializing";
14181
14568
  const initBlocked = status === "error";
14182
- const handleRefresh = (0, import_react38.useCallback)(() => {
14569
+ const handleRefresh = (0, import_react40.useCallback)(() => {
14183
14570
  revalidate?.();
14184
14571
  }, [revalidate]);
14185
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
14186
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(WidgetContainer, { theme: effectiveTheme, style, children: [
14187
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14572
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
14573
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(WidgetContainer, { theme: effectiveTheme, style, children: [
14574
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14188
14575
  WidgetContent,
14189
14576
  {
14190
14577
  onStateChange,
14191
14578
  showThemeToggle
14192
14579
  }
14193
14580
  ),
14194
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14581
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14195
14582
  InitErrorOverlay,
14196
14583
  {
14197
14584
  open: initBlocked,
@@ -14201,7 +14588,7 @@ function WidgetInner({
14201
14588
  }
14202
14589
  )
14203
14590
  ] }),
14204
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14591
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14205
14592
  ConfirmCloseDialog,
14206
14593
  {
14207
14594
  open: showConfirmDialog,
@@ -14212,7 +14599,7 @@ function WidgetInner({
14212
14599
  )
14213
14600
  ] });
14214
14601
  }
14215
- var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV22({
14602
+ var TrustwareWidgetV2 = (0, import_react40.forwardRef)(function TrustwareWidgetV22({
14216
14603
  theme = "system",
14217
14604
  style,
14218
14605
  initialStep = "home",
@@ -14221,14 +14608,14 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14221
14608
  onOpen,
14222
14609
  showThemeToggle = true
14223
14610
  }, ref) {
14224
- const [isOpen, setIsOpen] = (0, import_react38.useState)(defaultOpen);
14225
- const closeRequestRef = (0, import_react38.useRef)(null);
14611
+ const [isOpen, setIsOpen] = (0, import_react40.useState)(defaultOpen);
14612
+ const closeRequestRef = (0, import_react40.useRef)(null);
14226
14613
  const effectiveInitialStep = initialStep;
14227
- const open = (0, import_react38.useCallback)(() => {
14614
+ const open = (0, import_react40.useCallback)(() => {
14228
14615
  setIsOpen(true);
14229
14616
  onOpen?.();
14230
14617
  }, [onOpen]);
14231
- const close = (0, import_react38.useCallback)(() => {
14618
+ const close = (0, import_react40.useCallback)(() => {
14232
14619
  if (closeRequestRef.current) {
14233
14620
  closeRequestRef.current();
14234
14621
  } else {
@@ -14236,11 +14623,11 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14236
14623
  onClose?.();
14237
14624
  }
14238
14625
  }, [onClose]);
14239
- const handleClose = (0, import_react38.useCallback)(() => {
14626
+ const handleClose = (0, import_react40.useCallback)(() => {
14240
14627
  setIsOpen(false);
14241
14628
  onClose?.();
14242
14629
  }, [onClose]);
14243
- (0, import_react38.useImperativeHandle)(
14630
+ (0, import_react40.useImperativeHandle)(
14244
14631
  ref,
14245
14632
  () => ({
14246
14633
  open,
@@ -14252,7 +14639,7 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14252
14639
  if (!isOpen) {
14253
14640
  return null;
14254
14641
  }
14255
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14642
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14256
14643
  WidgetInner,
14257
14644
  {
14258
14645
  theme,
@@ -14297,6 +14684,7 @@ init_constants();
14297
14684
  DEFAULT_RETRY_CONFIG,
14298
14685
  DEFAULT_SLIPPAGE,
14299
14686
  DEFAULT_THEME,
14687
+ GTM_ID,
14300
14688
  IdentityStore,
14301
14689
  RateLimitError,
14302
14690
  SDK_NAME,