@blockend/widget 1.0.49-beta.2 → 1.0.49-beta.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.
Files changed (117) hide show
  1. package/dist/{AllRoutes-SK8ZFq_x.js → AllRoutes-LD5p98zn.js} +9 -9
  2. package/dist/{Box-DAMq9mQT.js → Box-Cs3JEIFG.js} +6 -6
  3. package/dist/EstGas-H-UdwS1f.js +12659 -0
  4. package/dist/{Grow-Qzfjlf_b.js → Grow-BvHTdetx.js} +2 -2
  5. package/dist/{InputComp-BUhhYfS_.js → InputComp-COwG8q-J.js} +3 -3
  6. package/dist/{LoadRoute-B9EnT59x.js → LoadRoute-DsdVO6Oo.js} +4 -4
  7. package/dist/{QuotesProgress-DMyLQ_Iw.js → QuotesProgress-B8bDI4r6.js} +1 -1
  8. package/dist/{SwapAsset-mgONO1Wh.js → SwapAsset-Ddh66LWB.js} +1 -1
  9. package/dist/{Tooltip-CCwWxndh.js → Tooltip-hBxzXSU3.js} +3 -3
  10. package/dist/TxnButton-jGgemD8y.js +205 -0
  11. package/dist/{add-DgNWpTbE.js → add-DGq3NqFo.js} +1 -1
  12. package/dist/{all-wallets-DbLggbFH.js → all-wallets-CzWn7-6X.js} +1 -1
  13. package/dist/{app-store-BM-3bzwt.js → app-store-BGFzY2oe.js} +1 -1
  14. package/dist/{apple-DGgkQglq.js → apple-D5zFxCbx.js} +1 -1
  15. package/dist/{arrow-bottom-BCcsiVDf.js → arrow-bottom-D25Ef730.js} +1 -1
  16. package/dist/{arrow-bottom-circle-BxnEnxCv.js → arrow-bottom-circle-CskusJTk.js} +1 -1
  17. package/dist/{arrow-left-BajNw8Bo.js → arrow-left-Bn-AuY99.js} +1 -1
  18. package/dist/{arrow-right-Kqyf83Ue.js → arrow-right-DJQCv_ak.js} +1 -1
  19. package/dist/{arrow-top-P0YZuCsS.js → arrow-top-Do8qEhLT.js} +1 -1
  20. package/dist/{bank-BdBlTjok.js → bank-CBeLsi0M.js} +1 -1
  21. package/dist/{basic-B7dsMTNk.js → basic-DLf5LiFg.js} +3 -3
  22. package/dist/{browser-CiQFAZ4t.js → browser-DVamy-m2.js} +1 -1
  23. package/dist/{card-D94MFuQu.js → card-tFF7X_nt.js} +1 -1
  24. package/dist/{ccip-vv5r0Apm.js → ccip-C4idlAuS.js} +16 -16
  25. package/dist/{checkmark-Cucqq4L6.js → checkmark-DkVW1LY2.js} +1 -1
  26. package/dist/{checkmark-bold-C5WgesjY.js → checkmark-bold-BbQos6bO.js} +1 -1
  27. package/dist/{chevron-bottom-CyfhotQQ.js → chevron-bottom-DokKka1d.js} +1 -1
  28. package/dist/{chevron-left-CXJ7R3iS.js → chevron-left-BPwuTnF_.js} +1 -1
  29. package/dist/{chevron-right-4ex-g3or.js → chevron-right-Djdm9Vly.js} +1 -1
  30. package/dist/{chevron-top-BDfgSTbr.js → chevron-top-DviiO5xj.js} +1 -1
  31. package/dist/{chrome-store-CX9plHu3.js → chrome-store-BFukaYHs.js} +1 -1
  32. package/dist/{clock-CtQPqpVc.js → clock-gPhvJPEh.js} +1 -1
  33. package/dist/{close-CYlyCBrT.js → close-CWK6JCCg.js} +1 -1
  34. package/dist/{coinPlaceholder-DS0YfqOM.js → coinPlaceholder-DuZ2QujM.js} +1 -1
  35. package/dist/{compass-DVktgTZ-.js → compass-DlrcJ8Hk.js} +1 -1
  36. package/dist/{copy-Bk0qGavv.js → copy-CNAncK5I.js} +1 -1
  37. package/dist/{core-DgJB3Qno.js → core-BkrnmkI7.js} +17 -16
  38. package/dist/{cursor-CCqfxECm.js → cursor-BknQSZIa.js} +1 -1
  39. package/dist/{cursor-transparent-CPbYJ9jd.js → cursor-transparent-D7K-weum.js} +1 -1
  40. package/dist/{desktop-DAykpsO7.js → desktop-Dvki1QtU.js} +1 -1
  41. package/dist/{disconnect-DL8vRZg2.js → disconnect-QbJ6g-Q9.js} +1 -1
  42. package/dist/{discord-BS8TPANA.js → discord-BtkOmfcK.js} +1 -1
  43. package/dist/{down-D6aGpC9P.js → down-DRC2u-nt.js} +2 -2
  44. package/dist/{etherscan-YSjUjqH5.js → etherscan-C4RKkVrP.js} +1 -1
  45. package/dist/{exclamation-triangle-Cd8s_lsN.js → exclamation-triangle-CEoAdk7x.js} +1 -1
  46. package/dist/{extension-BfYpl1LK.js → extension-DkOomXUg.js} +1 -1
  47. package/dist/{external-link-uF5MV_9t.js → external-link-D9HfOXel.js} +1 -1
  48. package/dist/{facebook-DO648yaX.js → facebook-zQmBHowA.js} +1 -1
  49. package/dist/{farcaster-DZF64pQM.js → farcaster-Cfy-sjqY.js} +1 -1
  50. package/dist/{filters-DMTGJi0Y.js → filters-Cq1K6QWb.js} +1 -1
  51. package/dist/{getChainIds-DUKOh0Kp.js → getChainIds-Btq6EjyX.js} +2 -2
  52. package/dist/getCosmosAddress-Bu-V7Ot0.js +9565 -0
  53. package/dist/{github-DQDrN0RZ.js → github-gNR-tm3O.js} +1 -1
  54. package/dist/{google-DRrIdyFk.js → google-rmnuGsrL.js} +1 -1
  55. package/dist/{hamburger-DFh0u4ls.js → hamburger-CEQO6OZs.js} +5 -5
  56. package/dist/{help-circle-n5Ls2-2F.js → help-circle-Cj4bjfia.js} +1 -1
  57. package/dist/{id-DbShnIoD.js → id-nb5m-NKY.js} +1 -1
  58. package/dist/{image-B5YOEd-c.js → image-BlK2k80L.js} +1 -1
  59. package/dist/{index-BwAuNUFT.js → index-1OzJ9Z6-.js} +2192 -2170
  60. package/dist/{index-BC_WzIG-.js → index-7R8NiD42.js} +1 -1
  61. package/dist/index-7iRnvPpN.js +159 -0
  62. package/dist/{index-CL2LZuVL.js → index-CZQdiy7b.js} +2 -2
  63. package/dist/{index-DvR1iioL.js → index-CbycATvf.js} +78 -78
  64. package/dist/{index-CDBWyjo1.js → index-D0tb6mUR.js} +11 -11
  65. package/dist/index-D5aVEHZL.js +206 -0
  66. package/dist/index-DTish3yr.js +1014 -0
  67. package/dist/index-Fv4UV6Sc.js +30707 -0
  68. package/dist/{index-DuTB7F2j.js → index-pieshoDv.js} +542 -507
  69. package/dist/{index-CktG1k9u.js → index-salSLcoU.js} +1 -1
  70. package/dist/{index-D4uRM0hD.js → index-vM1noC-w.js} +1320 -1194
  71. package/dist/{index.es-BRVISbr4.js → index.es-CJ-ZznBF.js} +1712 -1625
  72. package/dist/{index.es-DD1q2x58.js → index.es-Ce_QYzsk.js} +1 -1
  73. package/dist/index.es.js +1 -1
  74. package/dist/{info-5rQx4FCT.js → info-6RBhKgcd.js} +1 -1
  75. package/dist/{info-circle-DnNqx9Fu.js → info-circle-BlIbWe25.js} +1 -1
  76. package/dist/{lightbulb-DEa_QXWk.js → lightbulb-CS3_wKY8.js} +1 -1
  77. package/dist/{mail-DNWPpemE.js → mail-CRsD8jAA.js} +1 -1
  78. package/dist/{mobile-CsmBvAG0.js → mobile-DMLTKouh.js} +1 -1
  79. package/dist/{more-Bjd7dOWF.js → more-uoTJ3kvy.js} +1 -1
  80. package/dist/{network-placeholder-DsQ_HMHG.js → network-placeholder-D-XL3hqx.js} +1 -1
  81. package/dist/{nftPlaceholder-KsQSrTt2.js → nftPlaceholder-CiYWPSAY.js} +1 -1
  82. package/dist/{off-B0hqloiu.js → off-B79emGaW.js} +1 -1
  83. package/dist/{play-store-DseAgFmo.js → play-store-B828L964.js} +1 -1
  84. package/dist/{plus-BJCNDRM3.js → plus-BRVCC9lV.js} +1 -1
  85. package/dist/{qr-code-lEBAtsO4.js → qr-code-qp9DeEO9.js} +1 -1
  86. package/dist/{recycle-horizontal-K4rUQslN.js → recycle-horizontal-DoDvFScD.js} +1 -1
  87. package/dist/{refresh-DEZrriLV.js → refresh-BuegBzBd.js} +1 -1
  88. package/dist/{reown-logo-BHbe-CUO.js → reown-logo-BrUAyTxC.js} +1 -1
  89. package/dist/{search-CIK9XN0-.js → search-CzpyG7ky.js} +1 -1
  90. package/dist/{send-Bxpdb3Vf.js → send-BHMxC1xj.js} +1 -1
  91. package/dist/{swapHorizontal-BBHEuYx1.js → swapHorizontal-Bq8mR1QZ.js} +1 -1
  92. package/dist/{swapHorizontalBold-t0VsiN4I.js → swapHorizontalBold-2ueiC4L9.js} +1 -1
  93. package/dist/{swapHorizontalMedium-PzUH_Th4.js → swapHorizontalMedium-9jh3zunE.js} +1 -1
  94. package/dist/{swapHorizontalRoundedBold-EyDyL2Bj.js → swapHorizontalRoundedBold-BIk7kp2S.js} +1 -1
  95. package/dist/{swapVertical-CusOd1Kd.js → swapVertical-DM_T3EzD.js} +1 -1
  96. package/dist/{telegram-DfP_Unfg.js → telegram-CbeDajqU.js} +1 -1
  97. package/dist/{three-dots-BcnJZFUd.js → three-dots-DUntIedp.js} +1 -1
  98. package/dist/{twitch-CN0F2VUn.js → twitch-DIXNVK7h.js} +1 -1
  99. package/dist/{twitterIcon-DDA3Skm-.js → twitterIcon-nHRKKmzg.js} +1 -1
  100. package/dist/{unsupportedProp-CIQ48Cx8.js → unsupportedProp-BAk0ueJt.js} +1 -1
  101. package/dist/{useRegisterError-DuNi8RxR.js → useRegisterError-tq4Tke9I.js} +150 -150
  102. package/dist/{verify-BVsIUy32.js → verify-CbyVHS7l.js} +1 -1
  103. package/dist/{verify-filled-bQ1f0Y-d.js → verify-filled-QZDBE0oP.js} +1 -1
  104. package/dist/{w3m-modal-Cg8vnNGL.js → w3m-modal-Bp3nI0EC.js} +2 -2
  105. package/dist/{wallet-OISOAGe9.js → wallet-DVjsV39Q.js} +1 -1
  106. package/dist/{wallet-placeholder-DZD3tMxc.js → wallet-placeholder-BgrGGLNk.js} +1 -1
  107. package/dist/{walletconnect-CCANKmqY.js → walletconnect-zriuFVFg.js} +1 -1
  108. package/dist/{warning-circle-C_uh-wB2.js → warning-circle-CpWwL8_f.js} +1 -1
  109. package/dist/widget.css +1 -1
  110. package/dist/{x-BpuzG7VO.js → x-DN0-dY3F.js} +1 -1
  111. package/package.json +4 -7
  112. package/dist/EstGas-B9rFXiVW.js +0 -1486
  113. package/dist/TxnButton-CqL_9AIV.js +0 -211
  114. package/dist/getCosmosAddress-Cb98patK.js +0 -6075
  115. package/dist/index-BIN4LE_6.js +0 -42277
  116. package/dist/index-DEecyVOZ.js +0 -6711
  117. package/dist/index-VUJh-JIq.js +0 -206
