@wheelx-widget/widget 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React5 = require('react');
4
+ var react = require('@chakra-ui/react');
4
5
  var reactQuery = require('@tanstack/react-query');
5
6
  var sdkReactCore = require('@dynamic-labs/sdk-react-core');
6
7
  var ethereum = require('@dynamic-labs/ethereum');
@@ -12,7 +13,6 @@ var react$1 = require('@emotion/react');
12
13
  var jsxRuntime = require('react/jsx-runtime');
13
14
  var axios6 = require('axios');
14
15
  var zustand = require('zustand');
15
- var react = require('@chakra-ui/react');
16
16
  var biFraction = require('bi-fraction');
17
17
  var viem = require('viem');
18
18
  var chains = require('viem/chains');
@@ -474,6 +474,37 @@ function WalletConnectionStateSync() {
474
474
  useSyncWalletConnectedStore();
475
475
  return null;
476
476
  }
477
+ function LoadingSkeleton() {
478
+ const { theme } = useWidgetTheme();
479
+ return /* @__PURE__ */ jsxRuntime.jsxs(
480
+ react.Box,
481
+ {
482
+ display: "flex",
483
+ flexDirection: "column",
484
+ alignItems: "center",
485
+ justifyContent: "center",
486
+ w: { base: "100%", md: "480px" },
487
+ h: { base: "400px", md: "440px" },
488
+ borderRadius: "24px",
489
+ bg: theme.assistBgColor,
490
+ gap: 4,
491
+ children: [
492
+ /* @__PURE__ */ jsxRuntime.jsx(
493
+ react.Box,
494
+ {
495
+ w: "40px",
496
+ h: "40px",
497
+ borderRadius: "full",
498
+ bg: theme.defaultBorderColor,
499
+ opacity: 0.4,
500
+ animation: "pulse 1.5s ease-in-out infinite"
501
+ }
502
+ ),
503
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "14px", color: theme.defaultTextColor, children: "Loading chains and tokens..." })
504
+ ]
505
+ }
506
+ );
507
+ }
477
508
  function ChainsAndTokensLoader({ children, config }) {
478
509
  const { data } = useChainsAndTokens(true);
479
510
  const { setChains, setSlippagePolicies } = useChainsStore();
@@ -530,7 +561,7 @@ function ChainsAndTokensLoader({ children, config }) {
530
561
  }, [filteredChains, filteredTokens, data, setChains, setTokens, setSlippagePolicies]);
531
562
  const isReady = filteredChains && filteredTokens;
532
563
  if (!isReady) {
533
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "200px" }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Loading chains and tokens..." }) });
564
+ return /* @__PURE__ */ jsxRuntime.jsx(LoadingSkeleton, {});
534
565
  }
