@blockend/widget 1.0.53 → 1.0.55-beta.1

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.
Files changed (118) hide show
  1. package/dist/{AllRoutes-D7SQ_djS.js → AllRoutes-D6S-NFxZ.js} +9 -9
  2. package/dist/{Box-eYBli8DE.js → Box-DESo1bHm.js} +6 -6
  3. package/dist/EstGas-Dy3XfCzY.js +1496 -0
  4. package/dist/{Grow-DIpP1jgy.js → Grow-DzEr7XrA.js} +2 -2
  5. package/dist/{InputComp-CqKp9s9s.js → InputComp-GcnDqx_s.js} +3 -3
  6. package/dist/{LoadRoute-U-YYy2K3.js → LoadRoute-BmUgvDid.js} +4 -4
  7. package/dist/{QuotesProgress-zqHV9NVn.js → QuotesProgress-E5JnUMS0.js} +1 -1
  8. package/dist/{SwapAsset-BELTzo8V.js → SwapAsset-MBXcdeBf.js} +1 -1
  9. package/dist/{Tooltip-DHYTtHrE.js → Tooltip-DSAJT2x7.js} +3 -3
  10. package/dist/TxnButton-Br8R19rF.js +215 -0
  11. package/dist/{add-BwIWDVOf.js → add-BryKCrpI.js} +1 -1
  12. package/dist/{all-wallets-BV7E6F_5.js → all-wallets-BMVOK2Ci.js} +1 -1
  13. package/dist/{app-store-YEMLMArP.js → app-store-3WurbJdI.js} +1 -1
  14. package/dist/{apple-CgQVpLw3.js → apple-eM872Ubz.js} +1 -1
  15. package/dist/{arrow-bottom-CRrVrT6a.js → arrow-bottom-HMc73fJ8.js} +1 -1
  16. package/dist/{arrow-bottom-circle-uSjT8Rwu.js → arrow-bottom-circle-B1N_R8Ux.js} +1 -1
  17. package/dist/{arrow-left-CCnLL3nn.js → arrow-left-Q7GAZkD7.js} +1 -1
  18. package/dist/{arrow-right-DlnbfdJg.js → arrow-right-ft3TcIM3.js} +1 -1
  19. package/dist/{arrow-top-D-LM7HS0.js → arrow-top-C2xmF6tK.js} +1 -1
  20. package/dist/{bank-a2jDISgY.js → bank-Bk-2ZR5E.js} +1 -1
  21. package/dist/{basic-BPGeEjKa.js → basic-CWrKgDAB.js} +3 -3
  22. package/dist/{browser-CkPcErHl.js → browser-BFB3TFfv.js} +1 -1
  23. package/dist/{card-D7wnivhY.js → card-DCx59si8.js} +1 -1
  24. package/dist/{ccip-CHcnnTPb.js → ccip-CXr08uP1.js} +16 -16
  25. package/dist/{checkmark-Cs2cMRQF.js → checkmark-BGsuJuhE.js} +1 -1
  26. package/dist/{checkmark-bold-CqH2C5X1.js → checkmark-bold-DvjIl-51.js} +1 -1
  27. package/dist/{chevron-bottom-DgUwkJku.js → chevron-bottom-DAEnG7QP.js} +1 -1
  28. package/dist/{chevron-left-BcVL0AJj.js → chevron-left-D33h2ppx.js} +1 -1
  29. package/dist/{chevron-right-B2gAVYyw.js → chevron-right-C8Z_feNK.js} +1 -1
  30. package/dist/{chevron-top-CbzTNOsN.js → chevron-top-DwDMd3p9.js} +1 -1
  31. package/dist/{chrome-store-ClqKW_b4.js → chrome-store-B7ZDs2Fj.js} +1 -1
  32. package/dist/{clock-CZ61HTR5.js → clock-DnELUxSR.js} +1 -1
  33. package/dist/{close-BK4LD1ho.js → close-Dnt29Pss.js} +1 -1
  34. package/dist/{coinPlaceholder-BV1cYtd2.js → coinPlaceholder-C09pzuXv.js} +1 -1
  35. package/dist/{compass-DBPni3SF.js → compass-D8ZY16nH.js} +1 -1
  36. package/dist/{copy-DtT5Ilfh.js → copy-DEh4RBKI.js} +1 -1
  37. package/dist/{core-DW1LfS8S.js → core-CgIQaiRa.js} +16 -17
  38. package/dist/{cursor-DFsOHbuU.js → cursor-BtzkAOER.js} +1 -1
  39. package/dist/{cursor-transparent-B1EDdNh4.js → cursor-transparent-B0nCflmb.js} +1 -1
  40. package/dist/{desktop-BSVZc50y.js → desktop-toTG92uH.js} +1 -1
  41. package/dist/{disconnect-viKgGwNY.js → disconnect-C97lbAtY.js} +1 -1
  42. package/dist/{discord-CbPDNoe9.js → discord-BNJ3JePY.js} +1 -1
  43. package/dist/{down-BdHOrfT4.js → down-BFx-Bg5Q.js} +2 -2
  44. package/dist/{etherscan-BzCPwNdI.js → etherscan-CK87TQMS.js} +1 -1
  45. package/dist/{exclamation-triangle-BLtYhryv.js → exclamation-triangle-LWnOk0uz.js} +1 -1
  46. package/dist/{extension-D51cnS_y.js → extension-5eIZU28A.js} +1 -1
  47. package/dist/{external-link-1EdliA4O.js → external-link-DDlCfigP.js} +1 -1
  48. package/dist/{facebook-CFlh7Dpj.js → facebook-1lTMXKeH.js} +1 -1
  49. package/dist/{farcaster-mcqUptUZ.js → farcaster-Di2TUKlZ.js} +1 -1
  50. package/dist/{filters-3wQB0cY5.js → filters-B_THnHaX.js} +1 -1
  51. package/dist/{getChainIds-BANkCOEE.js → getChainIds-CeLEUxe0.js} +69 -69
  52. package/dist/getCosmosAddress-B8s9Ycj4.js +6075 -0
  53. package/dist/{github-BZ6HjM3r.js → github-D5B1FE4K.js} +1 -1
  54. package/dist/{google-DDSxVvC_.js → google-C8_WSUfw.js} +1 -1
  55. package/dist/{hamburger-CzgucnXk.js → hamburger-BzMrQx9y.js} +5 -5
  56. package/dist/{help-circle-D5aDSl5K.js → help-circle-C-ZOzjAP.js} +1 -1
  57. package/dist/{id-CYNm8Iqt.js → id-BynpKmej.js} +1 -1
  58. package/dist/{image-CQMOZulk.js → image-BRYUh760.js} +1 -1
  59. package/dist/{index-C5kvo12a.js → index-A8ClQmZo.js} +1 -1
  60. package/dist/{index-3VdzF1gV.js → index-BFUVWgoD.js} +78 -78
  61. package/dist/{index-Df1lOqUE.js → index-BK0BZT6j.js} +2600 -2622
  62. package/dist/index-C5bv1F_u.js +48843 -0
  63. package/dist/{index-C1UDOLq9.js → index-CN6pVc2G.js} +233 -241
  64. package/dist/index-CZwuzz6v.js +6712 -0
  65. package/dist/{index-CEbOV6hy.js → index-DHYWnqST.js} +1 -1
  66. package/dist/{index-DMD0kcnG.js → index-Dnyeih-W.js} +884 -813
  67. package/dist/{index-DlGQW646.js → index-DpHhW0_2.js} +2 -2
  68. package/dist/{index-oTak4j0W.js → index-SkYFFVLL.js} +11 -11
  69. package/dist/index-krrwn6Pi.js +206 -0
  70. package/dist/{index.es-BhN1DTXX.js → index.es-DB9y_DEM.js} +1 -1
  71. package/dist/index.es-vIyUKt0W.js +13232 -0
  72. package/dist/index.es.js +3 -2
  73. package/dist/{info-jv27M7m3.js → info-DSQyHS8b.js} +1 -1
  74. package/dist/{info-circle-CUy7raCU.js → info-circle-BfpWcI4c.js} +1 -1
  75. package/dist/{lightbulb-Dg84wz9J.js → lightbulb-DEMYYsZd.js} +1 -1
  76. package/dist/{mail-BmvI1eEM.js → mail-DNZ2to_6.js} +1 -1
  77. package/dist/{mobile-nbT-f90s.js → mobile-qsyS8oMK.js} +1 -1
  78. package/dist/{more-D5N_--2B.js → more-CnBuKwll.js} +1 -1
  79. package/dist/{network-placeholder-Dqj58Jvo.js → network-placeholder-DhJITakA.js} +1 -1
  80. package/dist/{nftPlaceholder-CwRHJWFO.js → nftPlaceholder-DD3-Cc9U.js} +1 -1
  81. package/dist/{off-CbNfAER2.js → off-CBApAdDk.js} +1 -1
  82. package/dist/{play-store-S7vuVGZC.js → play-store-DDoeRc-b.js} +1 -1
  83. package/dist/{plus-Dm_WFpLs.js → plus-C3J-XWCn.js} +1 -1
  84. package/dist/{qr-code-C57hb-Nm.js → qr-code-CEoOYtHk.js} +1 -1
  85. package/dist/{recycle-horizontal-C5RQV_TS.js → recycle-horizontal-BHJ_s9Yx.js} +1 -1
  86. package/dist/{refresh-BkmZxxGf.js → refresh-CtzOoHls.js} +1 -1
  87. package/dist/{reown-logo-qD9cAPWZ.js → reown-logo-BOj4YDUQ.js} +1 -1
  88. package/dist/{search-REmhFYCv.js → search--Miza3A_.js} +1 -1
  89. package/dist/{send-BeT9MX93.js → send-Bhl1lz4j.js} +1 -1
  90. package/dist/{swapHorizontal-DOphmFlr.js → swapHorizontal-CCvKCngz.js} +1 -1
  91. package/dist/{swapHorizontalBold-AuZckFTe.js → swapHorizontalBold-B90V-dXL.js} +1 -1
  92. package/dist/{swapHorizontalMedium-O3G4LtoW.js → swapHorizontalMedium-CYjeHjnI.js} +1 -1
  93. package/dist/{swapHorizontalRoundedBold-BTI3vDN8.js → swapHorizontalRoundedBold-DSMWeXdW.js} +1 -1
  94. package/dist/{swapVertical-C7PVGBzc.js → swapVertical-DOJUNIvk.js} +1 -1
  95. package/dist/{telegram-vQ5xN0Ac.js → telegram-CufEY_4d.js} +1 -1
  96. package/dist/{three-dots-Bfs9BhnJ.js → three-dots-J2ngva7G.js} +1 -1
  97. package/dist/{twitch-3OzmB49Y.js → twitch-B4vTKVf5.js} +1 -1
  98. package/dist/{twitterIcon-B5PBw26A.js → twitterIcon-DLrxpAGg.js} +1 -1
  99. package/dist/{unsupportedProp-CdKLbhlE.js → unsupportedProp-BLzY2-w_.js} +1 -1
  100. package/dist/{useRegisterError-DY4SqZO0.js → useRegisterError-Cf6oylnR.js} +1 -1
  101. package/dist/{verify-Rne5G5VT.js → verify-CbHqPQKs.js} +1 -1
  102. package/dist/{verify-filled-D7HTBXJf.js → verify-filled-CzKx9Cph.js} +1 -1
  103. package/dist/{w3m-modal-w8n6vImv.js → w3m-modal-DhpjK4cG.js} +2 -2
  104. package/dist/{wallet-a9Xlbfi8.js → wallet-CvIeO6On.js} +1 -1
  105. package/dist/{wallet-placeholder-BeGMf_JP.js → wallet-placeholder-BqELXTBj.js} +1 -1
  106. package/dist/{walletconnect-CnA6lXAN.js → walletconnect-BN4c4XQ5.js} +1 -1
  107. package/dist/{warning-circle-oQbNOUJk.js → warning-circle--dqxXujk.js} +1 -1
  108. package/dist/widget.css +1 -1
  109. package/dist/{x-0bdSPLtI.js → x-CkCp5gtL.js} +1 -1
  110. package/package.json +4 -2
  111. package/dist/EstGas-uPThONt-.js +0 -20281
  112. package/dist/TxnButton-CtczuoSf.js +0 -223
  113. package/dist/getCosmosAddress-BOA-n4al.js +0 -9566
  114. package/dist/index-B705NMZ_.js +0 -160
  115. package/dist/index-CmMHlKPv.js +0 -206
  116. package/dist/index-DTish3yr.js +0 -1014
  117. package/dist/index-DaSDqtx4.js +0 -30694
  118. package/dist/index.es-BjSHM6VO.js +0 -11678
