@blockend/widget 1.0.48-beta.0 → 1.0.48-beta.3

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 (116) hide show
  1. package/dist/{AllRoutes-D8LuuVmM.js → AllRoutes-C-U8YGtd.js} +9 -9
  2. package/dist/{Box-DM9yFOex.js → Box-B_mTSlep.js} +8 -8
  3. package/dist/EstGas-CCERzudF.js +12661 -0
  4. package/dist/{Grow-DOn6L3co.js → Grow-BdE6qPGu.js} +2 -2
  5. package/dist/{InputComp-NuVHgaJr.js → InputComp-Kftsbbyk.js} +3 -3
  6. package/dist/{LoadRoute-B67KdzDM.js → LoadRoute-CErdzadx.js} +4 -4
  7. package/dist/{QuotesProgress-QaDMFoy1.js → QuotesProgress-77-UCvmW.js} +1 -1
  8. package/dist/{SwapAsset-DS1khTG7.js → SwapAsset-B_I68Ftn.js} +1 -1
  9. package/dist/{Tooltip-Ba3WFgGd.js → Tooltip-Cb4SPrGT.js} +15 -15
  10. package/dist/TxnButton-CqfPh7o1.js +212 -0
  11. package/dist/{add-q9Nf6prg.js → add-BeCIyX-Y.js} +1 -1
  12. package/dist/{all-wallets-DPeT0Mif.js → all-wallets-BP4cRbn5.js} +1 -1
  13. package/dist/{app-store-DN3WdWdo.js → app-store-BU1otjma.js} +1 -1
  14. package/dist/{apple-DyzMqifv.js → apple-DPtuPM2A.js} +1 -1
  15. package/dist/{arrow-bottom-circle-gYCPf_-a.js → arrow-bottom-circle-Dvw4EJOS.js} +1 -1
  16. package/dist/{arrow-bottom-DqoHxj9Z.js → arrow-bottom-yKGhbxmR.js} +1 -1
  17. package/dist/{arrow-left-BCb0WGCp.js → arrow-left-CsQltXH-.js} +1 -1
  18. package/dist/{arrow-right-COFDKXwO.js → arrow-right-CzaJ4ftn.js} +1 -1
  19. package/dist/{arrow-top-A2hPO7gg.js → arrow-top-DLnnHYUj.js} +1 -1
  20. package/dist/{bank-DzMH-tSV.js → bank-B3uqGiyw.js} +1 -1
  21. package/dist/{basic-C5wivloW.js → basic-DCkzI77e.js} +3 -3
  22. package/dist/{browser-pBih3Y0E.js → browser-CRhK2W3v.js} +1 -1
  23. package/dist/{card-CnPr5FkC.js → card-CotCh4Zh.js} +1 -1
  24. package/dist/{ccip-Di_Zaa6h.js → ccip-CLYRUE4Z.js} +16 -16
  25. package/dist/{checkmark-DuHkawx4.js → checkmark-C8BlGo41.js} +1 -1
  26. package/dist/{checkmark-bold-CbTyGrPC.js → checkmark-bold-CVNnFQAS.js} +1 -1
  27. package/dist/{chevron-bottom-ClujWrwS.js → chevron-bottom-DERTIke-.js} +1 -1
  28. package/dist/{chevron-left-Bk48p4Zx.js → chevron-left-CAWjwwlc.js} +1 -1
  29. package/dist/{chevron-right-DNGloKKX.js → chevron-right-CHS8KD16.js} +1 -1
  30. package/dist/{chevron-top-BeF-AMWu.js → chevron-top-DhNLNNrk.js} +1 -1
  31. package/dist/{chrome-store-DbhS7z0N.js → chrome-store-CtAro_iY.js} +1 -1
  32. package/dist/{clock-C_6_l4to.js → clock-wh4mI-YE.js} +1 -1
  33. package/dist/{close-CSt1jFt2.js → close-Bop05rfP.js} +1 -1
  34. package/dist/{coinPlaceholder-BCj1y0PN.js → coinPlaceholder-BpdglsB4.js} +1 -1
  35. package/dist/{compass-BylNTlMa.js → compass-eRykCmFZ.js} +1 -1
  36. package/dist/{copy-B5chXsW-.js → copy-DfaESEi8.js} +1 -1
  37. package/dist/{core-DMrbUYAd.js → core-oAZaQzVN.js} +17 -16
  38. package/dist/{cursor-DOai1hPO.js → cursor-BPOMEtly.js} +1 -1
  39. package/dist/{cursor-transparent-Cadcmy6E.js → cursor-transparent-Bz094H-z.js} +1 -1
  40. package/dist/{desktop-DCy_OF9q.js → desktop-BUH3EaB6.js} +1 -1
  41. package/dist/{disconnect-d_9YI8yP.js → disconnect-BLRvP77B.js} +1 -1
  42. package/dist/{discord-C5PncbsA.js → discord-jIVxo6sb.js} +1 -1
  43. package/dist/{down-B0DJRPMS.js → down-DcwhchHU.js} +2 -2
  44. package/dist/{etherscan-ClGwr9lW.js → etherscan-CdEQL28a.js} +1 -1
  45. package/dist/{exclamation-triangle-UG68kEuv.js → exclamation-triangle-Bgm1hlpv.js} +1 -1
  46. package/dist/{extension-Bhr-Ssau.js → extension-BcH5ChMV.js} +1 -1
  47. package/dist/{external-link-BRJo7SZO.js → external-link-Dr99WQrw.js} +1 -1
  48. package/dist/{facebook-BnA-xxoO.js → facebook-Dsea5Olw.js} +1 -1
  49. package/dist/{farcaster-CvgpGB8R.js → farcaster-CX_6QQcc.js} +1 -1
  50. package/dist/{filters-2DNvXC2d.js → filters-un4wKhPu.js} +1 -1
  51. package/dist/{getChainIds-BJOBostX.js → getChainIds-C9ItGg9m.js} +2 -2
  52. package/dist/getCosmosAddress-CzbEOXJP.js +9565 -0
  53. package/dist/{github-CqCIZfoi.js → github-wf8bO7ps.js} +1 -1
  54. package/dist/{google-Cb46Xe1N.js → google-ZFm7AEjn.js} +1 -1
  55. package/dist/{hamburger-Cj81xHVG.js → hamburger-n-2YAsJF.js} +5 -5
  56. package/dist/{help-circle-BQm3Y4uL.js → help-circle-oGbSkgHq.js} +1 -1
  57. package/dist/{id-DlZAWXhX.js → id-Bwsil6b4.js} +1 -1
  58. package/dist/{image-C-Rdb3yG.js → image-C4EVs8u8.js} +1 -1
  59. package/dist/{index-DeBuj-lE.js → index-BvR7CDnE.js} +1 -1
  60. package/dist/{index-BEianCH_.js → index-C-eYMc-v.js} +349 -374
  61. package/dist/{index-DD4yqUTK.js → index-C6_jbyY6.js} +78 -78
  62. package/dist/{index-CxxmgFkL.js → index-CC6HzX1j.js} +1 -1
  63. package/dist/{index-N4PNqcjR.js → index-C__s55xC.js} +2 -2
  64. package/dist/{index-CPAph-rb.js → index-CdzSCXtN.js} +4 -4
  65. package/dist/{index-CUDhfiq5.js → index-Cu7bkctg.js} +10 -10
  66. package/dist/{index-BKAQ3OTd.js → index-Cxpya7hq.js} +11 -11
  67. package/dist/index-D7Yyunzk.js +3010 -0
  68. package/dist/index-DTish3yr.js +1014 -0
  69. package/dist/index-D_JuZTeh.js +30399 -0
  70. package/dist/{index-BJtXFuWZ.js → index-Dxd3AuKe.js} +7 -8
  71. package/dist/{index.es-DGhokHli.js → index.es-CydRuxkZ.js} +1 -1
  72. package/dist/{index.es-BkvYD6Tp.js → index.es-DuRfuzLW.js} +3244 -3032
  73. package/dist/index.es.js +1 -1
  74. package/dist/{info-o_cb8tTT.js → info-CMnPgIrZ.js} +1 -1
  75. package/dist/{info-circle-BweemjWa.js → info-circle-DuhGQ4ic.js} +1 -1
  76. package/dist/{lightbulb-CIREQKfQ.js → lightbulb-DAD1d8Fi.js} +1 -1
  77. package/dist/{mail-D7pla8qN.js → mail-B23MWWdW.js} +1 -1
  78. package/dist/{mobile-BfSFqXTR.js → mobile-CpdXpyQX.js} +1 -1
  79. package/dist/{more-Cm2OZt-4.js → more-B_OmGwt6.js} +1 -1
  80. package/dist/{network-placeholder-cja_SKEh.js → network-placeholder-BMDYhkiQ.js} +1 -1
  81. package/dist/{nftPlaceholder-CPMGC0YA.js → nftPlaceholder-Docsf6MN.js} +1 -1
  82. package/dist/{off-2ov8-cMg.js → off-CicDsu98.js} +1 -1
  83. package/dist/{play-store-K7jF5Tx9.js → play-store-CaNoIw4w.js} +1 -1
  84. package/dist/{plus-D2hT5Tke.js → plus-CxUFJOiC.js} +1 -1
  85. package/dist/{qr-code-DdAcFtyy.js → qr-code-xvoJRoyY.js} +1 -1
  86. package/dist/{recycle-horizontal-C_hgDyOE.js → recycle-horizontal-Ba3QEtzr.js} +1 -1
  87. package/dist/{refresh-DmHZ_uHs.js → refresh-DLtq5KDZ.js} +1 -1
  88. package/dist/{reown-logo-C7Ew_uaV.js → reown-logo-B078nydd.js} +1 -1
  89. package/dist/{search-DIQ1nJd8.js → search-CYxrMnug.js} +1 -1
  90. package/dist/{send-oPtL6xIE.js → send-Cq9LLhxk.js} +1 -1
  91. package/dist/{swapHorizontal-Csk-Etan.js → swapHorizontal-Cg62VhVZ.js} +1 -1
  92. package/dist/{swapHorizontalBold-BcWknhY6.js → swapHorizontalBold-_sWQyMvj.js} +1 -1
  93. package/dist/{swapHorizontalMedium-DmNmthd2.js → swapHorizontalMedium-BNEJP-B4.js} +1 -1
  94. package/dist/{swapHorizontalRoundedBold-Cqili0jK.js → swapHorizontalRoundedBold-D4lhcKKW.js} +1 -1
  95. package/dist/{swapVertical-CmQhV1BW.js → swapVertical-CSL0Dyfn.js} +1 -1
  96. package/dist/{telegram-8VqDFrbM.js → telegram-C3rufnpb.js} +1 -1
  97. package/dist/{three-dots-54YC22RW.js → three-dots-CV0E364-.js} +1 -1
  98. package/dist/{twitch-BG66DH8z.js → twitch-B4mDsd2W.js} +1 -1
  99. package/dist/{twitterIcon-B3TRjKnO.js → twitterIcon-CZC6TWXO.js} +1 -1
  100. package/dist/{unsupportedProp-DxJPUr4X.js → unsupportedProp-T7UIcMuo.js} +1 -1
  101. package/dist/useRegisterError-D_ji6DYe.js +8812 -0
  102. package/dist/{verify-Cxrk9OZf.js → verify-B2iXm8pq.js} +1 -1
  103. package/dist/{verify-filled-DTYh5fHd.js → verify-filled-DOmWi0y-.js} +1 -1
  104. package/dist/{w3m-modal-BtzAU8Rd.js → w3m-modal-4C4QgyiO.js} +2 -2
  105. package/dist/{wallet-CqHzy9UL.js → wallet-C03uvXRp.js} +1 -1
  106. package/dist/{wallet-placeholder-DUpL8Wi-.js → wallet-placeholder-yqde6LK5.js} +1 -1
  107. package/dist/{walletconnect-CMShOjhI.js → walletconnect-D_hPqru1.js} +1 -1
  108. package/dist/{warning-circle-C-6BUTdg.js → warning-circle-FuMUWkAg.js} +1 -1
  109. package/dist/{x-Bs3i9yGj.js → x-C_7GXbgW.js} +1 -1
  110. package/package.json +2 -6
  111. package/dist/EstGas-BeT31S57.js +0 -13644
  112. package/dist/TxnButton-tr4Dz_jE.js +0 -223
  113. package/dist/getCosmosAddress-nYlLagxO.js +0 -8398
  114. package/dist/index-DQ-upUtl.js +0 -85050
  115. package/dist/index-eC9_VgZe.js +0 -3183
  116. package/dist/useRegisterError-RP3LuUvG.js +0 -8913
