@blockend/widget 1.0.50 → 1.0.51

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-CULIQsat.js → AllRoutes-CV0ZvXKH.js} +9 -9
  2. package/dist/{Box-NqP6AVwQ.js → Box-Cb39MKJA.js} +9 -9
  3. package/dist/EstGas-DScDuqvp.js +14426 -0
  4. package/dist/{Grow-DimeDg31.js → Grow-CyOgpnIU.js} +2 -2
  5. package/dist/{InputComp-yY8lKNsS.js → InputComp-B5PYzgiO.js} +3 -3
  6. package/dist/{LoadRoute-C9PROsCB.js → LoadRoute-DVPHaKWi.js} +4 -4
  7. package/dist/{QuotesProgress-BqAtKdL0.js → QuotesProgress-ClcaHGJM.js} +1 -1
  8. package/dist/{SwapAsset-CZhHktg2.js → SwapAsset-Blw4SFxU.js} +1 -1
  9. package/dist/{Tooltip-BiZCYxM1.js → Tooltip-C0P7i2vF.js} +15 -15
  10. package/dist/TxnButton-CHHh05qr.js +223 -0
  11. package/dist/{add-h0-mWiyZ.js → add-B1LcVGSW.js} +1 -1
  12. package/dist/{all-wallets-B1G-BF4O.js → all-wallets-BeJrQ3-B.js} +1 -1
  13. package/dist/{app-store-C6terlTd.js → app-store-CaDVWZZh.js} +1 -1
  14. package/dist/{apple-BAMP6vUT.js → apple-CkGFfDmj.js} +1 -1
  15. package/dist/{arrow-bottom-circle-GWblbKB-.js → arrow-bottom-circle-KdHp0Ttj.js} +1 -1
  16. package/dist/{arrow-bottom-5NtikK9r.js → arrow-bottom-riUHz5wW.js} +1 -1
  17. package/dist/{arrow-left-CuwEORVr.js → arrow-left-4uZ_FCKk.js} +1 -1
  18. package/dist/{arrow-right-B7p52n9L.js → arrow-right-CQx64HKf.js} +1 -1
  19. package/dist/{arrow-top-X0Z_PT4J.js → arrow-top-DCNA0fLu.js} +1 -1
  20. package/dist/{bank-I9RgXHkl.js → bank-BnOJ4hFp.js} +1 -1
  21. package/dist/{basic-DlZzE8fW.js → basic-BwxnVi-O.js} +3 -3
  22. package/dist/{browser-y883UdyY.js → browser-B5n8jjez.js} +1 -1
  23. package/dist/{card-DFwMQe6t.js → card-CyQg9FUR.js} +1 -1
  24. package/dist/{ccip-BdqG54tP.js → ccip-BJVsdO9f.js} +14 -14
  25. package/dist/{checkmark-DwHPcz7y.js → checkmark-TXxWxJ06.js} +1 -1
  26. package/dist/{checkmark-bold-CwUU9faI.js → checkmark-bold-D0241gVT.js} +1 -1
  27. package/dist/{chevron-bottom-CM8xoehI.js → chevron-bottom-BUgj0Jms.js} +1 -1
  28. package/dist/{chevron-left-Bv_KYFge.js → chevron-left-CMc-uR1E.js} +1 -1
  29. package/dist/{chevron-right-CuU7ZCUE.js → chevron-right-DgxFd0Bj.js} +1 -1
  30. package/dist/{chevron-top-FBXj-YJj.js → chevron-top-DiIar6gP.js} +1 -1
  31. package/dist/{chrome-store-BIA_g9fd.js → chrome-store-B8MGsjNr.js} +1 -1
  32. package/dist/{clock-CgcPvmV3.js → clock-Cyg_My5N.js} +1 -1
  33. package/dist/{close-Dro7okSF.js → close-RY0sGjCf.js} +1 -1
  34. package/dist/{coinPlaceholder-Df9r_k0L.js → coinPlaceholder-DE_qwsbW.js} +1 -1
  35. package/dist/{compass-zmLyV0WT.js → compass-CEHhCP6E.js} +1 -1
  36. package/dist/{copy-CIamcXhE.js → copy-FM62Yyrj.js} +1 -1
  37. package/dist/{core-2WkYhq16.js → core-BhR-bSA_.js} +16 -17
  38. package/dist/{cursor-C2EB1DLY.js → cursor-DladmQh5.js} +1 -1
  39. package/dist/{cursor-transparent-BRACM7k5.js → cursor-transparent-D0WNWO9Y.js} +1 -1
  40. package/dist/{desktop-Nj8wnhrx.js → desktop-B6eJupyA.js} +1 -1
  41. package/dist/{disconnect-BA3_H2TE.js → disconnect-VPpMScfC.js} +1 -1
  42. package/dist/{discord-BnYi_b4O.js → discord-wBtYxM-t.js} +1 -1
  43. package/dist/{down-BiWYZhrl.js → down-Owe76_31.js} +2 -2
  44. package/dist/{etherscan-Oni_KoX7.js → etherscan-9nLZ-l75.js} +1 -1
  45. package/dist/{exclamation-triangle-DensxwAC.js → exclamation-triangle-BWl_FP8O.js} +1 -1
  46. package/dist/{extension-CJ-ksDa9.js → extension-BzBM3WFk.js} +1 -1
  47. package/dist/{external-link-D2xEf8Lc.js → external-link-Dyl12aJV.js} +1 -1
  48. package/dist/{facebook-Dc9l2BHT.js → facebook-CBkAbn5g.js} +1 -1
  49. package/dist/{farcaster-PnjVCWz_.js → farcaster-BRpuoVay.js} +1 -1
  50. package/dist/{filters-BHTpF3UH.js → filters-B7NeWYDv.js} +1 -1
  51. package/dist/{getChainIds-CfrzTUBX.js → getChainIds-3ucdX-1p.js} +2 -2
  52. package/dist/getCosmosAddress-COhqxzQU.js +8398 -0
  53. package/dist/{github-SsGUhatp.js → github-BkQ92Psg.js} +1 -1
  54. package/dist/{google-ClSrT1Rw.js → google-D-_oWzT6.js} +1 -1
  55. package/dist/{hamburger-CnBL_kWz.js → hamburger-BumvcHR4.js} +5 -5
  56. package/dist/{help-circle-6WH3b0xJ.js → help-circle-YBo375ZL.js} +1 -1
  57. package/dist/{id-BpdNL8xg.js → id-125Dr2Fp.js} +1 -1
  58. package/dist/{image-D98hwlBe.js → image-KqH_HXHv.js} +1 -1
  59. package/dist/{index-BD7sxHzc.js → index-1-e5pJ-0.js} +2 -2
  60. package/dist/{index-CbunQDKM.js → index-Bpdql1-8.js} +1 -1
  61. package/dist/{index-yf9XBWfH.js → index-CEXnASRZ.js} +573 -525
  62. package/dist/{index-Kcq8t_TI.js → index-CkwDOdMt.js} +1 -1
  63. package/dist/{index-Hx1OgUt3.js → index-DJxdLFXV.js} +51 -51
  64. package/dist/index-DRUdCBxf.js +3189 -0
  65. package/dist/{index-270jcL0T.js → index-Drhw6mFH.js} +8 -7
  66. package/dist/{index-CdSs-KXV.js → index-DvuINyOl.js} +11 -11
  67. package/dist/{index-DbBaCDf8.js → index-O7aWWjZs.js} +78 -78
  68. package/dist/index-aoGlnTj5.js +70013 -0
  69. package/dist/{index-BYEfYYbR.js → index-uIBPDdlb.js} +10 -10
  70. package/dist/{index.es-extFs-He.js → index.es-C5JaVECC.js} +3032 -3244
  71. package/dist/{index.es-DNIrxJpP.js → index.es-Dg8PGfqY.js} +1 -1
  72. package/dist/index.es.js +1 -1
  73. package/dist/{info-CX4R9q8L.js → info-D7JbYWOR.js} +1 -1
  74. package/dist/{info-circle-ByA7titS.js → info-circle-wQJP08na.js} +1 -1
  75. package/dist/{lightbulb-DpdMU1eo.js → lightbulb-DvxJHkNC.js} +1 -1
  76. package/dist/{mail-D7BloLRj.js → mail-BdTr8Qhk.js} +1 -1
  77. package/dist/{mobile-BfhAPCLe.js → mobile-BYMl9NU4.js} +1 -1
  78. package/dist/{more-2Fi4UnXg.js → more-_GkH6PVz.js} +1 -1
  79. package/dist/{network-placeholder-CQk-R-eu.js → network-placeholder-RkFane_-.js} +1 -1
  80. package/dist/{nftPlaceholder-D67aKpf-.js → nftPlaceholder-brLois7k.js} +1 -1
  81. package/dist/{off-CER3l2ZF.js → off-BvoRAKQk.js} +1 -1
  82. package/dist/{play-store-D3OG1Nf5.js → play-store-PAYBmMKL.js} +1 -1
  83. package/dist/{plus-XfyglU6D.js → plus-C7ndQrVG.js} +1 -1
  84. package/dist/{qr-code-C2QzWWzi.js → qr-code-BzVDMXG9.js} +1 -1
  85. package/dist/{recycle-horizontal-BNoCX8eV.js → recycle-horizontal-CcSjuPBD.js} +1 -1
  86. package/dist/{refresh-BtgNPYm1.js → refresh-EnEB4S0q.js} +1 -1
  87. package/dist/{reown-logo-BfwHREPj.js → reown-logo-D-m3ZlCn.js} +1 -1
  88. package/dist/{search-xILtKxp2.js → search-rK2TO8oW.js} +1 -1
  89. package/dist/{send-Cbq82Ise.js → send-ewC_Dr5a.js} +1 -1
  90. package/dist/{swapHorizontal-ieu8keoA.js → swapHorizontal-D4_CLnQ1.js} +1 -1
  91. package/dist/{swapHorizontalBold-DB9kV8I4.js → swapHorizontalBold-BxJSvW__.js} +1 -1
  92. package/dist/{swapHorizontalMedium-CFcq-Eii.js → swapHorizontalMedium-BC6YI70K.js} +1 -1
  93. package/dist/{swapHorizontalRoundedBold-J-bBHkKw.js → swapHorizontalRoundedBold-BvJ7MjAm.js} +1 -1
  94. package/dist/{swapVertical-CdsB-iHQ.js → swapVertical-uQyY1dbd.js} +1 -1
  95. package/dist/{telegram-BcA4SOe-.js → telegram-Dzfv7CZN.js} +1 -1
  96. package/dist/{three-dots-tnSr7FoX.js → three-dots-O3uLZLkz.js} +1 -1
  97. package/dist/{twitch-C0EXCOL_.js → twitch-CUtrbmL-.js} +1 -1
  98. package/dist/{twitterIcon-D8gUfoR9.js → twitterIcon-DZMQ8Bmn.js} +1 -1
  99. package/dist/{unsupportedProp-ClTIJsqE.js → unsupportedProp-Dh57ZITi.js} +1 -1
  100. package/dist/useRegisterError-Bp8xpLyh.js +8912 -0
  101. package/dist/{verify-1fQ9qDGq.js → verify-1kJPzvCP.js} +1 -1
  102. package/dist/{verify-filled-B-Bua_F7.js → verify-filled-D6xGY8A5.js} +1 -1
  103. package/dist/{w3m-modal-B4ljhCgE.js → w3m-modal-slf0WTO2.js} +2 -2
  104. package/dist/{wallet-CHuFygGk.js → wallet-CI9ZKXI5.js} +1 -1
  105. package/dist/{wallet-placeholder-BY3FPHTK.js → wallet-placeholder-DHsdhsL5.js} +1 -1
  106. package/dist/{walletconnect-1yfFjEWg.js → walletconnect-YEeO3478.js} +1 -1
  107. package/dist/{warning-circle-CtfJ6Xr4.js → warning-circle-CnXCXT-G.js} +1 -1
  108. package/dist/widget.css +1 -1
  109. package/dist/{x-j-7tNFTH.js → x-ChzZn6EY.js} +1 -1
  110. package/package.json +7 -5
  111. package/dist/EstGas-Dh9afjPx.js +0 -12661
  112. package/dist/TxnButton-BZKqys7R.js +0 -212
  113. package/dist/getCosmosAddress-CQBPedP-.js +0 -9565
  114. package/dist/index-DTish3yr.js +0 -1014
  115. package/dist/index-VwOzTBuI.js +0 -30707
  116. package/dist/index-uMBmZTqD.js +0 -3010
  117. package/dist/useRegisterError-BrX0SzkP.js +0 -8812
