@blockend/widget 1.0.56 → 1.0.58

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 (113) hide show
  1. package/dist/{AllRoutes-CyD25qOP.js → AllRoutes-BEvx1n3I.js} +9 -9
  2. package/dist/{Box-BqKR6yh2.js → Box-CFvGLr8n.js} +13 -13
  3. package/dist/{EstGas-BIwMpIdu.js → EstGas-CCL9S4TI.js} +93 -92
  4. package/dist/{Grow-BVXa982_.js → Grow-3AzCkJ1l.js} +28 -28
  5. package/dist/{InputComp-mfg9qUQM.js → InputComp-C3wBbcNC.js} +3 -3
  6. package/dist/{LoadRoute-psJpcC1g.js → LoadRoute-CmXjqn50.js} +4 -4
  7. package/dist/{QuotesProgress-DdH9coV4.js → QuotesProgress-DBDNx9H9.js} +1 -1
  8. package/dist/{SwapAsset-DZm2uxy-.js → SwapAsset-BP7fNDep.js} +1 -1
  9. package/dist/{Tooltip-BasOLFMf.js → Tooltip-C-Vq_jVP.js} +3 -3
  10. package/dist/TxnButton-BpypaZLc.js +222 -0
  11. package/dist/{add-hMkDpQJx.js → add-BdD4qw8Y.js} +1 -1
  12. package/dist/{all-wallets-TzzPsASL.js → all-wallets-CCk-NAvP.js} +1 -1
  13. package/dist/{app-store-Bvi3lO0E.js → app-store-CHYh6OVQ.js} +1 -1
  14. package/dist/{apple-DovGBZVC.js → apple-W6CdATsu.js} +1 -1
  15. package/dist/{arrow-bottom-Bt0z0B0d.js → arrow-bottom-Bmskvc3Q.js} +1 -1
  16. package/dist/{arrow-bottom-circle-B6pKx0dw.js → arrow-bottom-circle-BR3rUR84.js} +1 -1
  17. package/dist/{arrow-left-I0NpmB6b.js → arrow-left-JA_61b-X.js} +1 -1
  18. package/dist/{arrow-right-CmtwLDja.js → arrow-right-BrlRvAbh.js} +1 -1
  19. package/dist/{arrow-top-DokEs3HC.js → arrow-top-DwizL9FK.js} +1 -1
  20. package/dist/{bank-yu5LTCzK.js → bank-J83igXCJ.js} +1 -1
  21. package/dist/{basic-Cuqqlzwv.js → basic-5KVBTBSB.js} +3 -3
  22. package/dist/{browser-D-klzbTJ.js → browser-rzo1y-xO.js} +1 -1
  23. package/dist/{card-C7_UmEhR.js → card-Bf337Wog.js} +1 -1
  24. package/dist/{ccip-BqcIWBNQ.js → ccip-tVAKLdmf.js} +16 -16
  25. package/dist/{checkmark-DGmFkx4x.js → checkmark-CRZ67K1E.js} +1 -1
  26. package/dist/{checkmark-bold-K5aQHF2s.js → checkmark-bold-UTr8cTAr.js} +1 -1
  27. package/dist/{chevron-bottom-D1sa5ntV.js → chevron-bottom-Dg5A8EZk.js} +1 -1
  28. package/dist/{chevron-left-CrTavssV.js → chevron-left-CeBZLZL-.js} +1 -1
  29. package/dist/{chevron-right-4tHjmIzI.js → chevron-right-DphGRKhn.js} +1 -1
  30. package/dist/{chevron-top-BGhhItI1.js → chevron-top-C-lV7Uem.js} +1 -1
  31. package/dist/{chrome-store-BSS7R8tR.js → chrome-store-BYOPEdIk.js} +1 -1
  32. package/dist/{clock-C0LASIAZ.js → clock-CCLHSdRO.js} +1 -1
  33. package/dist/{close-u-Xm2I00.js → close-D8yBWTz7.js} +1 -1
  34. package/dist/{coinPlaceholder-C-f0Hi8-.js → coinPlaceholder-CAhetIpf.js} +1 -1
  35. package/dist/{compass-BePsWGiq.js → compass-BsT-4aom.js} +1 -1
  36. package/dist/{copy-CcmBGGYL.js → copy-DdmNsEiq.js} +1 -1
  37. package/dist/{core-DTXll9hG.js → core-BdeortC8.js} +17 -16
  38. package/dist/{cursor-CtyBKKIZ.js → cursor-CTcNmP6c.js} +1 -1
  39. package/dist/{cursor-transparent-DV-nTgKw.js → cursor-transparent-BIA0Pwyl.js} +1 -1
  40. package/dist/{desktop-BQk6XvDk.js → desktop-rDm7WANn.js} +1 -1
  41. package/dist/{disconnect-Bnip6tM-.js → disconnect-DW8S5LHd.js} +1 -1
  42. package/dist/{discord-CixZYk_L.js → discord-BpI0wQ38.js} +1 -1
  43. package/dist/{down-DveeNmNl.js → down-CAlD4xKv.js} +2 -2
  44. package/dist/{etherscan-Ca4qbKIV.js → etherscan-BMI4kIcU.js} +1 -1
  45. package/dist/{exclamation-triangle-DEJeWCAG.js → exclamation-triangle-DEqUV_BK.js} +1 -1
  46. package/dist/{extension-Dwkk2Z0q.js → extension-CbqiDgO8.js} +1 -1
  47. package/dist/{external-link-BVJzQ3gM.js → external-link-DAoUJv1x.js} +1 -1
  48. package/dist/{facebook-H39HpD1e.js → facebook-DIzWVNaQ.js} +1 -1
  49. package/dist/{farcaster-B0C8pA-P.js → farcaster-CkM6gsVL.js} +1 -1
  50. package/dist/{filters-BfgKjq1s.js → filters-D7b-x_Uf.js} +1 -1
  51. package/dist/{getChainIds-DJyYvC8w.js → getChainIds-DeuU0YpN.js} +69 -69
  52. package/dist/getCosmosAddress-eM1PmEO6.js +9517 -0
  53. package/dist/{github-CZxxY0sj.js → github-BCWeXDnx.js} +1 -1
  54. package/dist/{google-DbGRWYI0.js → google-CH0e_364.js} +1 -1
  55. package/dist/{hamburger-C-fmenLo.js → hamburger-BttJpVUT.js} +5 -5
  56. package/dist/{help-circle-BZqpCbkX.js → help-circle-BH-hM-3X.js} +1 -1
  57. package/dist/{id-BohjVAp4.js → id-Cpmcss3v.js} +1 -1
  58. package/dist/{image-DYGqq78I.js → image-DmOL9UPO.js} +1 -1
  59. package/dist/{index-9oZmbNJz.js → index-21yaepI8.js} +4 -4
  60. package/dist/{index-Cb-vA8WO.js → index-C7MrbINr.js} +11 -11
  61. package/dist/{index-C2K4V7-H.js → index-CH5jwNS_.js} +1 -1
  62. package/dist/{index-CgCWrCyY.js → index-CkwNinHh.js} +19 -18
  63. package/dist/index-DTish3yr.js +1014 -0
  64. package/dist/{index-BuTM3T5V.js → index-Dh6UktNj.js} +1 -1
  65. package/dist/{index-CJJQ2LCX.js → index-DqDiVhjG.js} +8 -7
  66. package/dist/{index-hXKqfCGv.js → index-DsvUp-b6.js} +78 -78
  67. package/dist/{index-Cb6Z5QF3.js → index-DxjkYOh2.js} +7 -7
  68. package/dist/{index-OBUgs_7T.js → index-WIhW13yE.js} +4 -4
  69. package/dist/{index-BE1KHDcY.js → index-i5MevQRn.js} +2 -2
  70. package/dist/index-py3G4zgL.js +29495 -0
  71. package/dist/{index.es-BNrhKlYX.js → index.es-CC918dIS.js} +26 -24
  72. package/dist/{index.es-Dodf_4Pq.js → index.es-CKCeP3NS.js} +1 -1
  73. package/dist/index.es.js +1 -1
  74. package/dist/{info-DpJutiAx.js → info--YGPEfie.js} +1 -1
  75. package/dist/{info-circle-BwhhpI3z.js → info-circle-sufy15Ei.js} +1 -1
  76. package/dist/{lightbulb-DWYKdsBz.js → lightbulb-DCcrC2bd.js} +1 -1
  77. package/dist/{mail-CEBxLp-q.js → mail-BWKIk0Hz.js} +1 -1
  78. package/dist/{mobile-jGiJK-tS.js → mobile-DlOglq5A.js} +1 -1
  79. package/dist/{more-Ceddtafo.js → more-BuLL_YUE.js} +1 -1
  80. package/dist/{network-placeholder-BiDTGsDC.js → network-placeholder-DN5-JzRo.js} +1 -1
  81. package/dist/{nftPlaceholder-Bdt3xlsh.js → nftPlaceholder-j4mjXhT8.js} +1 -1
  82. package/dist/{off-CjQUQbIf.js → off-DnKbD_YT.js} +1 -1
  83. package/dist/{play-store-CHlzBg61.js → play-store-Be2CrJ2l.js} +1 -1
  84. package/dist/{plus-BpDW56X5.js → plus-BdtL-uFU.js} +1 -1
  85. package/dist/{qr-code-Cn4ixB1y.js → qr-code-iJexJUy_.js} +1 -1
  86. package/dist/{recycle-horizontal-DBU-2t6D.js → recycle-horizontal-BOCYZAze.js} +1 -1
  87. package/dist/{refresh-DF6FHw_b.js → refresh-CpiebWPE.js} +1 -1
  88. package/dist/{reown-logo-DZuLV_8T.js → reown-logo-CEmx4hCV.js} +1 -1
  89. package/dist/{search-CtvrGHTU.js → search-CFglH0n3.js} +1 -1
  90. package/dist/{send-q0rRlrWy.js → send-Bw76ODGY.js} +1 -1
  91. package/dist/{swapHorizontal-y4XZEygv.js → swapHorizontal-DAVGs6k6.js} +1 -1
  92. package/dist/{swapHorizontalBold-DbOTapbL.js → swapHorizontalBold-CzB5JPVP.js} +1 -1
  93. package/dist/{swapHorizontalMedium-DjJ6sIy9.js → swapHorizontalMedium-CBRWvDqm.js} +1 -1
  94. package/dist/{swapHorizontalRoundedBold-DseOC2QK.js → swapHorizontalRoundedBold-CdWble2C.js} +1 -1
  95. package/dist/{swapVertical-CtSwX7c_.js → swapVertical-DUVJ2TCz.js} +1 -1
  96. package/dist/{telegram-mDVVPT-5.js → telegram-CWHjjMJD.js} +1 -1
  97. package/dist/{three-dots-BC4W7vAE.js → three-dots-DpcT07dz.js} +1 -1
  98. package/dist/{twitch-BtdlLgtD.js → twitch-DGYmy7ds.js} +1 -1
  99. package/dist/{twitterIcon-FYpWmhWb.js → twitterIcon-6o1rEIpq.js} +1 -1
  100. package/dist/{unsupportedProp-Bk4k1APH.js → unsupportedProp-CqrW5ONm.js} +1 -1
  101. package/dist/{useRegisterError-Dvrv5eoV.js → useRegisterError-CgXIOMQ5.js} +1 -1
  102. package/dist/{verify-filled-D86UrptW.js → verify-filled-Dqm20w60.js} +1 -1
  103. package/dist/{verify-Dherv62_.js → verify-nTHRV-dU.js} +1 -1
  104. package/dist/{w3m-modal-DGiYzg-1.js → w3m-modal-TrjUTxFF.js} +2 -2
  105. package/dist/{wallet-placeholder-BjrNOIyN.js → wallet-placeholder-wR7aP7XH.js} +1 -1
  106. package/dist/{wallet-BlgfCBaN.js → wallet-v6WLuXPB.js} +1 -1
  107. package/dist/{walletconnect-__d1VRdN.js → walletconnect-Cebd_xmw.js} +1 -1
  108. package/dist/{warning-circle-CR3NTneR.js → warning-circle-DnrQ8NUj.js} +1 -1
  109. package/dist/{x-BVa5oeDy.js → x-BQskV_5A.js} +1 -1
  110. package/package.json +4 -5
  111. package/dist/TxnButton-7H0ziW6y.js +0 -215
  112. package/dist/getCosmosAddress-wvdpMO7J.js +0 -6075
  113. package/dist/index-qJms-6-V.js +0 -48905