@@ -1,211 +0,0 @@
1
- import { jsx as N } from "react/jsx-runtime";
2
- import { useState as q, useEffect as P } from "react";
3
- import { useSwitchNetwork as je, useDynamicContext as Ae, useIsLoggedIn as ve } from "@dynamic-labs/sdk-react-core";
4
- import { a as we, u as T, aI as ze, aJ as Me } from "./index-BIN4LE_6.js";
5
- import { s as f } from "./WidgetForm.module-QHJ0-m5f.js";
6
- import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as qe } from "wagmi";
7
- import { u as ae, d as Pe, c as _e, C as oe } from "./useRegisterError-DuNi8RxR.js";
8
- import { v as Je } from "./validError-CDlJpg_f.js";
9
- import { u as Qe, p as He } from "./index-DuTB7F2j.js";
10
- function Ke(n) {
11
- const { wallet: g, address: y } = we(), [E, S] = q(0);
12
- async function m() {
13
- const A = await window.tronWeb.trx.getBalance(y);
14
- S(A / Math.pow(10, 6));
15
- }
16
- return P(() => {
17
- y && (n == null ? void 0 : n.networkType) === "tron" && m();
18
- }, [y, n == null ? void 0 : n.networkType]), { tronBal: E };
19
- }
20
- function j(n) {
21
- if (n.key.toLowerCase() === "backpacksol")
22
- return !0;
23
- }
24
- function ct({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: m, handleConfirmClose: A, balanceSol: F, getCoinBalance: be, handleSuccess: ue }) {
25
- var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
26
- const o = T((s) => s.gradient), I = T((s) => s.configuration), e = T((s) => s.fromChain), i = T((s) => s.fromCoin), r = T((s) => s.toChain), w = T((s) => s.toCoin), { isConnected: L, address: _, chain: h } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
27
- chainData: e
28
- }), { connected: J, address: Q, disconnect: Ue } = we(), v = T((s) => s.toDisconnect), d = T((s) => s.customWallet), { getWallet: Ie } = ae({ chainData: e }), he = xe(e, r), [z, Te] = q("101"), { tronBal: M } = Ke(e), { cosmosBalance: H } = Qe(), O = ((Y = e.chain) == null ? void 0 : Y.length) && ((Z = r.chain) == null ? void 0 : Z.length), R = ((W = i.address) == null ? void 0 : W.length) && ((k = w.address) == null ? void 0 : k.length), me = Pe(), Ne = ze(), { switchChain: Xe, switchChainAsync: fe, isPending: Be } = Ve({
29
- chainId: Number((e == null ? void 0 : e.chainId) || "0"),
30
- config: pe,
31
- throwForSwitchChainNotSupported: !0,
32
- onError(s) {
33
- Je(s.message) && me({ module: "wallet-error-switch", error: s.message });
34
- }
35
- }), x = qe({
36
- address: _,
37
- token: "",
38
- chainId: Number((e == null ? void 0 : e.chainId) || 0),
39
- enabled: (e == null ? void 0 : e.networkType) == "evm"
40
- }), K = _e(be || 0, 11), [a, l] = q({
41
- text: "",
42
- isGradient: !1,
43
- color: "bw-bg-border-primary"
44
- });
45
- async function Ge() {
46
- if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (h == null ? void 0 : h.id))
47
- try {
48
- await fe({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
49
- } catch {
50
- }
51
- else if ((e == null ? void 0 : e.networkType) === "sol" && z !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
52
- try {
53
- let s = await ge({ wallet: b, network: e.chainId == "eclipse-svm" ? "201" : "101" });
54
- U();
55
- } catch {
56
- }
57
- else
58
- Ne.emit(Me.TransactionStarted, {
59
- ...n
60
- }), B && (ue(!1), A());
61
- }
62
- const { primaryWallet: b } = Ae(), V = ve(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = Ie(e)) == null ? void 0 : D.address) != null && C.length) : ye(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), U = async () => {
63
- if (b)
64
- try {
65
- const s = await b.getNetwork();
66
- Te(s);
67
- } catch {
68
- }
69
- else
70
- return;
71
- };
72
- P(() => {
73
- U();
74
- }, [b]);
75
- function X(s, u) {
76
- let p = s / Math.pow(10, u);
77
- return p < 1e-6 ? p.toFixed(20) : p;
78
- }
79
- function Se() {
80
- var s;
81
- return Number(((s = x == null ? void 0 : x.data) == null ? void 0 : s.formatted) || 0);
82
- }
83
- function $e(s) {
84
- var u;
85
- return Number(((u = H[He(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
86
- }
87
- function Ee() {
88
- var $;
89
- let s = {};
90
- function u(t, c) {
91
- let G = Object.keys(s);
92
- 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 += X(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
93
- amountInToken: c.amountInToken,
94
- gas: X(c.amountInToken, t == null ? void 0 : t.decimals),
95
- token: t,
96
- nativeBal: (d == null ? void 0 : d.length) > 30 && !v && (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" ? F : (t == null ? void 0 : t.networkType) == "tron" ? M : (t == null ? void 0 : t.networkType) == "cosmos" ? $e(t) : Se(),
97
- isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
98
- 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 : G.length > 2 ? 3 : 2
99
- };
100
- }
101
- ($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
102
- const { token: c } = t;
103
- t.source.toLowerCase() == "from_source_wallet" && u(c, t);
104
- });
105
- let p = K;
106
- if (Number(y) > Number(p))
107
- l({
108
- text: `Insufficient Balance ${i.coin || ""}`,
109
- isGradient: !1,
110
- color: "bw-bg-border-primary"
111
- });
112
- else if ((x != null && x.isLoading || x.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof F > "u" || F === null) && (e == null ? void 0 : e.networkType) === "sol" || !M && (e == null ? void 0 : e.networkType) === "tron")
113
- l({
114
- text: "Fetching Balance..",
115
- isGradient: !1,
116
- color: "bw-bg-border-primary"
117
- });
118
- else {
119
- let t = Object.values(s).sort((c, G) => c.order - G.order);
120
- t.some((c) => {
121
- var G, de, le;
122
- return c != null && c.isFromChain && Number(y) <= Number(p) && Number(c.nativeBal) - Number(y) < c.gas && (i != null && i.isNative) || Number(y) <= Number(p) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (l({
123
- text: `Insufficient ${((G = c == null ? void 0 : c.token) == null ? void 0 : G.symbol) || ""} for gas on ${c.token.blockchain}`,
124
- isGradient: !1,
125
- color: "bw-bg-border-primary"
126
- }), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((de = c == null ? void 0 : c.token) == null ? void 0 : de.chainId) == (r == null ? void 0 : r.chainId)) ? (l({
127
- text: `Insufficient ${((le = c == null ? void 0 : c.token) == null ? void 0 : le.symbol) || ""} for gas on ${c.token.blockchain}`,
128
- isGradient: !1,
129
- color: "bw-bg-border-primary"
130
- }), !0) : (l({
131
- text: "",
132
- isGradient: !0,
133
- color: o || f.gradientbutton
134
- }), !0);
135
- }), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && l({
136
- text: "",
137
- isGradient: !0,
138
- color: o || f.gradientbutton
139
- });
140
- }
141
- }
142
- P(() => {
143
- var s, u, p;
144
- !i.coin.length || !(w != null && w.coin.length) ? l({
145
- text: "Select Token",
146
- isGradient: !0,
147
- color: o || f.gradientbutton
148
- }) : B ? typeof y < "u" && Number(y || 0) <= 0 ? l({
149
- text: "Enter Amount",
150
- isGradient: !1,
151
- color: "bw-bg-border-primary"
152
- }) : g.isFetching || !E ? l({
153
- text: "Loading Routes...",
154
- isGradient: !1,
155
- color: "bw-bg-border-primary"
156
- }) : e.chainId === "eclipse-svm" && !j(b) ? l({
157
- text: `Select ${e.name} wallet`,
158
- isGradient: !0,
159
- color: o || f.gradientbutton
160
- }) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? l({
161
- text: "Enter recipient wallet address",
162
- isGradient: !0,
163
- color: o || f.gradientbutton
164
- }) : (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && _ === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (b == null ? void 0 : b.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? l({
165
- text: "From and To asset can not be the same!",
166
- isGradient: !1,
167
- color: "bw-bg-border-primary"
168
- }) : (p = (u = (s = g == null ? void 0 : g.data) == null ? void 0 : s.data) == null ? void 0 : u.quotes) != null && p.length ? g != null && g.error ? l({
169
- text: "Failed to fetch Quotes",
170
- isGradient: !1,
171
- color: "bw-bg-border-primary"
172
- }) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (h == null ? void 0 : h.id) && (e == null ? void 0 : e.networkType) === "evm" || V && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== z && (e == null ? void 0 : e.networkType) === "sol" ? l({
173
- text: `Switch Chain to ${e.chain}`,
174
- isGradient: !0,
175
- color: o || f.gradientbutton
176
- }) : Ee() : l({
177
- text: "No Routes Found",
178
- isGradient: !1,
179
- color: "bw-bg-border-primary"
180
- }) : l({
181
- text: "",
182
- isGradient: !0,
183
- color: o || f.gradientbutton
184
- });
185
- }, [z, b, i, w, y, e, r, (ee = x.data) == null ? void 0 : ee.formatted, n, x.isFetching, x.isLoading, L, K, B, g.isFetching, h == null ? void 0 : h.id, E, M, F, d, H]);
186
- let Fe = [`switch chain to ${(te = e.chain) == null ? void 0 : te.toLowerCase()}`, `select ${(se = e.chain) == null ? void 0 : se.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
187
- function Le() {
188
- var s, u, p, $;
189
- return B ? g.isFetching ? !0 : a.text.length ? !Fe.includes((s = a.text) == null ? void 0 : s.toLowerCase()) : !(($ = (p = (u = g.data) == null ? void 0 : u.data) == null ? void 0 : p.quotes) != null && $.length) : !1;
190
- }
191
- return /* @__PURE__ */ N(
192
- "button",
193
- {
194
- disabled: Le(),
195
- style: a != null && a.isGradient && O && R ? {
196
- ...I == null ? void 0 : I.gradientStyle,
197
- boxShadow: I && I.customTheme && ((ce = (re = I.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
198
- } : {
199
- boxShadow: I && I.customTheme && ((ie = (ne = I.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
200
- },
201
- className: `bw-w-full bw-rounded-sm bw-h-[52px] ${a != null && a.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${O && R && a.color} ${a.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${a != null && a.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
202
- onClick: () => {
203
- B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && V && b !== null || (e == null ? void 0 : e.networkType) !== "tron" && J && Q) && !v ? m("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && J && Q || v ? m("to") : m("from")), e.chainId === "eclipse-svm" && !j(b) ? (S(!0), m("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (S(!0), m("to")) : Ge();
204
- },
205
- children: /* @__PURE__ */ N("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__ */ N("p", { className: "bw-relative bw-z-20", children: O && R ? Be ? /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) : B ? a.text.length ? a.text : "Start Transaction" : `Connect ${he} Wallet` : /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) }) })
206
- }
207
- );
208
- }
209
- export {
210
- ct as default
211
- };