@@ -1,223 +0,0 @@
1
- import { jsx as G } from "react/jsx-runtime";
2
- import { useState as v, useEffect as z } from "react";
3
- import { useDynamicContext as xe, useSwitchNetwork as Me, useIsLoggedIn as Oe } from "@dynamic-labs/sdk-react-core";
4
- import { a as _, u as h, aA as Re, aB as pe } from "./index-DaSDqtx4.js";
5
- import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
6
- import { useAccount as Ve, useConfig as qe, useSwitchChain as Pe, useBalance as _e } from "wagmi";
7
- import { u as ge, d as Qe, c as He, C as ye } from "./useRegisterError-DY4SqZO0.js";
8
- import "./getCosmosAddress-BOA-n4al.js";
9
- import { v as Je } from "./validError-CDlJpg_f.js";
10
- import { u as Ke, g as Ue, p as Xe } from "./index-C1UDOLq9.js";
11
- function Ye(n) {
12
- const { wallet: u, address: l } = _(), [f, N] = v(0);
13
- async function x() {
14
- const F = await window.tronWeb.trx.getBalance(l);
15
- N(F / Math.pow(10, 6));
16
- }
17
- return z(() => {
18
- l && (n == null ? void 0 : n.networkType) === "tron" && x();
19
- }, [l, n == null ? void 0 : n.networkType]), { tronBal: f };
20
- }
21
- function A(n) {
22
- if (n.key.toLowerCase() === "backpacksol")
23
- return !0;
24
- }
25
- function Ze() {
26
- const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: f } = xe();
27
- async function N() {
28
- let x = await f.getBalance();
29
- u(Number(x) || 0);
30
- }
31
- return z(() => {
32
- (l.networkType === "btc" || l.networkType === "sui") && N();
33
- }, [l.networkType, f]), n;
34
- }
35
- function ot({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowWallet: N, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: Te, handleSuccess: Q }) {
36
- var C, ee, te, se, re, ce, ne, ie, de, ae, le, oe, we;
37
- const w = h((s) => s.gradient), m = h((s) => s.configuration), e = h((s) => s.fromChain), i = h((s) => s.fromCoin), r = h((s) => s.toChain), b = h((s) => s.toCoin), { isConnected: j, address: H, chain: I } = Ve(), { address: J, isConnected: We } = _(), me = qe(), Ie = Me(), { getBothWalletConnection: he, getConnectWallet: fe } = ge({
38
- chainData: e
39
- }), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: Ne } = ge({ chainData: e }), Be = fe(e, r), [O, Ge] = v("101"), { tronBal: R } = Ye(e), { cosmosBalance: X } = Ke(), Y = Ze(), V = ((C = e.chain) == null ? void 0 : C.length) && ((ee = r.chain) == null ? void 0 : ee.length), q = ((te = i.address) == null ? void 0 : te.length) && ((se = b.address) == null ? void 0 : se.length), Se = Qe(), Z = Re(), { switchChain: ke, switchChainAsync: $e, isPending: Ee } = Pe({
40
- chainId: Number((e == null ? void 0 : e.chainId) || "0"),
41
- config: me,
42
- throwForSwitchChainNotSupported: !0,
43
- onError(s) {
44
- Je(s.message) && Se({ module: "wallet-error-switch", error: s.message });
45
- }
46
- }), T = _e({
47
- address: H,
48
- token: "",
49
- chainId: Number((e == null ? void 0 : e.chainId) || 0),
50
- enabled: (e == null ? void 0 : e.networkType) == "evm"
51
- }), W = He(Te || 0, 11), [o, a] = v({
52
- text: "",
53
- isGradient: !1,
54
- color: "bw-bg-border-primary"
55
- });
56
- async function Fe() {
57
- if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
58
- try {
59
- await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
60
- } catch {
61
- }
62
- else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
63
- try {
64
- let s = await Ie({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
65
- D();
66
- } catch {
67
- }
68
- else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(pe.TransactionStarted, {
69
- ...n
70
- }), B && (Q(!1), F())) : (Z.emit(pe.TransactionStarted, {
71
- ...n
72
- }), B && (Q(!1), F()));
73
- }
74
- const { primaryWallet: p } = xe(), P = Oe(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Ne(e)) == null ? void 0 : re.address) != null && ce.length) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), D = async () => {
75
- if (p)
76
- try {
77
- const s = await p.getNetwork();
78
- Ge(s);
79
- } catch {
80
- }
81
- else
82
- return;
83
- };
84
- z(() => {
85
- D();
86
- }, [p]);
87
- function k(s, g) {
88
- let y = s / Math.pow(10, g);
89
- return y < 1e-6 ? y.toFixed(20) : y;
90
- }
91
- function Le() {
92
- var s;
93
- return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
94
- }
95
- function je(s) {
96
- var g;
97
- return Number(((g = X[Xe(s.address)]) == null ? void 0 : g.amount) || 0) / Math.pow(10, s.decimals);
98
- }
99
- function Ae() {
100
- var E;
101
- let s = {};
102
- async function g(t, c) {
103
- let $ = Object.keys(s);
104
- s[t == null ? void 0 : t.chainId] ? (s[t == null ? void 0 : t.chainId].amountInToken += c.amountInToken, s[t == null ? void 0 : t.chainId].gas += k(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
105
- amountInToken: c.amountInToken,
106
- gas: k(c.amountInToken, t == null ? void 0 : t.decimals),
107
- token: t,
108
- nativeBal: (d == null ? void 0 : d.length) > 30 && !M && (t == null ? void 0 : t.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (t == null ? void 0 : t.networkType) == "sol" ? L : (t == null ? void 0 : t.networkType) == "tron" ? R : (t == null ? void 0 : t.networkType) == "btc" || (t == null ? void 0 : t.networkType) == "sui" ? Y : (t == null ? void 0 : t.networkType) == "cosmos" ? je(t) : (t == null ? void 0 : t.networkType) == "tron" ? Ue(J) : Le(),
109
- isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
110
- order: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (t == null ? void 0 : t.chainId) ? 2 : $.length > 2 ? 3 : 2
111
- };
112
- }
113
- (E = n == null ? void 0 : n.fee) == null || E.forEach((t) => {
114
- const { token: c } = t;
115
- t.source.toLowerCase() == "from_source_wallet" && g(c, t);
116
- });
117
- let y = W;
118
- if (Number(l) > Number(y))
119
- a({
120
- text: `Insufficient Balance ${i.coin || ""}`,
121
- isGradient: !1,
122
- color: "bw-bg-border-primary"
123
- });
124
- else if ((T != null && T.isLoading || T.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !R && (e == null ? void 0 : e.networkType) === "tron")
125
- a({
126
- text: "Fetching Balance..",
127
- isGradient: !1,
128
- color: "bw-bg-border-primary"
129
- });
130
- else {
131
- let t = Object.values(s).sort((c, $) => c.order - $.order);
132
- t.some((c) => {
133
- var $, be, ue;
134
- return c != null && c.isFromChain && Number(l) <= Number(y) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(y) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
135
- text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
136
- isGradient: !1,
137
- color: "bw-bg-border-primary"
138
- }), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
139
- text: `Insufficient ${((ue = c == null ? void 0 : c.token) == null ? void 0 : ue.symbol) || ""} for gas on ${c.token.blockchain}`,
140
- isGradient: !1,
141
- color: "bw-bg-border-primary"
142
- }), !0) : (a({
143
- text: "",
144
- isGradient: !0,
145
- color: w || S.gradientbutton
146
- }), !0);
147
- }), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
148
- text: "",
149
- isGradient: !0,
150
- color: w || S.gradientbutton
151
- });
152
- }
153
- }
154
- z(() => {
155
- var s, g, y;
156
- !i.coin.length || !(b != null && b.coin.length) ? a({
157
- text: "Select Token",
158
- isGradient: !0,
159
- color: w || S.gradientbutton
160
- }) : B ? typeof l < "u" && Number(l || 0) <= 0 ? a({
161
- text: "Enter Amount",
162
- isGradient: !1,
163
- color: "bw-bg-border-primary"
164
- }) : u.isFetching || !f ? a({
165
- text: "Loading Routes...",
166
- isGradient: !1,
167
- color: "bw-bg-border-primary"
168
- }) : e.chainId === "eclipse-svm" && !A(p) ? a({
169
- text: `Select ${e.name} wallet`,
170
- isGradient: !0,
171
- color: w || S.gradientbutton
172
- }) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? a({
173
- text: "Enter recipient wallet address",
174
- isGradient: !0,
175
- color: w || S.gradientbutton
176
- }) : (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && H === d && (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) || (e == null ? void 0 : e.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) ? a({
177
- text: "From and To asset can not be the same!",
178
- isGradient: !1,
179
- color: "bw-bg-border-primary"
180
- }) : (y = (g = (s = u == null ? void 0 : u.data) == null ? void 0 : s.data) == null ? void 0 : g.quotes) != null && y.length ? u != null && u.error ? a({
181
- text: "Failed to fetch Quotes",
182
- isGradient: !1,
183
- color: "bw-bg-border-primary"
184
- }) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== O && (e == null ? void 0 : e.networkType) === "sol" ? a({
185
- text: `Switch Chain to ${e.chain}`,
186
- isGradient: !0,
187
- color: w || S.gradientbutton
188
- }) : Ae() : a({
189
- text: "No Routes Found",
190
- isGradient: !1,
191
- color: "bw-bg-border-primary"
192
- }) : a({
193
- text: "",
194
- isGradient: !0,
195
- color: w || S.gradientbutton
196
- });
197
- }, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, B, u.isFetching, I == null ? void 0 : I.id, f, R, L, d, Y, X, J]);
198
- let ve = [`switch chain to ${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, `select ${(de = e.chain) == null ? void 0 : de.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
199
- function ze() {
200
- var s, g, y, E;
201
- return B ? u.isFetching ? !0 : o.text.length ? !ve.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !((E = (y = (g = u.data) == null ? void 0 : g.data) == null ? void 0 : y.quotes) != null && E.length) : !1;
202
- }
203
- return /* @__PURE__ */ G(
204
- "button",
205
- {
206
- disabled: ze(),
207
- style: o != null && o.isGradient && V && q ? {
208
- ...m == null ? void 0 : m.gradientStyle,
209
- boxShadow: m && m.customTheme && ((le = (ae = m.customTheme) == null ? void 0 : ae.shadow) == null ? void 0 : le.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
210
- } : {
211
- boxShadow: m && m.customTheme && ((we = (oe = m.customTheme) == null ? void 0 : oe.shadow) == null ? void 0 : we.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
212
- },
213
- className: `bw-w-full bw-rounded-sm bw-h-[52px] ${o != null && o.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${V && q && o.color} ${o.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${o != null && o.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
214
- onClick: () => {
215
- B || (N(!0), ((e == null ? void 0 : e.networkType) !== "evm" && j || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && K && U) && !M ? x("from") : j && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && K && U || M ? x("to") : x("from")), e.chainId === "eclipse-svm" && !A(p) ? (N(!0), x("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? (N(!0), x("to")) : Fe();
216
- },
217
- children: /* @__PURE__ */ G("div", { className: "bw-rounded-sm bw-bg-background-container bw-flex bw-items-center bw-justify-center b-w-full bw-h-full", children: /* @__PURE__ */ G("p", { className: "bw-relative bw-z-20", children: V && q ? Ee ? /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) : B ? o.text.length ? o.text : "Start Transaction" : `Connect ${Be} Wallet` : /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
218
- }
219
- );
220
- }
221
- export {
222
- ot as default
223
- };