@@ -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 ge, useSwitchNetwork as ze, useIsLoggedIn as Me } from "@dynamic-labs/sdk-react-core";
4
- import { a as ye, u as h, aD as Oe, aE as be } from "./index-DQ-upUtl.js";
5
- import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
6
- import { useAccount as Re, useConfig as Ve, useSwitchChain as qe, useBalance as Pe } from "wagmi";
7
- import { u as ue, d as _e, c as Qe, C as pe } from "./useRegisterError-RP3LuUvG.js";
8
- import "./getCosmosAddress-nYlLagxO.js";
9
- import { v as He } from "./validError-CDlJpg_f.js";
10
- import { u as Je, p as Ke } from "./index-BEianCH_.js";
11
- function Ue(n) {
12
- const { wallet: u, address: l } = ye(), [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 Xe() {
26
- const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: f } = ge();
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 dt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowWallet: N, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: xe, handleSuccess: _ }) {
36
- var D, k, C, ee, te, se, re, ce, ne, ie, de, ae, le;
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: Q, chain: I } = Re(), Te = Ve(), me = ze(), { getBothWalletConnection: Ie, getConnectWallet: he } = ue({
38
- chainData: e
39
- }), { connected: H, address: J, disconnect: Ye } = ye(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: fe } = ue({ chainData: e }), Ne = he(e, r), [O, Be] = v("101"), { tronBal: R } = Ue(e), { cosmosBalance: K } = Je(), U = Xe(), V = ((D = e.chain) == null ? void 0 : D.length) && ((k = r.chain) == null ? void 0 : k.length), q = ((C = i.address) == null ? void 0 : C.length) && ((ee = b.address) == null ? void 0 : ee.length), Ge = _e(), X = Oe(), { switchChain: Ze, switchChainAsync: Se, isPending: Ee } = qe({
40
- chainId: Number((e == null ? void 0 : e.chainId) || "0"),
41
- config: Te,
42
- throwForSwitchChainNotSupported: !0,
43
- onError(s) {
44
- He(s.message) && Ge({ module: "wallet-error-switch", error: s.message });
45
- }
46
- }), T = Pe({
47
- address: Q,
48
- token: "",
49
- chainId: Number((e == null ? void 0 : e.chainId) || 0),
50
- enabled: (e == null ? void 0 : e.networkType) == "evm"
51
- }), Y = Qe(xe || 0, 11), [o, a] = v({
52
- text: "",
53
- isGradient: !1,
54
- color: "bw-bg-border-primary"
55
- });
56
- async function $e() {
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 Se({ 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 me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
65
- Z();
66
- } catch {
67
- }
68
- else (e == null ? void 0 : e.networkType) === "sui" ? (X.emit(be.TransactionStarted, {
69
- ...n
70
- }), B && (_(!1), F())) : (X.emit(be.TransactionStarted, {
71
- ...n
72
- }), B && (_(!1), F()));
73
- }
74
- const { primaryWallet: p } = ge(), P = Me(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((se = (te = fe(e)) == null ? void 0 : te.address) != null && se.length) : Ie(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), Z = async () => {
75
- if (p)
76
- try {
77
- const s = await p.getNetwork();
78
- Be(s);
79
- } catch {
80
- }
81
- else
82
- return;
83
- };
84
- z(() => {
85
- Z();
86
- }, [p]);
87
- function W(s, g) {
88
- let y = s / Math.pow(10, g);
89
- return y < 1e-6 ? y.toFixed(20) : y;
90
- }
91
- function Fe() {
92
- var s;
93
- return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
94
- }
95
- function Le(s) {
96
- var g;
97
- return Number(((g = K[Ke(s.address)]) == null ? void 0 : g.amount) || 0) / Math.pow(10, s.decimals);
98
- }
99
- function je() {
100
- var $;
101
- let s = {};
102
- async function g(t, c) {
103
- let E = 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 += W(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
105
- amountInToken: c.amountInToken,
106
- gas: W(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" ? U : (t == null ? void 0 : t.networkType) == "cosmos" ? Le(t) : Fe(),
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 : E.length > 2 ? 3 : 2
111
- };
112
- }
113
- ($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
114
- const { token: c } = t;
115
- t.source.toLowerCase() == "from_source_wallet" && g(c, t);
116
- });
117
- let y = Y;
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, E) => c.order - E.order);
132
- t.some((c) => {
133
- var E, oe, we;
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 ${((E = c == null ? void 0 : c.token) == null ? void 0 : E.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 && ((oe = c == null ? void 0 : c.token) == null ? void 0 : oe.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
139
- text: `Insufficient ${((we = c == null ? void 0 : c.token) == null ? void 0 : we.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" && Q === 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
- }) : je() : 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, (re = T.data) == null ? void 0 : re.formatted, n, T.isFetching, T.isLoading, j, Y, B, u.isFetching, I == null ? void 0 : I.id, f, R, L, d, U, K]);
198
- let Ae = [`switch chain to ${(ce = e.chain) == null ? void 0 : ce.toLowerCase()}`, `select ${(ne = e.chain) == null ? void 0 : ne.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
199
- function ve() {
200
- var s, g, y, $;
201
- return B ? u.isFetching ? !0 : o.text.length ? !Ae.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !(($ = (y = (g = u.data) == null ? void 0 : g.data) == null ? void 0 : y.quotes) != null && $.length) : !1;
202
- }
203
- return /* @__PURE__ */ G(
204
- "button",
205
- {
206
- disabled: ve(),
207
- style: o != null && o.isGradient && V && q ? {
208
- ...m == null ? void 0 : m.gradientStyle,
209
- boxShadow: m && m.customTheme && ((de = (ie = m.customTheme) == null ? void 0 : ie.shadow) == null ? void 0 : de.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
210
- } : {
211
- 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)"
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" && H && J) && !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" && H && J || 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")) : $e();
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(pe, { size: 22, thickness: 5, color: "inherit" }) }) : B ? o.text.length ? o.text : "Start Transaction" : `Connect ${Ne} 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(pe, { size: 22, thickness: 5, color: "inherit" }) }) }) })
218
- }
219
- );
220
- }
221
- export {
222
- dt as default
223
- };