@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/widget.cjs CHANGED
@@ -67,19 +67,21 @@ var init_config = __esm({
67
67
  };
68
68
  DEFAULT_FEATURE_FLAGS = {
69
69
  tokensPagination: false,
70
- balanceStreaming: false
70
+ balanceStreaming: false,
71
+ shouldAllowGA4: true
71
72
  };
72
73
  }
73
74
  });
74
75
 
75
76
  // src/constants.ts
76
- var SDK_NAME, SDK_VERSION, API_ROOT, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
77
+ var SDK_NAME, SDK_VERSION, API_ROOT, GTM_ID, API_PREFIX, ASSETS_BASE_URL, WALLETCONNECT_PROJECT_ID;
77
78
  var init_constants = __esm({
78
79
  "src/constants.ts"() {
79
80
  "use strict";
80
81
  SDK_NAME = "@trustware/sdk";
81
- SDK_VERSION = "1.1.3-staging.20";
82
+ SDK_VERSION = "1.1.3-staging.31";
82
83
  API_ROOT = "https://bv-staging-api.trustware.io";
84
+ GTM_ID = "";
83
85
  API_PREFIX = "/api";
84
86
  ASSETS_BASE_URL = "https://app.trustware.io";
85
87
  WALLETCONNECT_PROJECT_ID = "4ead125c-63be-4b1a-a835-cef2dce67b84";
@@ -171,7 +173,8 @@ function resolveConfig(input) {
171
173
  const walletConnect = resolveWalletConnectConfig(input.walletConnect);
172
174
  const features = {
173
175
  tokensPagination: input.features?.tokensPagination ?? DEFAULT_FEATURE_FLAGS.tokensPagination,
174
- balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming
176
+ balanceStreaming: input.features?.balanceStreaming ?? DEFAULT_FEATURE_FLAGS.balanceStreaming,
177
+ shouldAllowGA4: input.features?.shouldAllowGA4 ?? DEFAULT_FEATURE_FLAGS.shouldAllowGA4
175
178
  };
176
179
  return {
177
180
  apiKey: input.apiKey,
@@ -835,8 +838,8 @@ function ConfettiEffect({
835
838
  clearDelay = 3e3,
836
839
  pieceCount = 50
837
840
  }) {
838
- const [pieces, setPieces] = (0, import_react19.useState)([]);
839
- (0, import_react19.useEffect)(() => {
841
+ const [pieces, setPieces] = (0, import_react20.useState)([]);
842
+ (0, import_react20.useEffect)(() => {
840
843
  if (isActive) {
841
844
  const colors2 = [
842
845
  "#10b981",
@@ -912,11 +915,11 @@ function ConfettiEffect({
912
915
  }
913
916
  );
914
917
  }
915
- var import_react19, import_jsx_runtime6, ConfettiEffect_default;
918
+ var import_react20, import_jsx_runtime6, ConfettiEffect_default;
916
919
  var init_ConfettiEffect = __esm({
917
920
  "src/widget/components/ConfettiEffect.tsx"() {
918
921
  "use strict";
919
- import_react19 = require("react");
922
+ import_react20 = require("react");
920
923
  import_jsx_runtime6 = require("react/jsx-runtime");
921
924
  ConfettiEffect_default = ConfettiEffect;
922
925
  }
@@ -931,7 +934,7 @@ __export(widget_exports, {
931
934
  module.exports = __toCommonJS(widget_exports);
932
935
 
933
936
  // src/widget/TrustwareWidgetV2.tsx
934
- var import_react38 = require("react");
937
+ var import_react40 = require("react");
935
938
 
936
939
  // src/widget/lib/utils.ts
937
940
  function mergeStyles(...styles) {
@@ -1411,7 +1414,7 @@ var ANIMATION_CLASSES = `
1411
1414
  var ALL_ANIMATION_STYLES = KEYFRAMES + ANIMATION_CLASSES;
1412
1415
 
1413
1416
  // src/widget/context/DepositContext.tsx
1414
- var import_react16 = __toESM(require("react"), 1);
1417
+ var import_react17 = __toESM(require("react"), 1);
1415
1418
 
1416
1419
  // src/provider.tsx
1417
1420
  var import_react5 = require("react");
@@ -4643,6 +4646,26 @@ var Trustware = {
4643
4646
  });
4644
4647
  return Trustware;
4645
4648
  },
4649
+ setDestinationChain(chain) {
4650
+ const prev = TrustwareConfigStore.get();
4651
+ TrustwareConfigStore.update({
4652
+ routes: {
4653
+ ...prev.routes,
4654
+ toChain: chain
4655
+ }
4656
+ });
4657
+ return Trustware;
4658
+ },
4659
+ setDestinationToken(token) {
4660
+ const prev = TrustwareConfigStore.get();
4661
+ TrustwareConfigStore.update({
4662
+ routes: {
4663
+ ...prev.routes,
4664
+ toToken: token
4665
+ }
4666
+ });
4667
+ return Trustware;
4668
+ },
4646
4669
  /** Read active wallet */
4647
4670
  getWallet() {
4648
4671
  return walletManager.wallet;
@@ -4829,7 +4852,7 @@ function useWalletSessionState() {
4829
4852
  }
4830
4853
 
4831
4854
  // src/widget/state/deposit/useWalletTokenState.ts
4832
- var import_react15 = require("react");
4855
+ var import_react16 = require("react");
4833
4856
 
4834
4857
  // src/widget/hooks/useRouteBuilder.ts
4835
4858
  var import_react10 = require("react");
@@ -5128,7 +5151,8 @@ function useTrustwareConfig() {
5128
5151
  },
5129
5152
  features: {
5130
5153
  tokensPagination: false,
5131
- balanceStreaming: false
5154
+ balanceStreaming: false,
5155
+ shouldAllowGA4: true
5132
5156
  }
5133
5157
  };
5134
5158
  }
@@ -5332,7 +5356,144 @@ function mapTransactionError(err) {
5332
5356
  }
5333
5357
 
5334
5358
  // src/widget/hooks/useTransactionPolling.ts
5359
+ var import_react15 = require("react");
5360
+ init_constants();
5361
+
5362
+ // src/hooks/useGTM.ts
5335
5363
  var import_react14 = require("react");
5364
+ function useGTM(gtmId) {
5365
+ const isInitialized = (0, import_react14.useRef)(false);
5366
+ const scriptRef = (0, import_react14.useRef)(null);
5367
+ const isGA4Allowed = (0, import_react14.useCallback)(() => {
5368
+ try {
5369
+ return Trustware.getConfig().features.shouldAllowGA4;
5370
+ } catch {
5371
+ return false;
5372
+ }
5373
+ }, []);
5374
+ (0, import_react14.useEffect)(() => {
5375
+ if (!isGA4Allowed()) {
5376
+ console.warn(
5377
+ "useGTM: GA4 tracking is disabled or Trustware config not initialized."
5378
+ );
5379
+ return;
5380
+ }
5381
+ if (!gtmId || typeof gtmId !== "string") {
5382
+ console.error(
5383
+ "useGTM: A valid GTM Container ID is required (format: GTM-XXXXX)."
5384
+ );
5385
+ return;
5386
+ }
5387
+ if (isInitialized.current) return;
5388
+ const alreadyLoaded = document.querySelector(
5389
+ `script[src*="googletagmanager.com/gtm.js?id=${gtmId}"]`
5390
+ );
5391
+ if (alreadyLoaded) {
5392
+ window.dataLayer = window.dataLayer || [];
5393
+ isInitialized.current = true;
5394
+ return;
5395
+ }
5396
+ window.dataLayer = window.dataLayer || [];
5397
+ window.dataLayer.push({
5398
+ "gtm.start": (/* @__PURE__ */ new Date()).getTime(),
5399
+ event: "gtm.js"
5400
+ });
5401
+ const firstScript = document.getElementsByTagName("script")[0];
5402
+ const script = document.createElement("script");
5403
+ script.async = true;
5404
+ script.src = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`;
5405
+ firstScript.parentNode?.insertBefore(script, firstScript);
5406
+ scriptRef.current = script;
5407
+ isInitialized.current = true;
5408
+ return () => {
5409
+ if (scriptRef.current) {
5410
+ scriptRef.current.parentNode?.removeChild(scriptRef.current);
5411
+ scriptRef.current = null;
5412
+ }
5413
+ isInitialized.current = false;
5414
+ };
5415
+ }, [gtmId, isGA4Allowed]);
5416
+ const addNoscriptIframe = (0, import_react14.useCallback)(() => {
5417
+ if (!isGA4Allowed()) return;
5418
+ if (document.querySelector('iframe[src*="googletagmanager.com/ns.html"]'))
5419
+ return;
5420
+ const noscript = document.createElement("noscript");
5421
+ const iframe = document.createElement("iframe");
5422
+ iframe.src = `https://www.googletagmanager.com/ns.html?id=${gtmId}`;
5423
+ iframe.height = "0";
5424
+ iframe.width = "0";
5425
+ iframe.style.display = "none";
5426
+ iframe.style.visibility = "hidden";
5427
+ noscript.appendChild(iframe);
5428
+ document.body.insertBefore(noscript, document.body.firstChild);
5429
+ }, [gtmId, isGA4Allowed]);
5430
+ const trackEvent = (0, import_react14.useCallback)(
5431
+ (eventName, eventParams = {}) => {
5432
+ if (!isInitialized.current) {
5433
+ console.warn(
5434
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5435
+ );
5436
+ return;
5437
+ }
5438
+ if (!eventName || typeof eventName !== "string") {
5439
+ console.error("useGTM: A valid event name is required.");
5440
+ return;
5441
+ }
5442
+ const payload = { event: eventName, ...eventParams };
5443
+ window.dataLayer.push(payload);
5444
+ },
5445
+ []
5446
+ );
5447
+ const trackPageView = (0, import_react14.useCallback)(
5448
+ (pagePath, pageTitle = document.title) => {
5449
+ trackEvent("page_view", {
5450
+ page_path: pagePath,
5451
+ page_title: pageTitle,
5452
+ page_location: window.location.href
5453
+ });
5454
+ },
5455
+ [trackEvent]
5456
+ );
5457
+ const setUserProperty = (0, import_react14.useCallback)(
5458
+ (propertyName, value) => {
5459
+ if (!isInitialized.current) {
5460
+ console.warn(
5461
+ "useGTM: Not initialized. Ensure a valid GTM Container ID was provided."
5462
+ );
5463
+ return;
5464
+ }
5465
+ const payload = {
5466
+ event: "user_property",
5467
+ user_property_name: propertyName,
5468
+ user_property_value: value
5469
+ };
5470
+ window.dataLayer.push(payload);
5471
+ },
5472
+ []
5473
+ );
5474
+ const directGtag = (0, import_react14.useCallback)(
5475
+ (command, ...args) => {
5476
+ if (!isGA4Allowed()) return;
5477
+ if (!window.gtag) {
5478
+ console.warn(
5479
+ "useGTM: window.gtag is not available. Load gtag.js separately to use this method."
5480
+ );
5481
+ return;
5482
+ }
5483
+ window.gtag(command, ...args);
5484
+ },
5485
+ [isGA4Allowed]
5486
+ );
5487
+ return {
5488
+ trackEvent,
5489
+ trackPageView,
5490
+ setUserProperty,
5491
+ directGtag,
5492
+ addNoscriptIframe
5493
+ };
5494
+ }
5495
+
5496
+ // src/widget/hooks/useTransactionPolling.ts
5336
5497
  var FAST_POLL_INTERVAL_MS = 1500;
5337
5498
  var NORMAL_POLL_INTERVAL_MS = 2500;
5338
5499
  var POLL_TIMEOUT_MS = 5 * 60 * 1e3;
@@ -5340,19 +5501,28 @@ function useTransactionPolling() {
5340
5501
  const { setCurrentStep } = useDepositNavigation();
5341
5502
  const { setTransactionStatus, setErrorMessage } = useDepositTransaction();
5342
5503
  const { emitSuccess } = useTrustware();
5343
- const [state, setState] = (0, import_react14.useState)({
5504
+ const { selectedChain, selectedToken } = useDepositForm();
5505
+ const destinationConfig = (() => {
5506
+ try {
5507
+ return Trustware.getConfig();
5508
+ } catch {
5509
+ return void 0;
5510
+ }
5511
+ })();
5512
+ const { trackEvent } = useGTM(GTM_ID);
5513
+ const [state, setState] = (0, import_react15.useState)({
5344
5514
  isPolling: false,
5345
5515
  apiStatus: null,
5346
5516
  error: null,
5347
5517
  transaction: null,
5348
5518
  receiptSubmitted: false
5349
5519
  });
5350
- const pollingRef = (0, import_react14.useRef)(null);
5351
- const timeoutRef = (0, import_react14.useRef)(null);
5352
- const abortRef = (0, import_react14.useRef)(false);
5353
- const startTimeRef = (0, import_react14.useRef)(0);
5354
- const pollCountRef = (0, import_react14.useRef)(0);
5355
- const clearPolling = (0, import_react14.useCallback)(() => {
5520
+ const pollingRef = (0, import_react15.useRef)(null);
5521
+ const timeoutRef = (0, import_react15.useRef)(null);
5522
+ const abortRef = (0, import_react15.useRef)(false);
5523
+ const startTimeRef = (0, import_react15.useRef)(0);
5524
+ const pollCountRef = (0, import_react15.useRef)(0);
5525
+ const clearPolling = (0, import_react15.useCallback)(() => {
5356
5526
  abortRef.current = true;
5357
5527
  if (pollingRef.current) {
5358
5528
  clearTimeout(pollingRef.current);
@@ -5363,7 +5533,7 @@ function useTransactionPolling() {
5363
5533
  timeoutRef.current = null;
5364
5534
  }
5365
5535
  }, []);
5366
- const startPolling = (0, import_react14.useCallback)(
5536
+ const startPolling = (0, import_react15.useCallback)(
5367
5537
  async (intentId, _txHash) => {
5368
5538
  clearPolling();
5369
5539
  abortRef.current = false;
@@ -5410,6 +5580,13 @@ function useTransactionPolling() {
5410
5580
  }));
5411
5581
  setTransactionStatus("success");
5412
5582
  setCurrentStep("success");
5583
+ trackEvent("payment_completed", {
5584
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId ?? "unknown",
5585
+ from_token: selectedToken?.symbol ?? "unknown",
5586
+ to_chain: destinationConfig?.routes?.toChain ?? "unknown",
5587
+ to_token: destinationConfig?.routes?.toToken ?? "unknown",
5588
+ domain: window.origin
5589
+ });
5413
5590
  emitSuccess?.(tx);
5414
5591
  return;
5415
5592
  }
@@ -5472,20 +5649,27 @@ function useTransactionPolling() {
5472
5649
  },
5473
5650
  [
5474
5651
  clearPolling,
5652
+ destinationConfig?.routes.toChain,
5653
+ destinationConfig?.routes.toToken,
5475
5654
  emitSuccess,
5476
- setTransactionStatus,
5655
+ selectedChain?.axelarChainName,
5656
+ selectedChain?.chainId,
5657
+ selectedChain?.networkName,
5658
+ selectedToken?.symbol,
5477
5659
  setCurrentStep,
5478
- setErrorMessage
5660
+ setErrorMessage,
5661
+ setTransactionStatus,
5662
+ trackEvent
5479
5663
  ]
5480
5664
  );
5481
- const stopPolling = (0, import_react14.useCallback)(() => {
5665
+ const stopPolling = (0, import_react15.useCallback)(() => {
5482
5666
  clearPolling();
5483
5667
  setState((prev) => ({
5484
5668
  ...prev,
5485
5669
  isPolling: false
5486
5670
  }));
5487
5671
  }, [clearPolling]);
5488
- const resetPolling = (0, import_react14.useCallback)(() => {
5672
+ const resetPolling = (0, import_react15.useCallback)(() => {
5489
5673
  clearPolling();
5490
5674
  setState({
5491
5675
  isPolling: false,
@@ -5495,9 +5679,9 @@ function useTransactionPolling() {
5495
5679
  receiptSubmitted: false
5496
5680
  });
5497
5681
  }, [clearPolling]);
5498
- const clearPollingRef = (0, import_react14.useRef)(clearPolling);
5682
+ const clearPollingRef = (0, import_react15.useRef)(clearPolling);
5499
5683
  clearPollingRef.current = clearPolling;
5500
- (0, import_react14.useEffect)(() => {
5684
+ (0, import_react15.useEffect)(() => {
5501
5685
  return () => {
5502
5686
  clearPollingRef.current();
5503
5687
  };
@@ -5566,12 +5750,12 @@ function useWalletTokenState({
5566
5750
  selectedToken,
5567
5751
  setSelectedToken
5568
5752
  }) {
5569
- const [yourWalletTokens, setYourWalletTokens] = (0, import_react15.useState)([]);
5570
- const [walletTokensReloadNonce, setWalletTokensReloadNonce] = (0, import_react15.useState)(0);
5571
- const lastLoadedWalletRef = (0, import_react15.useRef)(null);
5753
+ const [yourWalletTokens, setYourWalletTokens] = (0, import_react16.useState)([]);
5754
+ const [walletTokensReloadNonce, setWalletTokensReloadNonce] = (0, import_react16.useState)(0);
5755
+ const lastLoadedWalletRef = (0, import_react16.useRef)(null);
5572
5756
  const { tokens } = useTokens(null);
5573
5757
  const { chains } = useChains();
5574
- (0, import_react15.useEffect)(() => {
5758
+ (0, import_react16.useEffect)(() => {
5575
5759
  if (!walletAddress || chains.length === 0 || tokens.length === 0) {
5576
5760
  setYourWalletTokens([]);
5577
5761
  if (!walletAddress) {
@@ -5790,14 +5974,14 @@ function mapWalletTokens(balances, chains, tokens) {
5790
5974
 
5791
5975
  // src/widget/context/DepositContext.tsx
5792
5976
  var import_jsx_runtime2 = require("react/jsx-runtime");
5793
- var DepositContext = (0, import_react16.createContext)(
5977
+ var DepositContext = (0, import_react17.createContext)(
5794
5978
  void 0
5795
5979
  );
5796
- var DepositNavigationContext = (0, import_react16.createContext)(void 0);
5797
- var DepositWalletContext = (0, import_react16.createContext)(void 0);
5798
- var DepositFormContext = (0, import_react16.createContext)(void 0);
5799
- var DepositTransactionContext = (0, import_react16.createContext)(void 0);
5800
- var DepositUiContext = (0, import_react16.createContext)(void 0);
5980
+ var DepositNavigationContext = (0, import_react17.createContext)(void 0);
5981
+ var DepositWalletContext = (0, import_react17.createContext)(void 0);
5982
+ var DepositFormContext = (0, import_react17.createContext)(void 0);
5983
+ var DepositTransactionContext = (0, import_react17.createContext)(void 0);
5984
+ var DepositUiContext = (0, import_react17.createContext)(void 0);
5801
5985
  function DepositProvider({
5802
5986
  children,
5803
5987
  initialStep = "home"
@@ -5819,12 +6003,12 @@ function DepositProvider({
5819
6003
  connectWallet,
5820
6004
  disconnectWallet
5821
6005
  } = useWalletSessionState();
5822
- const [amountInputMode, setAmountInputMode] = (0, import_react16.useState)(
6006
+ const [amountInputMode, setAmountInputMode] = (0, import_react17.useState)(
5823
6007
  "usd"
5824
6008
  );
5825
- const [selectedToken, setSelectedToken] = (0, import_react16.useState)(null);
5826
- const [selectedChain, setSelectedChain] = (0, import_react16.useState)(null);
5827
- const [amount, setAmount] = (0, import_react16.useState)("");
6009
+ const [selectedToken, setSelectedToken] = (0, import_react17.useState)(null);
6010
+ const [selectedChain, setSelectedChain] = (0, import_react17.useState)(null);
6011
+ const [amount, setAmount] = (0, import_react17.useState)("");
5828
6012
  const { yourWalletTokens, setYourWalletTokens, reloadWalletTokens } = useWalletTokenState({
5829
6013
  walletAddress,
5830
6014
  selectedChain,
@@ -5832,12 +6016,12 @@ function DepositProvider({
5832
6016
  selectedToken,
5833
6017
  setSelectedToken
5834
6018
  });
5835
- const [transactionStatus, setTransactionStatus] = (0, import_react16.useState)("idle");
5836
- const [transactionHash, setTransactionHash] = (0, import_react16.useState)(null);
5837
- const [errorMessage, setErrorMessage] = (0, import_react16.useState)(null);
5838
- const [intentId, setIntentId] = (0, import_react16.useState)(null);
5839
- const [paymentMethod, setPaymentMethod] = (0, import_react16.useState)("crypto");
5840
- const resetState = import_react16.default.useCallback(() => {
6019
+ const [transactionStatus, setTransactionStatus] = (0, import_react17.useState)("idle");
6020
+ const [transactionHash, setTransactionHash] = (0, import_react17.useState)(null);
6021
+ const [errorMessage, setErrorMessage] = (0, import_react17.useState)(null);
6022
+ const [intentId, setIntentId] = (0, import_react17.useState)(null);
6023
+ const [paymentMethod, setPaymentMethod] = (0, import_react17.useState)("crypto");
6024
+ const resetState = import_react17.default.useCallback(() => {
5841
6025
  resetNavigation();
5842
6026
  setSelectedToken(null);
5843
6027
  setSelectedChain(null);
@@ -5850,7 +6034,7 @@ function DepositProvider({
5850
6034
  setPaymentMethod("crypto");
5851
6035
  reloadWalletTokens();
5852
6036
  }, [reloadWalletTokens, resetNavigation]);
5853
- const navigationValue = (0, import_react16.useMemo)(
6037
+ const navigationValue = (0, import_react17.useMemo)(
5854
6038
  () => ({
5855
6039
  currentStep,
5856
6040
  setCurrentStep,
@@ -5868,7 +6052,7 @@ function DepositProvider({
5868
6052
  stepHistory
5869
6053
  ]
5870
6054
  );
5871
- const walletValue = (0, import_react16.useMemo)(
6055
+ const walletValue = (0, import_react17.useMemo)(
5872
6056
  () => ({
5873
6057
  selectedWallet,
5874
6058
  walletAddress,
@@ -5888,7 +6072,7 @@ function DepositProvider({
5888
6072
  yourWalletTokens
5889
6073
  ]
5890
6074
  );
5891
- const formValue = (0, import_react16.useMemo)(
6075
+ const formValue = (0, import_react17.useMemo)(
5892
6076
  () => ({
5893
6077
  selectedToken,
5894
6078
  setSelectedToken,
@@ -5910,7 +6094,7 @@ function DepositProvider({
5910
6094
  setPaymentMethod
5911
6095
  ]
5912
6096
  );
5913
- const transactionValue = (0, import_react16.useMemo)(
6097
+ const transactionValue = (0, import_react17.useMemo)(
5914
6098
  () => ({
5915
6099
  transactionStatus,
5916
6100
  setTransactionStatus,
@@ -5923,14 +6107,14 @@ function DepositProvider({
5923
6107
  }),
5924
6108
  [errorMessage, intentId, transactionHash, transactionStatus]
5925
6109
  );
5926
- const uiValue = (0, import_react16.useMemo)(
6110
+ const uiValue = (0, import_react17.useMemo)(
5927
6111
  () => ({
5928
6112
  resolvedTheme,
5929
6113
  toggleTheme
5930
6114
  }),
5931
6115
  [resolvedTheme, toggleTheme]
5932
6116
  );
5933
- const value = (0, import_react16.useMemo)(
6117
+ const value = (0, import_react17.useMemo)(
5934
6118
  () => ({
5935
6119
  ...navigationValue,
5936
6120
  ...walletValue,
@@ -5943,7 +6127,7 @@ function DepositProvider({
5943
6127
  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 }) }) }) }) }) });
5944
6128
  }
5945
6129
  function useRequiredContext(context, name) {
5946
- const value = (0, import_react16.useContext)(context);
6130
+ const value = (0, import_react17.useContext)(context);
5947
6131
  if (value === void 0) {
5948
6132
  throw new Error(`${name} must be used within a DepositProvider`);
5949
6133
  }
@@ -5966,7 +6150,7 @@ function useDepositUi() {
5966
6150
  }
5967
6151
 
5968
6152
  // src/widget/components/AmountSlider.tsx
5969
- var import_react17 = require("react");
6153
+ var import_react18 = require("react");
5970
6154
  var import_jsx_runtime3 = require("react/jsx-runtime");
5971
6155
  var roundToNiceNumber = (value, range) => {
5972
6156
  let roundingFactor;
@@ -6016,7 +6200,7 @@ function AmountSlider({
6016
6200
  style,
6017
6201
  disabled = false
6018
6202
  }) {
6019
- const generateTickMarks = (0, import_react17.useCallback)(
6203
+ const generateTickMarks = (0, import_react18.useCallback)(
6020
6204
  (minValue, maxValue) => {
6021
6205
  const range = maxValue - minValue;
6022
6206
  if (range <= 0) {
@@ -6064,25 +6248,25 @@ function AmountSlider({
6064
6248
  },
6065
6249
  []
6066
6250
  );
6067
- const tickMarks = (0, import_react17.useMemo)(
6251
+ const tickMarks = (0, import_react18.useMemo)(
6068
6252
  () => generateTickMarks(min, max),
6069
6253
  [generateTickMarks, min, max]
6070
6254
  );
6071
- const getPercentage = (0, import_react17.useCallback)(() => {
6255
+ const getPercentage = (0, import_react18.useCallback)(() => {
6072
6256
  const range = max - min;
6073
6257
  if (range <= 0) return 0;
6074
6258
  const clampedValue = Math.min(Math.max(value, min), max);
6075
6259
  return (clampedValue - min) / range * 100;
6076
6260
  }, [max, min, value]);
6077
- const percentage = (0, import_react17.useMemo)(() => getPercentage(), [getPercentage]);
6078
- const handleChange = (0, import_react17.useCallback)(
6261
+ const percentage = (0, import_react18.useMemo)(() => getPercentage(), [getPercentage]);
6262
+ const handleChange = (0, import_react18.useCallback)(
6079
6263
  (e2) => {
6080
6264
  const newValue = Math.min(Math.max(Number(e2.target.value), min), max);
6081
6265
  onChange(newValue);
6082
6266
  },
6083
6267
  [onChange, min, max]
6084
6268
  );
6085
- const handleTickClick = (0, import_react17.useCallback)(
6269
+ const handleTickClick = (0, import_react18.useCallback)(
6086
6270
  (tickValue) => {
6087
6271
  if (disabled) return;
6088
6272
  onChange(tickValue);
@@ -6300,7 +6484,7 @@ function AmountSlider({
6300
6484
  }
6301
6485
 
6302
6486
  // src/widget/components/AmountInputDisplay.tsx
6303
- var import_react18 = require("react");
6487
+ var import_react19 = require("react");
6304
6488
  var import_jsx_runtime4 = require("react/jsx-runtime");
6305
6489
  function formatDisplayAmount(value) {
6306
6490
  if (!Number.isFinite(value) || value <= 0) return "0";
@@ -6339,8 +6523,8 @@ function AmountInputDisplay({
6339
6523
  style,
6340
6524
  inputAriaLabel = "Deposit amount"
6341
6525
  }) {
6342
- const [isEditing, setIsEditing] = (0, import_react18.useState)(false);
6343
- const inputRef = (0, import_react18.useRef)(null);
6526
+ const [isEditing, setIsEditing] = (0, import_react19.useState)(false);
6527
+ const inputRef = (0, import_react19.useRef)(null);
6344
6528
  const handleAmountClick = () => {
6345
6529
  if (isFixedAmount) return;
6346
6530
  const isZeroish = !amount || parseFloat(amount) === 0;
@@ -6555,7 +6739,7 @@ function CircularProgress({
6555
6739
  }
6556
6740
 
6557
6741
  // src/widget/components/Dialog.tsx
6558
- var import_react20 = require("react");
6742
+ var import_react21 = require("react");
6559
6743
  var import_jsx_runtime7 = require("react/jsx-runtime");
6560
6744
  var Dialog = ({
6561
6745
  open,
@@ -6567,11 +6751,11 @@ var Dialog = ({
6567
6751
  confirmText = "Close Anyway",
6568
6752
  isDark = false
6569
6753
  }) => {
6570
- const dialogRef = (0, import_react20.useRef)(null);
6571
- const overlayRef = (0, import_react20.useRef)(null);
6572
- const firstButtonRef = (0, import_react20.useRef)(null);
6573
- const lastButtonRef = (0, import_react20.useRef)(null);
6574
- (0, import_react20.useEffect)(() => {
6754
+ const dialogRef = (0, import_react21.useRef)(null);
6755
+ const overlayRef = (0, import_react21.useRef)(null);
6756
+ const firstButtonRef = (0, import_react21.useRef)(null);
6757
+ const lastButtonRef = (0, import_react21.useRef)(null);
6758
+ (0, import_react21.useEffect)(() => {
6575
6759
  const handleEscape = (e2) => {
6576
6760
  if (e2.key === "Escape" && open) {
6577
6761
  e2.preventDefault();
@@ -6585,7 +6769,7 @@ var Dialog = ({
6585
6769
  document.removeEventListener("keydown", handleEscape);
6586
6770
  };
6587
6771
  }, [open, onCancel]);
6588
- (0, import_react20.useEffect)(() => {
6772
+ (0, import_react21.useEffect)(() => {
6589
6773
  const handleTabKey = (e2) => {
6590
6774
  if (!open) return;
6591
6775
  if (e2.key === "Tab") {
@@ -6609,7 +6793,7 @@ var Dialog = ({
6609
6793
  document.removeEventListener("keydown", handleTabKey);
6610
6794
  };
6611
6795
  }, [open]);
6612
- (0, import_react20.useEffect)(() => {
6796
+ (0, import_react21.useEffect)(() => {
6613
6797
  if (open) {
6614
6798
  const originalStyle = window.getComputedStyle(document.body).overflow;
6615
6799
  document.body.style.overflow = "hidden";
@@ -6907,7 +7091,7 @@ function TransactionHashLink({
6907
7091
  }
6908
7092
 
6909
7093
  // src/widget/components/SwipeToConfirmTokens.tsx
6910
- var import_react21 = require("react");
7094
+ var import_react22 = require("react");
6911
7095
  var import_jsx_runtime9 = require("react/jsx-runtime");
6912
7096
  function SwipeToConfirmTokens({
6913
7097
  fromToken,
@@ -6922,33 +7106,33 @@ function SwipeToConfirmTokens({
6922
7106
  style,
6923
7107
  text
6924
7108
  }) {
6925
- const [dragX, setDragX] = (0, import_react21.useState)(0);
6926
- const [isDragging, setIsDragging] = (0, import_react21.useState)(false);
6927
- const [isComplete, setIsComplete] = (0, import_react21.useState)(false);
6928
- const trackRef = (0, import_react21.useRef)(null);
6929
- const thumbRef = (0, import_react21.useRef)(null);
6930
- const [isLongPressing, setIsLongPressing] = (0, import_react21.useState)(false);
6931
- const [longPressProgress, setLongPressProgress] = (0, import_react21.useState)(0);
6932
- const longPressTimerRef = (0, import_react21.useRef)(null);
6933
- const longPressStartRef = (0, import_react21.useRef)(null);
6934
- const longPressAnimationRef = (0, import_react21.useRef)(null);
7109
+ const [dragX, setDragX] = (0, import_react22.useState)(0);
7110
+ const [isDragging, setIsDragging] = (0, import_react22.useState)(false);
7111
+ const [isComplete, setIsComplete] = (0, import_react22.useState)(false);
7112
+ const trackRef = (0, import_react22.useRef)(null);
7113
+ const thumbRef = (0, import_react22.useRef)(null);
7114
+ const [isLongPressing, setIsLongPressing] = (0, import_react22.useState)(false);
7115
+ const [longPressProgress, setLongPressProgress] = (0, import_react22.useState)(0);
7116
+ const longPressTimerRef = (0, import_react22.useRef)(null);
7117
+ const longPressStartRef = (0, import_react22.useRef)(null);
7118
+ const longPressAnimationRef = (0, import_react22.useRef)(null);
6935
7119
  const LONG_PRESS_DURATION = 1500;
6936
7120
  const thumbSize = 48;
6937
7121
  const padding = 4;
6938
7122
  const threshold = 0.8;
6939
- const getMaxDrag = (0, import_react21.useCallback)(() => {
7123
+ const getMaxDrag = (0, import_react22.useCallback)(() => {
6940
7124
  if (!trackRef.current) return 0;
6941
7125
  return trackRef.current.offsetWidth - thumbSize - padding * 2;
6942
7126
  }, []);
6943
- const getProgress = (0, import_react21.useCallback)(() => {
7127
+ const getProgress = (0, import_react22.useCallback)(() => {
6944
7128
  const maxDrag = getMaxDrag();
6945
7129
  return maxDrag > 0 ? dragX / maxDrag : 0;
6946
7130
  }, [dragX, getMaxDrag]);
6947
- const handleDragStart = (0, import_react21.useCallback)(() => {
7131
+ const handleDragStart = (0, import_react22.useCallback)(() => {
6948
7132
  if (disabled || isComplete) return;
6949
7133
  setIsDragging(true);
6950
7134
  }, [disabled, isComplete]);
6951
- const handleDragMove = (0, import_react21.useCallback)(
7135
+ const handleDragMove = (0, import_react22.useCallback)(
6952
7136
  (clientX) => {
6953
7137
  if (!isDragging || !trackRef.current || isComplete) return;
6954
7138
  const rect = trackRef.current.getBoundingClientRect();
@@ -6959,7 +7143,7 @@ function SwipeToConfirmTokens({
6959
7143
  },
6960
7144
  [isDragging, isComplete, getMaxDrag]
6961
7145
  );
6962
- const handleDragEnd = (0, import_react21.useCallback)(() => {
7146
+ const handleDragEnd = (0, import_react22.useCallback)(() => {
6963
7147
  if (!isDragging) return;
6964
7148
  setIsDragging(false);
6965
7149
  const progress2 = getProgress();
@@ -6972,14 +7156,14 @@ function SwipeToConfirmTokens({
6972
7156
  setDragX(0);
6973
7157
  }
6974
7158
  }, [isDragging, getProgress, getMaxDrag, onConfirm]);
6975
- const triggerConfirmation = (0, import_react21.useCallback)(() => {
7159
+ const triggerConfirmation = (0, import_react22.useCallback)(() => {
6976
7160
  if (isComplete) return;
6977
7161
  setDragX(getMaxDrag());
6978
7162
  setIsComplete(true);
6979
7163
  if (navigator.vibrate) navigator.vibrate(50);
6980
7164
  setTimeout(() => onConfirm(), 150);
6981
7165
  }, [isComplete, getMaxDrag, onConfirm]);
6982
- const cancelLongPress = (0, import_react21.useCallback)(() => {
7166
+ const cancelLongPress = (0, import_react22.useCallback)(() => {
6983
7167
  setIsLongPressing(false);
6984
7168
  setLongPressProgress(0);
6985
7169
  longPressStartRef.current = null;
@@ -6992,7 +7176,7 @@ function SwipeToConfirmTokens({
6992
7176
  longPressAnimationRef.current = null;
6993
7177
  }
6994
7178
  }, []);
6995
- const startLongPress = (0, import_react21.useCallback)(() => {
7179
+ const startLongPress = (0, import_react22.useCallback)(() => {
6996
7180
  if (disabled || isComplete || isDragging) return;
6997
7181
  setIsLongPressing(true);
6998
7182
  longPressStartRef.current = Date.now();
@@ -7010,7 +7194,7 @@ function SwipeToConfirmTokens({
7010
7194
  };
7011
7195
  longPressAnimationRef.current = requestAnimationFrame(animateProgress);
7012
7196
  }, [disabled, isComplete, isDragging, triggerConfirmation, cancelLongPress]);
7013
- const handleKeyDown = (0, import_react21.useCallback)(
7197
+ const handleKeyDown = (0, import_react22.useCallback)(
7014
7198
  (e2) => {
7015
7199
  if (disabled || isComplete) return;
7016
7200
  if (e2.key === "Enter" || e2.key === " ") {
@@ -7020,7 +7204,7 @@ function SwipeToConfirmTokens({
7020
7204
  },
7021
7205
  [disabled, isComplete, startLongPress]
7022
7206
  );
7023
- const handleKeyUp = (0, import_react21.useCallback)(
7207
+ const handleKeyUp = (0, import_react22.useCallback)(
7024
7208
  (e2) => {
7025
7209
  if (e2.key === "Enter" || e2.key === " ") {
7026
7210
  e2.preventDefault();
@@ -7029,7 +7213,7 @@ function SwipeToConfirmTokens({
7029
7213
  },
7030
7214
  [cancelLongPress]
7031
7215
  );
7032
- (0, import_react21.useEffect)(() => {
7216
+ (0, import_react22.useEffect)(() => {
7033
7217
  return () => {
7034
7218
  if (longPressTimerRef.current) clearTimeout(longPressTimerRef.current);
7035
7219
  if (longPressAnimationRef.current)
@@ -7040,15 +7224,15 @@ function SwipeToConfirmTokens({
7040
7224
  e2.preventDefault();
7041
7225
  handleDragStart();
7042
7226
  };
7043
- const handleMouseMove = (0, import_react21.useCallback)(
7227
+ const handleMouseMove = (0, import_react22.useCallback)(
7044
7228
  (e2) => handleDragMove(e2.clientX),
7045
7229
  [handleDragMove]
7046
7230
  );
7047
- const handleMouseUp = (0, import_react21.useCallback)(() => handleDragEnd(), [handleDragEnd]);
7231
+ const handleMouseUp = (0, import_react22.useCallback)(() => handleDragEnd(), [handleDragEnd]);
7048
7232
  const handleTouchStart = () => handleDragStart();
7049
7233
  const handleTouchMove = (e2) => handleDragMove(e2.touches[0].clientX);
7050
7234
  const handleTouchEnd = () => handleDragEnd();
7051
- (0, import_react21.useEffect)(() => {
7235
+ (0, import_react22.useEffect)(() => {
7052
7236
  if (isDragging) {
7053
7237
  window.addEventListener("mousemove", handleMouseMove);
7054
7238
  window.addEventListener("mouseup", handleMouseUp);
@@ -7060,7 +7244,29 @@ function SwipeToConfirmTokens({
7060
7244
  }, [isDragging, handleMouseMove, handleMouseUp]);
7061
7245
  const progress = getProgress();
7062
7246
  const effectiveProgress = isLongPressing ? longPressProgress : progress;
7063
- const getTokenInitials = (symbol) => symbol?.slice(0, 2).toUpperCase();
7247
+ const [blinkOpacity, setBlinkOpacity] = (0, import_react22.useState)(1);
7248
+ (0, import_react22.useEffect)(() => {
7249
+ if (disabled || isComplete || isDragging || isLongPressing) {
7250
+ setBlinkOpacity(1);
7251
+ return;
7252
+ }
7253
+ let direction = -1;
7254
+ const interval = setInterval(() => {
7255
+ setBlinkOpacity((prev) => {
7256
+ const newVal = prev + direction * 0.8;
7257
+ if (newVal <= 0.2) {
7258
+ direction = 1;
7259
+ return 0.2;
7260
+ }
7261
+ if (newVal >= 1) {
7262
+ direction = -1;
7263
+ return 1;
7264
+ }
7265
+ return newVal;
7266
+ });
7267
+ }, 700);
7268
+ return () => clearInterval(interval);
7269
+ }, [disabled, isComplete, isDragging, isLongPressing]);
7064
7270
  const getAriaLabel = () => {
7065
7271
  if (!isWalletConnected) return "Connect your wallet to deposit";
7066
7272
  if (isComplete) return "Transaction confirmed";
@@ -7280,27 +7486,52 @@ function SwipeToConfirmTokens({
7280
7486
  onTouchStart: handleTouchStart,
7281
7487
  onTouchMove: handleTouchMove,
7282
7488
  onTouchEnd: handleTouchEnd,
7283
- children: fromToken.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7284
- "img",
7489
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7490
+ ImageLoader,
7285
7491
  {
7286
- src: fromToken.iconUrl,
7492
+ src: fromToken.iconUrl || "",
7287
7493
  alt: fromToken.symbol,
7288
- style: {
7494
+ imgStyle: {
7289
7495
  width: "2.5rem",
7290
7496
  height: "2.5rem",
7291
7497
  objectFit: "contain",
7292
7498
  borderRadius: "9999px"
7293
- }
7294
- }
7295
- ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7296
- "span",
7297
- {
7298
- style: {
7299
- fontSize: fontSize.sm,
7300
- fontWeight: fontWeight.bold,
7301
- color: colors.white
7302
7499
  },
7303
- children: getTokenInitials(fromToken.symbol)
7500
+ retry: 1,
7501
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7502
+ "span",
7503
+ {
7504
+ style: {
7505
+ fontSize: fontSize.sm,
7506
+ fontWeight: fontWeight.bold,
7507
+ color: colors.white,
7508
+ opacity: blinkOpacity,
7509
+ transition: "opacity 0.5s ease-in-out"
7510
+ },
7511
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7512
+ "svg",
7513
+ {
7514
+ style: {
7515
+ width: "2rem",
7516
+ height: "2rem",
7517
+ color: colors.zinc[500]
7518
+ },
7519
+ fill: "none",
7520
+ stroke: "currentColor",
7521
+ viewBox: "0 0 24 24",
7522
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7523
+ "path",
7524
+ {
7525
+ strokeLinecap: "round",
7526
+ strokeLinejoin: "round",
7527
+ strokeWidth: 2,
7528
+ d: "M9 5l7 7-7 7"
7529
+ }
7530
+ )
7531
+ }
7532
+ )
7533
+ }
7534
+ )
7304
7535
  }
7305
7536
  )
7306
7537
  }
@@ -7336,47 +7567,6 @@ function SwipeToConfirmTokens({
7336
7567
  }
7337
7568
  )
7338
7569
  }
7339
- ),
7340
- !toTokenIcon && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7341
- "div",
7342
- {
7343
- style: {
7344
- position: "absolute",
7345
- top: "50%",
7346
- transform: "translateY(-50%)",
7347
- width: "3rem",
7348
- height: "3rem",
7349
- borderRadius: "9999px",
7350
- display: "flex",
7351
- alignItems: "center",
7352
- justifyContent: "center",
7353
- transition: "opacity 0.2s",
7354
- right: `${padding}px`,
7355
- opacity: 0.3 + effectiveProgress * 0.7
7356
- },
7357
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7358
- "svg",
7359
- {
7360
- style: {
7361
- width: "1.5rem",
7362
- height: "1.5rem",
7363
- color: colors.white
7364
- },
7365
- fill: "none",
7366
- stroke: "currentColor",
7367
- viewBox: "0 0 24 24",
7368
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7369
- "path",
7370
- {
7371
- strokeLinecap: "round",
7372
- strokeLinejoin: "round",
7373
- strokeWidth: 2,
7374
- d: "M9 5l7 7-7 7"
7375
- }
7376
- )
7377
- }
7378
- )
7379
- }
7380
7570
  )
7381
7571
  ]
7382
7572
  }
@@ -7489,7 +7679,7 @@ function ThemeToggle({
7489
7679
  }
7490
7680
 
7491
7681
  // src/widget/components/Toast.tsx
7492
- var import_react22 = require("react");
7682
+ var import_react23 = require("react");
7493
7683
  var import_jsx_runtime11 = require("react/jsx-runtime");
7494
7684
  var variantStyles = {
7495
7685
  default: {
@@ -7519,14 +7709,14 @@ function ToastItem({
7519
7709
  duration = 4e3,
7520
7710
  onDismiss
7521
7711
  }) {
7522
- const [isExiting, setIsExiting] = (0, import_react22.useState)(false);
7523
- (0, import_react22.useEffect)(() => {
7712
+ const [isExiting, setIsExiting] = (0, import_react23.useState)(false);
7713
+ (0, import_react23.useEffect)(() => {
7524
7714
  const timer = setTimeout(() => {
7525
7715
  setIsExiting(true);
7526
7716
  }, duration);
7527
7717
  return () => clearTimeout(timer);
7528
7718
  }, [duration]);
7529
- (0, import_react22.useEffect)(() => {
7719
+ (0, import_react23.useEffect)(() => {
7530
7720
  if (isExiting) {
7531
7721
  const exitTimer = setTimeout(() => {
7532
7722
  onDismiss(id);
@@ -7730,8 +7920,8 @@ function toast(data) {
7730
7920
  toast.error = (title, description) => toast({ title, description, variant: "destructive" });
7731
7921
  toast.success = (title, description) => toast({ title, description, variant: "success" });
7732
7922
  function ToastContainer() {
7733
- const [activeToasts, setActiveToasts] = (0, import_react22.useState)([]);
7734
- (0, import_react22.useEffect)(() => {
7923
+ const [activeToasts, setActiveToasts] = (0, import_react23.useState)([]);
7924
+ (0, import_react23.useEffect)(() => {
7735
7925
  const listener = (newToasts) => {
7736
7926
  setActiveToasts(newToasts);
7737
7927
  };
@@ -7743,7 +7933,7 @@ function ToastContainer() {
7743
7933
  }
7744
7934
  };
7745
7935
  }, []);
7746
- const handleDismiss = (0, import_react22.useCallback)((id) => {
7936
+ const handleDismiss = (0, import_react23.useCallback)((id) => {
7747
7937
  toasts = toasts.filter((t) => t.id !== id);
7748
7938
  notifyListeners();
7749
7939
  }, []);
@@ -7780,7 +7970,7 @@ function ToastContainer() {
7780
7970
  }
7781
7971
 
7782
7972
  // src/widget/components/TokenSwipePill.tsx
7783
- var import_react23 = __toESM(require("react"), 1);
7973
+ var import_react24 = __toESM(require("react"), 1);
7784
7974
  var import_jsx_runtime12 = require("react/jsx-runtime");
7785
7975
  var MAX_VISIBLE_DOTS = 5;
7786
7976
  function TokenSwipePill({
@@ -7792,10 +7982,10 @@ function TokenSwipePill({
7792
7982
  walletAddress,
7793
7983
  style
7794
7984
  }) {
7795
- const [isDragging, setIsDragging] = (0, import_react23.useState)(false);
7796
- const [dragOffset, setDragOffset] = (0, import_react23.useState)(0);
7797
- const startXRef = (0, import_react23.useRef)(0);
7798
- const containerRef = (0, import_react23.useRef)(null);
7985
+ const [isDragging, setIsDragging] = (0, import_react24.useState)(false);
7986
+ const [dragOffset, setDragOffset] = (0, import_react24.useState)(0);
7987
+ const startXRef = (0, import_react24.useRef)(0);
7988
+ const containerRef = (0, import_react24.useRef)(null);
7799
7989
  const currentIndex = tokens.findIndex(
7800
7990
  (t) => normalizeAddress2(
7801
7991
  t.address,
@@ -7816,11 +8006,11 @@ function TokenSwipePill({
7816
8006
  }
7817
8007
  return pos;
7818
8008
  };
7819
- const handleDragStart = (0, import_react23.useCallback)((clientX) => {
8009
+ const handleDragStart = (0, import_react24.useCallback)((clientX) => {
7820
8010
  setIsDragging(true);
7821
8011
  startXRef.current = clientX;
7822
8012
  }, []);
7823
- const handleDragMove = (0, import_react23.useCallback)(
8013
+ const handleDragMove = (0, import_react24.useCallback)(
7824
8014
  (clientX) => {
7825
8015
  if (!isDragging) return;
7826
8016
  const delta = startXRef.current - clientX;
@@ -7828,7 +8018,7 @@ function TokenSwipePill({
7828
8018
  },
7829
8019
  [isDragging]
7830
8020
  );
7831
- const handleDragEnd = (0, import_react23.useCallback)(() => {
8021
+ const handleDragEnd = (0, import_react24.useCallback)(() => {
7832
8022
  if (!isDragging) return;
7833
8023
  setIsDragging(false);
7834
8024
  if (Math.abs(dragOffset) > swipeThreshold) {
@@ -7846,13 +8036,13 @@ function TokenSwipePill({
7846
8036
  e2.preventDefault();
7847
8037
  handleDragStart(e2.clientX);
7848
8038
  };
7849
- const handleMouseMove = (0, import_react23.useCallback)(
8039
+ const handleMouseMove = (0, import_react24.useCallback)(
7850
8040
  (e2) => {
7851
8041
  handleDragMove(e2.clientX);
7852
8042
  },
7853
8043
  [handleDragMove]
7854
8044
  );
7855
- const handleMouseUp = (0, import_react23.useCallback)(() => {
8045
+ const handleMouseUp = (0, import_react24.useCallback)(() => {
7856
8046
  handleDragEnd();
7857
8047
  }, [handleDragEnd]);
7858
8048
  const handleTouchStart = (e2) => {
@@ -7866,7 +8056,7 @@ function TokenSwipePill({
7866
8056
  const handleTouchEnd = () => {
7867
8057
  handleDragEnd();
7868
8058
  };
7869
- (0, import_react23.useEffect)(() => {
8059
+ (0, import_react24.useEffect)(() => {
7870
8060
  if (isDragging) {
7871
8061
  window.addEventListener("mousemove", handleMouseMove);
7872
8062
  window.addEventListener("mouseup", handleMouseUp);
@@ -7877,10 +8067,10 @@ function TokenSwipePill({
7877
8067
  }
7878
8068
  }, [isDragging, handleMouseMove, handleMouseUp]);
7879
8069
  const visualOffset = Math.max(-40, Math.min(40, dragOffset * 0.5));
7880
- const getTokenInitials = (symbol) => {
7881
- return symbol?.slice(0, 2).toUpperCase();
8070
+ const getChainInitials = (chain) => {
8071
+ return chain?.slice(0, 2).toUpperCase();
7882
8072
  };
7883
- const chainBadge = (0, import_react23.useMemo)(() => {
8073
+ const chainBadge = (0, import_react24.useMemo)(() => {
7884
8074
  const url = selectedToken.chainData?.chainIconURI || selectedToken.chainData?.iconUrl;
7885
8075
  return url?.toString();
7886
8076
  }, [selectedToken]);
@@ -7905,6 +8095,7 @@ function TokenSwipePill({
7905
8095
  alignItems: "flex-start",
7906
8096
  gap: spacing[2],
7907
8097
  padding: `${spacing[1.5]} ${spacing[4]}`,
8098
+ minWidth: "16.875rem",
7908
8099
  backgroundColor: colors.background,
7909
8100
  borderRadius: borderRadius.full,
7910
8101
  border: `1px solid ${colors.border}`,
@@ -7925,7 +8116,8 @@ function TokenSwipePill({
7925
8116
  style: {
7926
8117
  display: "flex",
7927
8118
  flexDirection: "column",
7928
- alignItems: "center"
8119
+ alignItems: "center",
8120
+ width: "70%"
7929
8121
  },
7930
8122
  children: [
7931
8123
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -8005,26 +8197,31 @@ function TokenSwipePill({
8005
8197
  alignItems: "center",
8006
8198
  justifyContent: "center"
8007
8199
  },
8008
- children: validateIconUrl(token.iconUrl, isCenter) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8009
- "img",
8200
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8201
+ ImageLoader,
8010
8202
  {
8011
8203
  src: validateIconUrl(token.iconUrl, isCenter),
8012
8204
  alt: token.symbol,
8013
- style: {
8205
+ imgStyle: {
8014
8206
  width: "2rem",
8015
8207
  height: "2rem",
8016
8208
  objectFit: "contain"
8017
- }
8018
- }
8019
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8020
- "span",
8021
- {
8022
- style: {
8023
- fontSize: fontSize.xs,
8024
- fontWeight: fontWeight.bold,
8025
- color: colors.zinc[800]
8026
8209
  },
8027
- children: getTokenInitials(token.symbol)
8210
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8211
+ "span",
8212
+ {
8213
+ style: {
8214
+ fontSize: fontSize.xs,
8215
+ fontWeight: fontWeight.bold,
8216
+ color: colors.zinc[800],
8217
+ width: "2rem",
8218
+ height: "2rem",
8219
+ objectFit: "contain",
8220
+ textAlign: "center"
8221
+ },
8222
+ children: token.symbol
8223
+ }
8224
+ )
8028
8225
  }
8029
8226
  )
8030
8227
  }
@@ -8047,16 +8244,27 @@ function TokenSwipePill({
8047
8244
  overflow: "hidden"
8048
8245
  },
8049
8246
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8050
- "img",
8247
+ ImageLoader,
8051
8248
  {
8052
- src: chainBadge,
8249
+ src: chainBadge || "",
8053
8250
  alt: selectedToken.chainData?.networkName,
8054
- style: {
8251
+ imgStyle: {
8055
8252
  width: "0.75rem",
8056
8253
  height: "0.75rem",
8057
8254
  borderRadius: "9999px",
8058
8255
  objectFit: "cover"
8059
- }
8256
+ },
8257
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8258
+ "span",
8259
+ {
8260
+ style: {
8261
+ fontSize: "10px"
8262
+ },
8263
+ children: getChainInitials(
8264
+ selectedToken.chainData?.networkName
8265
+ )
8266
+ }
8267
+ )
8060
8268
  }
8061
8269
  )
8062
8270
  }
@@ -8148,7 +8356,7 @@ function TokenSwipePill({
8148
8356
  const token = tokens[index];
8149
8357
  const prevIndex = uniqueIndices[i - 1];
8150
8358
  const showGap = i > 0 && index - prevIndex > 1;
8151
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react23.default.Fragment, { children: [
8359
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react24.default.Fragment, { children: [
8152
8360
  showGap && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8153
8361
  "span",
8154
8362
  {
@@ -8330,7 +8538,7 @@ function TokenSwipePill({
8330
8538
  }
8331
8539
 
8332
8540
  // src/widget/components/TransactionSteps.tsx
8333
- var import_react24 = require("react");
8541
+ var import_react25 = require("react");
8334
8542
  var import_jsx_runtime13 = require("react/jsx-runtime");
8335
8543
  var DEFAULT_LABELS = {
8336
8544
  confirming: "Confirming in wallet",
@@ -8370,14 +8578,14 @@ function TransactionSteps({
8370
8578
  style,
8371
8579
  stepLabels
8372
8580
  }) {
8373
- const labels = (0, import_react24.useMemo)(
8581
+ const labels = (0, import_react25.useMemo)(
8374
8582
  () => ({
8375
8583
  ...DEFAULT_LABELS,
8376
8584
  ...stepLabels
8377
8585
  }),
8378
8586
  [stepLabels]
8379
8587
  );
8380
- const steps = (0, import_react24.useMemo)(
8588
+ const steps = (0, import_react25.useMemo)(
8381
8589
  () => getSteps(transactionStatus, labels),
8382
8590
  [transactionStatus, labels]
8383
8591
  );
@@ -8536,7 +8744,7 @@ function TransactionSteps({
8536
8744
  }
8537
8745
 
8538
8746
  // src/widget/components/WidgetContainer.tsx
8539
- var import_react25 = require("react");
8747
+ var import_react26 = require("react");
8540
8748
  var import_jsx_runtime14 = require("react/jsx-runtime");
8541
8749
  var INJECTED_STYLES = ALL_THEME_STYLES + ALL_ANIMATION_STYLES;
8542
8750
  function WidgetContainer({
@@ -8545,8 +8753,8 @@ function WidgetContainer({
8545
8753
  className,
8546
8754
  style
8547
8755
  }) {
8548
- const [resolvedTheme, setResolvedTheme] = (0, import_react25.useState)("light");
8549
- (0, import_react25.useEffect)(() => {
8756
+ const [resolvedTheme, setResolvedTheme] = (0, import_react26.useState)("light");
8757
+ (0, import_react26.useEffect)(() => {
8550
8758
  if (theme === "system") {
8551
8759
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
8552
8760
  setResolvedTheme(mediaQuery.matches ? "dark" : "light");
@@ -8789,8 +8997,147 @@ function WidgetSecurityFooter({
8789
8997
  );
8790
8998
  }
8791
8999
 
8792
- // src/widget/components/Skeletons/LoadingSkeleton.tsx
9000
+ // src/widget/components/ImageLoader.tsx
9001
+ var import_react27 = require("react");
8793
9002
  var import_jsx_runtime17 = require("react/jsx-runtime");
9003
+ function Skeleton({
9004
+ background,
9005
+ height,
9006
+ borderRadius: borderRadius2
9007
+ }) {
9008
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9009
+ "div",
9010
+ {
9011
+ style: {
9012
+ background: background || "#eee",
9013
+ height: height || "50px",
9014
+ borderRadius: borderRadius2 || "100%"
9015
+ }
9016
+ }
9017
+ );
9018
+ }
9019
+ function ImageLoader({
9020
+ src,
9021
+ alt = "",
9022
+ retry = 0,
9023
+ retryDelay = 1e3,
9024
+ lazy: lazy2 = true,
9025
+ Fallback = null,
9026
+ // skeleton = null,
9027
+ imgStyle,
9028
+ onLoad,
9029
+ onError
9030
+ }) {
9031
+ const [status, setStatus] = (0, import_react27.useState)("idle");
9032
+ const [attempt, setAttempt] = (0, import_react27.useState)(0);
9033
+ const [srcIsEmpty, setSrcIsEmpty] = (0, import_react27.useState)(false);
9034
+ const imgRef = (0, import_react27.useRef)(null);
9035
+ const observerRef = (0, import_react27.useRef)(null);
9036
+ (0, import_react27.useEffect)(() => {
9037
+ if (status === "error" && attempt < retry) {
9038
+ const timer = setTimeout(() => {
9039
+ setAttempt((prev) => prev + 1);
9040
+ setStatus("loading");
9041
+ }, retryDelay);
9042
+ return () => clearTimeout(timer);
9043
+ }
9044
+ }, [status, attempt, retry, retryDelay]);
9045
+ const loadImage = () => {
9046
+ if (!src) {
9047
+ setSrcIsEmpty(true);
9048
+ return;
9049
+ }
9050
+ setStatus("loading");
9051
+ const img = new Image();
9052
+ img.src = src;
9053
+ img.onload = () => {
9054
+ setStatus("success");
9055
+ onLoad?.();
9056
+ };
9057
+ img.onerror = () => {
9058
+ setStatus("error");
9059
+ onError?.();
9060
+ };
9061
+ };
9062
+ (0, import_react27.useEffect)(() => {
9063
+ if (!lazy2) {
9064
+ setTimeout(() => {
9065
+ loadImage();
9066
+ }, 0);
9067
+ return;
9068
+ }
9069
+ observerRef.current = new IntersectionObserver(
9070
+ (entries) => {
9071
+ entries.forEach((entry) => {
9072
+ if (entry.isIntersecting) {
9073
+ loadImage();
9074
+ observerRef.current?.disconnect();
9075
+ }
9076
+ });
9077
+ },
9078
+ { threshold: 0.1 }
9079
+ );
9080
+ if (imgRef.current) {
9081
+ observerRef.current.observe(imgRef.current);
9082
+ }
9083
+ return () => observerRef.current?.disconnect();
9084
+ }, [lazy2, src, loadImage]);
9085
+ const showFallback = (0, import_react27.useMemo)(() => {
9086
+ return (status === "error" && attempt >= retry || srcIsEmpty) && Fallback;
9087
+ }, [status, attempt, retry, srcIsEmpty, Fallback]);
9088
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { ref: imgRef, style: { position: "relative" }, children: [
9089
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9090
+ Skeleton,
9091
+ {
9092
+ height: imgStyle?.height,
9093
+ borderRadius: imgStyle?.borderRadius
9094
+ }
9095
+ ),
9096
+ status === "success" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9097
+ "img",
9098
+ {
9099
+ src,
9100
+ alt,
9101
+ style: {
9102
+ // Css guards to prevent external styles from interfering with image rendering
9103
+ all: "revert",
9104
+ // Undo any inherited/global resets (e.g. Tailwind, normalize.css)
9105
+ display: "block",
9106
+ // Prevent inline baseline gap
9107
+ width: "100%",
9108
+ // Restore intended sizing
9109
+ maxWidth: "100%",
9110
+ // Prevent overflow
9111
+ height: "auto",
9112
+ // Maintain aspect ratio
9113
+ border: "none",
9114
+ // Strip any border resets
9115
+ padding: 0,
9116
+ // Strip padding resets
9117
+ margin: 0,
9118
+ // Strip margin resets
9119
+ objectFit: "cover",
9120
+ // Preserve visual intent
9121
+ verticalAlign: "middle",
9122
+ // Guard against inline stripping
9123
+ filter: "none",
9124
+ // Prevent inherited filter washes
9125
+ opacity: 1,
9126
+ // Prevent inherited opacity stripping
9127
+ mixBlendMode: "normal",
9128
+ // Prevent blend mode interference
9129
+ colorScheme: "normal",
9130
+ // Prevent dark-mode inversion
9131
+ ...imgStyle
9132
+ }
9133
+ }
9134
+ ),
9135
+ showFallback && Fallback
9136
+ ] });
9137
+ }
9138
+
9139
+ // src/widget/components/Skeletons/LoadingSkeleton.tsx
9140
+ var import_jsx_runtime18 = require("react/jsx-runtime");
8794
9141
  var containerStyle = {
8795
9142
  display: "flex",
8796
9143
  flexDirection: "column",
@@ -8826,11 +9173,11 @@ var lineSmStyle = {
8826
9173
  function LoadingSkeleton({
8827
9174
  style
8828
9175
  }) {
8829
- 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: [
8830
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: circleStyle, className: "tw-animate-pulse" }),
8831
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1 }, children: [
8832
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
8833
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9176
+ 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: [
9177
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: circleStyle, className: "tw-animate-pulse" }),
9178
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { flex: 1 }, children: [
9179
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: lineLgStyle, className: "tw-animate-pulse" }),
9180
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
8834
9181
  "div",
8835
9182
  {
8836
9183
  style: { ...lineSmStyle, marginTop: spacing[2] },
@@ -8857,14 +9204,14 @@ function clearPersistedState() {
8857
9204
  }
8858
9205
 
8859
9206
  // src/widget/app/WidgetShellOverlays.tsx
8860
- var import_jsx_runtime18 = require("react/jsx-runtime");
9207
+ var import_jsx_runtime19 = require("react/jsx-runtime");
8861
9208
  function ConfirmCloseDialog({
8862
9209
  open,
8863
9210
  onConfirm,
8864
9211
  onCancel,
8865
9212
  theme
8866
9213
  }) {
8867
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9214
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8868
9215
  Dialog,
8869
9216
  {
8870
9217
  open,
@@ -8883,7 +9230,7 @@ function InitErrorOverlay({
8883
9230
  onRefresh
8884
9231
  }) {
8885
9232
  if (!open) return null;
8886
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9233
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8887
9234
  "div",
8888
9235
  {
8889
9236
  role: "dialog",
@@ -8901,7 +9248,7 @@ function InitErrorOverlay({
8901
9248
  padding: spacing[6],
8902
9249
  borderRadius: "20px"
8903
9250
  },
8904
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
9251
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
8905
9252
  "div",
8906
9253
  {
8907
9254
  style: {
@@ -8916,7 +9263,7 @@ function InitErrorOverlay({
8916
9263
  border: `1px solid ${colors.border}`
8917
9264
  },
8918
9265
  children: [
8919
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9266
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8920
9267
  "h2",
8921
9268
  {
8922
9269
  id: "init-error-title",
@@ -8928,7 +9275,7 @@ function InitErrorOverlay({
8928
9275
  children: "API key validation failed"
8929
9276
  }
8930
9277
  ),
8931
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9278
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8932
9279
  "p",
8933
9280
  {
8934
9281
  id: "init-error-description",
@@ -8940,7 +9287,7 @@ function InitErrorOverlay({
8940
9287
  children: "We could not validate your Trustware API key. Please refresh to retry."
8941
9288
  }
8942
9289
  ),
8943
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
9290
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8944
9291
  "button",
8945
9292
  {
8946
9293
  onClick: onRefresh,
@@ -8971,7 +9318,7 @@ function InitErrorOverlay({
8971
9318
  }
8972
9319
 
8973
9320
  // src/widget/app/WidgetRouter.tsx
8974
- var import_react37 = require("react");
9321
+ var import_react39 = require("react");
8975
9322
 
8976
9323
  // src/widget/helpers/tokenAmount.ts
8977
9324
  function rawToDecimal(rawAmount, decimals) {
@@ -9034,12 +9381,12 @@ function resolveChainLabel(chain) {
9034
9381
  }
9035
9382
 
9036
9383
  // src/widget/features/token-selection/components/AvailableTokenListItem.tsx
9037
- var import_jsx_runtime19 = require("react/jsx-runtime");
9384
+ var import_jsx_runtime20 = require("react/jsx-runtime");
9038
9385
  function AvailableTokenListItem({
9039
9386
  onSelect,
9040
9387
  token
9041
9388
  }) {
9042
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
9389
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9043
9390
  "button",
9044
9391
  {
9045
9392
  type: "button",
@@ -9057,7 +9404,7 @@ function AvailableTokenListItem({
9057
9404
  cursor: "pointer"
9058
9405
  },
9059
9406
  children: [
9060
- token.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9407
+ token.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9061
9408
  "img",
9062
9409
  {
9063
9410
  src: token.iconUrl,
@@ -9078,7 +9425,7 @@ function AvailableTokenListItem({
9078
9425
  }
9079
9426
  }
9080
9427
  ) : null,
9081
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9428
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9082
9429
  "div",
9083
9430
  {
9084
9431
  style: {
@@ -9091,7 +9438,7 @@ function AvailableTokenListItem({
9091
9438
  flexShrink: 0,
9092
9439
  display: token.iconUrl ? "none" : "flex"
9093
9440
  },
9094
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9441
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9095
9442
  "span",
9096
9443
  {
9097
9444
  style: {
@@ -9104,8 +9451,8 @@ function AvailableTokenListItem({
9104
9451
  )
9105
9452
  }
9106
9453
  ),
9107
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9108
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9454
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9455
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9109
9456
  "div",
9110
9457
  {
9111
9458
  style: {
@@ -9113,7 +9460,7 @@ function AvailableTokenListItem({
9113
9460
  alignItems: "center",
9114
9461
  gap: spacing[1.5]
9115
9462
  },
9116
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9463
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9117
9464
  "span",
9118
9465
  {
9119
9466
  style: {
@@ -9129,7 +9476,7 @@ function AvailableTokenListItem({
9129
9476
  )
9130
9477
  }
9131
9478
  ),
9132
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9479
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9133
9480
  "span",
9134
9481
  {
9135
9482
  style: {
@@ -9144,7 +9491,7 @@ function AvailableTokenListItem({
9144
9491
  }
9145
9492
  )
9146
9493
  ] }),
9147
- token.balance !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9494
+ token.balance !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { textAlign: "right", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9148
9495
  "span",
9149
9496
  {
9150
9497
  style: {
@@ -9155,7 +9502,7 @@ function AvailableTokenListItem({
9155
9502
  children: formatTokenBalance(token.balance, token.decimals)
9156
9503
  }
9157
9504
  ) }) : null,
9158
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
9505
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9159
9506
  "svg",
9160
9507
  {
9161
9508
  style: {
@@ -9168,7 +9515,7 @@ function AvailableTokenListItem({
9168
9515
  fill: "none",
9169
9516
  stroke: "currentColor",
9170
9517
  strokeWidth: 2,
9171
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9518
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m9 18 6-6-6-6" })
9172
9519
  }
9173
9520
  )
9174
9521
  ]
@@ -9177,7 +9524,7 @@ function AvailableTokenListItem({
9177
9524
  }
9178
9525
 
9179
9526
  // src/widget/features/token-selection/components/ChainSelectorPanel.tsx
9180
- var import_jsx_runtime20 = require("react/jsx-runtime");
9527
+ var import_jsx_runtime21 = require("react/jsx-runtime");
9181
9528
  function ChainItem({
9182
9529
  chain,
9183
9530
  index,
@@ -9186,7 +9533,7 @@ function ChainItem({
9186
9533
  }) {
9187
9534
  const key = chain.id ?? chain.chainId ?? chain.networkIdentifier ?? `chain-${index}`;
9188
9535
  const label = resolveChainLabel(chain);
9189
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9536
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9190
9537
  "button",
9191
9538
  {
9192
9539
  type: "button",
@@ -9208,7 +9555,7 @@ function ChainItem({
9208
9555
  }
9209
9556
  },
9210
9557
  children: [
9211
- chain.chainIconURI ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9558
+ chain.chainIconURI ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9212
9559
  "img",
9213
9560
  {
9214
9561
  src: chain.chainIconURI,
@@ -9221,7 +9568,7 @@ function ChainItem({
9221
9568
  flexShrink: 0
9222
9569
  }
9223
9570
  }
9224
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9571
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9225
9572
  "div",
9226
9573
  {
9227
9574
  style: {
@@ -9234,7 +9581,7 @@ function ChainItem({
9234
9581
  justifyContent: "center",
9235
9582
  flexShrink: 0
9236
9583
  },
9237
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9584
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9238
9585
  "span",
9239
9586
  {
9240
9587
  style: {
@@ -9247,7 +9594,7 @@ function ChainItem({
9247
9594
  )
9248
9595
  }
9249
9596
  ),
9250
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9597
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9251
9598
  "span",
9252
9599
  {
9253
9600
  style: {
@@ -9262,7 +9609,7 @@ function ChainItem({
9262
9609
  children: label
9263
9610
  }
9264
9611
  ) }),
9265
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9612
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9266
9613
  "div",
9267
9614
  {
9268
9615
  style: {
@@ -9275,7 +9622,7 @@ function ChainItem({
9275
9622
  justifyContent: "center",
9276
9623
  flexShrink: 0
9277
9624
  },
9278
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9625
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9279
9626
  "svg",
9280
9627
  {
9281
9628
  style: {
@@ -9287,7 +9634,7 @@ function ChainItem({
9287
9634
  fill: "none",
9288
9635
  stroke: "currentColor",
9289
9636
  strokeWidth: 3,
9290
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9637
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9291
9638
  "path",
9292
9639
  {
9293
9640
  strokeLinecap: "round",
@@ -9312,7 +9659,7 @@ function ChainSelectorPanel({
9312
9659
  otherChains,
9313
9660
  popularChains
9314
9661
  }) {
9315
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9662
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9316
9663
  "div",
9317
9664
  {
9318
9665
  style: {
@@ -9323,14 +9670,14 @@ function ChainSelectorPanel({
9323
9670
  overflow: "hidden"
9324
9671
  },
9325
9672
  children: [
9326
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9673
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9327
9674
  "div",
9328
9675
  {
9329
9676
  style: {
9330
9677
  padding: `${spacing[2]} ${spacing[3]}`,
9331
9678
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
9332
9679
  },
9333
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9680
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9334
9681
  "span",
9335
9682
  {
9336
9683
  style: {
@@ -9345,7 +9692,7 @@ function ChainSelectorPanel({
9345
9692
  )
9346
9693
  }
9347
9694
  ),
9348
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9695
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9349
9696
  "div",
9350
9697
  {
9351
9698
  style: {
@@ -9353,7 +9700,7 @@ function ChainSelectorPanel({
9353
9700
  overflowY: "auto",
9354
9701
  padding: `${spacing[2]} ${spacing[1]}`
9355
9702
  },
9356
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9703
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9357
9704
  "div",
9358
9705
  {
9359
9706
  style: {
@@ -9362,7 +9709,7 @@ function ChainSelectorPanel({
9362
9709
  gap: spacing[2],
9363
9710
  padding: `0 ${spacing[2]}`
9364
9711
  },
9365
- children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9712
+ children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9366
9713
  "div",
9367
9714
  {
9368
9715
  style: {
@@ -9372,7 +9719,7 @@ function ChainSelectorPanel({
9372
9719
  padding: `${spacing[2]} 0`
9373
9720
  },
9374
9721
  children: [
9375
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9722
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9376
9723
  "div",
9377
9724
  {
9378
9725
  style: {
@@ -9384,7 +9731,7 @@ function ChainSelectorPanel({
9384
9731
  className: "tw-animate-pulse"
9385
9732
  }
9386
9733
  ),
9387
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9734
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9388
9735
  "div",
9389
9736
  {
9390
9737
  style: {
@@ -9401,7 +9748,7 @@ function ChainSelectorPanel({
9401
9748
  i
9402
9749
  ))
9403
9750
  }
9404
- ) : error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
9751
+ ) : error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9405
9752
  "div",
9406
9753
  {
9407
9754
  style: {
@@ -9409,8 +9756,8 @@ function ChainSelectorPanel({
9409
9756
  textAlign: "center"
9410
9757
  },
9411
9758
  children: [
9412
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9413
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9759
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { style: { fontSize: fontSize.sm, color: colors.destructive }, children: error }),
9760
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9414
9761
  "button",
9415
9762
  {
9416
9763
  type: "button",
@@ -9429,9 +9776,9 @@ function ChainSelectorPanel({
9429
9776
  )
9430
9777
  ]
9431
9778
  }
9432
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
9433
- popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: spacing[2] }, children: [
9434
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9779
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
9780
+ popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { marginBottom: spacing[2] }, children: [
9781
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { padding: `${spacing[1.5]} ${spacing[3]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9435
9782
  "span",
9436
9783
  {
9437
9784
  style: {
@@ -9444,7 +9791,7 @@ function ChainSelectorPanel({
9444
9791
  children: "Popular"
9445
9792
  }
9446
9793
  ) }),
9447
- popularChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9794
+ popularChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9448
9795
  ChainItem,
9449
9796
  {
9450
9797
  chain,
@@ -9457,15 +9804,15 @@ function ChainSelectorPanel({
9457
9804
  )
9458
9805
  ))
9459
9806
  ] }),
9460
- otherChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
9461
- popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9807
+ otherChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
9808
+ popularChains.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9462
9809
  "div",
9463
9810
  {
9464
9811
  style: {
9465
9812
  padding: `${spacing[1.5]} ${spacing[3]}`,
9466
9813
  marginTop: spacing[2]
9467
9814
  },
9468
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9815
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9469
9816
  "span",
9470
9817
  {
9471
9818
  style: {
@@ -9480,7 +9827,7 @@ function ChainSelectorPanel({
9480
9827
  )
9481
9828
  }
9482
9829
  ),
9483
- otherChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9830
+ otherChains.map((chain, idx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9484
9831
  ChainItem,
9485
9832
  {
9486
9833
  chain,
@@ -9493,14 +9840,14 @@ function ChainSelectorPanel({
9493
9840
  )
9494
9841
  ))
9495
9842
  ] }),
9496
- popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9843
+ popularChains.length === 0 && otherChains.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9497
9844
  "div",
9498
9845
  {
9499
9846
  style: {
9500
9847
  padding: `${spacing[3]} ${spacing[4]}`,
9501
9848
  textAlign: "center"
9502
9849
  },
9503
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
9850
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9504
9851
  "p",
9505
9852
  {
9506
9853
  style: {
@@ -9521,13 +9868,13 @@ function ChainSelectorPanel({
9521
9868
  }
9522
9869
 
9523
9870
  // src/widget/features/token-selection/components/TokenSearchInput.tsx
9524
- var import_jsx_runtime21 = require("react/jsx-runtime");
9871
+ var import_jsx_runtime22 = require("react/jsx-runtime");
9525
9872
  function TokenSearchInput({
9526
9873
  searchQuery,
9527
9874
  setSearchQuery
9528
9875
  }) {
9529
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { position: "relative" }, children: [
9530
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
9876
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { position: "relative" }, children: [
9877
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
9531
9878
  "svg",
9532
9879
  {
9533
9880
  style: {
@@ -9544,12 +9891,12 @@ function TokenSearchInput({
9544
9891
  stroke: "currentColor",
9545
9892
  strokeWidth: 2,
9546
9893
  children: [
9547
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
9548
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
9894
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
9895
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" })
9549
9896
  ]
9550
9897
  }
9551
9898
  ),
9552
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9899
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9553
9900
  "input",
9554
9901
  {
9555
9902
  type: "text",
@@ -9572,7 +9919,7 @@ function TokenSearchInput({
9572
9919
  }
9573
9920
  }
9574
9921
  ),
9575
- searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9922
+ searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9576
9923
  "button",
9577
9924
  {
9578
9925
  type: "button",
@@ -9590,7 +9937,7 @@ function TokenSearchInput({
9590
9937
  transition: "background-color 0.2s"
9591
9938
  },
9592
9939
  "aria-label": "Clear search",
9593
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
9940
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9594
9941
  "svg",
9595
9942
  {
9596
9943
  style: {
@@ -9602,7 +9949,7 @@ function TokenSearchInput({
9602
9949
  fill: "none",
9603
9950
  stroke: "currentColor",
9604
9951
  strokeWidth: 2,
9605
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
9952
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M18 6 6 18M6 6l12 12" })
9606
9953
  }
9607
9954
  )
9608
9955
  }
@@ -9611,7 +9958,7 @@ function TokenSearchInput({
9611
9958
  }
9612
9959
 
9613
9960
  // src/widget/features/token-selection/components/TokenSelectorStateView.tsx
9614
- var import_jsx_runtime22 = require("react/jsx-runtime");
9961
+ var import_jsx_runtime23 = require("react/jsx-runtime");
9615
9962
  function TokenSelectorStateView({
9616
9963
  isLoadingTokens,
9617
9964
  searchQuery,
@@ -9620,7 +9967,7 @@ function TokenSelectorStateView({
9620
9967
  tokensError
9621
9968
  }) {
9622
9969
  if (isLoadingTokens) {
9623
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9970
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9624
9971
  "div",
9625
9972
  {
9626
9973
  style: {
@@ -9629,7 +9976,7 @@ function TokenSelectorStateView({
9629
9976
  gap: spacing[2],
9630
9977
  padding: `0 ${spacing[2]}`
9631
9978
  },
9632
- children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
9979
+ children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9633
9980
  "div",
9634
9981
  {
9635
9982
  style: {
@@ -9639,7 +9986,7 @@ function TokenSelectorStateView({
9639
9986
  padding: `${spacing[2.5]} ${spacing[2]}`
9640
9987
  },
9641
9988
  children: [
9642
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
9989
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9643
9990
  "div",
9644
9991
  {
9645
9992
  style: {
@@ -9651,8 +9998,8 @@ function TokenSelectorStateView({
9651
9998
  className: "tw-animate-pulse"
9652
9999
  }
9653
10000
  ),
9654
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { flex: 1 }, children: [
9655
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10001
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1 }, children: [
10002
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9656
10003
  "div",
9657
10004
  {
9658
10005
  style: {
@@ -9665,7 +10012,7 @@ function TokenSelectorStateView({
9665
10012
  className: "tw-animate-pulse"
9666
10013
  }
9667
10014
  ),
9668
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10015
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9669
10016
  "div",
9670
10017
  {
9671
10018
  style: {
@@ -9678,7 +10025,7 @@ function TokenSelectorStateView({
9678
10025
  }
9679
10026
  )
9680
10027
  ] }),
9681
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10028
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9682
10029
  "div",
9683
10030
  {
9684
10031
  style: {
@@ -9698,7 +10045,7 @@ function TokenSelectorStateView({
9698
10045
  );
9699
10046
  }
9700
10047
  if (state === "no-chain") {
9701
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10048
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9702
10049
  "div",
9703
10050
  {
9704
10051
  style: {
@@ -9708,8 +10055,8 @@ function TokenSelectorStateView({
9708
10055
  justifyContent: "center",
9709
10056
  padding: `0 ${spacing[4]}`
9710
10057
  },
9711
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
9712
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10058
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10059
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9713
10060
  "svg",
9714
10061
  {
9715
10062
  style: {
@@ -9722,7 +10069,7 @@ function TokenSelectorStateView({
9722
10069
  fill: "none",
9723
10070
  stroke: "currentColor",
9724
10071
  strokeWidth: 1.5,
9725
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10072
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9726
10073
  "path",
9727
10074
  {
9728
10075
  strokeLinecap: "round",
@@ -9732,7 +10079,7 @@ function TokenSelectorStateView({
9732
10079
  )
9733
10080
  }
9734
10081
  ),
9735
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10082
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9736
10083
  "p",
9737
10084
  {
9738
10085
  style: {
@@ -9747,7 +10094,7 @@ function TokenSelectorStateView({
9747
10094
  );
9748
10095
  }
9749
10096
  if (state === "error") {
9750
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10097
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9751
10098
  "div",
9752
10099
  {
9753
10100
  style: {
@@ -9757,8 +10104,8 @@ function TokenSelectorStateView({
9757
10104
  justifyContent: "center",
9758
10105
  padding: `0 ${spacing[4]}`
9759
10106
  },
9760
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
9761
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10107
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10108
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9762
10109
  "svg",
9763
10110
  {
9764
10111
  style: {
@@ -9772,12 +10119,12 @@ function TokenSelectorStateView({
9772
10119
  stroke: "currentColor",
9773
10120
  strokeWidth: 2,
9774
10121
  children: [
9775
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
9776
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
10122
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
10123
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "M12 8v4M12 16h.01" })
9777
10124
  ]
9778
10125
  }
9779
10126
  ),
9780
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10127
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9781
10128
  "p",
9782
10129
  {
9783
10130
  style: {
@@ -9788,7 +10135,7 @@ function TokenSelectorStateView({
9788
10135
  children: tokensError
9789
10136
  }
9790
10137
  ),
9791
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10138
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9792
10139
  "button",
9793
10140
  {
9794
10141
  type: "button",
@@ -9809,7 +10156,7 @@ function TokenSelectorStateView({
9809
10156
  }
9810
10157
  );
9811
10158
  }
9812
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10159
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9813
10160
  "div",
9814
10161
  {
9815
10162
  style: {
@@ -9819,8 +10166,8 @@ function TokenSelectorStateView({
9819
10166
  justifyContent: "center",
9820
10167
  padding: `0 ${spacing[4]}`
9821
10168
  },
9822
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { textAlign: "center" }, children: [
9823
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10169
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { textAlign: "center" }, children: [
10170
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9824
10171
  "svg",
9825
10172
  {
9826
10173
  style: {
@@ -9833,13 +10180,13 @@ function TokenSelectorStateView({
9833
10180
  stroke: "currentColor",
9834
10181
  strokeWidth: 1.5,
9835
10182
  children: [
9836
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
9837
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
9838
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", d: "M8 11h6" })
10183
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
10184
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "m21 21-4.35-4.35" }),
10185
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "M8 11h6" })
9839
10186
  ]
9840
10187
  }
9841
10188
  ),
9842
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10189
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9843
10190
  "p",
9844
10191
  {
9845
10192
  style: {
@@ -9849,7 +10196,7 @@ function TokenSelectorStateView({
9849
10196
  children: searchQuery ? `No tokens matching "${searchQuery}"` : "No tokens available"
9850
10197
  }
9851
10198
  ),
9852
- searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
10199
+ searchQuery ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
9853
10200
  "button",
9854
10201
  {
9855
10202
  type: "button",
@@ -9872,13 +10219,13 @@ function TokenSelectorStateView({
9872
10219
  }
9873
10220
 
9874
10221
  // src/widget/features/token-selection/components/WalletTokenListItem.tsx
9875
- var import_jsx_runtime23 = require("react/jsx-runtime");
10222
+ var import_jsx_runtime24 = require("react/jsx-runtime");
9876
10223
  function WalletTokenListItem({
9877
10224
  onSelect,
9878
10225
  token
9879
10226
  }) {
9880
10227
  const logoUrl = token.iconUrl || token.logo_url;
9881
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10228
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
9882
10229
  "button",
9883
10230
  {
9884
10231
  type: "button",
@@ -9896,8 +10243,8 @@ function WalletTokenListItem({
9896
10243
  cursor: "pointer"
9897
10244
  },
9898
10245
  children: [
9899
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { position: "relative" }, children: [
9900
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10246
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { position: "relative" }, children: [
10247
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9901
10248
  "img",
9902
10249
  {
9903
10250
  src: logoUrl,
@@ -9910,7 +10257,7 @@ function WalletTokenListItem({
9910
10257
  flexShrink: 0
9911
10258
  }
9912
10259
  }
9913
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10260
+ ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9914
10261
  "div",
9915
10262
  {
9916
10263
  style: {
@@ -9920,7 +10267,7 @@ function WalletTokenListItem({
9920
10267
  objectFit: "cover",
9921
10268
  flexShrink: 0
9922
10269
  },
9923
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10270
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9924
10271
  "span",
9925
10272
  {
9926
10273
  style: {
@@ -9936,7 +10283,7 @@ function WalletTokenListItem({
9936
10283
  )
9937
10284
  }
9938
10285
  ),
9939
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10286
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9940
10287
  "div",
9941
10288
  {
9942
10289
  style: {
@@ -9952,7 +10299,7 @@ function WalletTokenListItem({
9952
10299
  alignItems: "center",
9953
10300
  justifyContent: "center"
9954
10301
  },
9955
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10302
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9956
10303
  "img",
9957
10304
  {
9958
10305
  src: token.chainIconURI,
@@ -9967,8 +10314,8 @@ function WalletTokenListItem({
9967
10314
  }
9968
10315
  )
9969
10316
  ] }),
9970
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
9971
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10317
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { style: { flex: 1, textAlign: "left", minWidth: 0 }, children: [
10318
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9972
10319
  "div",
9973
10320
  {
9974
10321
  style: {
@@ -9976,7 +10323,7 @@ function WalletTokenListItem({
9976
10323
  alignItems: "center",
9977
10324
  gap: spacing[1.5]
9978
10325
  },
9979
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10326
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
9980
10327
  "span",
9981
10328
  {
9982
10329
  style: {
@@ -9992,7 +10339,7 @@ function WalletTokenListItem({
9992
10339
  )
9993
10340
  }
9994
10341
  ),
9995
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10342
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
9996
10343
  "span",
9997
10344
  {
9998
10345
  style: {
@@ -10017,7 +10364,7 @@ function WalletTokenListItem({
10017
10364
  }
10018
10365
 
10019
10366
  // src/widget/features/token-selection/components/TokenSelectorPanel.tsx
10020
- var import_jsx_runtime24 = require("react/jsx-runtime");
10367
+ var import_jsx_runtime25 = require("react/jsx-runtime");
10021
10368
  function TokenSelectorPanel({
10022
10369
  filteredTokens,
10023
10370
  filteredWalletTokens,
@@ -10033,7 +10380,7 @@ function TokenSelectorPanel({
10033
10380
  tokensError,
10034
10381
  walletAddress
10035
10382
  }) {
10036
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10383
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10037
10384
  "div",
10038
10385
  {
10039
10386
  style: {
@@ -10043,7 +10390,7 @@ function TokenSelectorPanel({
10043
10390
  overflow: "hidden"
10044
10391
  },
10045
10392
  children: [
10046
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10393
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10047
10394
  "div",
10048
10395
  {
10049
10396
  style: {
@@ -10051,7 +10398,7 @@ function TokenSelectorPanel({
10051
10398
  borderBottom: `1px solid rgba(63, 63, 70, 0.5)`
10052
10399
  },
10053
10400
  children: [
10054
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10401
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10055
10402
  "div",
10056
10403
  {
10057
10404
  style: {
@@ -10061,7 +10408,7 @@ function TokenSelectorPanel({
10061
10408
  marginBottom: spacing[2]
10062
10409
  },
10063
10410
  children: [
10064
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10411
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10065
10412
  "span",
10066
10413
  {
10067
10414
  style: {
@@ -10074,7 +10421,7 @@ function TokenSelectorPanel({
10074
10421
  children: "Token"
10075
10422
  }
10076
10423
  ),
10077
- walletAddress && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10424
+ walletAddress && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10078
10425
  "span",
10079
10426
  {
10080
10427
  style: {
@@ -10090,7 +10437,7 @@ function TokenSelectorPanel({
10090
10437
  ]
10091
10438
  }
10092
10439
  ),
10093
- selectedChain ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10440
+ selectedChain ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10094
10441
  TokenSearchInput,
10095
10442
  {
10096
10443
  searchQuery,
@@ -10100,7 +10447,7 @@ function TokenSelectorPanel({
10100
10447
  ]
10101
10448
  }
10102
10449
  ),
10103
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10450
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10104
10451
  "div",
10105
10452
  {
10106
10453
  style: {
@@ -10108,7 +10455,7 @@ function TokenSelectorPanel({
10108
10455
  overflowY: "auto",
10109
10456
  padding: `${spacing[2]} ${spacing[1]}`
10110
10457
  },
10111
- children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10458
+ children: !selectedChain || isLoadingTokens || tokensError || filteredTokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10112
10459
  TokenSelectorStateView,
10113
10460
  {
10114
10461
  isLoadingTokens,
@@ -10117,7 +10464,7 @@ function TokenSelectorPanel({
10117
10464
  state: !selectedChain ? "no-chain" : tokensError ? "error" : "empty",
10118
10465
  tokensError
10119
10466
  }
10120
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10467
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10121
10468
  "div",
10122
10469
  {
10123
10470
  style: {
@@ -10126,7 +10473,7 @@ function TokenSelectorPanel({
10126
10473
  gap: spacing[0.5]
10127
10474
  },
10128
10475
  children: [
10129
- filteredWalletTokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10476
+ filteredWalletTokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10130
10477
  "div",
10131
10478
  {
10132
10479
  style: {
@@ -10137,7 +10484,7 @@ function TokenSelectorPanel({
10137
10484
  paddingRight: "0.5rem",
10138
10485
  marginBottom: spacing[2]
10139
10486
  },
10140
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10487
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10141
10488
  "span",
10142
10489
  {
10143
10490
  style: {
@@ -10150,7 +10497,7 @@ function TokenSelectorPanel({
10150
10497
  )
10151
10498
  }
10152
10499
  ) : null,
10153
- filteredWalletTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10500
+ filteredWalletTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10154
10501
  WalletTokenListItem,
10155
10502
  {
10156
10503
  token,
@@ -10158,7 +10505,7 @@ function TokenSelectorPanel({
10158
10505
  },
10159
10506
  `${token.address}-${i}`
10160
10507
  )),
10161
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10508
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10162
10509
  "div",
10163
10510
  {
10164
10511
  style: {
@@ -10169,7 +10516,7 @@ function TokenSelectorPanel({
10169
10516
  paddingRight: "0.5rem",
10170
10517
  marginBottom: spacing[2]
10171
10518
  },
10172
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10519
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10173
10520
  "span",
10174
10521
  {
10175
10522
  style: {
@@ -10182,7 +10529,7 @@ function TokenSelectorPanel({
10182
10529
  )
10183
10530
  }
10184
10531
  ),
10185
- filteredTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10532
+ filteredTokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10186
10533
  AvailableTokenListItem,
10187
10534
  {
10188
10535
  token,
@@ -10190,7 +10537,7 @@ function TokenSelectorPanel({
10190
10537
  },
10191
10538
  `${token.address}-${i}`
10192
10539
  )),
10193
- hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10540
+ hasNextPage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10194
10541
  "button",
10195
10542
  {
10196
10543
  type: "button",
@@ -10223,7 +10570,7 @@ function TokenSelectorPanel({
10223
10570
  }
10224
10571
 
10225
10572
  // src/widget/features/token-selection/hooks/useOrderedWalletTokens.ts
10226
- var import_react26 = require("react");
10573
+ var import_react28 = require("react");
10227
10574
  function useOrderedWalletTokens({
10228
10575
  amount,
10229
10576
  amountInputMode,
@@ -10232,7 +10579,7 @@ function useOrderedWalletTokens({
10232
10579
  setSelectedToken,
10233
10580
  yourWalletTokens
10234
10581
  }) {
10235
- const handleTokenChange = (0, import_react26.useCallback)(
10582
+ const handleTokenChange = (0, import_react28.useCallback)(
10236
10583
  async (token) => {
10237
10584
  if (token) {
10238
10585
  setSelectedToken(token);
@@ -10241,7 +10588,7 @@ function useOrderedWalletTokens({
10241
10588
  },
10242
10589
  [setSelectedChain, setSelectedToken]
10243
10590
  );
10244
- const orderedTokens = (0, import_react26.useMemo)(() => {
10591
+ const orderedTokens = (0, import_react28.useMemo)(() => {
10245
10592
  const selectedTokenChainType = selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType;
10246
10593
  const index = yourWalletTokens.findIndex(
10247
10594
  (token) => normalizeAddress2(
@@ -10310,7 +10657,7 @@ function filterTokenAmountCompatibleTokens(tokens, parsedAmount) {
10310
10657
  }
10311
10658
 
10312
10659
  // src/widget/features/token-selection/hooks/useSelectTokenModel.ts
10313
- var import_react27 = require("react");
10660
+ var import_react29 = require("react");
10314
10661
  function useSelectTokenModel({
10315
10662
  goBack,
10316
10663
  searchQuery,
@@ -10334,7 +10681,7 @@ function useSelectTokenModel({
10334
10681
  explorerUrl: chain.blockExplorerUrls?.[0]
10335
10682
  });
10336
10683
  };
10337
- const handleTokenSelect = (0, import_react27.useCallback)(
10684
+ const handleTokenSelect = (0, import_react29.useCallback)(
10338
10685
  async (token) => {
10339
10686
  if (token.balance !== void 0) {
10340
10687
  setSelectedToken(token);
@@ -10358,7 +10705,7 @@ function useSelectTokenModel({
10358
10705
  },
10359
10706
  [goBack, selectedChain, setSelectedToken, walletAddress]
10360
10707
  );
10361
- const handleYourTokenSelect = (0, import_react27.useCallback)(
10708
+ const handleYourTokenSelect = (0, import_react29.useCallback)(
10362
10709
  (token) => {
10363
10710
  setSelectedToken(token);
10364
10711
  setSelectedChain(token.chainData);
@@ -10380,7 +10727,7 @@ function useSelectTokenModel({
10380
10727
  const address = token.address?.toLowerCase() ?? "";
10381
10728
  return symbol.includes(normalizedSearchQuery) || name.includes(normalizedSearchQuery) || address.includes(normalizedSearchQuery);
10382
10729
  };
10383
- const filteredWalletTokens = (0, import_react27.useMemo)(() => {
10730
+ const filteredWalletTokens = (0, import_react29.useMemo)(() => {
10384
10731
  if (!selectedChain?.chainId) {
10385
10732
  return [];
10386
10733
  }
@@ -10473,7 +10820,7 @@ var feeSummaryValueStyle = {
10473
10820
  };
10474
10821
 
10475
10822
  // src/widget/features/amount/components/AmountBalanceRow.tsx
10476
- var import_jsx_runtime25 = require("react/jsx-runtime");
10823
+ var import_jsx_runtime26 = require("react/jsx-runtime");
10477
10824
  function formatBalanceLabel({
10478
10825
  amountInputMode,
10479
10826
  hasUsdPrice,
@@ -10504,8 +10851,8 @@ function AmountBalanceRow({
10504
10851
  selectedTokenSymbol,
10505
10852
  tokenPriceUSD
10506
10853
  }) {
10507
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: balanceRowStyle, children: [
10508
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10854
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: balanceRowStyle, children: [
10855
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10509
10856
  "span",
10510
10857
  {
10511
10858
  style: {
@@ -10523,7 +10870,7 @@ function AmountBalanceRow({
10523
10870
  })
10524
10871
  }
10525
10872
  ),
10526
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10873
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10527
10874
  "button",
10528
10875
  {
10529
10876
  type: "button",
@@ -10537,7 +10884,7 @@ function AmountBalanceRow({
10537
10884
  }
10538
10885
 
10539
10886
  // src/widget/features/amount/components/AmountConversionRow.tsx
10540
- var import_jsx_runtime26 = require("react/jsx-runtime");
10887
+ var import_jsx_runtime27 = require("react/jsx-runtime");
10541
10888
  function formatTokenAmount(value) {
10542
10889
  const amount = Number(value ?? 0);
10543
10890
  if (amount <= 0) return "0";
@@ -10561,22 +10908,22 @@ function AmountConversionRow({
10561
10908
  selectedTokenSymbol,
10562
10909
  setAmountInputMode
10563
10910
  }) {
10564
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: tokenConversionRowStyle, children: [
10565
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10911
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: tokenConversionRowStyle, children: [
10912
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10566
10913
  "span",
10567
10914
  {
10568
10915
  style: {
10569
10916
  fontSize: fontSize.lg,
10570
10917
  color: colors.mutedForeground
10571
10918
  },
10572
- children: amountInputMode === "usd" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
10919
+ children: amountInputMode === "usd" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10573
10920
  formatTokenAmount(amountComputation.tokenAmount),
10574
10921
  " ",
10575
10922
  selectedTokenSymbol
10576
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
10923
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: hasUsdPrice ? formatUsdAmount2(amountComputation.usdAmount) : "USD pricing unavailable" })
10577
10924
  }
10578
10925
  ),
10579
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10926
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10580
10927
  "svg",
10581
10928
  {
10582
10929
  style: {
@@ -10593,7 +10940,7 @@ function AmountConversionRow({
10593
10940
  if (isFixedAmount) return;
10594
10941
  setAmountInputMode((mode) => mode === "usd" ? "token" : "usd");
10595
10942
  },
10596
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10943
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10597
10944
  "path",
10598
10945
  {
10599
10946
  strokeLinecap: "round",
@@ -10607,7 +10954,7 @@ function AmountConversionRow({
10607
10954
  }
10608
10955
 
10609
10956
  // src/widget/features/amount/components/AmountFeeSummary.tsx
10610
- var import_jsx_runtime27 = require("react/jsx-runtime");
10957
+ var import_jsx_runtime28 = require("react/jsx-runtime");
10611
10958
  function formatEstimatedReceive(estimatedReceive, parsedAmount) {
10612
10959
  if (estimatedReceive) {
10613
10960
  return `~$${parseFloat(estimatedReceive).toLocaleString(void 0, {
@@ -10628,8 +10975,8 @@ function AmountFeeSummary({
10628
10975
  parsedAmount,
10629
10976
  selectedTokenDecimals
10630
10977
  }) {
10631
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: loadingFeeSummaryStyle, children: [
10632
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10978
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: feeSummaryContainerStyle, children: isLoadingRoute ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: loadingFeeSummaryStyle, children: [
10979
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
10633
10980
  "svg",
10634
10981
  {
10635
10982
  style: {
@@ -10641,7 +10988,7 @@ function AmountFeeSummary({
10641
10988
  fill: "none",
10642
10989
  className: "tw-animate-spin",
10643
10990
  children: [
10644
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10991
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10645
10992
  "circle",
10646
10993
  {
10647
10994
  style: { opacity: 0.25 },
@@ -10652,7 +10999,7 @@ function AmountFeeSummary({
10652
10999
  strokeWidth: "4"
10653
11000
  }
10654
11001
  ),
10655
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11002
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10656
11003
  "path",
10657
11004
  {
10658
11005
  style: { opacity: 0.75 },
@@ -10663,7 +11010,7 @@ function AmountFeeSummary({
10663
11010
  ]
10664
11011
  }
10665
11012
  ),
10666
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11013
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10667
11014
  "span",
10668
11015
  {
10669
11016
  style: {
@@ -10674,7 +11021,7 @@ function AmountFeeSummary({
10674
11021
  children: "Calculating fees..."
10675
11022
  }
10676
11023
  )
10677
- ] }) : !amount.trim() ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11024
+ ] }) : !amount.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: emptyFeeSummaryStyle, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10678
11025
  "p",
10679
11026
  {
10680
11027
  style: {
@@ -10683,10 +11030,10 @@ function AmountFeeSummary({
10683
11030
  },
10684
11031
  children: "Enter an amount to continue."
10685
11032
  }
10686
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10687
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: feeSummaryRowStyle, children: [
10688
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
10689
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { style: feeSummaryValueStyle, children: [
11033
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
11034
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: feeSummaryRowStyle, children: [
11035
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { style: { color: colors.mutedForeground }, children: "Network fee" }),
11036
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { style: feeSummaryValueStyle, children: [
10690
11037
  weiToDecimalString(
10691
11038
  gasReservationWei,
10692
11039
  selectedTokenDecimals ?? 0,
@@ -10695,9 +11042,9 @@ function AmountFeeSummary({
10695
11042
  " "
10696
11043
  ] })
10697
11044
  ] }),
10698
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: feeSummaryDividerStyle }),
10699
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: feeSummaryRowStyle, children: [
10700
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11045
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: feeSummaryDividerStyle }),
11046
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: feeSummaryRowStyle, children: [
11047
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10701
11048
  "span",
10702
11049
  {
10703
11050
  style: {
@@ -10707,7 +11054,7 @@ function AmountFeeSummary({
10707
11054
  children: "You'll receive"
10708
11055
  }
10709
11056
  ),
10710
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11057
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10711
11058
  "span",
10712
11059
  {
10713
11060
  style: {
@@ -10722,7 +11069,7 @@ function AmountFeeSummary({
10722
11069
  }
10723
11070
 
10724
11071
  // src/widget/features/amount/components/CryptoPayAmountSection.tsx
10725
- var import_jsx_runtime28 = require("react/jsx-runtime");
11072
+ var import_jsx_runtime29 = require("react/jsx-runtime");
10726
11073
  function CryptoPayAmountSection({
10727
11074
  amount,
10728
11075
  amountComputation,
@@ -10749,8 +11096,8 @@ function CryptoPayAmountSection({
10749
11096
  walletAddress,
10750
11097
  yourWalletTokensLength
10751
11098
  }) {
10752
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: amountSectionContainerStyle, children: [
10753
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11099
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: amountSectionContainerStyle, children: [
11100
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10754
11101
  "p",
10755
11102
  {
10756
11103
  style: {
@@ -10762,7 +11109,7 @@ function CryptoPayAmountSection({
10762
11109
  children: "Enter an amount"
10763
11110
  }
10764
11111
  ),
10765
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11112
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10766
11113
  AmountInputDisplay,
10767
11114
  {
10768
11115
  amount,
@@ -10774,7 +11121,7 @@ function CryptoPayAmountSection({
10774
11121
  style: { marginBottom: spacing[4] }
10775
11122
  }
10776
11123
  ),
10777
- selectedToken ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11124
+ selectedToken ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10778
11125
  AmountConversionRow,
10779
11126
  {
10780
11127
  amountComputation,
@@ -10785,7 +11132,7 @@ function CryptoPayAmountSection({
10785
11132
  setAmountInputMode
10786
11133
  }
10787
11134
  ) : null,
10788
- selectedToken?.balance ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11135
+ selectedToken?.balance ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10789
11136
  AmountBalanceRow,
10790
11137
  {
10791
11138
  amountInputMode,
@@ -10798,7 +11145,7 @@ function CryptoPayAmountSection({
10798
11145
  tokenPriceUSD
10799
11146
  }
10800
11147
  ) : null,
10801
- selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11148
+ selectedToken && yourWalletTokensLength > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: tokenPickerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10802
11149
  TokenSwipePill,
10803
11150
  {
10804
11151
  tokens: orderedTokens,
@@ -10809,8 +11156,8 @@ function CryptoPayAmountSection({
10809
11156
  walletAddress
10810
11157
  }
10811
11158
  ) }) : null,
10812
- !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: amountSliderContainerStyle, children: [
10813
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
11159
+ !isFixedAmount && selectedToken && effectiveSliderMax !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: amountSliderContainerStyle, children: [
11160
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
10814
11161
  "p",
10815
11162
  {
10816
11163
  style: {
@@ -10826,7 +11173,7 @@ function CryptoPayAmountSection({
10826
11173
  ]
10827
11174
  }
10828
11175
  ),
10829
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11176
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10830
11177
  AmountSlider,
10831
11178
  {
10832
11179
  value: Math.min(parsedAmount, effectiveSliderMax),
@@ -10837,7 +11184,7 @@ function CryptoPayAmountSection({
10837
11184
  }
10838
11185
  )
10839
11186
  ] }) : null,
10840
- showFeeSummary ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11187
+ showFeeSummary ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
10841
11188
  AmountFeeSummary,
10842
11189
  {
10843
11190
  amount,
@@ -10852,7 +11199,7 @@ function CryptoPayAmountSection({
10852
11199
  }
10853
11200
 
10854
11201
  // src/widget/features/amount/hooks/useDepositAmountModel.ts
10855
- var import_react28 = require("react");
11202
+ var import_react30 = require("react");
10856
11203
  var BALANCE_TOLERANCE = 1e-9;
10857
11204
  function useDepositAmountModel({
10858
11205
  amount,
@@ -10867,14 +11214,14 @@ function useDepositAmountModel({
10867
11214
  }) {
10868
11215
  const tokenPriceUSD = typeof selectedToken?.usdPrice === "number" && Number.isFinite(selectedToken.usdPrice) && selectedToken.usdPrice > 0 ? selectedToken.usdPrice : 0;
10869
11216
  const hasUsdPrice = typeof tokenPriceUSD === "number" && Number.isFinite(tokenPriceUSD) && tokenPriceUSD > 0;
10870
- const normalizedTokenBalance = (0, import_react28.useMemo)(() => {
11217
+ const normalizedTokenBalance = (0, import_react30.useMemo)(() => {
10871
11218
  if (!selectedToken?.balance) return 0;
10872
11219
  const normalized = Number(
10873
11220
  rawToDecimal(selectedToken.balance, selectedToken.decimals ?? 18)
10874
11221
  );
10875
11222
  return Number.isFinite(normalized) ? normalized : 0;
10876
11223
  }, [selectedToken?.balance, selectedToken?.decimals]);
10877
- (0, import_react28.useEffect)(() => {
11224
+ (0, import_react30.useEffect)(() => {
10878
11225
  if (fixedFromAmountString) return;
10879
11226
  if (isReady && !hasUsdPrice && amountInputMode === "usd") {
10880
11227
  setAmountInputMode("token");
@@ -10886,7 +11233,7 @@ function useDepositAmountModel({
10886
11233
  isReady,
10887
11234
  setAmountInputMode
10888
11235
  ]);
10889
- (0, import_react28.useEffect)(() => {
11236
+ (0, import_react30.useEffect)(() => {
10890
11237
  if (!fixedFromAmountString) return;
10891
11238
  if (amount !== fixedFromAmountString) {
10892
11239
  setAmount(fixedFromAmountString);
@@ -10901,7 +11248,7 @@ function useDepositAmountModel({
10901
11248
  setAmount,
10902
11249
  setAmountInputMode
10903
11250
  ]);
10904
- const amountComputation = (0, import_react28.useMemo)(() => {
11251
+ const amountComputation = (0, import_react30.useMemo)(() => {
10905
11252
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
10906
11253
  if (!rawAmount) {
10907
11254
  return {
@@ -10968,11 +11315,11 @@ function useDepositAmountModel({
10968
11315
  selectedToken?.decimals,
10969
11316
  tokenPriceUSD
10970
11317
  ]);
10971
- const requestedTokenAmount = (0, import_react28.useMemo)(() => {
11318
+ const requestedTokenAmount = (0, import_react30.useMemo)(() => {
10972
11319
  const tokenAmount = Number(amountComputation.tokenAmount);
10973
11320
  return Number.isFinite(tokenAmount) ? tokenAmount : 0;
10974
11321
  }, [amountComputation.tokenAmount]);
10975
- const amountValidationError = (0, import_react28.useMemo)(() => {
11322
+ const amountValidationError = (0, import_react30.useMemo)(() => {
10976
11323
  if (amountComputation.parseError) {
10977
11324
  return amountComputation.parseError;
10978
11325
  }
@@ -11005,15 +11352,15 @@ function useDepositAmountModel({
11005
11352
  ]);
11006
11353
  const amountWei = amountValidationError ? 0n : amountComputation.fromAmountWei ?? 0n;
11007
11354
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11008
- const maxTokenAmount = (0, import_react28.useMemo)(
11355
+ const maxTokenAmount = (0, import_react30.useMemo)(
11009
11356
  () => Math.min(normalizedTokenBalance, 1e4),
11010
11357
  [normalizedTokenBalance]
11011
11358
  );
11012
- const maxUsdAmount = (0, import_react28.useMemo)(() => {
11359
+ const maxUsdAmount = (0, import_react30.useMemo)(() => {
11013
11360
  if (!hasUsdPrice) return void 0;
11014
11361
  return Math.min(maxTokenAmount * tokenPriceUSD, 1e4);
11015
11362
  }, [hasUsdPrice, maxTokenAmount, tokenPriceUSD]);
11016
- const minAmountForMode = (0, import_react28.useMemo)(() => {
11363
+ const minAmountForMode = (0, import_react30.useMemo)(() => {
11017
11364
  if (minAmountUsd == null) return 0;
11018
11365
  if (amountInputMode === "usd") {
11019
11366
  return minAmountUsd;
@@ -11022,11 +11369,11 @@ function useDepositAmountModel({
11022
11369
  return minAmountUsd / tokenPriceUSD;
11023
11370
  }, [amountInputMode, hasUsdPrice, minAmountUsd, tokenPriceUSD]);
11024
11371
  const sliderMax = amountInputMode === "usd" ? maxUsdAmount : maxTokenAmount;
11025
- const effectiveSliderMax = (0, import_react28.useMemo)(() => {
11372
+ const effectiveSliderMax = (0, import_react30.useMemo)(() => {
11026
11373
  if (sliderMax == null || !Number.isFinite(sliderMax)) return void 0;
11027
11374
  return Math.max(sliderMax, 0);
11028
11375
  }, [sliderMax]);
11029
- const effectiveSliderMin = (0, import_react28.useMemo)(() => {
11376
+ const effectiveSliderMin = (0, import_react30.useMemo)(() => {
11030
11377
  if (effectiveSliderMax == null || !Number.isFinite(effectiveSliderMax) || effectiveSliderMax <= 0) {
11031
11378
  return 0;
11032
11379
  }
@@ -11053,7 +11400,7 @@ function useDepositAmountModel({
11053
11400
  }
11054
11401
 
11055
11402
  // src/widget/features/amount/hooks/useHomeAmountModel.ts
11056
- var import_react29 = require("react");
11403
+ var import_react31 = require("react");
11057
11404
  function useHomeAmountModel({
11058
11405
  amount,
11059
11406
  setAmount,
@@ -11064,7 +11411,7 @@ function useHomeAmountModel({
11064
11411
  minAmountUsd,
11065
11412
  maxAmountUsd
11066
11413
  }) {
11067
- (0, import_react29.useEffect)(() => {
11414
+ (0, import_react31.useEffect)(() => {
11068
11415
  if (!fixedFromAmountString) return;
11069
11416
  if (amount !== fixedFromAmountString) {
11070
11417
  setAmount(fixedFromAmountString);
@@ -11080,7 +11427,7 @@ function useHomeAmountModel({
11080
11427
  setAmountInputMode
11081
11428
  ]);
11082
11429
  const parsedAmount = parseFloat(fixedFromAmountString ?? amount) || 0;
11083
- const amountValidationMessage = (0, import_react29.useMemo)(() => {
11430
+ const amountValidationMessage = (0, import_react31.useMemo)(() => {
11084
11431
  const rawAmount = (fixedFromAmountString ?? amount)?.trim();
11085
11432
  if (!rawAmount) return null;
11086
11433
  if (!/^\d*\.?\d*$/.test(rawAmount)) {
@@ -11171,7 +11518,7 @@ var mutedOrDividerStyle = (isDarkTheme) => ({
11171
11518
  });
11172
11519
 
11173
11520
  // src/widget/features/wallet/components/PaymentOptionRow.tsx
11174
- var import_jsx_runtime29 = require("react/jsx-runtime");
11521
+ var import_jsx_runtime30 = require("react/jsx-runtime");
11175
11522
  function PaymentOptionRow({
11176
11523
  disabled = false,
11177
11524
  icon,
@@ -11179,7 +11526,7 @@ function PaymentOptionRow({
11179
11526
  onClick,
11180
11527
  trailing
11181
11528
  }) {
11182
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11529
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11183
11530
  "button",
11184
11531
  {
11185
11532
  type: "button",
@@ -11202,7 +11549,7 @@ function PaymentOptionRow({
11202
11549
  opacity: disabled ? 0.5 : 1
11203
11550
  },
11204
11551
  children: [
11205
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11552
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11206
11553
  "div",
11207
11554
  {
11208
11555
  style: {
@@ -11212,7 +11559,7 @@ function PaymentOptionRow({
11212
11559
  },
11213
11560
  children: [
11214
11561
  icon,
11215
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11562
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11216
11563
  "span",
11217
11564
  {
11218
11565
  style: {
@@ -11226,24 +11573,24 @@ function PaymentOptionRow({
11226
11573
  ]
11227
11574
  }
11228
11575
  ),
11229
- trailing ?? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: selectionRingStyle })
11576
+ trailing ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: selectionRingStyle })
11230
11577
  ]
11231
11578
  }
11232
11579
  );
11233
11580
  }
11234
11581
 
11235
11582
  // src/widget/features/wallet/components/DetectedWalletRow.tsx
11236
- var import_jsx_runtime30 = require("react/jsx-runtime");
11583
+ var import_jsx_runtime31 = require("react/jsx-runtime");
11237
11584
  function DetectedWalletRow({
11238
11585
  onSelect,
11239
11586
  wallet
11240
11587
  }) {
11241
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11588
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11242
11589
  PaymentOptionRow,
11243
11590
  {
11244
11591
  onClick: () => void onSelect(wallet),
11245
11592
  label: wallet.meta.name,
11246
- icon: wallet.meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11593
+ icon: wallet.meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11247
11594
  "img",
11248
11595
  {
11249
11596
  src: wallet.meta.logo,
@@ -11255,7 +11602,7 @@ function DetectedWalletRow({
11255
11602
  objectFit: "cover"
11256
11603
  }
11257
11604
  }
11258
- ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11605
+ ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11259
11606
  "div",
11260
11607
  {
11261
11608
  style: {
@@ -11267,7 +11614,7 @@ function DetectedWalletRow({
11267
11614
  alignItems: "center",
11268
11615
  justifyContent: "center"
11269
11616
  },
11270
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11617
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11271
11618
  "span",
11272
11619
  {
11273
11620
  style: {
@@ -11285,16 +11632,16 @@ function DetectedWalletRow({
11285
11632
  }
11286
11633
 
11287
11634
  // src/widget/features/wallet/components/WalletConnectRow.tsx
11288
- var import_jsx_runtime31 = require("react/jsx-runtime");
11635
+ var import_jsx_runtime32 = require("react/jsx-runtime");
11289
11636
  function WalletConnectRow({
11290
11637
  onClick
11291
11638
  }) {
11292
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11639
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11293
11640
  PaymentOptionRow,
11294
11641
  {
11295
11642
  onClick: () => void onClick(),
11296
11643
  label: "WalletConnect",
11297
- icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11644
+ icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: walletActionIconBoxStyle, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11298
11645
  "svg",
11299
11646
  {
11300
11647
  style: {
@@ -11304,10 +11651,10 @@ function WalletConnectRow({
11304
11651
  },
11305
11652
  viewBox: "0 0 24 24",
11306
11653
  fill: "currentColor",
11307
- 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" })
11654
+ 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" })
11308
11655
  }
11309
11656
  ) }),
11310
- trailing: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11657
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11311
11658
  "svg",
11312
11659
  {
11313
11660
  style: {
@@ -11319,7 +11666,7 @@ function WalletConnectRow({
11319
11666
  fill: "none",
11320
11667
  stroke: "currentColor",
11321
11668
  strokeWidth: 2,
11322
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11669
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
11323
11670
  }
11324
11671
  )
11325
11672
  }
@@ -11327,9 +11674,9 @@ function WalletConnectRow({
11327
11674
  }
11328
11675
 
11329
11676
  // src/widget/features/wallet/components/WalletDropdownEmptyState.tsx
11330
- var import_jsx_runtime32 = require("react/jsx-runtime");
11677
+ var import_jsx_runtime33 = require("react/jsx-runtime");
11331
11678
  function WalletDropdownEmptyState() {
11332
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11679
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11333
11680
  "p",
11334
11681
  {
11335
11682
  style: {
@@ -11344,13 +11691,13 @@ function WalletDropdownEmptyState() {
11344
11691
  }
11345
11692
 
11346
11693
  // src/widget/features/wallet/components/CryptoWalletDropdownContent.tsx
11347
- var import_jsx_runtime33 = require("react/jsx-runtime");
11694
+ var import_jsx_runtime34 = require("react/jsx-runtime");
11348
11695
  function CryptoWalletDropdownContent({
11349
11696
  browserWallets,
11350
11697
  handleWalletConnect,
11351
11698
  handleWalletSelect
11352
11699
  }) {
11353
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
11700
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
11354
11701
  "div",
11355
11702
  {
11356
11703
  style: {
@@ -11367,10 +11714,10 @@ function CryptoWalletDropdownContent({
11367
11714
  scrollbarColor: `${colors.muted} transparent`
11368
11715
  },
11369
11716
  children: [
11370
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { padding: spacing[3] }, children: [
11371
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11372
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11373
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11717
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { padding: spacing[3] }, children: [
11718
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11719
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: dropdownStatusDotStyle(colors.green[500]) }),
11720
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11374
11721
  "span",
11375
11722
  {
11376
11723
  style: {
@@ -11382,7 +11729,7 @@ function CryptoWalletDropdownContent({
11382
11729
  }
11383
11730
  )
11384
11731
  ] }),
11385
- browserWallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11732
+ browserWallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11386
11733
  "div",
11387
11734
  {
11388
11735
  style: {
@@ -11390,7 +11737,7 @@ function CryptoWalletDropdownContent({
11390
11737
  flexDirection: "column",
11391
11738
  gap: spacing[1]
11392
11739
  },
11393
- children: browserWallets.map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11740
+ children: browserWallets.map((wallet) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11394
11741
  DetectedWalletRow,
11395
11742
  {
11396
11743
  wallet,
@@ -11399,19 +11746,19 @@ function CryptoWalletDropdownContent({
11399
11746
  wallet.meta.id
11400
11747
  ))
11401
11748
  }
11402
- ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(WalletDropdownEmptyState, {})
11749
+ ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(WalletDropdownEmptyState, {})
11403
11750
  ] }),
11404
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: dividerBorderStyle }),
11405
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(WalletConnectRow, { onClick: handleWalletConnect }) })
11751
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: dividerBorderStyle }),
11752
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { padding: spacing[3] }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(WalletConnectRow, { onClick: handleWalletConnect }) })
11406
11753
  ]
11407
11754
  }
11408
11755
  );
11409
11756
  }
11410
11757
 
11411
11758
  // src/widget/features/wallet/components/FiatComingSoonBanner.tsx
11412
- var import_jsx_runtime34 = require("react/jsx-runtime");
11759
+ var import_jsx_runtime35 = require("react/jsx-runtime");
11413
11760
  function FiatComingSoonBanner() {
11414
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11761
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11415
11762
  "div",
11416
11763
  {
11417
11764
  style: {
@@ -11419,7 +11766,7 @@ function FiatComingSoonBanner() {
11419
11766
  backgroundColor: "rgba(245, 158, 11, 0.1)",
11420
11767
  borderBottom: "1px solid rgba(245, 158, 11, 0.2)"
11421
11768
  },
11422
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11769
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11423
11770
  "p",
11424
11771
  {
11425
11772
  style: {
@@ -11436,29 +11783,29 @@ function FiatComingSoonBanner() {
11436
11783
  }
11437
11784
 
11438
11785
  // src/widget/features/wallet/components/FiatMethodRow.tsx
11439
- var import_jsx_runtime35 = require("react/jsx-runtime");
11786
+ var import_jsx_runtime36 = require("react/jsx-runtime");
11440
11787
  function FiatMethodRow({
11441
11788
  method,
11442
11789
  onSelect
11443
11790
  }) {
11444
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11791
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11445
11792
  PaymentOptionRow,
11446
11793
  {
11447
11794
  onClick: onSelect,
11448
11795
  disabled: true,
11449
11796
  label: method.name,
11450
- icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { color: colors.mutedForeground }, children: method.icon })
11797
+ icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: colors.mutedForeground }, children: method.icon })
11451
11798
  }
11452
11799
  );
11453
11800
  }
11454
11801
 
11455
11802
  // src/widget/features/wallet/components/FiatPaymentDropdownContent.tsx
11456
- var import_jsx_runtime36 = require("react/jsx-runtime");
11803
+ var import_jsx_runtime37 = require("react/jsx-runtime");
11457
11804
  function FiatPaymentDropdownContent({
11458
11805
  fiatOptions: fiatOptions2,
11459
11806
  handleFiatSelect
11460
11807
  }) {
11461
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
11808
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11462
11809
  "div",
11463
11810
  {
11464
11811
  style: {
@@ -11472,11 +11819,11 @@ function FiatPaymentDropdownContent({
11472
11819
  animation: "tw-fade-in 0.2s ease-out"
11473
11820
  },
11474
11821
  children: [
11475
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FiatComingSoonBanner, {}),
11476
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { padding: spacing[3] }, children: [
11477
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11478
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: dropdownStatusDotStyle(colors.primary) }),
11479
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11822
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FiatComingSoonBanner, {}),
11823
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { padding: spacing[3] }, children: [
11824
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: dropdownSectionHeadingStyle, children: [
11825
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { style: dropdownStatusDotStyle(colors.primary) }),
11826
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11480
11827
  "span",
11481
11828
  {
11482
11829
  style: {
@@ -11488,7 +11835,7 @@ function FiatPaymentDropdownContent({
11488
11835
  }
11489
11836
  )
11490
11837
  ] }),
11491
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11838
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11492
11839
  "div",
11493
11840
  {
11494
11841
  style: {
@@ -11496,7 +11843,7 @@ function FiatPaymentDropdownContent({
11496
11843
  flexDirection: "column",
11497
11844
  gap: spacing[1]
11498
11845
  },
11499
- children: fiatOptions2.map((method) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11846
+ children: fiatOptions2.map((method) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11500
11847
  FiatMethodRow,
11501
11848
  {
11502
11849
  method,
@@ -11513,9 +11860,9 @@ function FiatPaymentDropdownContent({
11513
11860
  }
11514
11861
 
11515
11862
  // src/widget/features/wallet/components/paymentOptionIcons.tsx
11516
- var import_jsx_runtime37 = require("react/jsx-runtime");
11863
+ var import_jsx_runtime38 = require("react/jsx-runtime");
11517
11864
  function CryptoPaymentIcon() {
11518
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11865
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11519
11866
  "svg",
11520
11867
  {
11521
11868
  style: {
@@ -11527,7 +11874,7 @@ function CryptoPaymentIcon() {
11527
11874
  fill: "none",
11528
11875
  stroke: "currentColor",
11529
11876
  strokeWidth: 2,
11530
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11877
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11531
11878
  "path",
11532
11879
  {
11533
11880
  strokeLinecap: "round",
@@ -11539,7 +11886,7 @@ function CryptoPaymentIcon() {
11539
11886
  );
11540
11887
  }
11541
11888
  function FiatPaymentIcon() {
11542
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11889
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11543
11890
  "svg",
11544
11891
  {
11545
11892
  style: {
@@ -11552,94 +11899,94 @@ function FiatPaymentIcon() {
11552
11899
  stroke: "currentColor",
11553
11900
  strokeWidth: 2,
11554
11901
  children: [
11555
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
11556
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
11902
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
11903
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
11557
11904
  ]
11558
11905
  }
11559
11906
  );
11560
11907
  }
11561
11908
  function ApplePayIcon() {
11562
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11909
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
11563
11910
  "svg",
11564
11911
  {
11565
11912
  style: { width: "2rem", height: "1.25rem" },
11566
11913
  viewBox: "0 0 50 20",
11567
11914
  fill: "currentColor",
11568
11915
  children: [
11569
- /* @__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" }),
11570
- /* @__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" })
11916
+ /* @__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" }),
11917
+ /* @__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" })
11571
11918
  ]
11572
11919
  }
11573
11920
  );
11574
11921
  }
11575
11922
  function MPesaIcon() {
11576
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11923
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11577
11924
  "svg",
11578
11925
  {
11579
11926
  style: { width: "2rem", height: "1.25rem" },
11580
11927
  viewBox: "0 0 24 24",
11581
11928
  fill: "currentColor",
11582
- 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" })
11929
+ 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" })
11583
11930
  }
11584
11931
  );
11585
11932
  }
11586
11933
  function VenmoIcon() {
11587
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11934
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11588
11935
  "svg",
11589
11936
  {
11590
11937
  style: { width: "2rem", height: "1.25rem" },
11591
11938
  viewBox: "0 0 24 24",
11592
11939
  fill: "currentColor",
11593
- 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" })
11940
+ 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" })
11594
11941
  }
11595
11942
  );
11596
11943
  }
11597
11944
  function ZelleIcon() {
11598
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11945
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11599
11946
  "svg",
11600
11947
  {
11601
11948
  style: { width: "2rem", height: "1.25rem" },
11602
11949
  viewBox: "0 0 24 24",
11603
11950
  fill: "currentColor",
11604
- 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" })
11951
+ 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" })
11605
11952
  }
11606
11953
  );
11607
11954
  }
11608
11955
 
11609
11956
  // src/widget/features/wallet/components/fiatOptions.tsx
11610
- var import_jsx_runtime38 = require("react/jsx-runtime");
11957
+ var import_jsx_runtime39 = require("react/jsx-runtime");
11611
11958
  var fiatOptions = [
11612
11959
  {
11613
11960
  id: "applepay",
11614
11961
  name: "Apple Pay",
11615
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ApplePayIcon, {})
11962
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ApplePayIcon, {})
11616
11963
  },
11617
11964
  {
11618
11965
  id: "mpesa",
11619
11966
  name: "M-Pesa",
11620
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MPesaIcon, {})
11967
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MPesaIcon, {})
11621
11968
  },
11622
11969
  {
11623
11970
  id: "venmo",
11624
11971
  name: "Venmo",
11625
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(VenmoIcon, {})
11972
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VenmoIcon, {})
11626
11973
  },
11627
11974
  {
11628
11975
  id: "zelle",
11629
11976
  name: "Zelle",
11630
- icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ZelleIcon, {})
11977
+ icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ZelleIcon, {})
11631
11978
  }
11632
11979
  ];
11633
11980
 
11634
11981
  // src/widget/features/wallet/components/PaymentDropdownButton.tsx
11635
- var import_jsx_runtime39 = require("react/jsx-runtime");
11982
+ var import_jsx_runtime40 = require("react/jsx-runtime");
11636
11983
  function PaymentDropdownButton({
11637
11984
  icon,
11638
11985
  isOpen,
11639
11986
  label,
11640
11987
  onClick
11641
11988
  }) {
11642
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
11989
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11643
11990
  "button",
11644
11991
  {
11645
11992
  type: "button",
@@ -11665,7 +12012,7 @@ function PaymentDropdownButton({
11665
12012
  },
11666
12013
  children: [
11667
12014
  icon,
11668
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12015
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11669
12016
  "span",
11670
12017
  {
11671
12018
  style: {
@@ -11678,7 +12025,7 @@ function PaymentDropdownButton({
11678
12025
  children: label
11679
12026
  }
11680
12027
  ),
11681
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12028
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11682
12029
  "svg",
11683
12030
  {
11684
12031
  style: {
@@ -11692,7 +12039,7 @@ function PaymentDropdownButton({
11692
12039
  fill: "none",
11693
12040
  stroke: "currentColor",
11694
12041
  strokeWidth: 2,
11695
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
12042
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
11696
12043
  }
11697
12044
  )
11698
12045
  ]
@@ -11701,7 +12048,7 @@ function PaymentDropdownButton({
11701
12048
  }
11702
12049
 
11703
12050
  // src/widget/features/wallet/components/HomePaymentOptions.tsx
11704
- var import_jsx_runtime40 = require("react/jsx-runtime");
12051
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11705
12052
  function HomePaymentOptions({
11706
12053
  browserWallets,
11707
12054
  cryptoDropdownRef,
@@ -11715,7 +12062,7 @@ function HomePaymentOptions({
11715
12062
  setIsCryptoDropdownOpen,
11716
12063
  setIsFiatDropdownOpen
11717
12064
  }) {
11718
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12065
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11719
12066
  "div",
11720
12067
  {
11721
12068
  style: {
@@ -11728,16 +12075,16 @@ function HomePaymentOptions({
11728
12075
  minHeight: "6rem"
11729
12076
  },
11730
12077
  children: [
11731
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12078
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11732
12079
  "div",
11733
12080
  {
11734
12081
  style: isCryptoDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11735
12082
  ref: cryptoDropdownRef,
11736
12083
  children: [
11737
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12084
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11738
12085
  PaymentDropdownButton,
11739
12086
  {
11740
- icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CryptoPaymentIcon, {}),
12087
+ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CryptoPaymentIcon, {}),
11741
12088
  isOpen: isCryptoDropdownOpen,
11742
12089
  label: "Pay with crypto",
11743
12090
  onClick: () => {
@@ -11746,7 +12093,7 @@ function HomePaymentOptions({
11746
12093
  }
11747
12094
  }
11748
12095
  ),
11749
- isCryptoDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12096
+ isCryptoDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11750
12097
  CryptoWalletDropdownContent,
11751
12098
  {
11752
12099
  browserWallets,
@@ -11757,9 +12104,9 @@ function HomePaymentOptions({
11757
12104
  ]
11758
12105
  }
11759
12106
  ),
11760
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { style: dividerRowStyle, children: [
11761
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) }),
11762
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12107
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { style: dividerRowStyle, children: [
12108
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) }),
12109
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11763
12110
  "span",
11764
12111
  {
11765
12112
  style: {
@@ -11770,18 +12117,18 @@ function HomePaymentOptions({
11770
12117
  children: "Or"
11771
12118
  }
11772
12119
  ),
11773
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) })
12120
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { style: mutedOrDividerStyle(isDarkTheme) })
11774
12121
  ] }),
11775
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
12122
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
11776
12123
  "div",
11777
12124
  {
11778
12125
  style: isFiatDropdownOpen ? dropdownWrapperOpenStyle : dropdownWrapperStyle,
11779
12126
  ref: fiatDropdownRef,
11780
12127
  children: [
11781
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12128
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11782
12129
  PaymentDropdownButton,
11783
12130
  {
11784
- icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FiatPaymentIcon, {}),
12131
+ icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(FiatPaymentIcon, {}),
11785
12132
  isOpen: isFiatDropdownOpen,
11786
12133
  label: "Pay with fiat",
11787
12134
  onClick: () => {
@@ -11790,7 +12137,7 @@ function HomePaymentOptions({
11790
12137
  }
11791
12138
  }
11792
12139
  ),
11793
- isFiatDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12140
+ isFiatDropdownOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11794
12141
  FiatPaymentDropdownContent,
11795
12142
  {
11796
12143
  fiatOptions,
@@ -11806,7 +12153,7 @@ function HomePaymentOptions({
11806
12153
  }
11807
12154
 
11808
12155
  // src/widget/features/wallet/hooks/useHomeWalletActions.ts
11809
- var import_react30 = require("react");
12156
+ var import_react32 = require("react");
11810
12157
 
11811
12158
  // src/config/walletconnect.ts
11812
12159
  var import_appkit_universal_connector = require("@reown/appkit-universal-connector");
@@ -11929,12 +12276,12 @@ function useHomeWalletActions({
11929
12276
  detectedWallets,
11930
12277
  setCurrentStep
11931
12278
  }) {
11932
- const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = (0, import_react30.useState)(false);
11933
- const [isFiatDropdownOpen, setIsFiatDropdownOpen] = (0, import_react30.useState)(false);
11934
- const [universalConnector, setUniversalConnector] = (0, import_react30.useState)();
11935
- const cryptoDropdownRef = (0, import_react30.useRef)(null);
11936
- const fiatDropdownRef = (0, import_react30.useRef)(null);
11937
- (0, import_react30.useEffect)(() => {
12279
+ const [isCryptoDropdownOpen, setIsCryptoDropdownOpen] = (0, import_react32.useState)(false);
12280
+ const [isFiatDropdownOpen, setIsFiatDropdownOpen] = (0, import_react32.useState)(false);
12281
+ const [universalConnector, setUniversalConnector] = (0, import_react32.useState)();
12282
+ const cryptoDropdownRef = (0, import_react32.useRef)(null);
12283
+ const fiatDropdownRef = (0, import_react32.useRef)(null);
12284
+ (0, import_react32.useEffect)(() => {
11938
12285
  const handleClickOutside = (event) => {
11939
12286
  if (cryptoDropdownRef.current && !cryptoDropdownRef.current.contains(event.target)) {
11940
12287
  setIsCryptoDropdownOpen(false);
@@ -11946,7 +12293,7 @@ function useHomeWalletActions({
11946
12293
  document.addEventListener("mousedown", handleClickOutside);
11947
12294
  return () => document.removeEventListener("mousedown", handleClickOutside);
11948
12295
  }, []);
11949
- (0, import_react30.useEffect)(() => {
12296
+ (0, import_react32.useEffect)(() => {
11950
12297
  getUniversalConnector().then(setUniversalConnector);
11951
12298
  }, []);
11952
12299
  const handleWalletSelect = async (wallet) => {
@@ -11987,7 +12334,7 @@ function useHomeWalletActions({
11987
12334
  }
11988
12335
 
11989
12336
  // src/widget/pages/Home.tsx
11990
- var import_jsx_runtime41 = require("react/jsx-runtime");
12337
+ var import_jsx_runtime42 = require("react/jsx-runtime");
11991
12338
  function Home({ style: _style }) {
11992
12339
  const { amount, setAmount, amountInputMode, setAmountInputMode } = useDepositForm();
11993
12340
  const { setCurrentStep } = useDepositNavigation();
@@ -12021,7 +12368,7 @@ function Home({ style: _style }) {
12021
12368
  detectedWallets,
12022
12369
  setCurrentStep
12023
12370
  });
12024
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12371
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12025
12372
  "div",
12026
12373
  {
12027
12374
  style: {
@@ -12030,7 +12377,7 @@ function Home({ style: _style }) {
12030
12377
  minHeight: "500px"
12031
12378
  },
12032
12379
  children: [
12033
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12380
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12034
12381
  "div",
12035
12382
  {
12036
12383
  style: {
@@ -12040,7 +12387,7 @@ function Home({ style: _style }) {
12040
12387
  padding: `${spacing[4]} ${spacing[4]}`,
12041
12388
  borderBottom: `1px solid ${colors.border}`
12042
12389
  },
12043
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12390
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12044
12391
  "h1",
12045
12392
  {
12046
12393
  style: {
@@ -12053,7 +12400,7 @@ function Home({ style: _style }) {
12053
12400
  )
12054
12401
  }
12055
12402
  ),
12056
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
12403
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12057
12404
  "div",
12058
12405
  {
12059
12406
  style: {
@@ -12067,7 +12414,7 @@ function Home({ style: _style }) {
12067
12414
  position: "relative"
12068
12415
  },
12069
12416
  children: [
12070
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12417
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12071
12418
  "p",
12072
12419
  {
12073
12420
  style: {
@@ -12078,7 +12425,7 @@ function Home({ style: _style }) {
12078
12425
  children: "Enter an amount"
12079
12426
  }
12080
12427
  ),
12081
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12428
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12082
12429
  AmountInputDisplay,
12083
12430
  {
12084
12431
  amount,
@@ -12089,7 +12436,7 @@ function Home({ style: _style }) {
12089
12436
  style: { marginBottom: spacing[8] }
12090
12437
  }
12091
12438
  ),
12092
- amountValidationMessage ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12439
+ amountValidationMessage ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12093
12440
  "p",
12094
12441
  {
12095
12442
  style: {
@@ -12102,7 +12449,7 @@ function Home({ style: _style }) {
12102
12449
  },
12103
12450
  children: amountValidationMessage
12104
12451
  }
12105
- ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12452
+ ) : minAmountUsd != null || maxAmountUsd != null ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12106
12453
  "p",
12107
12454
  {
12108
12455
  style: {
@@ -12118,7 +12465,7 @@ function Home({ style: _style }) {
12118
12465
  ].filter(Boolean).join(" \u2022 ")
12119
12466
  }
12120
12467
  ) : null,
12121
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12468
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12122
12469
  HomePaymentOptions,
12123
12470
  {
12124
12471
  browserWallets,
@@ -12137,14 +12484,14 @@ function Home({ style: _style }) {
12137
12484
  ]
12138
12485
  }
12139
12486
  ),
12140
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(WidgetSecurityFooter, {})
12487
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(WidgetSecurityFooter, {})
12141
12488
  ]
12142
12489
  }
12143
12490
  );
12144
12491
  }
12145
12492
 
12146
12493
  // src/widget/pages/SelectToken.tsx
12147
- var import_jsx_runtime42 = require("react/jsx-runtime");
12494
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12148
12495
  function SelectToken({ style }) {
12149
12496
  const { selectedChain, setSelectedChain, setSelectedToken } = useDepositForm();
12150
12497
  const { goBack } = useDepositNavigation();
@@ -12175,7 +12522,7 @@ function SelectToken({ style }) {
12175
12522
  walletAddress,
12176
12523
  yourWalletTokens
12177
12524
  });
12178
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12525
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12179
12526
  "div",
12180
12527
  {
12181
12528
  style: {
@@ -12186,7 +12533,7 @@ function SelectToken({ style }) {
12186
12533
  ...style
12187
12534
  },
12188
12535
  children: [
12189
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12536
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12190
12537
  "div",
12191
12538
  {
12192
12539
  style: {
@@ -12196,7 +12543,7 @@ function SelectToken({ style }) {
12196
12543
  borderBottom: `1px solid ${colors.border}`
12197
12544
  },
12198
12545
  children: [
12199
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12546
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12200
12547
  "button",
12201
12548
  {
12202
12549
  type: "button",
@@ -12211,7 +12558,7 @@ function SelectToken({ style }) {
12211
12558
  cursor: "pointer"
12212
12559
  },
12213
12560
  "aria-label": "Go back",
12214
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12561
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12215
12562
  "svg",
12216
12563
  {
12217
12564
  style: {
@@ -12223,7 +12570,7 @@ function SelectToken({ style }) {
12223
12570
  fill: "none",
12224
12571
  stroke: "currentColor",
12225
12572
  strokeWidth: 2,
12226
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12573
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12227
12574
  "path",
12228
12575
  {
12229
12576
  strokeLinecap: "round",
@@ -12235,7 +12582,7 @@ function SelectToken({ style }) {
12235
12582
  )
12236
12583
  }
12237
12584
  ),
12238
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12585
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12239
12586
  "h1",
12240
12587
  {
12241
12588
  style: {
@@ -12252,7 +12599,7 @@ function SelectToken({ style }) {
12252
12599
  ]
12253
12600
  }
12254
12601
  ),
12255
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
12602
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
12256
12603
  "div",
12257
12604
  {
12258
12605
  style: {
@@ -12261,7 +12608,7 @@ function SelectToken({ style }) {
12261
12608
  overflow: "hidden"
12262
12609
  },
12263
12610
  children: [
12264
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12611
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12265
12612
  ChainSelectorPanel,
12266
12613
  {
12267
12614
  error,
@@ -12272,7 +12619,7 @@ function SelectToken({ style }) {
12272
12619
  popularChains
12273
12620
  }
12274
12621
  ),
12275
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12622
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12276
12623
  TokenSelectorPanel,
12277
12624
  {
12278
12625
  filteredTokens,
@@ -12293,17 +12640,17 @@ function SelectToken({ style }) {
12293
12640
  ]
12294
12641
  }
12295
12642
  ),
12296
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(WidgetSecurityFooter, {})
12643
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(WidgetSecurityFooter, {})
12297
12644
  ]
12298
12645
  }
12299
12646
  );
12300
12647
  }
12301
12648
 
12302
12649
  // src/widget/pages/CryptoPay.tsx
12303
- var import_react33 = require("react");
12650
+ var import_react35 = require("react");
12304
12651
 
12305
12652
  // src/widget/features/route-preview/hooks/useRoutePreviewModel.ts
12306
- var import_react31 = require("react");
12653
+ var import_react33 = require("react");
12307
12654
  function useRoutePreviewModel({
12308
12655
  amountUsd,
12309
12656
  amountValidationError,
@@ -12316,7 +12663,7 @@ function useRoutePreviewModel({
12316
12663
  walletAddress
12317
12664
  }) {
12318
12665
  const { chains } = useChains();
12319
- const destinationConfig = (0, import_react31.useMemo)(
12666
+ const destinationConfig = (0, import_react33.useMemo)(
12320
12667
  () => ({
12321
12668
  dappName: config.messages?.title || "DApp",
12322
12669
  toChain: config.routes.toChain,
@@ -12330,7 +12677,7 @@ function useRoutePreviewModel({
12330
12677
  config.routes.toToken
12331
12678
  ]
12332
12679
  );
12333
- const routeConfig = (0, import_react31.useMemo)(() => {
12680
+ const routeConfig = (0, import_react33.useMemo)(() => {
12334
12681
  const toChainId = config.routes.toChain;
12335
12682
  const toChainKey = normalizeChainKey2(toChainId);
12336
12683
  const toChain = toChainKey ? chains.find(
@@ -12364,7 +12711,7 @@ function useRoutePreviewModel({
12364
12711
  walletAddress
12365
12712
  ]);
12366
12713
  const routeBuilderState = useRouteBuilder(routeConfig);
12367
- const routePrerequisiteError = (0, import_react31.useMemo)(() => {
12714
+ const routePrerequisiteError = (0, import_react33.useMemo)(() => {
12368
12715
  if (!isReady) return;
12369
12716
  if (!selectedChain) {
12370
12717
  return "Select a source chain to fetch a route.";
@@ -12404,7 +12751,7 @@ function useRoutePreviewModel({
12404
12751
  }
12405
12752
 
12406
12753
  // src/widget/features/transaction/components/CryptoPaySwipeSection.tsx
12407
- var import_jsx_runtime43 = require("react/jsx-runtime");
12754
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12408
12755
  function CryptoPaySwipeSection({
12409
12756
  actionErrorMessage,
12410
12757
  canSwipe,
@@ -12420,13 +12767,13 @@ function CryptoPaySwipeSection({
12420
12767
  swipeResetKey
12421
12768
  }) {
12422
12769
  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";
12423
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12770
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12424
12771
  "div",
12425
12772
  {
12426
12773
  style: {
12427
12774
  padding: `${spacing[4]} ${spacing[6]}`
12428
12775
  },
12429
- children: selectedToken?.chainData ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12776
+ children: selectedToken?.chainData ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12430
12777
  SwipeToConfirmTokens,
12431
12778
  {
12432
12779
  text: swipeText,
@@ -12446,7 +12793,7 @@ function CryptoPaySwipeSection({
12446
12793
  }
12447
12794
 
12448
12795
  // src/widget/features/transaction/components/ErrorRecoveryCard.tsx
12449
- var import_jsx_runtime44 = require("react/jsx-runtime");
12796
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12450
12797
  function ErrorRecoveryCard({
12451
12798
  errorMessage,
12452
12799
  errorSuggestion,
@@ -12457,7 +12804,7 @@ function ErrorRecoveryCard({
12457
12804
  renderErrorIcon,
12458
12805
  transactionHash
12459
12806
  }) {
12460
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12807
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12461
12808
  "div",
12462
12809
  {
12463
12810
  style: {
@@ -12469,7 +12816,7 @@ function ErrorRecoveryCard({
12469
12816
  padding: `${spacing[8]} ${spacing[6]}`
12470
12817
  },
12471
12818
  children: [
12472
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12819
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12473
12820
  "div",
12474
12821
  {
12475
12822
  style: {
@@ -12485,7 +12832,7 @@ function ErrorRecoveryCard({
12485
12832
  children: renderErrorIcon()
12486
12833
  }
12487
12834
  ),
12488
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12835
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12489
12836
  "h2",
12490
12837
  {
12491
12838
  style: {
@@ -12498,7 +12845,7 @@ function ErrorRecoveryCard({
12498
12845
  children: errorTitle
12499
12846
  }
12500
12847
  ),
12501
- errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12848
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12502
12849
  "p",
12503
12850
  {
12504
12851
  style: {
@@ -12510,7 +12857,7 @@ function ErrorRecoveryCard({
12510
12857
  children: errorMessage
12511
12858
  }
12512
12859
  ) : null,
12513
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12860
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12514
12861
  "p",
12515
12862
  {
12516
12863
  style: {
@@ -12523,13 +12870,13 @@ function ErrorRecoveryCard({
12523
12870
  children: errorSuggestion
12524
12871
  }
12525
12872
  ),
12526
- explorerUrl && transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12873
+ explorerUrl && transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12527
12874
  "div",
12528
12875
  {
12529
12876
  style: {
12530
12877
  marginBottom: spacing[6]
12531
12878
  },
12532
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12879
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12533
12880
  TransactionHashLink,
12534
12881
  {
12535
12882
  explorerUrl,
@@ -12539,7 +12886,7 @@ function ErrorRecoveryCard({
12539
12886
  )
12540
12887
  }
12541
12888
  ) : null,
12542
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
12889
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12543
12890
  "div",
12544
12891
  {
12545
12892
  style: {
@@ -12550,7 +12897,7 @@ function ErrorRecoveryCard({
12550
12897
  maxWidth: "20rem"
12551
12898
  },
12552
12899
  children: [
12553
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12900
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12554
12901
  "button",
12555
12902
  {
12556
12903
  type: "button",
@@ -12570,7 +12917,7 @@ function ErrorRecoveryCard({
12570
12917
  children: "Try Again"
12571
12918
  }
12572
12919
  ),
12573
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12920
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12574
12921
  "button",
12575
12922
  {
12576
12923
  type: "button",
@@ -12599,7 +12946,7 @@ function ErrorRecoveryCard({
12599
12946
  }
12600
12947
 
12601
12948
  // src/widget/features/transaction/components/SuccessSummaryCard.tsx
12602
- var import_jsx_runtime45 = require("react/jsx-runtime");
12949
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12603
12950
  function SuccessSummaryCard({
12604
12951
  amount,
12605
12952
  explorerUrl,
@@ -12609,7 +12956,7 @@ function SuccessSummaryCard({
12609
12956
  selectedTokenSymbol,
12610
12957
  transactionHash
12611
12958
  }) {
12612
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12959
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12613
12960
  "div",
12614
12961
  {
12615
12962
  style: {
@@ -12623,7 +12970,7 @@ function SuccessSummaryCard({
12623
12970
  animation: "fade-in 0.3s ease-out"
12624
12971
  },
12625
12972
  children: [
12626
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12973
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12627
12974
  "div",
12628
12975
  {
12629
12976
  style: {
@@ -12633,7 +12980,7 @@ function SuccessSummaryCard({
12633
12980
  marginBottom: "2rem"
12634
12981
  },
12635
12982
  children: [
12636
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12983
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12637
12984
  "div",
12638
12985
  {
12639
12986
  style: {
@@ -12647,7 +12994,7 @@ function SuccessSummaryCard({
12647
12994
  animation: "scale-in 0.3s ease-out",
12648
12995
  marginBottom: "0.75rem"
12649
12996
  },
12650
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12997
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12651
12998
  "svg",
12652
12999
  {
12653
13000
  style: {
@@ -12660,7 +13007,7 @@ function SuccessSummaryCard({
12660
13007
  stroke: "currentColor",
12661
13008
  strokeWidth: 2.5,
12662
13009
  "aria-hidden": "true",
12663
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13010
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12664
13011
  "path",
12665
13012
  {
12666
13013
  strokeLinecap: "round",
@@ -12672,7 +13019,7 @@ function SuccessSummaryCard({
12672
13019
  )
12673
13020
  }
12674
13021
  ),
12675
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13022
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12676
13023
  "div",
12677
13024
  {
12678
13025
  style: {
@@ -12686,7 +13033,7 @@ function SuccessSummaryCard({
12686
13033
  ]
12687
13034
  }
12688
13035
  ),
12689
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13036
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12690
13037
  "div",
12691
13038
  {
12692
13039
  style: {
@@ -12696,7 +13043,7 @@ function SuccessSummaryCard({
12696
13043
  marginBottom: "2rem"
12697
13044
  },
12698
13045
  children: [
12699
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13046
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12700
13047
  "div",
12701
13048
  {
12702
13049
  style: {
@@ -12713,7 +13060,7 @@ function SuccessSummaryCard({
12713
13060
  ]
12714
13061
  }
12715
13062
  ),
12716
- selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13063
+ selectedTokenIconUrl && selectedTokenSymbol ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12717
13064
  "div",
12718
13065
  {
12719
13066
  style: {
@@ -12723,7 +13070,7 @@ function SuccessSummaryCard({
12723
13070
  marginTop: "0.375rem"
12724
13071
  },
12725
13072
  children: [
12726
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13073
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12727
13074
  "img",
12728
13075
  {
12729
13076
  src: selectedTokenIconUrl,
@@ -12735,7 +13082,7 @@ function SuccessSummaryCard({
12735
13082
  }
12736
13083
  }
12737
13084
  ),
12738
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
13085
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
12739
13086
  "span",
12740
13087
  {
12741
13088
  style: {
@@ -12754,13 +13101,13 @@ function SuccessSummaryCard({
12754
13101
  ]
12755
13102
  }
12756
13103
  ),
12757
- transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13104
+ transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12758
13105
  "div",
12759
13106
  {
12760
13107
  style: {
12761
13108
  marginBottom: "2rem"
12762
13109
  },
12763
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13110
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12764
13111
  TransactionHashLink,
12765
13112
  {
12766
13113
  explorerUrl,
@@ -12770,14 +13117,14 @@ function SuccessSummaryCard({
12770
13117
  )
12771
13118
  }
12772
13119
  ) : null,
12773
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13120
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12774
13121
  "div",
12775
13122
  {
12776
13123
  style: {
12777
13124
  width: "100%",
12778
13125
  padding: "1rem"
12779
13126
  },
12780
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
13127
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12781
13128
  "button",
12782
13129
  {
12783
13130
  type: "button",
@@ -12803,8 +13150,9 @@ function SuccessSummaryCard({
12803
13150
  }
12804
13151
 
12805
13152
  // src/widget/features/transaction/hooks/useTransactionActionModel.ts
12806
- var import_react32 = require("react");
13153
+ var import_react34 = require("react");
12807
13154
  var import_viem2 = require("viem");
13155
+ init_constants();
12808
13156
  function normalizeTokenAddressForCompare(chain, addr) {
12809
13157
  const chainType = (chain.type ?? chain.chainType ?? "").toLowerCase();
12810
13158
  const value = (addr ?? "").trim();
@@ -12825,12 +13173,20 @@ function useTransactionActionModel({
12825
13173
  walletAddress,
12826
13174
  walletStatus
12827
13175
  }) {
12828
- const feeDataCacheRef = (0, import_react32.useRef)({});
13176
+ const feeDataCacheRef = (0, import_react34.useRef)({});
12829
13177
  const { isSubmitting, submitTransaction } = useTransactionSubmit();
13178
+ const { trackEvent } = useGTM(GTM_ID);
13179
+ const destinationConfig = (() => {
13180
+ try {
13181
+ return Trustware.getConfig();
13182
+ } catch {
13183
+ return void 0;
13184
+ }
13185
+ })();
12830
13186
  const chainType = selectedChain?.type ?? selectedChain?.chainType;
12831
13187
  const chainTypeNormalized = (chainType ?? "").toLowerCase();
12832
13188
  const isEvm = chainTypeNormalized === "evm";
12833
- const backendChainId2 = (0, import_react32.useMemo)(() => {
13189
+ const backendChainId2 = (0, import_react34.useMemo)(() => {
12834
13190
  const chainRef = routeResult?.txReq?.chainId ?? selectedChain?.networkIdentifier ?? selectedChain?.chainId ?? selectedChain?.id;
12835
13191
  if (chainRef == null) return null;
12836
13192
  return String(chainRef);
@@ -12840,23 +13196,23 @@ function useTransactionActionModel({
12840
13196
  selectedChain?.id,
12841
13197
  selectedChain?.networkIdentifier
12842
13198
  ]);
12843
- const isNativeSelected = (0, import_react32.useMemo)(() => {
13199
+ const isNativeSelected = (0, import_react34.useMemo)(() => {
12844
13200
  const address = selectedToken?.address;
12845
13201
  return isNativeTokenAddress(address, chainType) || isZeroAddrLike(address, chainType) || normalizeTokenAddressForCompare(selectedChain, address) === normalizeTokenAddressForCompare(
12846
13202
  selectedChain,
12847
13203
  getNativeTokenAddress2(chainType)
12848
13204
  );
12849
13205
  }, [chainType, selectedChain, selectedToken?.address]);
12850
- const spender = (0, import_react32.useMemo)(() => {
13206
+ const spender = (0, import_react34.useMemo)(() => {
12851
13207
  const txReq = routeResult?.txReq;
12852
13208
  const addr = txReq?.to ?? txReq?.target;
12853
13209
  return addr ?? null;
12854
13210
  }, [routeResult?.txReq]);
12855
- const [allowanceWei, setAllowanceWei] = (0, import_react32.useState)(0n);
12856
- const [isReadingAllowance, setIsReadingAllowance] = (0, import_react32.useState)(false);
12857
- const [isApproving, setIsApproving] = (0, import_react32.useState)(false);
12858
- const [gasReservationWei, setGasReservationWei] = (0, import_react32.useState)(0n);
12859
- const readAllowance = (0, import_react32.useCallback)(async () => {
13211
+ const [allowanceWei, setAllowanceWei] = (0, import_react34.useState)(0n);
13212
+ const [isReadingAllowance, setIsReadingAllowance] = (0, import_react34.useState)(false);
13213
+ const [isApproving, setIsApproving] = (0, import_react34.useState)(false);
13214
+ const [gasReservationWei, setGasReservationWei] = (0, import_react34.useState)(0n);
13215
+ const readAllowance = (0, import_react34.useCallback)(async () => {
12860
13216
  if (!isEvm || isNativeSelected || !backendChainId2 || !walletAddress || !spender || !selectedToken?.address) {
12861
13217
  setAllowanceWei(0n);
12862
13218
  return;
@@ -12883,11 +13239,11 @@ function useTransactionActionModel({
12883
13239
  spender,
12884
13240
  walletAddress
12885
13241
  ]);
12886
- (0, import_react32.useEffect)(() => {
13242
+ (0, import_react34.useEffect)(() => {
12887
13243
  void readAllowance();
12888
13244
  }, [readAllowance]);
12889
13245
  const needsApproval = isEvm && !isNativeSelected && !!walletAddress && !!spender && amountWei > 0n && allowanceWei < amountWei;
12890
- const waitForApprovalConfirmation = (0, import_react32.useCallback)(
13246
+ const waitForApprovalConfirmation = (0, import_react34.useCallback)(
12891
13247
  async (chainId, txHash) => {
12892
13248
  const timeoutMs = 12e4;
12893
13249
  const intervalMs = 2e3;
@@ -12906,7 +13262,7 @@ function useTransactionActionModel({
12906
13262
  },
12907
13263
  []
12908
13264
  );
12909
- const handleApproveExact = (0, import_react32.useCallback)(async () => {
13265
+ const handleApproveExact = (0, import_react34.useCallback)(async () => {
12910
13266
  if (isApproving || amountWei <= 0n || !walletAddress || !spender || !selectedToken?.address) {
12911
13267
  return;
12912
13268
  }
@@ -12914,6 +13270,13 @@ function useTransactionActionModel({
12914
13270
  if (!wallet || wallet.ecosystem !== "evm") {
12915
13271
  return;
12916
13272
  }
13273
+ trackEvent("token_approval_initiated", {
13274
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13275
+ from_token: selectedToken?.symbol,
13276
+ to_chain: destinationConfig?.routes.toChain,
13277
+ to_token: destinationConfig?.routes.toToken,
13278
+ domain: window.origin
13279
+ });
12917
13280
  setIsApproving(true);
12918
13281
  try {
12919
13282
  const targetChain = Number(
@@ -12971,17 +13334,23 @@ function useTransactionActionModel({
12971
13334
  }, [
12972
13335
  amountWei,
12973
13336
  backendChainId2,
13337
+ destinationConfig?.routes.toChain,
13338
+ destinationConfig?.routes.toToken,
12974
13339
  isApproving,
12975
13340
  readAllowance,
12976
13341
  routeResult?.txReq?.chainId,
13342
+ selectedChain?.axelarChainName,
12977
13343
  selectedChain?.chainId,
12978
13344
  selectedChain?.id,
13345
+ selectedChain?.networkName,
12979
13346
  selectedToken?.address,
13347
+ selectedToken?.symbol,
12980
13348
  spender,
13349
+ trackEvent,
12981
13350
  waitForApprovalConfirmation,
12982
13351
  walletAddress
12983
13352
  ]);
12984
- const getCachedFeeData = (0, import_react32.useCallback)(async () => {
13353
+ const getCachedFeeData = (0, import_react34.useCallback)(async () => {
12985
13354
  if (!backendChainId2) return {};
12986
13355
  const now = Date.now();
12987
13356
  const cache = feeDataCacheRef.current;
@@ -13004,7 +13373,7 @@ function useTransactionActionModel({
13004
13373
  }
13005
13374
  return cache.inflight;
13006
13375
  }, [backendChainId2]);
13007
- const estimateGasReservationWei = (0, import_react32.useCallback)(async () => {
13376
+ const estimateGasReservationWei = (0, import_react34.useCallback)(async () => {
13008
13377
  if (!isNativeSelected) {
13009
13378
  setGasReservationWei(0n);
13010
13379
  return 0n;
@@ -13068,18 +13437,35 @@ function useTransactionActionModel({
13068
13437
  routeResult?.txReq,
13069
13438
  walletAddress
13070
13439
  ]);
13071
- (0, import_react32.useEffect)(() => {
13440
+ (0, import_react34.useEffect)(() => {
13072
13441
  if (routeResult) {
13073
13442
  void estimateGasReservationWei();
13074
13443
  }
13075
13444
  }, [estimateGasReservationWei, routeResult]);
13076
- const handleConfirm = (0, import_react32.useCallback)(async () => {
13445
+ const handleConfirm = (0, import_react34.useCallback)(async () => {
13077
13446
  if (!routeResult) {
13078
13447
  return;
13079
13448
  }
13449
+ trackEvent("payment_initiated", {
13450
+ from_chain: selectedChain?.networkName ?? selectedChain?.axelarChainName ?? selectedChain?.chainId,
13451
+ from_token: selectedToken?.symbol,
13452
+ to_chain: destinationConfig?.routes.toChain,
13453
+ to_token: destinationConfig?.routes.toToken,
13454
+ domain: window.origin
13455
+ });
13080
13456
  await submitTransaction(routeResult);
13081
- }, [routeResult, submitTransaction]);
13082
- const handleSwipeConfirm = (0, import_react32.useCallback)(async () => {
13457
+ }, [
13458
+ destinationConfig?.routes.toChain,
13459
+ destinationConfig?.routes.toToken,
13460
+ routeResult,
13461
+ selectedChain?.axelarChainName,
13462
+ selectedChain?.chainId,
13463
+ selectedChain?.networkName,
13464
+ selectedToken?.symbol,
13465
+ submitTransaction,
13466
+ trackEvent
13467
+ ]);
13468
+ const handleSwipeConfirm = (0, import_react34.useCallback)(async () => {
13083
13469
  if (needsApproval) {
13084
13470
  await handleApproveExact();
13085
13471
  return;
@@ -13088,7 +13474,7 @@ function useTransactionActionModel({
13088
13474
  }, [handleApproveExact, handleConfirm, needsApproval]);
13089
13475
  const isWalletConnected = walletStatus === "connected";
13090
13476
  const canSwipe = parsedAmount > 0 && !!selectedToken && isWalletConnected && !isLoadingRoute && !isSubmitting && !!routeResult && !actionErrorMessage && !isApproving && !isReadingAllowance;
13091
- const swipeResetKey = (0, import_react32.useMemo)(() => {
13477
+ const swipeResetKey = (0, import_react34.useMemo)(() => {
13092
13478
  const tokenAddress = selectedToken ? normalizeAddress2(
13093
13479
  selectedToken.address,
13094
13480
  selectedToken?.chainData?.type ?? selectedToken?.chainData?.chainType
@@ -13115,7 +13501,7 @@ function useTransactionActionModel({
13115
13501
  }
13116
13502
 
13117
13503
  // src/widget/pages/CryptoPay.tsx
13118
- var import_jsx_runtime46 = require("react/jsx-runtime");
13504
+ var import_jsx_runtime47 = require("react/jsx-runtime");
13119
13505
  var SHOW_FEE_SUMMARY = false;
13120
13506
  function CryptoPay({ style: _style }) {
13121
13507
  const {
@@ -13132,12 +13518,12 @@ function CryptoPay({ style: _style }) {
13132
13518
  const { goBack, setCurrentStep, currentStep } = useDepositNavigation();
13133
13519
  const config = useTrustwareConfig();
13134
13520
  const { fixedFromAmountString, isFixedAmount, minAmountUsd, maxAmountUsd } = useAmountConstraints();
13135
- const routeRefreshMs = (0, import_react33.useMemo)(() => {
13521
+ const routeRefreshMs = (0, import_react35.useMemo)(() => {
13136
13522
  const raw = config.routes?.options?.routeRefreshMs;
13137
13523
  const n = Number(raw);
13138
13524
  return Number.isFinite(n) && n > 0 ? n : void 0;
13139
13525
  }, [config.routes?.options?.routeRefreshMs]);
13140
- const isReady = (0, import_react33.useMemo)(() => {
13526
+ const isReady = (0, import_react35.useMemo)(() => {
13141
13527
  if (selectedToken !== null && yourWalletTokens.length > 0 && selectedToken?.chainData !== void 0) {
13142
13528
  return true;
13143
13529
  }
@@ -13212,7 +13598,7 @@ function CryptoPay({ style: _style }) {
13212
13598
  });
13213
13599
  const { emitError } = useTrustware();
13214
13600
  const readySelectedToken = isReady ? selectedToken : null;
13215
- (0, import_react33.useEffect)(() => {
13601
+ (0, import_react35.useEffect)(() => {
13216
13602
  if (currentStep !== "crypto-pay" || !actionErrorMessage) return;
13217
13603
  emitError?.(
13218
13604
  new TrustwareError({
@@ -13244,7 +13630,7 @@ function CryptoPay({ style: _style }) {
13244
13630
  const handleExpandTokens = () => {
13245
13631
  setCurrentStep("select-token");
13246
13632
  };
13247
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
13633
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13248
13634
  "div",
13249
13635
  {
13250
13636
  style: {
@@ -13253,9 +13639,9 @@ function CryptoPay({ style: _style }) {
13253
13639
  minHeight: "500px"
13254
13640
  },
13255
13641
  children: [
13256
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13257
- isReady ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
13258
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13642
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetPageHeader, { onBack: goBack, title: "Confirm Deposit" }),
13643
+ isReady ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
13644
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13259
13645
  CryptoPayAmountSection,
13260
13646
  {
13261
13647
  amount,
@@ -13284,7 +13670,7 @@ function CryptoPay({ style: _style }) {
13284
13670
  yourWalletTokensLength: yourWalletTokens.length
13285
13671
  }
13286
13672
  ),
13287
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13673
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13288
13674
  CryptoPaySwipeSection,
13289
13675
  {
13290
13676
  actionErrorMessage,
@@ -13301,8 +13687,8 @@ function CryptoPay({ style: _style }) {
13301
13687
  swipeResetKey
13302
13688
  }
13303
13689
  ),
13304
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(WidgetSecurityFooter, {})
13305
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
13690
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetSecurityFooter, {})
13691
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13306
13692
  "div",
13307
13693
  {
13308
13694
  style: {
@@ -13311,7 +13697,7 @@ function CryptoPay({ style: _style }) {
13311
13697
  alignItems: "center",
13312
13698
  justifyContent: "center"
13313
13699
  },
13314
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LoadingSkeleton, {})
13700
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingSkeleton, {})
13315
13701
  }
13316
13702
  )
13317
13703
  ]
@@ -13320,8 +13706,8 @@ function CryptoPay({ style: _style }) {
13320
13706
  }
13321
13707
 
13322
13708
  // src/widget/pages/Processing.tsx
13323
- var import_react34 = require("react");
13324
- var import_jsx_runtime47 = require("react/jsx-runtime");
13709
+ var import_react36 = require("react");
13710
+ var import_jsx_runtime48 = require("react/jsx-runtime");
13325
13711
  function getProgressFromStatus(status) {
13326
13712
  switch (status) {
13327
13713
  case "confirming":
@@ -13359,27 +13745,27 @@ function Processing({ style }) {
13359
13745
  const { resetState, setCurrentStep } = useDepositNavigation();
13360
13746
  const { transactionStatus, transactionHash, intentId } = useDepositTransaction();
13361
13747
  const { transaction, startPolling, isPolling } = useTransactionPolling();
13362
- const hasStartedPolling = (0, import_react34.useRef)(false);
13363
- (0, import_react34.useEffect)(() => {
13748
+ const hasStartedPolling = (0, import_react36.useRef)(false);
13749
+ (0, import_react36.useEffect)(() => {
13364
13750
  return () => {
13365
13751
  hasStartedPolling.current = false;
13366
13752
  };
13367
13753
  }, []);
13368
- (0, import_react34.useEffect)(() => {
13754
+ (0, import_react36.useEffect)(() => {
13369
13755
  if (intentId && transactionHash && !isPolling && !hasStartedPolling.current && transactionStatus !== "success" && transactionStatus !== "error") {
13370
13756
  hasStartedPolling.current = true;
13371
13757
  startPolling(intentId, transactionHash);
13372
13758
  }
13373
13759
  }, [intentId, transactionHash, isPolling, transactionStatus, startPolling]);
13374
- const progress = (0, import_react34.useMemo)(
13760
+ const progress = (0, import_react36.useMemo)(
13375
13761
  () => getProgressFromStatus(transactionStatus),
13376
13762
  [transactionStatus]
13377
13763
  );
13378
- const stepText = (0, import_react34.useMemo)(
13764
+ const stepText = (0, import_react36.useMemo)(
13379
13765
  () => getStepText(transactionStatus),
13380
13766
  [transactionStatus]
13381
13767
  );
13382
- const explorerUrl = (0, import_react34.useMemo)(() => {
13768
+ const explorerUrl = (0, import_react36.useMemo)(() => {
13383
13769
  if (transaction?.fromChainTxUrl) {
13384
13770
  return transaction.fromChainTxUrl;
13385
13771
  }
@@ -13397,7 +13783,7 @@ function Processing({ style }) {
13397
13783
  };
13398
13784
  const isIndeterminate = transactionStatus === "confirming" || transactionStatus === "idle";
13399
13785
  const headerTitle = transactionStatus === "success" ? "Complete" : transactionStatus === "error" ? "Failed" : "Processing";
13400
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13786
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13401
13787
  "div",
13402
13788
  {
13403
13789
  style: {
@@ -13407,8 +13793,8 @@ function Processing({ style }) {
13407
13793
  ...style
13408
13794
  },
13409
13795
  children: [
13410
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
13411
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13796
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetPageHeader, { onClose: handleClose, title: headerTitle }),
13797
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13412
13798
  "div",
13413
13799
  {
13414
13800
  style: {
@@ -13420,13 +13806,13 @@ function Processing({ style }) {
13420
13806
  padding: `${spacing[8]} ${spacing[6]}`
13421
13807
  },
13422
13808
  children: [
13423
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13809
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13424
13810
  "div",
13425
13811
  {
13426
13812
  style: {
13427
13813
  marginBottom: spacing[6]
13428
13814
  },
13429
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13815
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13430
13816
  CircularProgress,
13431
13817
  {
13432
13818
  progress,
@@ -13438,7 +13824,7 @@ function Processing({ style }) {
13438
13824
  )
13439
13825
  }
13440
13826
  ),
13441
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13827
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13442
13828
  "p",
13443
13829
  {
13444
13830
  style: {
@@ -13451,7 +13837,7 @@ function Processing({ style }) {
13451
13837
  children: stepText
13452
13838
  }
13453
13839
  ),
13454
- selectedToken && parsedAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
13840
+ selectedToken && parsedAmount > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13455
13841
  "p",
13456
13842
  {
13457
13843
  style: {
@@ -13468,7 +13854,7 @@ function Processing({ style }) {
13468
13854
  ]
13469
13855
  }
13470
13856
  ),
13471
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13857
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13472
13858
  TransactionSteps,
13473
13859
  {
13474
13860
  transactionStatus,
@@ -13479,7 +13865,7 @@ function Processing({ style }) {
13479
13865
  }
13480
13866
  }
13481
13867
  ),
13482
- transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13868
+ transactionHash ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13483
13869
  TransactionHashLink,
13484
13870
  {
13485
13871
  explorerUrl,
@@ -13487,7 +13873,7 @@ function Processing({ style }) {
13487
13873
  label: "Transaction"
13488
13874
  }
13489
13875
  ) : null,
13490
- transactionStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
13876
+ transactionStatus === "error" && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13491
13877
  "button",
13492
13878
  {
13493
13879
  type: "button",
@@ -13509,23 +13895,23 @@ function Processing({ style }) {
13509
13895
  ]
13510
13896
  }
13511
13897
  ),
13512
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(WidgetSecurityFooter, {})
13898
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetSecurityFooter, {})
13513
13899
  ]
13514
13900
  }
13515
13901
  );
13516
13902
  }
13517
13903
 
13518
13904
  // src/widget/pages/Success.tsx
13519
- var import_react35 = require("react");
13520
- var import_jsx_runtime48 = require("react/jsx-runtime");
13521
- var ConfettiEffect2 = (0, import_react35.lazy)(() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports)));
13905
+ var import_react37 = require("react");
13906
+ var import_jsx_runtime49 = require("react/jsx-runtime");
13907
+ var ConfettiEffect2 = (0, import_react37.lazy)(() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports)));
13522
13908
  function Success({ style }) {
13523
13909
  const { selectedToken, selectedChain, amount } = useDepositForm();
13524
13910
  const { resetState } = useDepositNavigation();
13525
13911
  const { transactionHash } = useDepositTransaction();
13526
13912
  const { transaction } = useTransactionPolling();
13527
- const parsedAmount = (0, import_react35.useMemo)(() => parseFloat(amount) || 0, [amount]);
13528
- const explorerUrl = (0, import_react35.useMemo)(() => {
13913
+ const parsedAmount = (0, import_react37.useMemo)(() => parseFloat(amount) || 0, [amount]);
13914
+ const explorerUrl = (0, import_react37.useMemo)(() => {
13529
13915
  if (transaction?.toChainTxUrl) {
13530
13916
  return transaction.toChainTxUrl;
13531
13917
  }
@@ -13540,7 +13926,7 @@ function Success({ style }) {
13540
13926
  const handleDone = () => {
13541
13927
  resetState();
13542
13928
  };
13543
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
13929
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
13544
13930
  "div",
13545
13931
  {
13546
13932
  style: {
@@ -13553,9 +13939,9 @@ function Success({ style }) {
13553
13939
  ...style
13554
13940
  },
13555
13941
  children: [
13556
- /* @__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 }) }),
13557
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetPageHeader, { title: "Deposit Complete" }),
13558
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13942
+ /* @__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 }) }),
13943
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetPageHeader, { title: "Deposit Complete" }),
13944
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13559
13945
  "div",
13560
13946
  {
13561
13947
  style: {
@@ -13567,7 +13953,7 @@ function Success({ style }) {
13567
13953
  flexDirection: "column",
13568
13954
  alignItems: "center"
13569
13955
  },
13570
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13956
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
13571
13957
  SuccessSummaryCard,
13572
13958
  {
13573
13959
  amount: parsedAmount,
@@ -13581,16 +13967,16 @@ function Success({ style }) {
13581
13967
  )
13582
13968
  }
13583
13969
  ),
13584
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(WidgetSecurityFooter, {})
13970
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetSecurityFooter, {})
13585
13971
  ]
13586
13972
  }
13587
13973
  );
13588
13974
  }
13589
13975
 
13590
13976
  // src/widget/pages/Error.tsx
13591
- var import_react36 = require("react");
13977
+ var import_react38 = require("react");
13592
13978
  init_store();
13593
- var import_jsx_runtime49 = require("react/jsx-runtime");
13979
+ var import_jsx_runtime50 = require("react/jsx-runtime");
13594
13980
  function categorizeError(errorMessage) {
13595
13981
  if (!errorMessage) return "unknown";
13596
13982
  const msg = errorMessage.toLowerCase();
@@ -13677,20 +14063,20 @@ function Error2({ style }) {
13677
14063
  setErrorMessage,
13678
14064
  transactionHash
13679
14065
  } = useDepositTransaction();
13680
- const errorCategory = (0, import_react36.useMemo)(
14066
+ const errorCategory = (0, import_react38.useMemo)(
13681
14067
  () => categorizeError(errorMessage),
13682
14068
  [errorMessage]
13683
14069
  );
13684
- const errorTitle = (0, import_react36.useMemo)(
14070
+ const errorTitle = (0, import_react38.useMemo)(
13685
14071
  () => getErrorTitle(errorCategory),
13686
14072
  [errorCategory]
13687
14073
  );
13688
- const errorSuggestion = (0, import_react36.useMemo)(
14074
+ const errorSuggestion = (0, import_react38.useMemo)(
13689
14075
  () => getErrorSuggestion(errorCategory),
13690
14076
  [errorCategory]
13691
14077
  );
13692
- const retryStep = (0, import_react36.useMemo)(() => getRetryStep(errorCategory), [errorCategory]);
13693
- (0, import_react36.useEffect)(() => {
14078
+ const retryStep = (0, import_react38.useMemo)(() => getRetryStep(errorCategory), [errorCategory]);
14079
+ (0, import_react38.useEffect)(() => {
13694
14080
  if (errorMessage) {
13695
14081
  try {
13696
14082
  const config = TrustwareConfigStore.get();
@@ -13712,7 +14098,7 @@ function Error2({ style }) {
13712
14098
  const handleStartOver = () => {
13713
14099
  resetState();
13714
14100
  };
13715
- const explorerUrl = (0, import_react36.useMemo)(() => {
14101
+ const explorerUrl = (0, import_react38.useMemo)(() => {
13716
14102
  if (transactionHash && selectedChain?.blockExplorerUrls?.length) {
13717
14103
  return `${selectedChain.blockExplorerUrls[0].replace(/\/+$/, "")}/tx/${transactionHash}`;
13718
14104
  }
@@ -13720,7 +14106,7 @@ function Error2({ style }) {
13720
14106
  }, [transactionHash, selectedChain]);
13721
14107
  const renderErrorIcon = () => {
13722
14108
  if (errorCategory === "wallet_rejected") {
13723
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14109
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13724
14110
  "svg",
13725
14111
  {
13726
14112
  style: {
@@ -13733,7 +14119,7 @@ function Error2({ style }) {
13733
14119
  stroke: "currentColor",
13734
14120
  strokeWidth: 2.5,
13735
14121
  "aria-hidden": "true",
13736
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14122
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13737
14123
  "path",
13738
14124
  {
13739
14125
  strokeLinecap: "round",
@@ -13745,7 +14131,7 @@ function Error2({ style }) {
13745
14131
  );
13746
14132
  }
13747
14133
  if (errorCategory === "network_error") {
13748
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14134
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13749
14135
  "svg",
13750
14136
  {
13751
14137
  style: {
@@ -13758,7 +14144,7 @@ function Error2({ style }) {
13758
14144
  stroke: "currentColor",
13759
14145
  strokeWidth: 2,
13760
14146
  "aria-hidden": "true",
13761
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14147
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13762
14148
  "path",
13763
14149
  {
13764
14150
  strokeLinecap: "round",
@@ -13769,7 +14155,7 @@ function Error2({ style }) {
13769
14155
  }
13770
14156
  );
13771
14157
  }
13772
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14158
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13773
14159
  "svg",
13774
14160
  {
13775
14161
  style: {
@@ -13782,7 +14168,7 @@ function Error2({ style }) {
13782
14168
  stroke: "currentColor",
13783
14169
  strokeWidth: 2,
13784
14170
  "aria-hidden": "true",
13785
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14171
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13786
14172
  "path",
13787
14173
  {
13788
14174
  strokeLinecap: "round",
@@ -13793,7 +14179,7 @@ function Error2({ style }) {
13793
14179
  }
13794
14180
  );
13795
14181
  };
13796
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14182
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
13797
14183
  "div",
13798
14184
  {
13799
14185
  style: {
@@ -13803,8 +14189,8 @@ function Error2({ style }) {
13803
14189
  ...style
13804
14190
  },
13805
14191
  children: [
13806
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetPageHeader, { title: errorTitle }),
13807
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14192
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WidgetPageHeader, { title: errorTitle }),
14193
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
13808
14194
  ErrorRecoveryCard,
13809
14195
  {
13810
14196
  errorMessage,
@@ -13817,7 +14203,7 @@ function Error2({ style }) {
13817
14203
  transactionHash
13818
14204
  }
13819
14205
  ),
13820
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(WidgetSecurityFooter, {})
14206
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(WidgetSecurityFooter, {})
13821
14207
  ]
13822
14208
  }
13823
14209
  );
@@ -13839,7 +14225,7 @@ var ACTIVE_TRANSACTION_STATUSES = [
13839
14225
  ];
13840
14226
 
13841
14227
  // src/widget/app/WidgetRouter.tsx
13842
- var import_jsx_runtime50 = require("react/jsx-runtime");
14228
+ var import_jsx_runtime51 = require("react/jsx-runtime");
13843
14229
  var pageContainerBaseStyle = {
13844
14230
  width: "100%",
13845
14231
  height: "100%",
@@ -13850,26 +14236,26 @@ function WidgetRouter({
13850
14236
  navigationDirection,
13851
14237
  stepHistory
13852
14238
  }) {
13853
- const PageComponent = (0, import_react37.useMemo)(
14239
+ const PageComponent = (0, import_react39.useMemo)(
13854
14240
  () => PAGE_COMPONENTS[currentStep],
13855
14241
  [currentStep]
13856
14242
  );
13857
- const animationClass = (0, import_react37.useMemo)(() => {
14243
+ const animationClass = (0, import_react39.useMemo)(() => {
13858
14244
  return navigationDirection === "forward" ? "tw-animate-slide-in-right" : "tw-animate-slide-in-left";
13859
14245
  }, [navigationDirection]);
13860
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14246
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
13861
14247
  "div",
13862
14248
  {
13863
14249
  className: animationClass,
13864
14250
  style: mergeStyles(pageContainerBaseStyle),
13865
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PageComponent, {})
14251
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PageComponent, {})
13866
14252
  },
13867
14253
  `${currentStep}-${stepHistory.length}`
13868
14254
  );
13869
14255
  }
13870
14256
 
13871
14257
  // src/widget/TrustwareWidgetV2.tsx
13872
- var import_jsx_runtime51 = require("react/jsx-runtime");
14258
+ var import_jsx_runtime52 = require("react/jsx-runtime");
13873
14259
  var widgetContentContainerStyle = {
13874
14260
  position: "relative",
13875
14261
  width: "100%",
@@ -13891,7 +14277,7 @@ function WidgetContent({
13891
14277
  const { amount, selectedChain, selectedToken } = useDepositForm();
13892
14278
  const { transactionHash, transactionStatus } = useDepositTransaction();
13893
14279
  const { resolvedTheme, toggleTheme } = useDepositUi();
13894
- (0, import_react38.useEffect)(() => {
14280
+ (0, import_react40.useEffect)(() => {
13895
14281
  const state = {
13896
14282
  currentStep,
13897
14283
  amount,
@@ -13911,9 +14297,9 @@ function WidgetContent({
13911
14297
  transactionStatus,
13912
14298
  onStateChange
13913
14299
  ]);
13914
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
13915
- showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
13916
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14300
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
14301
+ showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
14302
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13917
14303
  WidgetRouter,
13918
14304
  {
13919
14305
  currentStep,
@@ -13934,8 +14320,8 @@ function WidgetInner({
13934
14320
  const { transactionStatus } = useDepositTransaction();
13935
14321
  const { resolvedTheme } = useDepositUi();
13936
14322
  const { status, revalidate } = useTrustware();
13937
- const [showConfirmDialog, setShowConfirmDialog] = (0, import_react38.useState)(false);
13938
- const handleCloseRequest = (0, import_react38.useCallback)(() => {
14323
+ const [showConfirmDialog, setShowConfirmDialog] = (0, import_react40.useState)(false);
14324
+ const handleCloseRequest = (0, import_react40.useCallback)(() => {
13939
14325
  if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
13940
14326
  setShowConfirmDialog(true);
13941
14327
  } else {
@@ -13946,32 +14332,32 @@ function WidgetInner({
13946
14332
  onClose?.();
13947
14333
  }
13948
14334
  }, [transactionStatus, onClose, resetState]);
13949
- (0, import_react38.useEffect)(() => {
14335
+ (0, import_react40.useEffect)(() => {
13950
14336
  closeRequestRef.current = handleCloseRequest;
13951
14337
  }, [handleCloseRequest, closeRequestRef]);
13952
- const handleConfirmClose = (0, import_react38.useCallback)(() => {
14338
+ const handleConfirmClose = (0, import_react40.useCallback)(() => {
13953
14339
  setShowConfirmDialog(false);
13954
14340
  onClose?.();
13955
14341
  }, [onClose]);
13956
- const handleCancelClose = (0, import_react38.useCallback)(() => {
14342
+ const handleCancelClose = (0, import_react40.useCallback)(() => {
13957
14343
  setShowConfirmDialog(false);
13958
14344
  }, []);
13959
14345
  const effectiveTheme = resolvedTheme;
13960
14346
  const isRefreshing = status === "initializing";
13961
14347
  const initBlocked = status === "error";
13962
- const handleRefresh = (0, import_react38.useCallback)(() => {
14348
+ const handleRefresh = (0, import_react40.useCallback)(() => {
13963
14349
  revalidate?.();
13964
14350
  }, [revalidate]);
13965
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
13966
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(WidgetContainer, { theme: effectiveTheme, style, children: [
13967
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14351
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
14352
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(WidgetContainer, { theme: effectiveTheme, style, children: [
14353
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13968
14354
  WidgetContent,
13969
14355
  {
13970
14356
  onStateChange,
13971
14357
  showThemeToggle
13972
14358
  }
13973
14359
  ),
13974
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14360
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13975
14361
  InitErrorOverlay,
13976
14362
  {
13977
14363
  open: initBlocked,
@@ -13981,7 +14367,7 @@ function WidgetInner({
13981
14367
  }
13982
14368
  )
13983
14369
  ] }),
13984
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14370
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
13985
14371
  ConfirmCloseDialog,
13986
14372
  {
13987
14373
  open: showConfirmDialog,
@@ -13992,7 +14378,7 @@ function WidgetInner({
13992
14378
  )
13993
14379
  ] });
13994
14380
  }
13995
- var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV22({
14381
+ var TrustwareWidgetV2 = (0, import_react40.forwardRef)(function TrustwareWidgetV22({
13996
14382
  theme = "system",
13997
14383
  style,
13998
14384
  initialStep = "home",
@@ -14001,14 +14387,14 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14001
14387
  onOpen,
14002
14388
  showThemeToggle = true
14003
14389
  }, ref) {
14004
- const [isOpen, setIsOpen] = (0, import_react38.useState)(defaultOpen);
14005
- const closeRequestRef = (0, import_react38.useRef)(null);
14390
+ const [isOpen, setIsOpen] = (0, import_react40.useState)(defaultOpen);
14391
+ const closeRequestRef = (0, import_react40.useRef)(null);
14006
14392
  const effectiveInitialStep = initialStep;
14007
- const open = (0, import_react38.useCallback)(() => {
14393
+ const open = (0, import_react40.useCallback)(() => {
14008
14394
  setIsOpen(true);
14009
14395
  onOpen?.();
14010
14396
  }, [onOpen]);
14011
- const close = (0, import_react38.useCallback)(() => {
14397
+ const close = (0, import_react40.useCallback)(() => {
14012
14398
  if (closeRequestRef.current) {
14013
14399
  closeRequestRef.current();
14014
14400
  } else {
@@ -14016,11 +14402,11 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14016
14402
  onClose?.();
14017
14403
  }
14018
14404
  }, [onClose]);
14019
- const handleClose = (0, import_react38.useCallback)(() => {
14405
+ const handleClose = (0, import_react40.useCallback)(() => {
14020
14406
  setIsOpen(false);
14021
14407
  onClose?.();
14022
14408
  }, [onClose]);
14023
- (0, import_react38.useImperativeHandle)(
14409
+ (0, import_react40.useImperativeHandle)(
14024
14410
  ref,
14025
14411
  () => ({
14026
14412
  open,
@@ -14032,7 +14418,7 @@ var TrustwareWidgetV2 = (0, import_react38.forwardRef)(function TrustwareWidgetV
14032
14418
  if (!isOpen) {
14033
14419
  return null;
14034
14420
  }
14035
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14421
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
14036
14422
  WidgetInner,
14037
14423
  {
14038
14424
  theme,