@@ -1,215 +0,0 @@
1
- import { jsx as B } from "react/jsx-runtime";
2
- import { useState as A, useEffect as v } from "react";
3
- import { useDynamicContext as xe, useSwitchNetwork as ve, useIsLoggedIn as ze } from "@dynamic-labs/sdk-react-core";
4
- import { a as _, u as h, aI as Me, aJ as ue } from "./index-qJms-6-V.js";
5
- import { s as G } from "./WidgetForm.module-QHJ0-m5f.js";
6
- import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as Pe } from "wagmi";
7
- import { u as ge, d as _e, c as qe, C as ye } from "./useRegisterError-Dvrv5eoV.js";
8
- import { v as Je } from "./validError-CDlJpg_f.js";
9
- import { u as Qe, g as He, p as Ke } from "./index-Cb6Z5QF3.js";
10
- function Ue(n) {
11
- const { wallet: u, address: l } = _(), [N, f] = A(0);
12
- async function g() {
13
- const E = await window.tronWeb.trx.getBalance(l);
14
- f(E / Math.pow(10, 6));
15
- }
16
- return v(() => {
17
- l && (n == null ? void 0 : n.networkType) === "tron" && g();
18
- }, [l, n == null ? void 0 : n.networkType]), { tronBal: N };
19
- }
20
- function j(n) {
21
- if (n.key.toLowerCase() === "backpacksol")
22
- return !0;
23
- }
24
- function Xe() {
25
- const [n, u] = A(0), l = h((g) => g.fromChain), { primaryWallet: N } = xe();
26
- async function f() {
27
- let g = await N.getBalance();
28
- u(Number(g) || 0);
29
- }
30
- return v(() => {
31
- (l.networkType === "btc" || l.networkType === "sui") && f();
32
- }, [l.networkType, N]), n;
33
- }
34
- function ds({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowWallet: f, setConnectWalletField: g, handleConfirmClose: E, balanceSol: F, getCoinBalance: Te, handleSuccess: q }) {
35
- var k, C, ee, se, te, re, ce, ne, ie, de, ae, le, oe;
36
- const o = h((t) => t.gradient), I = h((t) => t.configuration), e = h((t) => t.fromChain), i = h((t) => t.fromCoin), r = h((t) => t.toChain), w = h((t) => t.toCoin), { isConnected: L, address: J, chain: m } = Oe(), { address: Q, isConnected: Ye } = _(), Ie = Re(), me = ve(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
37
- chainData: e
38
- }), { connected: H, address: K, disconnect: Ze } = _(), z = h((t) => t.toDisconnect), d = h((t) => t.customWallet), { getWallet: fe } = ge({ chainData: e }), Be = Ne(e, r), [M, Ge] = A("101"), { tronBal: O } = Ue(e), { cosmosBalance: U } = Qe(), X = Xe(), R = ((k = e.chain) == null ? void 0 : k.length) && ((C = r.chain) == null ? void 0 : C.length), V = ((ee = i.address) == null ? void 0 : ee.length) && ((se = w.address) == null ? void 0 : se.length), Se = _e(), Y = Me(), { switchChain: We, switchChainAsync: $e, isPending: Ee } = Ve({
39
- chainId: Number((e == null ? void 0 : e.chainId) || "0"),
40
- config: Ie,
41
- throwForSwitchChainNotSupported: !0,
42
- onError(t) {
43
- Je(t.message) && Se({ module: "wallet-error-switch", error: t.message });
44
- }
45
- }), y = Pe({
46
- address: J,
47
- token: "",
48
- chainId: Number((e == null ? void 0 : e.chainId) || 0),
49
- enabled: (e == null ? void 0 : e.networkType) == "evm"
50
- }), Z = qe(Te || 0, 11), [b, a] = A({
51
- text: "",
52
- isGradient: !1,
53
- color: "bw-bg-border-primary"
54
- });
55
- async function Fe() {
56
- if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id))
57
- try {
58
- await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
59
- } catch {
60
- }
61
- else if ((e == null ? void 0 : e.networkType) === "sol" && M !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
62
- try {
63
- let t = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
64
- W();
65
- } catch {
66
- }
67
- else (e == null ? void 0 : e.networkType) === "sui" ? (Y.emit(ue.TransactionStarted, {
68
- ...n
69
- }), S && (q(!1), E())) : (Y.emit(ue.TransactionStarted, {
70
- ...n
71
- }), S && (q(!1), E()));
72
- }
73
- const { primaryWallet: p } = xe(), P = ze(), S = (e == null ? void 0 : e.networkType) === r.networkType ? !!((re = (te = fe(e)) == null ? void 0 : te.address) != null && re.length) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), W = async () => {
74
- if (p)
75
- try {
76
- const t = await p.getNetwork();
77
- Ge(t);
78
- } catch {
79
- }
80
- else
81
- return;
82
- };
83
- v(() => {
84
- W();
85
- }, [p]);
86
- function D(t, x) {
87
- let T = t / Math.pow(10, x);
88
- return T < 1e-6 ? T.toFixed(20) : T;
89
- }
90
- function Le() {
91
- var t;
92
- return Number(((t = y == null ? void 0 : y.data) == null ? void 0 : t.formatted) || 0);
93
- }
94
- function je(t) {
95
- var x;
96
- return Number(((x = U[Ke(t.address)]) == null ? void 0 : x.amount) || 0) / Math.pow(10, t.decimals);
97
- }
98
- function Ae() {
99
- var we;
100
- let t = {};
101
- async function x(s, c) {
102
- let $ = Object.keys(t);
103
- t[s == null ? void 0 : s.chainId] ? (t[s == null ? void 0 : s.chainId].amountInToken += c.amountInToken, t[s == null ? void 0 : s.chainId].gas += D(c.amountInToken, s == null ? void 0 : s.decimals)) : t[s == null ? void 0 : s.chainId] = {
104
- amountInToken: c.amountInToken,
105
- gas: D(c.amountInToken, s == null ? void 0 : s.decimals),
106
- token: s,
107
- nativeBal: (d == null ? void 0 : d.length) > 30 && !z && (s == null ? void 0 : s.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (s == null ? void 0 : s.networkType) == "sol" ? F : (s == null ? void 0 : s.networkType) == "tron" ? O : (s == null ? void 0 : s.networkType) == "btc" || (s == null ? void 0 : s.networkType) == "sui" ? X : (s == null ? void 0 : s.networkType) == "cosmos" ? je(s) : (s == null ? void 0 : s.networkType) == "tron" ? He(Q) : Le(),
108
- isFromChain: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId.toString()),
109
- order: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (s == null ? void 0 : s.chainId) ? 2 : $.length > 2 ? 3 : 2
110
- };
111
- }
112
- (we = n == null ? void 0 : n.fee) == null || we.forEach((s) => {
113
- const { token: c } = s;
114
- s.source.toLowerCase() == "from_source_wallet" && x(c, s);
115
- });
116
- let T = Z;
117
- if (Number(l) > Number(T))
118
- a({
119
- text: `Insufficient Balance ${i.coin || ""}`,
120
- isGradient: !1,
121
- color: "bw-bg-border-primary"
122
- });
123
- else if ((y != null && y.isLoading || y.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof F > "u" || F === null) && (e == null ? void 0 : e.networkType) === "sol" || !O && (e == null ? void 0 : e.networkType) === "tron")
124
- a({
125
- text: "Fetching Balance..",
126
- isGradient: !1,
127
- color: "bw-bg-border-primary"
128
- });
129
- else {
130
- let s = Object.values(t).sort((c, $) => c.order - $.order);
131
- s.some((c) => {
132
- var $, be, pe;
133
- return c != null && c.isFromChain && Number(l) <= Number(T) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(T) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
134
- text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
135
- isGradient: !1,
136
- color: "bw-bg-border-primary"
137
- }), !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({
138
- text: `Insufficient ${((pe = c == null ? void 0 : c.token) == null ? void 0 : pe.symbol) || ""} for gas on ${c.token.blockchain}`,
139
- isGradient: !1,
140
- color: "bw-bg-border-primary"
141
- }), !0) : (a({
142
- text: "",
143
- isGradient: !0,
144
- color: o || G.gradientbutton
145
- }), !0);
146
- }), s.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
147
- text: "",
148
- isGradient: !0,
149
- color: o || G.gradientbutton
150
- });
151
- }
152
- }
153
- return v(() => {
154
- var t, x, T;
155
- !i.coin.length || !(w != null && w.coin.length) ? a({
156
- text: "Select Token",
157
- isGradient: !0,
158
- color: o || G.gradientbutton
159
- }) : S ? typeof l < "u" && Number(l || 0) <= 0 ? a({
160
- text: "Enter Amount",
161
- isGradient: !1,
162
- color: "bw-bg-border-primary"
163
- }) : u.isFetching || !N ? a({
164
- text: "Loading Routes...",
165
- isGradient: !1,
166
- color: "bw-bg-border-primary"
167
- }) : e.chainId === "eclipse-svm" && !j(p) ? a({
168
- text: `Select ${e.name} wallet`,
169
- isGradient: !0,
170
- color: o || G.gradientbutton
171
- }) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? a({
172
- text: "Enter recipient wallet address",
173
- isGradient: !0,
174
- color: o || G.gradientbutton
175
- }) : (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" && J === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? a({
176
- text: "From and To asset can not be the same!",
177
- isGradient: !1,
178
- color: "bw-bg-border-primary"
179
- }) : (T = (x = (t = u == null ? void 0 : u.data) == null ? void 0 : t.data) == null ? void 0 : x.quotes) != null && T.length ? u != null && u.error ? a({
180
- text: "Failed to fetch Quotes",
181
- isGradient: !1,
182
- color: "bw-bg-border-primary"
183
- }) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== M && (e == null ? void 0 : e.networkType) === "sol" ? a({
184
- text: `Switch Chain to ${e.chain}`,
185
- isGradient: !0,
186
- color: o || G.gradientbutton
187
- }) : Ae() : a({
188
- text: "No Routes Found",
189
- isGradient: !1,
190
- color: "bw-bg-border-primary"
191
- }) : a({
192
- text: "",
193
- isGradient: !0,
194
- color: o || G.gradientbutton
195
- });
196
- }, [M, p, i, w, l, e, r, (ce = y.data) == null ? void 0 : ce.formatted, n, y.isFetching, y.isLoading, L, Z, S, u.isFetching, m == null ? void 0 : m.id, N, O, F, d, X, U, Q]), `${(ne = e.chain) == null ? void 0 : ne.toLowerCase()}`, `${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, /* @__PURE__ */ B(
197
- "button",
198
- {
199
- style: b != null && b.isGradient && R && V ? {
200
- ...I == null ? void 0 : I.gradientStyle,
201
- boxShadow: I && I.customTheme && ((ae = (de = I.customTheme) == null ? void 0 : de.shadow) == null ? void 0 : ae.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
202
- } : {
203
- boxShadow: I && I.customTheme && ((oe = (le = I.customTheme) == null ? void 0 : le.shadow) == null ? void 0 : oe.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
204
- },
205
- className: `bw-w-full bw-rounded-sm bw-h-[52px] ${b != null && b.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${R && V && b.color} ${b.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${b != null && b.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
206
- onClick: () => {
207
- S || (f(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && H && K) && !z ? g("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && H && K || z ? g("to") : g("from")), e.chainId === "eclipse-svm" && !j(p) ? (f(!0), g("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? (f(!0), g("to")) : Fe();
208
- },
209
- children: /* @__PURE__ */ B("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__ */ B("p", { className: "bw-relative bw-z-20", children: R && V ? Ee ? /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) : S ? b.text.length ? b.text : "Start Transaction" : `Connect ${Be} Wallet` : /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
210
- }
211
- );
212
- }
213
- export {
214
- ds as default
215
- };