@@ -1,212 +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 m, aA as ze, aB as Me } from "./index-VwOzTBuI.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-BrX0SzkP.js";
8
- import "./getCosmosAddress-CQBPedP-.js";
9
- import { v as Qe } from "./validError-CDlJpg_f.js";
10
- import { u as He, p as Je } from "./index-yf9XBWfH.js";
11
- function Ke(n) {
12
- const { wallet: g, address: y } = we(), [E, S] = q(0);
13
- async function T() {
14
- const A = await window.tronWeb.trx.getBalance(y);
15
- S(A / Math.pow(10, 6));
16
- }
17
- return P(() => {
18
- y && (n == null ? void 0 : n.networkType) === "tron" && T();
19
- }, [y, n == null ? void 0 : n.networkType]), { tronBal: E };
20
- }
21
- function j(n) {
22
- if (n.key.toLowerCase() === "backpacksol")
23
- return !0;
24
- }
25
- function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: T, handleConfirmClose: A, balanceSol: F, getCoinBalance: be, handleSuccess: ue }) {
26
- var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
27
- const o = m((s) => s.gradient), h = m((s) => s.configuration), e = m((s) => s.fromChain), i = m((s) => s.fromCoin), r = m((s) => s.toChain), w = m((s) => s.toCoin), { isConnected: L, address: _, chain: I } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
28
- chainData: e
29
- }), { connected: Q, address: H, disconnect: Ue } = we(), v = m((s) => s.toDisconnect), d = m((s) => s.customWallet), { getWallet: he } = ae({ chainData: e }), Ie = xe(e, r), [z, me] = q("101"), { tronBal: M } = Ke(e), { cosmosBalance: J } = He(), 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), Te = Pe(), Ne = ze(), { switchChain: Xe, switchChainAsync: fe, isPending: Be } = Ve({
30
- chainId: Number((e == null ? void 0 : e.chainId) || "0"),
31
- config: pe,
32
- throwForSwitchChainNotSupported: !0,
33
- onError(s) {
34
- Qe(s.message) && Te({ module: "wallet-error-switch", error: s.message });
35
- }
36
- }), x = qe({
37
- address: _,
38
- token: "",
39
- chainId: Number((e == null ? void 0 : e.chainId) || 0),
40
- enabled: (e == null ? void 0 : e.networkType) == "evm"
41
- }), K = _e(be || 0, 11), [a, l] = q({
42
- text: "",
43
- isGradient: !1,
44
- color: "bw-bg-border-primary"
45
- });
46
- async function Ge() {
47
- if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
48
- try {
49
- await fe({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
50
- } catch {
51
- }
52
- else if ((e == null ? void 0 : e.networkType) === "sol" && z !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
53
- try {
54
- let s = await ge({ wallet: b, network: e.chainId == "eclipse-svm" ? "201" : "101" });
55
- U();
56
- } catch {
57
- }
58
- else
59
- Ne.emit(Me.TransactionStarted, {
60
- ...n
61
- }), B && (ue(!1), A());
62
- }
63
- const { primaryWallet: b } = Ae(), V = ve(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = he(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 () => {
64
- if (b)
65
- try {
66
- const s = await b.getNetwork();
67
- me(s);
68
- } catch {
69
- }
70
- else
71
- return;
72
- };
73
- P(() => {
74
- U();
75
- }, [b]);
76
- function X(s, u) {
77
- let p = s / Math.pow(10, u);
78
- return p < 1e-6 ? p.toFixed(20) : p;
79
- }
80
- function Se() {
81
- var s;
82
- return Number(((s = x == null ? void 0 : x.data) == null ? void 0 : s.formatted) || 0);
83
- }
84
- function $e(s) {
85
- var u;
86
- return Number(((u = J[Je(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
87
- }
88
- function Ee() {
89
- var $;
90
- let s = {};
91
- function u(t, c) {
92
- let G = Object.keys(s);
93
- 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] = {
94
- amountInToken: c.amountInToken,
95
- gas: X(c.amountInToken, t == null ? void 0 : t.decimals),
96
- token: t,
97
- 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(),
98
- isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
99
- 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
100
- };
101
- }
102
- ($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
103
- const { token: c } = t;
104
- t.source.toLowerCase() == "from_source_wallet" && u(c, t);
105
- });
106
- let p = K;
107
- if (Number(y) > Number(p))
108
- l({
109
- text: `Insufficient Balance ${i.coin || ""}`,
110
- isGradient: !1,
111
- color: "bw-bg-border-primary"
112
- });
113
- 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")
114
- l({
115
- text: "Fetching Balance..",
116
- isGradient: !1,
117
- color: "bw-bg-border-primary"
118
- });
119
- else {
120
- let t = Object.values(s).sort((c, G) => c.order - G.order);
121
- t.some((c) => {
122
- var G, de, le;
123
- 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({
124
- text: `Insufficient ${((G = c == null ? void 0 : c.token) == null ? void 0 : G.symbol) || ""} for gas on ${c.token.blockchain}`,
125
- isGradient: !1,
126
- color: "bw-bg-border-primary"
127
- }), !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({
128
- text: `Insufficient ${((le = c == null ? void 0 : c.token) == null ? void 0 : le.symbol) || ""} for gas on ${c.token.blockchain}`,
129
- isGradient: !1,
130
- color: "bw-bg-border-primary"
131
- }), !0) : (l({
132
- text: "",
133
- isGradient: !0,
134
- color: o || f.gradientbutton
135
- }), !0);
136
- }), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && l({
137
- text: "",
138
- isGradient: !0,
139
- color: o || f.gradientbutton
140
- });
141
- }
142
- }
143
- P(() => {
144
- var s, u, p;
145
- !i.coin.length || !(w != null && w.coin.length) ? l({
146
- text: "Select Token",
147
- isGradient: !0,
148
- color: o || f.gradientbutton
149
- }) : B ? typeof y < "u" && Number(y || 0) <= 0 ? l({
150
- text: "Enter Amount",
151
- isGradient: !1,
152
- color: "bw-bg-border-primary"
153
- }) : g.isFetching || !E ? l({
154
- text: "Loading Routes...",
155
- isGradient: !1,
156
- color: "bw-bg-border-primary"
157
- }) : e.chainId === "eclipse-svm" && !j(b) ? l({
158
- text: `Select ${e.name} wallet`,
159
- isGradient: !0,
160
- color: o || f.gradientbutton
161
- }) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? l({
162
- text: "Enter recipient wallet address",
163
- isGradient: !0,
164
- color: o || f.gradientbutton
165
- }) : (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({
166
- text: "From and To asset can not be the same!",
167
- isGradient: !1,
168
- color: "bw-bg-border-primary"
169
- }) : (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({
170
- text: "Failed to fetch Quotes",
171
- isGradient: !1,
172
- color: "bw-bg-border-primary"
173
- }) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.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({
174
- text: `Switch Chain to ${e.chain}`,
175
- isGradient: !0,
176
- color: o || f.gradientbutton
177
- }) : Ee() : l({
178
- text: "No Routes Found",
179
- isGradient: !1,
180
- color: "bw-bg-border-primary"
181
- }) : l({
182
- text: "",
183
- isGradient: !0,
184
- color: o || f.gradientbutton
185
- });
186
- }, [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, I == null ? void 0 : I.id, E, M, F, d, J]);
187
- 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"];
188
- function Le() {
189
- var s, u, p, $;
190
- 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;
191
- }
192
- return /* @__PURE__ */ N(
193
- "button",
194
- {
195
- disabled: Le(),
196
- style: a != null && a.isGradient && O && R ? {
197
- ...h == null ? void 0 : h.gradientStyle,
198
- boxShadow: h && h.customTheme && ((ce = (re = h.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
199
- } : {
200
- boxShadow: h && h.customTheme && ((ie = (ne = h.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
201
- },
202
- 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"}`,
203
- onClick: () => {
204
- 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" && Q && H) && !v ? T("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && Q && H || v ? T("to") : T("from")), e.chainId === "eclipse-svm" && !j(b) ? (S(!0), T("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (S(!0), T("to")) : Ge();
205
- },
206
- 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 ${Ie} 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" }) }) }) })
207
- }
208
- );
209
- }
210
- export {
211
- nt as default
212
- };