535
566
  return /* @__PURE__ */ jsxRuntime.jsx(FavoritesProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TokenFavoritesProvider, { children: [
536
567
  /* @__PURE__ */ jsxRuntime.jsx(WalletConnectionStateSync, {}),
@@ -2858,13 +2889,17 @@ var extractVPathSegment = () => {
2858
2889
  const match = pathname.match(/^\/v\/([a-zA-Z0-9-+]+)/);
2859
2890
  return match ? match[1] : "";
2860
2891
  };
2861
- var toBigInt = (value) => {
2862
- try {
2863
- return BigInt(value);
2864
- } catch {
2865
- return BigInt(0);
2866
- }
2867
- };
2892
+ function toBigInt(balance, decimals = 6) {
2893
+ const balanceStr = typeof balance === "number" ? balance.toString() : balance;
2894
+ const [integerPart, decimalPart = ""] = balanceStr.split(".");
2895
+ const integerBigInt = BigInt(integerPart);
2896
+ const neededDecimalDigits = Math.min(decimalPart.length, decimals);
2897
+ const trimmedDecimal = decimalPart.slice(0, neededDecimalDigits);
2898
+ const paddedDecimal = trimmedDecimal.padEnd(decimals, "0");
2899
+ const decimalBigInt = BigInt(paddedDecimal);
2900
+ const multiplier = BigInt(10 ** decimals);
2901
+ return integerBigInt * multiplier + decimalBigInt;
2902
+ }
2868
2903
  function BackIcon(props = {}) {
2869
2904
  return React5.createElement("svg", {
2870
2905
  xmlns: "http://www.w3.org/2000/svg",
@@ -2886,7 +2921,7 @@ function ArrowRightIcon(props = {}) {
2886
2921
  height: props.size || 16,
2887
2922
  ...props,
2888
2923
  style: { display: "inline-block", verticalAlign: "middle", ...props.style || {} },
2889
- dangerouslySetInnerHTML: { __html: `<circle cx="23.0434" cy="23.5005" r="22.9565" fill="#81728C" />
2924
+ dangerouslySetInnerHTML: { __html: `<circle cx="23.0434" cy="23.5005" r="22.9565" fill="currentColor" />
2890
2925
  <path
2891
2926
  d="M14.0898 22.8301C14.0896 22.822 14.0889 22.8138 14.0889 22.8057C14.0889 22.3529 14.463 21.9813 14.9424 21.9365L15.0391 21.9316L29.0293 21.9316L25.582 18.7607C25.1215 18.3371 25.0489 17.7165 25.4199 17.375C25.7913 17.0335 26.466 17.1007 26.9268 17.5244L31.7939 22.001C32.1346 22.1339 32.374 22.4439 32.374 22.8057C32.374 22.8251 32.3715 22.8442 32.3701 22.8633C32.3705 22.874 32.3721 22.8847 32.3721 22.8955C32.3718 23.2561 32.1341 23.5657 31.7949 23.6992L26.9268 28.1768C26.4661 28.6002 25.7912 28.6674 25.4199 28.3262C25.0488 27.9848 25.1218 27.3641 25.582 26.9404L29.0293 23.7695L15.0371 23.7695L14.9404 23.7646C14.4611 23.7198 14.0872 23.3481 14.0869 22.8955C14.0869 22.8735 14.0881 22.8517 14.0898 22.8301Z"
2892
2927
  fill="white" />` }
@@ -3242,7 +3277,7 @@ var textRecipe = react.defineRecipe({
3242
3277
  }
3243
3278
  });
3244
3279
  var Heading = react.chakra("h2", headingRecipe);
3245
- var Text = react.chakra("p", textRecipe);
3280
+ var Text2 = react.chakra("p", textRecipe);
3246
3281
  var isTouchDevice = () => {
3247
3282
  if (typeof window === "undefined") return false;
3248
3283
  return "ontouchstart" in window || navigator.maxTouchPoints > 0;
@@ -3919,7 +3954,7 @@ var FormButton = ({
3919
3954
  const renderButton = () => {
3920
3955
  if (errorMessage || quoteMessage) {
3921
3956
  return /* @__PURE__ */ jsxRuntime.jsx(react.Button, { ...buttonStyles, disabled: true, bg: theme.disabledButtonBg, children: /* @__PURE__ */ jsxRuntime.jsx(
3922
- Text,
3957
+ Text2,
3923
3958
  {
3924
3959
  variant: {
3925
3960
  base: "content9",
@@ -3985,7 +4020,7 @@ var FormButton = ({
3985
4020
  }
3986
4021
  ),
3987
4022
  /* @__PURE__ */ jsxRuntime.jsx(
3988
- Text,
4023
+ Text2,
3989
4024
  {
3990
4025
  position: "absolute",
3991
4026
  w: "28px",
@@ -4000,7 +4035,7 @@ var FormButton = ({
4000
4035
  ]
4001
4036
  }
4002
4037
  ),
4003
- /* @__PURE__ */ jsxRuntime.jsx(Text, { children: "AI is Thinking the Best Price" })
4038
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { children: "AI is Thinking the Best Price" })
4004
4039
  ] }) })
4005
4040
  }
4006
4041
  );
@@ -4596,7 +4631,7 @@ var Network = ({
4596
4631
  }
4597
4632
  ),
4598
4633
  /* @__PURE__ */ jsxRuntime.jsxs(
4599
- Text,
4634
+ Text2,
4600
4635
  {
4601
4636
  variant: {
4602
4637
  base: "content7",
@@ -4731,7 +4766,7 @@ var TokenAmountText = ({
4731
4766
  });
4732
4767
  const leadingZeros = countLeadingZerosAfterDecimal(_amount);
4733
4768
  if (leadingZeros > 5) {
4734
- return /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "content8", ...props, children: [
4769
+ return /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: "content8", ...props, children: [
4735
4770
  prefix,
4736
4771
  " ",
4737
4772
  _amount.slice(0, 3),
@@ -4750,7 +4785,7 @@ var TokenAmountText = ({
4750
4785
  suffix
4751
4786
  ] });
4752
4787
  }
4753
- return /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "content7", ...props, children: [
4788
+ return /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: "content7", ...props, children: [
4754
4789
  prefix,
4755
4790
  " ",
4756
4791
  _amount,
@@ -5063,7 +5098,7 @@ var TokenAndAddress = ({
5063
5098
  )
5064
5099
  ] }),
5065
5100
  /* @__PURE__ */ jsxRuntime.jsx(
5066
- Text,
5101
+ Text2,
5067
5102
  {
5068
5103
  variant: {
5069
5104
  base: "content9",
@@ -5091,7 +5126,7 @@ var TokenAndAddress = ({
5091
5126
  }
5092
5127
  ),
5093
5128
  /* @__PURE__ */ jsxRuntime.jsx(
5094
- Text,
5129
+ Text2,
5095
5130
  {
5096
5131
  variant: {
5097
5132
  base: "content9",
@@ -5295,7 +5330,7 @@ var TokenList = ({
5295
5330
  }
5296
5331
  } else {
5297
5332
  return /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { w: "100%", h: "50px", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
5298
- Text,
5333
+ Text2,
5299
5334
  {
5300
5335
  color: theme.weakTextColor,
5301
5336
  variant: {
@@ -5394,7 +5429,7 @@ var TokenList = ({
5394
5429
  cursor: "pointer",
5395
5430
  children: [
5396
5431
  /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: item.icon, boxSize: "14px" }),
5397
- /* @__PURE__ */ jsxRuntime.jsx(Text, { children: item.name })
5432
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { children: item.name })
5398
5433
  ]
5399
5434
  },
5400
5435
  index
@@ -5694,7 +5729,7 @@ var MobileContent = React5.memo(function MobileContent2({
5694
5729
  objectFit: "cover"
5695
5730
  }
5696
5731
  ) }),
5697
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: ArrowDownIcon, boxSize: "16px" })
5732
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: ArrowDownIcon, boxSize: "16px", color: theme.defaultTextColor })
5698
5733
  ]
5699
5734
  }
5700
5735
  )
@@ -5750,10 +5785,10 @@ var MobileContent = React5.memo(function MobileContent2({
5750
5785
  children: [
5751
5786
  /* @__PURE__ */ jsxRuntime.jsx(AllChainsIcon, {}),
5752
5787
  /* @__PURE__ */ jsxRuntime.jsx(
5753
- Text,
5788
+ Text2,
5754
5789
  {
5755
5790
  variant: "content6_1",
5756
- color: "brand-grey1",
5791
+ color: theme.defaultTextColor,
5757
5792
  whiteSpace: "nowrap",
5758
5793
  children: "Chains with assets"
5759
5794
  }
@@ -5765,7 +5800,7 @@ var MobileContent = React5.memo(function MobileContent2({
5765
5800
  ]
5766
5801
  }
5767
5802
  ),
5768
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Popular" }),
5803
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Popular" }),
5769
5804
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "100%", align: "start", gap: 0, children: [
5770
5805
  popularChains?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
5771
5806
  Network,
@@ -5801,7 +5836,7 @@ var MobileContent = React5.memo(function MobileContent2({
5801
5836
  chain.chain_id + "fav-chains"
5802
5837
  ))
5803
5838
  ] }),
5804
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Chains (A-Z)" }),
5839
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Chains (A-Z)" }),
5805
5840
  /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "100%", align: "start", gap: 0, children: orderedChains?.filter((chain) => chain.is_testnet !== true)?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
5806
5841
  Network,
5807
5842
  {
@@ -5818,7 +5853,7 @@ var MobileContent = React5.memo(function MobileContent2({
5818
5853
  chain.chain_id + "ordered-chains"
5819
5854
  )) }),
5820
5855
  !isSelectingFromToken && !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5821
- /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Prediction" }),
5856
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Prediction" }),
5822
5857
  orderedPredictionChains?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
5823
5858
  Network,
5824
5859
  {
@@ -5836,7 +5871,7 @@ var MobileContent = React5.memo(function MobileContent2({
5836
5871
  chain.chain_id + "prediction-chains"
5837
5872
  ))
5838
5873
  ] }),
5839
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Testnet" }),
5874
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Testnet" }),
5840
5875
  orderedChains?.filter((chain) => chain.is_testnet === true)?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
5841
5876
  Network,
5842
5877
  {
@@ -6030,7 +6065,7 @@ var DesktopContent = ({
6030
6065
  children: [
6031
6066
  /* @__PURE__ */ jsxRuntime.jsx(AllChainsIcon, {}),
6032
6067
  /* @__PURE__ */ jsxRuntime.jsx(
6033
- Text,
6068
+ Text2,
6034
6069
  {
6035
6070
  variant: "content6_1",
6036
6071
  color: theme.defaultTextColor,
@@ -6057,7 +6092,7 @@ var DesktopContent = ({
6057
6092
  },
6058
6093
  chain.chain_id + "search-chains"
6059
6094
  )) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6060
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", mb: 2, children: "Popular" }),
6095
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", mb: 2, children: "Popular" }),
6061
6096
  popularChains?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
6062
6097
  Network,
6063
6098
  {
@@ -6085,7 +6120,7 @@ var DesktopContent = ({
6085
6120
  },
6086
6121
  chain.chain_id + "fav-chains"
6087
6122
  )),
6088
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Chains (A-Z)" }),
6123
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Chains (A-Z)" }),
6089
6124
  orderedChains?.filter((chain) => chain.is_testnet === false)?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
6090
6125
  Network,
6091
6126
  {
@@ -6101,7 +6136,7 @@ var DesktopContent = ({
6101
6136
  )),
6102
6137
  !isSelectingFromToken && !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6103
6138
  /* @__PURE__ */ jsxRuntime.jsx(
6104
- Text,
6139
+ Text2,
6105
6140
  {
6106
6141
  px: 2,
6107
6142
  color: theme.weakTextColor,
@@ -6127,7 +6162,7 @@ var DesktopContent = ({
6127
6162
  chain.chain_id + "prediction-chains"
6128
6163
  ))
6129
6164
  ] }),
6130
- !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Testnet" }),
6165
+ !isPreconfigured && /* @__PURE__ */ jsxRuntime.jsx(Text2, { px: 2, color: theme.weakTextColor, variant: "content7", my: 2, children: "Testnet" }),
6131
6166
  orderedChains?.filter((chain) => chain.is_testnet === true)?.map((chain) => /* @__PURE__ */ jsxRuntime.jsx(
6132
6167
  Network,
6133
6168
  {
@@ -6557,7 +6592,7 @@ var TokenInfoCom = ({ tokenInfo, priority = false }) => {
6557
6592
  }
6558
6593
  ),
6559
6594
  /* @__PURE__ */ jsxRuntime.jsx(
6560
- Text,
6595
+ Text2,
6561
6596
  {
6562
6597
  variant: {
6563
6598
  base: "content9",
@@ -6638,7 +6673,9 @@ var TokenSelectAndInput = ({
6638
6673
  const toTokenBalanceHyper = {
6639
6674
  formatted: toTokenBalanceHyperBack?.withdrawable,
6640
6675
  value: toBigInt(
6641
- toTokenBalanceHyperBack?.withdrawable ? toTokenBalanceHyperBack?.withdrawable : "0")
6676
+ toTokenBalanceHyperBack?.withdrawable ? toTokenBalanceHyperBack?.withdrawable : "0",
6677
+ 6
6678
+ )
6642
6679
  };
6643
6680
  React5.useEffect(() => {
6644
6681
  if (!isFrom) {
@@ -6827,7 +6864,7 @@ var TokenSelectAndInput = ({
6827
6864
  const loss = -(+toAmountToUsd - +fromAmountToUsd) / +fromAmountToUsd;
6828
6865
  if (loss >= 0.1) {
6829
6866
  return /* @__PURE__ */ jsxRuntime.jsx(
6830
- Text,
6867
+ Text2,
6831
6868
  {
6832
6869
  as: "span",
6833
6870
  color: "#ff4267",
@@ -6862,7 +6899,7 @@ var TokenSelectAndInput = ({
6862
6899
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
6863
6900
  renderSolanaWalletIcon(),
6864
6901
  /* @__PURE__ */ jsxRuntime.jsx(
6865
- Text,
6902
+ Text2,
6866
6903
  {
6867
6904
  variant: "content8",
6868
6905
  backgroundColor: theme.highlightBgColor,
@@ -6879,7 +6916,7 @@ var TokenSelectAndInput = ({
6879
6916
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
6880
6917
  walletIcon,
6881
6918
  /* @__PURE__ */ jsxRuntime.jsx(
6882
- Text,
6919
+ Text2,
6883
6920
  {
6884
6921
  variant: "content8",
6885
6922
  backgroundColor: theme.highlightBgColor,
@@ -6898,7 +6935,7 @@ var TokenSelectAndInput = ({
6898
6935
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
6899
6936
  walletIcon,
6900
6937
  /* @__PURE__ */ jsxRuntime.jsx(
6901
- Text,
6938
+ Text2,
6902
6939
  {
6903
6940
  variant: "content8",
6904
6941
  backgroundColor: theme.assistBgColor,
@@ -6912,7 +6949,7 @@ var TokenSelectAndInput = ({
6912
6949
  }
6913
6950
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
6914
6951
  /* @__PURE__ */ jsxRuntime.jsx(
6915
- Text,
6952
+ Text2,
6916
6953
  {
6917
6954
  variant: "content8",
6918
6955
  backgroundColor: theme.assistBgColor,
@@ -6941,7 +6978,7 @@ var TokenSelectAndInput = ({
6941
6978
  cursor: "pointer",
6942
6979
  children: [
6943
6980
  /* @__PURE__ */ jsxRuntime.jsx(
6944
- Text,
6981
+ Text2,
6945
6982
  {
6946
6983
  variant: "content8",
6947
6984
  backgroundColor: theme.assistBgColor,
@@ -6980,7 +7017,7 @@ var TokenSelectAndInput = ({
6980
7017
  cursor: "pointer",
6981
7018
  children: [
6982
7019
  /* @__PURE__ */ jsxRuntime.jsx(
6983
- Text,
7020
+ Text2,
6984
7021
  {
6985
7022
  variant: "content8",
6986
7023
  backgroundColor: theme.assistBgColor,
@@ -7014,7 +7051,7 @@ var TokenSelectAndInput = ({
7014
7051
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
7015
7052
  walletIcon,
7016
7053
  /* @__PURE__ */ jsxRuntime.jsx(
7017
- Text,
7054
+ Text2,
7018
7055
  {
7019
7056
  variant: "content8",
7020
7057
  backgroundColor: theme.assistBgColor,
@@ -7074,7 +7111,7 @@ var TokenSelectAndInput = ({
7074
7111
  border: "1px solid",
7075
7112
  borderColor: theme.highlightTextColor,
7076
7113
  onClick: () => handleQuickInput("50%"),
7077
- children: /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "content9", color: theme.highlightTextColor, children: "50%" })
7114
+ children: /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: "content9", color: theme.highlightTextColor, children: "50%" })
7078
7115
  }
7079
7116
  ),
7080
7117
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7087,10 +7124,10 @@ var TokenSelectAndInput = ({
7087
7124
  borderRadius: "4px",
7088
7125
  bg: theme.highlightButtonBg,
7089
7126
  onClick: () => handleQuickInput("Max"),
7090
- children: /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: "content9", color: theme.highlightButtonText, children: "Max" })
7127
+ children: /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: "content9", color: theme.highlightButtonText, children: "Max" })
7091
7128
  }
7092
7129
  ),
7093
- /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "content8", color: theme.weakTextColor, children: [
7130
+ /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: "content8", color: theme.weakTextColor, children: [
7094
7131
  "Balance:",
7095
7132
  " ",
7096
7133
  tokenInfo.isSolana && solanaBalance ? solanaBalance.formatted : balance
@@ -7207,7 +7244,7 @@ var TokenSelectAndInput = ({
7207
7244
  }
7208
7245
  ),
7209
7246
  /* @__PURE__ */ jsxRuntime.jsxs(
7210
- Text,
7247
+ Text2,
7211
7248
  {
7212
7249
  variant: {
7213
7250
  base: "content9",
@@ -7245,10 +7282,10 @@ var TokenSelectAndInput = ({
7245
7282
  bottom: ["6px", "8px"],
7246
7283
  left: 0,
7247
7284
  paddingRight: [2, 4],
7248
- children: !isFrom && !isDepositPlatformToken && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: tokenInfo.isSolana ? solanaWalletAddress && /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "content8", children: [
7285
+ children: !isFrom && !isDepositPlatformToken && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: tokenInfo.isSolana ? solanaWalletAddress && /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: "content8", children: [
7249
7286
  "Balance: ",
7250
7287
  displayBalance
7251
- ] }) : address && /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: "content8", children: [
7288
+ ] }) : address && /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: "content8", children: [
7252
7289
  "Balance: ",
7253
7290
  displayBalance
7254
7291
  ] }) })
@@ -7342,7 +7379,7 @@ var TipsContent = ({
7342
7379
  const renderFee = (fee) => {
7343
7380
  if (fee === "0") {
7344
7381
  return /* @__PURE__ */ jsxRuntime.jsx(
7345
- Text,
7382
+ Text2,
7346
7383
  {
7347
7384
  variant: "content9",
7348
7385
  color: "white",
@@ -7354,7 +7391,7 @@ var TipsContent = ({
7354
7391
  );
7355
7392
  }
7356
7393
  return /* @__PURE__ */ jsxRuntime.jsxs(
7357
- Text,
7394
+ Text2,
7358
7395
  {
7359
7396
  variant: {
7360
7397
  base: "content9",
@@ -7379,7 +7416,7 @@ var TipsContent = ({
7379
7416
  const sif = +swapImpactFee();
7380
7417
  if (toAmountToUsd === null) {
7381
7418
  return /* @__PURE__ */ jsxRuntime.jsx(
7382
- Text,
7419
+ Text2,
7383
7420
  {
7384
7421
  variant: {
7385
7422
  base: "content9",
@@ -7392,7 +7429,7 @@ var TipsContent = ({
7392
7429
  }
7393
7430
  if (sif > 0 || sif === 0) {
7394
7431
  return /* @__PURE__ */ jsxRuntime.jsxs(
7395
- Text,
7432
+ Text2,
7396
7433
  {
7397
7434
  variant: {
7398
7435
  base: "content9",
@@ -7407,7 +7444,7 @@ var TipsContent = ({
7407
7444
  );
7408
7445
  }
7409
7446
  return /* @__PURE__ */ jsxRuntime.jsxs(
7410
- Text,
7447
+ Text2,
7411
7448
  {
7412
7449
  variant: {
7413
7450
  base: "content9",
@@ -7442,7 +7479,7 @@ var TipsContent = ({
7442
7479
  ),
7443
7480
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", w: "100%", children: [
7444
7481
  /* @__PURE__ */ jsxRuntime.jsx(
7445
- Text,
7482
+ Text2,
7446
7483
  {
7447
7484
  variant: {
7448
7485
  base: "content9",
@@ -7456,7 +7493,7 @@ var TipsContent = ({
7456
7493
  ] }),
7457
7494
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", w: "100%", children: [
7458
7495
  /* @__PURE__ */ jsxRuntime.jsx(
7459
- Text,
7496
+ Text2,
7460
7497
  {
7461
7498
  variant: {
7462
7499
  base: "content9",
@@ -7467,7 +7504,7 @@ var TipsContent = ({
7467
7504
  }
7468
7505
  ),
7469
7506
  points === "0" && !fromTokenInfo.isSolana ? /* @__PURE__ */ jsxRuntime.jsx(
7470
- Text,
7507
+ Text2,
7471
7508
  {
7472
7509
  variant: "content9",
7473
7510
  color: "white",
@@ -7506,7 +7543,7 @@ var TipsContent = ({
7506
7543
  ),
7507
7544
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", w: "100%", children: [
7508
7545
  /* @__PURE__ */ jsxRuntime.jsx(
7509
- Text,
7546
+ Text2,
7510
7547
  {
7511
7548
  variant: {
7512
7549
  base: "content9",
@@ -7520,7 +7557,7 @@ var TipsContent = ({
7520
7557
  ] }),
7521
7558
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", w: "100%", children: [
7522
7559
  /* @__PURE__ */ jsxRuntime.jsx(
7523
- Text,
7560
+ Text2,
7524
7561
  {
7525
7562
  variant: {
7526
7563
  base: "content9",
@@ -7537,7 +7574,7 @@ var TipsContent = ({
7537
7574
  ] }),
7538
7575
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", w: "100%", children: [
7539
7576
  /* @__PURE__ */ jsxRuntime.jsx(
7540
- Text,
7577
+ Text2,
7541
7578
  {
7542
7579
  variant: {
7543
7580
  base: "content9",
@@ -7548,7 +7585,7 @@ var TipsContent = ({
7548
7585
  }
7549
7586
  ),
7550
7587
  points === "0" && !fromTokenInfo.isSolana ? /* @__PURE__ */ jsxRuntime.jsx(
7551
- Text,
7588
+ Text2,
7552
7589
  {
7553
7590
  variant: "content9",
7554
7591
  color: "white",
@@ -7605,7 +7642,7 @@ var TxInfo = ({
7605
7642
  const renderPriceImpactPercentage = () => {
7606
7643
  if (priceImpact.bridgeFee === "0" && priceImpact.dstGasFee === "0" && priceImpact.swapFee === "0") {
7607
7644
  return /* @__PURE__ */ jsxRuntime.jsx(
7608
- Text,
7645
+ Text2,
7609
7646
  {
7610
7647
  variant: "content9",
7611
7648
  color: theme.highlightButtonText,
@@ -7620,17 +7657,17 @@ var TxInfo = ({
7620
7657
  const inPrice = Number(fromAmountToUsd.replace(/,/g, ""));
7621
7658
  const outPrice = Number(toAmountToUsd.replace(/,/g, ""));
7622
7659
  if (outPrice > inPrice) {
7623
- return /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.defaultTextColor, children: `+${((outPrice - inPrice) / inPrice * 100).toFixed(2)}%` });
7660
+ return /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.defaultTextColor, children: `+${((outPrice - inPrice) / inPrice * 100).toFixed(2)}%` });
7624
7661
  }
7625
- return /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.defaultTextColor, children: `-${((inPrice - outPrice) / inPrice * 100).toFixed(2)}%` });
7662
+ return /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.defaultTextColor, children: `-${((inPrice - outPrice) / inPrice * 100).toFixed(2)}%` });
7626
7663
  }
7627
- return /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.defaultTextColor, children: "-" });
7664
+ return /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.defaultTextColor, children: "-" });
7628
7665
  };
7629
7666
  const renderSoneiumScore = React5.useMemo(() => {
7630
7667
  if (fromTokenInfo.chain_id === 1868 && toTokenInfo.chain_id !== 1868 || fromTokenInfo.chain_id === 1868 && toTokenInfo.chain_id === 1868) {
7631
7668
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7632
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Soneium Score" }),
7633
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, children: "+ 1" })
7669
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Soneium Score" }),
7670
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, children: "+ 1" })
7634
7671
  ] });
7635
7672
  }
7636
7673
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
@@ -7649,7 +7686,7 @@ var TxInfo = ({
7649
7686
  alignItems: "center",
7650
7687
  children: [
7651
7688
  /* @__PURE__ */ jsxRuntime.jsx(
7652
- Text,
7689
+ Text2,
7653
7690
  {
7654
7691
  variant: textVariant,
7655
7692
  fontSize: ["10px", "12px"],
@@ -7666,7 +7703,7 @@ var TxInfo = ({
7666
7703
  margin: "0 2px"
7667
7704
  }
7668
7705
  ),
7669
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, fontSize: ["10px", "12px"], children: "Score" })
7706
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, fontSize: ["10px", "12px"], children: "Score" })
7670
7707
  ]
7671
7708
  }
7672
7709
  );
@@ -7732,7 +7769,7 @@ var TxInfo = ({
7732
7769
  ] }, index);
7733
7770
  }) });
7734
7771
  }
7735
- return /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, children: router });
7772
+ return /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, children: router });
7736
7773
  };
7737
7774
  return /* @__PURE__ */ jsxRuntime.jsxs(
7738
7775
  react.Collapsible.Root,
@@ -7762,7 +7799,7 @@ var TxInfo = ({
7762
7799
  h: "14px"
7763
7800
  }
7764
7801
  ),
7765
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, whiteSpace: "nowrap", children: isRateReversed ? `1 ${toTokenInfo.symbol} = ${fromAmountInUnit} ${fromTokenInfo.symbol}` : `1 ${fromTokenInfo.symbol} = ${toAmountInUnitStr} ${toTokenInfo.symbol}` })
7802
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, whiteSpace: "nowrap", children: isRateReversed ? `1 ${toTokenInfo.symbol} = ${fromAmountInUnit} ${fromTokenInfo.symbol}` : `1 ${fromTokenInfo.symbol} = ${toAmountInUnitStr} ${toTokenInfo.symbol}` })
7766
7803
  ]
7767
7804
  }
7768
7805
  ),
@@ -7784,7 +7821,7 @@ var TxInfo = ({
7784
7821
  /* @__PURE__ */ jsxRuntime.jsx(react.Collapsible.Content, { w: "100%", pb: 1.5, color: theme.defaultTextColor, children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "100%", align: "start", fontSize: "xs", gap: 3, children: [
7785
7822
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { bg: theme.defaultBgColor, p: 3, borderRadius: "12px", w: "100%", children: [
7786
7823
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7787
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Price Impact" }),
7824
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Price Impact" }),
7788
7825
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
7789
7826
  renderPriceImpactPercentage(),
7790
7827
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7814,14 +7851,14 @@ var TxInfo = ({
7814
7851
  ] })
7815
7852
  ] }),
7816
7853
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7817
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Slippage" }),
7818
- /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: textVariant, children: [
7854
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Slippage" }),
7855
+ /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: textVariant, children: [
7819
7856
  formatSlippage(slippage),
7820
7857
  "%"
7821
7858
  ] })
7822
7859
  ] }),
7823
7860
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7824
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Min. Received" }),
7861
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Min. Received" }),
7825
7862
  /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { gap: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
7826
7863
  TokenAmountText,
7827
7864
  {
@@ -7834,10 +7871,10 @@ var TxInfo = ({
7834
7871
  ] }),
7835
7872
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { bg: theme.defaultBgColor, p: 3, borderRadius: "12px", w: "100%", children: [
7836
7873
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7837
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Estimated Time" }),
7874
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Estimated Time" }),
7838
7875
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
7839
7876
  /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { boxSize: "14px", children: /* @__PURE__ */ jsxRuntime.jsx(TimeIcon, {}) }),
7840
- /* @__PURE__ */ jsxRuntime.jsxs(Text, { variant: textVariant, children: [
7877
+ /* @__PURE__ */ jsxRuntime.jsxs(Text2, { variant: textVariant, children: [
7841
7878
  "~",
7842
7879
  estimatedTime,
7843
7880
  "s"
@@ -7845,11 +7882,11 @@ var TxInfo = ({
7845
7882
  ] })
7846
7883
  ] }),
7847
7884
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7848
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "Recipient Address" }),
7849
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, children: sliceAddress(recipient) })
7885
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "Recipient Address" }),
7886
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, children: sliceAddress(recipient) })
7850
7887
  ] }),
7851
7888
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", children: [
7852
- /* @__PURE__ */ jsxRuntime.jsx(Text, { variant: textVariant, color: theme.weakTextColor, children: "AI Router" }),
7889
+ /* @__PURE__ */ jsxRuntime.jsx(Text2, { variant: textVariant, color: theme.weakTextColor, children: "AI Router" }),
7853
7890
  renderAiRouter()
7854
7891
  ] }),
7855
7892
  renderSoneiumScore
@@ -8256,10 +8293,6 @@ var DifferentAddressDialog = ({
8256
8293
  );
8257
8294
  };
8258
8295
  var DifferentAddressDialog_default = DifferentAddressDialog;
8259
- var useRouter = () => ({ push: (_url) => {
8260
- }, replace: (_url) => {
8261
- } });
8262
- var usePathname = () => "";
8263
8296
  var FormBody = ({
8264
8297
  getQuote,
8265
8298
  quoteInfo,
@@ -8271,6 +8304,7 @@ var FormBody = ({
8271
8304
  refetchQuote,
8272
8305
  config
8273
8306
  }) => {
8307
+ const { theme } = useWidgetTheme();
8274
8308
  const {
8275
8309
  fromAmount,
8276
8310
  toAmount,
@@ -8286,14 +8320,14 @@ var FormBody = ({
8286
8320
  } = useSwapAndBridgeContextStore();
8287
8321
  const { chains } = useChainsStore();
8288
8322
  const { tokens } = useTokensStore();
8289
- const { replace: replaceLink } = useRouter();
8290
- const pathname = usePathname();
8291
- const { isTrendingOpen, setTrendingClientReact, setIsTrendingLonger } = { isTrendingOpen: false, setTrendingClientReact: (_v) => {
8292
- }, setIsTrendingLonger: (_v) => {
8293
- } };
8294
- const isMobile = react.useBreakpointValue({ base: true, md: false });
8295
8323
  const [isFromHyperChain, setIsFromHyperChain] = React5.useState(false);
8296
8324
  const [isToHyperChain, setIsToHyperChain] = React5.useState(false);
8325
+ const pathname = typeof window !== "undefined" ? window.location.pathname : "";
8326
+ const replaceLink = React5.useCallback((url) => {
8327
+ if (typeof window !== "undefined") {
8328
+ window.history.replaceState(null, "", url);
8329
+ }
8330
+ }, []);
8297
8331
  const updateSearchParams = React5.useCallback(
8298
8332
  (params) => {
8299
8333
  if (typeof window === "undefined") return;
@@ -8432,20 +8466,24 @@ var FormBody = ({
8432
8466
  address,
8433
8467
  isToHyperChain
8434
8468
  );
8435
- const fromTokenBalanceHyper = {
8469
+ const fromTokenBalanceHyper = React5.useMemo(() => ({
8436
8470
  decimals: 6,
8437
8471
  formatted: fromTokenBalanceHyperBack?.withdrawable,
8438
8472
  symbol: "USDC",
8439
8473
  value: toBigInt(
8440
- fromTokenBalanceHyperBack?.withdrawable ? fromTokenBalanceHyperBack?.withdrawable : "0")
8441
- };
8442
- const toTokenBalanceHyper = {
8474
+ fromTokenBalanceHyperBack?.withdrawable ? fromTokenBalanceHyperBack?.withdrawable : "0",
8475
+ 6
8476
+ )
8477
+ }), [fromTokenBalanceHyperBack?.withdrawable]);
8478
+ const toTokenBalanceHyper = React5.useMemo(() => ({
8443
8479
  decimals: 6,
8444
8480
  formatted: toTokenBalanceHyperBack?.withdrawable,
8445
8481
  symbol: "USDC",
8446
8482
  value: toBigInt(
8447
- toTokenBalanceHyperBack?.withdrawable ? toTokenBalanceHyperBack?.withdrawable : "0")
8448
- };
8483
+ toTokenBalanceHyperBack?.withdrawable ? toTokenBalanceHyperBack?.withdrawable : "0",
8484
+ 6
8485
+ )
8486
+ }), [toTokenBalanceHyperBack?.withdrawable]);
8449
8487
  React5.useEffect(() => {
8450
8488
  if (fromTokenInfo.chain_id === hyperliquidChainId) {
8451
8489
  setIsFromHyperChain(true);
@@ -8802,15 +8840,6 @@ var FormBody = ({
8802
8840
  const handleToAmountChange = (value) => {
8803
8841
  setToAmount(value);
8804
8842
  };
8805
- React5.useEffect(() => {
8806
- document.getElementById("js_main_form");
8807
- }, [
8808
- isMobile,
8809
- isTrendingOpen,
8810
- setTrendingClientReact,
8811
- quoteInfo,
8812
- setIsTrendingLonger
8813
- ]);
8814
8843
  React5.useEffect(() => {
8815
8844
  const refetchQuote2 = async () => {
8816
8845
  await getQuote({
@@ -8866,7 +8895,7 @@ var FormBody = ({
8866
8895
  transform: ["translate(-50%, -100%)", "translate(-50%, -82.5%)"],
8867
8896
  cursor: toTokenInfo.chain_id === hyperliquidChainId ? "default" : "pointer",
8868
8897
  onClick: handleSwitchTokens,
8869
- color: "#81728C",
8898
+ color: theme.weakTextColor,
8870
8899
  boxSize: {
8871
8900
  base: "20px",
8872
8901
  md: "30px"
@@ -9159,7 +9188,7 @@ var SlippageSettings = ({ refetchQuote }) => {
9159
9188
  boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.1)"
9160
9189
  },
9161
9190
  content: /* @__PURE__ */ jsxRuntime.jsx(
9162
- Text,
9191
+ Text2,
9163
9192
  {
9164
9193
  variant: {
9165
9194
  base: "content8",
@@ -9194,7 +9223,7 @@ var SlippageSettings = ({ refetchQuote }) => {
9194
9223
  top: 0,
9195
9224
  right: 0,
9196
9225
  children: /* @__PURE__ */ jsxRuntime.jsx(
9197
- Text,
9226
+ Text2,
9198
9227
  {
9199
9228
  variant: {
9200
9229
  base: "content9",
@@ -9225,7 +9254,7 @@ var SlippageSettings = ({ refetchQuote }) => {
9225
9254
  borderRadius: "10px",
9226
9255
  onClick: () => handlePresetClick(presetValue),
9227
9256
  children: /* @__PURE__ */ jsxRuntime.jsxs(
9228
- Text,
9257
+ Text2,
9229
9258
  {
9230
9259
  variant: {
9231
9260
  base: "content9",
@@ -9313,7 +9342,7 @@ var SlippageSettings = ({ refetchQuote }) => {
9313
9342
  }
9314
9343
  ),
9315
9344
  /* @__PURE__ */ jsxRuntime.jsx(
9316
- Text,
9345
+ Text2,
9317
9346
  {
9318
9347
  variant: {
9319
9348
  base: "content9",
@@ -9442,7 +9471,7 @@ var FormTop = ({
9442
9471
  textAlign: "center",
9443
9472
  lineHeight: "28px",
9444
9473
  fontSize: "10px",
9445
- color: countdown <= 10 ? "#FF4D4F" : "#81728C",
9474
+ color: countdown <= 10 ? theme.defaultTextColor : theme.highlightTextColor,
9446
9475
  children: isPolling && !hideCountdown && countdown > 0 ? countdown : ""
9447
9476
  }
9448
9477
  )
@@ -9497,7 +9526,7 @@ var Timer = ({ stop, onTick }) => {
9497
9526
  }
9498
9527
  }, [stop]);
9499
9528
  return /* @__PURE__ */ jsxRuntime.jsx(
9500
- Text,
9529
+ Text2,
9501
9530
  {
9502
9531
  variant: {
9503
9532
  base: "content8",
@@ -9879,7 +9908,7 @@ var TxState = ({
9879
9908
  if (isSolanaTransaction && solanaFromTxHash) {
9880
9909
  if (solanaStatus === "confirmed") {
9881
9910
  return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href: getSolanaTxLink(solanaFromTxHash), target: "_blank", children: /* @__PURE__ */ jsxRuntime.jsxs(
9882
- Text,
9911
+ Text2,
9883
9912
  {
9884
9913
  variant: {
9885
9914
  base: "content9",
@@ -9897,7 +9926,7 @@ var TxState = ({
9897
9926
  }
9898
9927
  if (solanaStatus === "failed") {
9899
9928
  return /* @__PURE__ */ jsxRuntime.jsx(
9900
- Text,
9929
+ Text2,
9901
9930
  {
9902
9931
  variant: {
9903
9932
  base: "content9",
@@ -9909,7 +9938,7 @@ var TxState = ({
9909
9938
  );
9910
9939
  }
9911
9940
  return /* @__PURE__ */ jsxRuntime.jsx(
9912
- Text,
9941
+ Text2,
9913
9942
  {
9914
9943
  variant: {
9915
9944
  base: "content9",
@@ -9927,7 +9956,7 @@ var TxState = ({
9927
9956
  href: getTxLink(fromTxHash, fromTokenInfo.chain_id),
9928
9957
  target: "_blank",
9929
9958
  children: /* @__PURE__ */ jsxRuntime.jsxs(
9930
- Text,
9959
+ Text2,
9931
9960
  {
9932
9961
  variant: {
9933
9962
  base: "content9",
@@ -9947,7 +9976,7 @@ var TxState = ({
9947
9976
  }
9948
9977
  if (fromTxHash && receiptStatus === "failed" || isFetched) {
9949
9978
  return /* @__PURE__ */ jsxRuntime.jsx(
9950
- Text,
9979
+ Text2,
9951
9980
  {
9952
9981
  variant: {
9953
9982
  base: "content9",
@@ -9960,7 +9989,7 @@ var TxState = ({
9960
9989
  }
9961
9990
  if (isTransactionBlocked) {
9962
9991
  return /* @__PURE__ */ jsxRuntime.jsx(
9963
- Text,
9992
+ Text2,
9964
9993
  {
9965
9994
  variant: {
9966
9995
  base: "content9",
@@ -9972,7 +10001,7 @@ var TxState = ({
9972
10001
  );
9973
10002
  }
9974
10003
  return /* @__PURE__ */ jsxRuntime.jsx(
9975
- Text,
10004
+ Text2,
9976
10005
  {
9977
10006
  variant: {
9978
10007
  base: "content9",
@@ -10122,7 +10151,7 @@ var TxState = ({
10122
10151
  }
10123
10152
  ),
10124
10153
  /* @__PURE__ */ jsxRuntime.jsx(
10125
- Text,
10154
+ Text2,
10126
10155
  {
10127
10156
  variant: {
10128
10157
  base: "content8",
@@ -10134,7 +10163,7 @@ var TxState = ({
10134
10163
  )
10135
10164
  ] }),
10136
10165
  /* @__PURE__ */ jsxRuntime.jsx(
10137
- Text,
10166
+ Text2,
10138
10167
  {
10139
10168
  variant: {
10140
10169
  base: "content8",
@@ -10186,6 +10215,7 @@ var TxState = ({
10186
10215
  md: "16px"
10187
10216
  },
10188
10217
  w: "100%",
10218
+ backgroundColor: theme.assistBgColor,
10189
10219
  children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "100%", justify: "space-between", gap: 1, children: [
10190
10220
  /* @__PURE__ */ jsxRuntime.jsx(
10191
10221
  BoxWithBg,
@@ -10229,6 +10259,7 @@ var TxState = ({
10229
10259
  base: "20px",
10230
10260
  md: "32px"
10231
10261
  },
10262
+ color: theme.weakTextColor,
10232
10263
  as: ArrowRightIcon
10233
10264
  }
10234
10265
  ),
@@ -10275,7 +10306,7 @@ var TxState = ({
10275
10306
  ),
10276
10307
  target: "_blank",
10277
10308
  children: /* @__PURE__ */ jsxRuntime.jsxs(
10278
- Text,
10309
+ Text2,
10279
10310
  {
10280
10311
  variant: {
10281
10312
  base: "content9",
@@ -10292,7 +10323,7 @@ var TxState = ({
10292
10323
  )
10293
10324
  }
10294
10325
  ) : /* @__PURE__ */ jsxRuntime.jsx(
10295
- Text,
10326
+ Text2,
10296
10327
  {
10297
10328
  variant: {
10298
10329
  base: "content9",
@@ -10326,7 +10357,7 @@ var TxState = ({
10326
10357
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
10327
10358
  /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: DateIcon }),
10328
10359
  /* @__PURE__ */ jsxRuntime.jsx(
10329
- Text,
10360
+ Text2,
10330
10361
  {
10331
10362
  variant: {
10332
10363
  base: "content8",
@@ -10338,7 +10369,7 @@ var TxState = ({
10338
10369
  )
10339
10370
  ] }),
10340
10371
  /* @__PURE__ */ jsxRuntime.jsx(
10341
- Text,
10372
+ Text2,
10342
10373
  {
10343
10374
  variant: {
10344
10375
  base: "content8",
@@ -10353,7 +10384,7 @@ var TxState = ({
10353
10384
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
10354
10385
  /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: TimeIcon }),
10355
10386
  /* @__PURE__ */ jsxRuntime.jsx(
10356
- Text,
10387
+ Text2,
10357
10388
  {
10358
10389
  variant: {
10359
10390
  base: "content8",
@@ -10376,7 +10407,7 @@ var TxState = ({
10376
10407
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { gap: 1, children: [
10377
10408
  /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: MoneyIcon }),
10378
10409
  /* @__PURE__ */ jsxRuntime.jsx(
10379
- Text,
10410
+ Text2,
10380
10411
  {
10381
10412
  variant: {
10382
10413
  base: "content8",
@@ -10388,7 +10419,7 @@ var TxState = ({
10388
10419
  )
10389
10420
  ] }),
10390
10421
  /* @__PURE__ */ jsxRuntime.jsx(
10391
- Text,
10422
+ Text2,
10392
10423
  {
10393
10424
  variant: {
10394
10425
  base: "content8",
@@ -10961,7 +10992,7 @@ var MainForm = ({ config }) => {
10961
10992
  href: "https://github.com/wheelx-fi/wheelx-contracts/blob/main/audits/ABDK_WheelX_WheelXContracts_v_1_0.pdf",
10962
10993
  target: "_blank",
10963
10994
  children: /* @__PURE__ */ jsxRuntime.jsxs(
10964
- Text,
10995
+ Text2,
10965
10996
  {
10966
10997
  color: "#5D6270",
10967
10998
  display: "flex",