@blockend/widget 1.0.46 → 1.0.48-beta.0

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-ebEKf9Ro.js → AllRoutes-D8LuuVmM.js} +9 -9
  2. package/dist/{Box-CiCWnabh.js → Box-DM9yFOex.js} +8 -8
  3. package/dist/EstGas-BeT31S57.js +13644 -0
  4. package/dist/{Grow-C6PHu0yK.js → Grow-DOn6L3co.js} +2 -2
  5. package/dist/{InputComp-BXSYOI6T.js → InputComp-NuVHgaJr.js} +5 -5
  6. package/dist/{LoadRoute-BNZMhjBq.js → LoadRoute-B67KdzDM.js} +18 -18
  7. package/dist/QuotesProgress-QaDMFoy1.js +28 -0
  8. package/dist/{SwapAsset-5fGa7RI7.js → SwapAsset-DS1khTG7.js} +1 -1
  9. package/dist/{Tooltip-DZnPQjew.js → Tooltip-Ba3WFgGd.js} +15 -15
  10. package/dist/TxnButton-tr4Dz_jE.js +223 -0
  11. package/dist/{add-DliAEKbR.js → add-q9Nf6prg.js} +1 -1
  12. package/dist/{all-wallets-9YBmSsEh.js → all-wallets-DPeT0Mif.js} +1 -1
  13. package/dist/{app-store-cLc_fbJp.js → app-store-DN3WdWdo.js} +1 -1
  14. package/dist/{apple-DmGlSCW4.js → apple-DyzMqifv.js} +1 -1
  15. package/dist/{arrow-bottom-BNKn4j5U.js → arrow-bottom-DqoHxj9Z.js} +1 -1
  16. package/dist/{arrow-bottom-circle-CZL2vTc2.js → arrow-bottom-circle-gYCPf_-a.js} +1 -1
  17. package/dist/{arrow-left-D9JcV0Q-.js → arrow-left-BCb0WGCp.js} +1 -1
  18. package/dist/{arrow-right-DOHZnmbU.js → arrow-right-COFDKXwO.js} +1 -1
  19. package/dist/{arrow-top-Dyu4OO_u.js → arrow-top-A2hPO7gg.js} +1 -1
  20. package/dist/{bank-CtB7x5WX.js → bank-DzMH-tSV.js} +1 -1
  21. package/dist/{basic-sgi7m0S-.js → basic-C5wivloW.js} +3 -3
  22. package/dist/{browser-CPMV76Fc.js → browser-pBih3Y0E.js} +1 -1
  23. package/dist/{card-DZrjJpNd.js → card-CnPr5FkC.js} +1 -1
  24. package/dist/{ccip-rz-h0ONe.js → ccip-Di_Zaa6h.js} +16 -16
  25. package/dist/{checkmark-CO1kXDe-.js → checkmark-DuHkawx4.js} +1 -1
  26. package/dist/{checkmark-bold-g1JkiOD4.js → checkmark-bold-CbTyGrPC.js} +1 -1
  27. package/dist/{chevron-bottom-CeJz8Reo.js → chevron-bottom-ClujWrwS.js} +1 -1
  28. package/dist/{chevron-left-BcYg2UPw.js → chevron-left-Bk48p4Zx.js} +1 -1
  29. package/dist/{chevron-right-BsBn3zrb.js → chevron-right-DNGloKKX.js} +1 -1
  30. package/dist/{chevron-top-CMxkT0uL.js → chevron-top-BeF-AMWu.js} +1 -1
  31. package/dist/{chrome-store-CkCy-7ku.js → chrome-store-DbhS7z0N.js} +1 -1
  32. package/dist/{clock-DMc_CWtO.js → clock-C_6_l4to.js} +1 -1
  33. package/dist/{close-CryuK1CT.js → close-CSt1jFt2.js} +1 -1
  34. package/dist/{coinPlaceholder-DvVl4DoH.js → coinPlaceholder-BCj1y0PN.js} +1 -1
  35. package/dist/{compass-D03r7VwG.js → compass-BylNTlMa.js} +1 -1
  36. package/dist/{copy-DMvE_6eP.js → copy-B5chXsW-.js} +1 -1
  37. package/dist/{core-DCInaJVR.js → core-DMrbUYAd.js} +16 -17
  38. package/dist/{cursor-95Nxz9_g.js → cursor-DOai1hPO.js} +1 -1
  39. package/dist/{cursor-transparent-D8DY5_j7.js → cursor-transparent-Cadcmy6E.js} +1 -1
  40. package/dist/{desktop-CRGnR_c9.js → desktop-DCy_OF9q.js} +1 -1
  41. package/dist/{disconnect-JWp74w81.js → disconnect-d_9YI8yP.js} +1 -1
  42. package/dist/{discord-BRXfeglo.js → discord-C5PncbsA.js} +1 -1
  43. package/dist/{down-RANbXRSh.js → down-B0DJRPMS.js} +2 -2
  44. package/dist/{etherscan-pfbXsPpq.js → etherscan-ClGwr9lW.js} +1 -1
  45. package/dist/{exclamation-triangle-BWZ21L0p.js → exclamation-triangle-UG68kEuv.js} +1 -1
  46. package/dist/{extension-CmXIVuOr.js → extension-Bhr-Ssau.js} +1 -1
  47. package/dist/{external-link-CAybzTlO.js → external-link-BRJo7SZO.js} +1 -1
  48. package/dist/{facebook-DcDQpXBA.js → facebook-BnA-xxoO.js} +1 -1
  49. package/dist/{farcaster-CGXV2sTr.js → farcaster-CvgpGB8R.js} +1 -1
  50. package/dist/{filters-4PzOF6Y_.js → filters-2DNvXC2d.js} +1 -1
  51. package/dist/{getChainIds-DHE0M6xN.js → getChainIds-BJOBostX.js} +2 -2
  52. package/dist/getCosmosAddress-nYlLagxO.js +8398 -0
  53. package/dist/{github-z1VaBQpb.js → github-CqCIZfoi.js} +1 -1
  54. package/dist/{google-DDDXhxRD.js → google-Cb46Xe1N.js} +1 -1
  55. package/dist/{hamburger-x__CpQ8N.js → hamburger-Cj81xHVG.js} +5 -5
  56. package/dist/{help-circle-Hk0xQlw5.js → help-circle-BQm3Y4uL.js} +1 -1
  57. package/dist/{id-BPRiRQQi.js → id-DlZAWXhX.js} +1 -1
  58. package/dist/{image-CZ26oTkB.js → image-C-Rdb3yG.js} +1 -1
  59. package/dist/{index-DA6hSPnv.js → index-BEianCH_.js} +356 -331
  60. package/dist/{index-2nKvQV6S.js → index-BJtXFuWZ.js} +8 -7
  61. package/dist/{index-CAsUs2fN.js → index-BKAQ3OTd.js} +11 -11
  62. package/dist/{index-DxSSO5f_.js → index-CPAph-rb.js} +4 -4
  63. package/dist/{index-BaJGH0Wo.js → index-CUDhfiq5.js} +10 -10
  64. package/dist/{index-D6p8qIoR.js → index-CxxmgFkL.js} +1 -1
  65. package/dist/{index-D6rJMZnJ.js → index-DD4yqUTK.js} +78 -78
  66. package/dist/index-DQ-upUtl.js +85050 -0
  67. package/dist/{index-DrCKZb_R.js → index-DeBuj-lE.js} +1 -1
  68. package/dist/{index-ChjHLLtj.js → index-N4PNqcjR.js} +2 -2
  69. package/dist/index-eC9_VgZe.js +3183 -0
  70. package/dist/{index.es-D7A4rCjT.js → index.es-BkvYD6Tp.js} +3032 -3244
  71. package/dist/{index.es-9vMrGsMN.js → index.es-DGhokHli.js} +1 -1
  72. package/dist/index.es.js +1 -1
  73. package/dist/{info-circle-DBRsyv1V.js → info-circle-BweemjWa.js} +1 -1
  74. package/dist/{info-nXKAaGnK.js → info-o_cb8tTT.js} +1 -1
  75. package/dist/{lightbulb-B1ByE_z3.js → lightbulb-CIREQKfQ.js} +1 -1
  76. package/dist/{mail-BEh53yuD.js → mail-D7pla8qN.js} +1 -1
  77. package/dist/{mobile-BTInaRxp.js → mobile-BfSFqXTR.js} +1 -1
  78. package/dist/{more-BdkhRCT0.js → more-Cm2OZt-4.js} +1 -1
  79. package/dist/{network-placeholder-_q940_Fj.js → network-placeholder-cja_SKEh.js} +1 -1
  80. package/dist/{nftPlaceholder-C_vMI1Zq.js → nftPlaceholder-CPMGC0YA.js} +1 -1
  81. package/dist/{off-CjN7QcgJ.js → off-2ov8-cMg.js} +1 -1
  82. package/dist/{play-store-D0oSbUK-.js → play-store-K7jF5Tx9.js} +1 -1
  83. package/dist/{plus-lZsdp6Eh.js → plus-D2hT5Tke.js} +1 -1
  84. package/dist/{qr-code-CQEDt6E5.js → qr-code-DdAcFtyy.js} +1 -1
  85. package/dist/{recycle-horizontal-BPR3n_8r.js → recycle-horizontal-C_hgDyOE.js} +1 -1
  86. package/dist/{refresh-BJkQe_FG.js → refresh-DmHZ_uHs.js} +1 -1
  87. package/dist/{reown-logo-Bevkr0xz.js → reown-logo-C7Ew_uaV.js} +1 -1
  88. package/dist/{search-BfGI_53c.js → search-DIQ1nJd8.js} +1 -1
  89. package/dist/{send-CqRHFlOm.js → send-oPtL6xIE.js} +1 -1
  90. package/dist/{swapHorizontal-uS8nbcBj.js → swapHorizontal-Csk-Etan.js} +1 -1
  91. package/dist/{swapHorizontalBold-rzZa_A7L.js → swapHorizontalBold-BcWknhY6.js} +1 -1
  92. package/dist/{swapHorizontalMedium-DmxWOlid.js → swapHorizontalMedium-DmNmthd2.js} +1 -1
  93. package/dist/{swapHorizontalRoundedBold-Bh4Bsx-4.js → swapHorizontalRoundedBold-Cqili0jK.js} +1 -1
  94. package/dist/{swapVertical-B30qm7WO.js → swapVertical-CmQhV1BW.js} +1 -1
  95. package/dist/{telegram-CITR-rqw.js → telegram-8VqDFrbM.js} +1 -1
  96. package/dist/{three-dots-DvMlVtkk.js → three-dots-54YC22RW.js} +1 -1
  97. package/dist/{twitch-Cg70CCVs.js → twitch-BG66DH8z.js} +1 -1
  98. package/dist/{twitterIcon-lUQKP1xi.js → twitterIcon-B3TRjKnO.js} +1 -1
  99. package/dist/{unsupportedProp-BEw61JH6.js → unsupportedProp-DxJPUr4X.js} +1 -1
  100. package/dist/useRegisterError-RP3LuUvG.js +8913 -0
  101. package/dist/{verify-Dr2B20vD.js → verify-Cxrk9OZf.js} +1 -1
  102. package/dist/{verify-filled-Bc-tpntt.js → verify-filled-DTYh5fHd.js} +1 -1
  103. package/dist/{w3m-modal-BW_yp0bM.js → w3m-modal-BtzAU8Rd.js} +2 -2
  104. package/dist/{wallet-LyIKSgXv.js → wallet-CqHzy9UL.js} +1 -1
  105. package/dist/{wallet-placeholder-Dofecbxd.js → wallet-placeholder-DUpL8Wi-.js} +1 -1
  106. package/dist/{walletconnect-CIiBCeU4.js → walletconnect-CMShOjhI.js} +1 -1
  107. package/dist/{warning-circle-DSqqePjX.js → warning-circle-C-6BUTdg.js} +1 -1
  108. package/dist/widget.css +1 -1
  109. package/dist/{x-Bw4KtWr5.js → x-Bs3i9yGj.js} +1 -1
  110. package/package.json +6 -2
  111. package/dist/EstGas-BVEriilK.js +0 -12693
  112. package/dist/QuotesProgress-BuNSdVaQ.js +0 -28
  113. package/dist/TxnButton-BmnXiTl8.js +0 -208
  114. package/dist/getCosmosAddress-BkiMb5Ws.js +0 -9565
  115. package/dist/index-Bd6WahOg.js +0 -30418
  116. package/dist/index-DSkfxRgh.js +0 -3010
  117. package/dist/index-DTish3yr.js +0 -1014
  118. package/dist/useRegisterError-FSrH_Jvm.js +0 -8812
@@ -1,28 +0,0 @@
1
- import { jsxs as w, jsx as t, Fragment as d } from "react/jsx-runtime";
2
- import { s as o } from "./WidgetForm.module-QHJ0-m5f.js";
3
- import { u as l, l as c } from "./index-Bd6WahOg.js";
4
- function f({ routesData: i, routes: a, quoteTimer: n }) {
5
- var b;
6
- const r = l((s) => s.configuration), e = l((s) => s.gradient);
7
- return !c.isEmpty(i) && !a.isFetching && a.isSuccess ? /* @__PURE__ */ w("div", { className: "bw-flex bw-items-center bw-gap-x-2 bw-justify-between", children: [
8
- /* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "New Quote in" }),
9
- /* @__PURE__ */ t("div", { className: " bw-w-[250px] bw-flex-1 bw-bg-border-primary bw-h-[3px] bw-overflow-x-hidden", children: /* @__PURE__ */ t(
10
- "div",
11
- {
12
- style: {
13
- height: "100%",
14
- ...r.gradientStyle,
15
- width: `${100 - n / i.deadline * 100}%`
16
- },
17
- className: ` ${e || `${(b = r.gradientStyle) != null && b.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${o.overlay}`} bw-relative `
18
- }
19
- ) }),
20
- /* @__PURE__ */ w("div", { style: { ...r.gradientStyle }, className: `${e ? `${e} bw-bg-clip-text bw-text-transparent` : o.gradienttext} bw-relative bw-text-right bw-w-max bw-text-2xl bw-font-semibold bw-text-transparent `, children: [
21
- n,
22
- "s"
23
- ] })
24
- ] }) : /* @__PURE__ */ t(d, {});
25
- }
26
- export {
27
- f as default
28
- };
@@ -1,208 +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 ze } from "@dynamic-labs/sdk-react-core";
4
- import { a as we, u as T, az as ve, aA as Me } from "./index-Bd6WahOg.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-FSrH_Jvm.js";
8
- import "./getCosmosAddress-BkiMb5Ws.js";
9
- import { v as He } from "./validError-CDlJpg_f.js";
10
- import { u as Je, p as Ke } from "./index-DA6hSPnv.js";
11
- function Qe(n) {
12
- const { wallet: h, address: g } = we(), [E, S] = q(0);
13
- async function m() {
14
- const A = await window.tronWeb.trx.getBalance(g);
15
- S(A / Math.pow(10, 6));
16
- }
17
- return P(() => {
18
- g && (n == null ? void 0 : n.networkType) === "tron" && m();
19
- }, [g, 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: h, amount: g, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: m, handleConfirmClose: A, balanceSol: L, getCoinBalance: be, handleSuccess: ue }) {
26
- var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
27
- const o = T((s) => s.gradient), x = 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: F, address: _, chain: I } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
28
- chainData: e
29
- }), { connected: H, address: J, disconnect: Ue } = we(), z = T((s) => s.toDisconnect), d = T((s) => s.customWallet), { getWallet: Ie } = ae({ chainData: e }), he = xe(e, r), [v, Te] = q("101"), { tronBal: M } = Qe(e), { cosmosBalance: K } = Je(), 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 = ve(), { 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
- He(s.message) && me({ module: "wallet-error-switch", error: s.message });
35
- }
36
- }), y = 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
- }), Q = _e(be || 0, 11), [l, a] = 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" && v !== ((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 = ze(), 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 () => {
64
- if (b)
65
- try {
66
- const s = await b.getNetwork();
67
- Te(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 = y == null ? void 0 : y.data) == null ? void 0 : s.formatted) || 0);
83
- }
84
- function $e(s) {
85
- var u;
86
- return Number(((u = K[Ke(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 && !z && (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" ? 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 = Q;
107
- if (Number(g) > Number(p))
108
- a({
109
- text: `Insufficient Balance ${i.coin || ""}`,
110
- isGradient: !1,
111
- color: "bw-bg-border-primary"
112
- });
113
- else if ((y != null && y.isLoading || y.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !M && (e == null ? void 0 : e.networkType) === "tron")
114
- a({
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(g) <= Number(p) && Number(c.nativeBal) - Number(g) < c.gas && (i != null && i.isNative) || Number(g) <= Number(p) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
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)) ? (a({
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) : (a({
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") && a({
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) ? a({
146
- text: "Select Token",
147
- isGradient: !0,
148
- color: o || f.gradientbutton
149
- }) : B ? typeof g < "u" && Number(g || 0) <= 0 ? a({
150
- text: "Enter Amount",
151
- isGradient: !1,
152
- color: "bw-bg-border-primary"
153
- }) : h.isFetching || !E ? a({
154
- text: "Loading Routes...",
155
- isGradient: !1,
156
- color: "bw-bg-border-primary"
157
- }) : e.chainId === "eclipse-svm" && !j(b) ? a({
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 ? a({
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) ? a({
166
- text: "From and To asset can not be the same!",
167
- isGradient: !1,
168
- color: "bw-bg-border-primary"
169
- }) : (p = (u = (s = h == null ? void 0 : h.data) == null ? void 0 : s.data) == null ? void 0 : u.quotes) != null && p.length ? F && 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") !== v && (e == null ? void 0 : e.networkType) === "sol" ? a({
170
- text: `Switch Chain to ${e.chain}`,
171
- isGradient: !0,
172
- color: o || f.gradientbutton
173
- }) : Ee() : a({
174
- text: "No Routes Found",
175
- isGradient: !1,
176
- color: "bw-bg-border-primary"
177
- }) : a({
178
- text: "",
179
- isGradient: !0,
180
- color: o || f.gradientbutton
181
- });
182
- }, [v, b, i, w, g, e, r, (ee = y.data) == null ? void 0 : ee.formatted, n, y.isFetching, y.isLoading, F, Q, B, h.isFetching, I == null ? void 0 : I.id, E, M, L, d, K]);
183
- let Le = [`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"];
184
- function Fe() {
185
- var s, u, p, $;
186
- return B ? h.isFetching ? !0 : l.text.length ? !Le.includes((s = l.text) == null ? void 0 : s.toLowerCase()) : !(($ = (p = (u = h.data) == null ? void 0 : u.data) == null ? void 0 : p.quotes) != null && $.length) : !1;
187
- }
188
- return /* @__PURE__ */ N(
189
- "button",
190
- {
191
- disabled: Fe(),
192
- style: l != null && l.isGradient && O && R ? {
193
- ...x == null ? void 0 : x.gradientStyle,
194
- boxShadow: x && x.customTheme && ((ce = (re = x.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
195
- } : {
196
- boxShadow: x && x.customTheme && ((ie = (ne = x.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
197
- },
198
- className: `bw-w-full bw-rounded-sm bw-h-[52px] ${l != null && l.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${O && R && l.color} ${l.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${l != null && l.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
199
- onClick: () => {
200
- B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" && F || (e == null ? void 0 : e.networkType) !== "sol" && V && b !== null || (e == null ? void 0 : e.networkType) !== "tron" && H && J) && !z ? m("from") : F && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && H && J || z ? 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();
201
- },
202
- 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 ? l.text.length ? l.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" }) }) }) })
203
- }
204
- );
205
- }
206
- export {
207
- nt as default
208
- };