@blockend/widget 1.0.57 → 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.
- package/dist/{AllRoutes-B1a7Sisc.js → AllRoutes-BEvx1n3I.js} +9 -9
- package/dist/{Box-CtkUvyKi.js → Box-CFvGLr8n.js} +1 -1
- package/dist/{EstGas-BgRchsSw.js → EstGas-CCL9S4TI.js} +7 -7
- package/dist/{Grow-DCuNJP12.js → Grow-3AzCkJ1l.js} +2 -2
- package/dist/{InputComp-CLCGCArk.js → InputComp-C3wBbcNC.js} +3 -3
- package/dist/{LoadRoute-CmWoHwz8.js → LoadRoute-CmXjqn50.js} +4 -4
- package/dist/{QuotesProgress-BYEYjV1N.js → QuotesProgress-DBDNx9H9.js} +1 -1
- package/dist/{SwapAsset-CWcUv8cg.js → SwapAsset-BP7fNDep.js} +1 -1
- package/dist/{Tooltip-qnRjkaHu.js → Tooltip-C-Vq_jVP.js} +3 -3
- package/dist/TxnButton-BpypaZLc.js +222 -0
- package/dist/{add-C0WjduJo.js → add-BdD4qw8Y.js} +1 -1
- package/dist/{all-wallets-BG090vGz.js → all-wallets-CCk-NAvP.js} +1 -1
- package/dist/{app-store-8QUBxl1J.js → app-store-CHYh6OVQ.js} +1 -1
- package/dist/{apple-CAKcoFwo.js → apple-W6CdATsu.js} +1 -1
- package/dist/{arrow-bottom-BrQB33BF.js → arrow-bottom-Bmskvc3Q.js} +1 -1
- package/dist/{arrow-bottom-circle-D2882GmP.js → arrow-bottom-circle-BR3rUR84.js} +1 -1
- package/dist/{arrow-left-B4guw_Rh.js → arrow-left-JA_61b-X.js} +1 -1
- package/dist/{arrow-right-C3YXteZd.js → arrow-right-BrlRvAbh.js} +1 -1
- package/dist/{arrow-top-B9jQ17Ob.js → arrow-top-DwizL9FK.js} +1 -1
- package/dist/{bank-BDNulypK.js → bank-J83igXCJ.js} +1 -1
- package/dist/{basic-BYr8jdy2.js → basic-5KVBTBSB.js} +3 -3
- package/dist/{browser-XDOSatp1.js → browser-rzo1y-xO.js} +1 -1
- package/dist/{card-DBu0KINk.js → card-Bf337Wog.js} +1 -1
- package/dist/{ccip-EUNQLhnu.js → ccip-tVAKLdmf.js} +1 -1
- package/dist/{checkmark-P4kqC4N0.js → checkmark-CRZ67K1E.js} +1 -1
- package/dist/{checkmark-bold-URBkS9AJ.js → checkmark-bold-UTr8cTAr.js} +1 -1
- package/dist/{chevron-bottom-CSA9bwls.js → chevron-bottom-Dg5A8EZk.js} +1 -1
- package/dist/{chevron-left-BqverHO5.js → chevron-left-CeBZLZL-.js} +1 -1
- package/dist/{chevron-right-Be8e0sop.js → chevron-right-DphGRKhn.js} +1 -1
- package/dist/{chevron-top-sj4fgGQ3.js → chevron-top-C-lV7Uem.js} +1 -1
- package/dist/{chrome-store-B125w25l.js → chrome-store-BYOPEdIk.js} +1 -1
- package/dist/{clock-CJ3o9i1f.js → clock-CCLHSdRO.js} +1 -1
- package/dist/{close-DMPxO1PW.js → close-D8yBWTz7.js} +1 -1
- package/dist/{coinPlaceholder-SycpnpvI.js → coinPlaceholder-CAhetIpf.js} +1 -1
- package/dist/{compass-DO1LxaD6.js → compass-BsT-4aom.js} +1 -1
- package/dist/{copy-DjdZX9o5.js → copy-DdmNsEiq.js} +1 -1
- package/dist/{core-DP5Vu59e.js → core-BdeortC8.js} +3 -3
- package/dist/{cursor-Bx2-TZNd.js → cursor-CTcNmP6c.js} +1 -1
- package/dist/{cursor-transparent-CGBhDi3F.js → cursor-transparent-BIA0Pwyl.js} +1 -1
- package/dist/{desktop-CQGrDIR2.js → desktop-rDm7WANn.js} +1 -1
- package/dist/{disconnect-DIUOO6qT.js → disconnect-DW8S5LHd.js} +1 -1
- package/dist/{discord-C97ToQrE.js → discord-BpI0wQ38.js} +1 -1
- package/dist/{down-BcGY1seq.js → down-CAlD4xKv.js} +2 -2
- package/dist/{etherscan-ChTnGoGp.js → etherscan-BMI4kIcU.js} +1 -1
- package/dist/{exclamation-triangle-B7hqeBkR.js → exclamation-triangle-DEqUV_BK.js} +1 -1
- package/dist/{extension-Cc7MKu6e.js → extension-CbqiDgO8.js} +1 -1
- package/dist/{external-link-CsSN3iCU.js → external-link-DAoUJv1x.js} +1 -1
- package/dist/{facebook-M9t70ipE.js → facebook-DIzWVNaQ.js} +1 -1
- package/dist/{farcaster-D5D419n8.js → farcaster-CkM6gsVL.js} +1 -1
- package/dist/{filters-CRFk2qR7.js → filters-D7b-x_Uf.js} +1 -1
- package/dist/{getChainIds-Ca6RgFpt.js → getChainIds-DeuU0YpN.js} +2 -2
- package/dist/{getCosmosAddress-CL0ZiapY.js → getCosmosAddress-eM1PmEO6.js} +2 -2
- package/dist/{github-BoIt-AwH.js → github-BCWeXDnx.js} +1 -1
- package/dist/{google-sIev9mO_.js → google-CH0e_364.js} +1 -1
- package/dist/{hamburger-DqQwQj13.js → hamburger-BttJpVUT.js} +5 -5
- package/dist/{help-circle-FjU_KTrS.js → help-circle-BH-hM-3X.js} +1 -1
- package/dist/{id-CmSp3QIh.js → id-Cpmcss3v.js} +1 -1
- package/dist/{image-zci9ybYh.js → image-DmOL9UPO.js} +1 -1
- package/dist/{index-pcz2RZOT.js → index-21yaepI8.js} +4 -4
- package/dist/{index-TsTH7Hxq.js → index-C7MrbINr.js} +11 -11
- package/dist/{index--FNeS5Rj.js → index-CH5jwNS_.js} +1 -1
- package/dist/{index-ClJq4MBB.js → index-CkwNinHh.js} +10 -10
- package/dist/{index-CoOpvDo4.js → index-Dh6UktNj.js} +1 -1
- package/dist/{index-BsS9maa9.js → index-DqDiVhjG.js} +5 -5
- package/dist/{index-DJwNEB-H.js → index-DsvUp-b6.js} +78 -78
- package/dist/{index-DCyDt3O-.js → index-DxjkYOh2.js} +7 -7
- package/dist/{index-D7xWUWmM.js → index-WIhW13yE.js} +4 -4
- package/dist/{index-DnRJWSaV.js → index-i5MevQRn.js} +2 -2
- package/dist/{index-WJQti9-t.js → index-py3G4zgL.js} +4 -4
- package/dist/{index.es-BLFPEWKC.js → index.es-CC918dIS.js} +2 -2
- package/dist/{index.es-zHtXZ4dp.js → index.es-CKCeP3NS.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-D6yjeLE7.js → info--YGPEfie.js} +1 -1
- package/dist/{info-circle-4TaoqFTQ.js → info-circle-sufy15Ei.js} +1 -1
- package/dist/{lightbulb-BekPKfrQ.js → lightbulb-DCcrC2bd.js} +1 -1
- package/dist/{mail-j6TBy5nM.js → mail-BWKIk0Hz.js} +1 -1
- package/dist/{mobile-SuvaDkyJ.js → mobile-DlOglq5A.js} +1 -1
- package/dist/{more-RFtulbqF.js → more-BuLL_YUE.js} +1 -1
- package/dist/{network-placeholder-CiudHFHV.js → network-placeholder-DN5-JzRo.js} +1 -1
- package/dist/{nftPlaceholder-BzhE1j93.js → nftPlaceholder-j4mjXhT8.js} +1 -1
- package/dist/{off-BQW7jzrf.js → off-DnKbD_YT.js} +1 -1
- package/dist/{play-store-ndEusUCo.js → play-store-Be2CrJ2l.js} +1 -1
- package/dist/{plus-B_-4L7uN.js → plus-BdtL-uFU.js} +1 -1
- package/dist/{qr-code-fGA-L64g.js → qr-code-iJexJUy_.js} +1 -1
- package/dist/{recycle-horizontal-bqeONrxc.js → recycle-horizontal-BOCYZAze.js} +1 -1
- package/dist/{refresh-CsiabOhS.js → refresh-CpiebWPE.js} +1 -1
- package/dist/{reown-logo-DAoeMWgC.js → reown-logo-CEmx4hCV.js} +1 -1
- package/dist/{search-syBa5OfX.js → search-CFglH0n3.js} +1 -1
- package/dist/{send-BbHKOCEY.js → send-Bw76ODGY.js} +1 -1
- package/dist/{swapHorizontal-CxK0nuYA.js → swapHorizontal-DAVGs6k6.js} +1 -1
- package/dist/{swapHorizontalBold-CtEonTbb.js → swapHorizontalBold-CzB5JPVP.js} +1 -1
- package/dist/{swapHorizontalMedium-DZKQimBT.js → swapHorizontalMedium-CBRWvDqm.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-BXxYHgU3.js → swapHorizontalRoundedBold-CdWble2C.js} +1 -1
- package/dist/{swapVertical-BePgHxv9.js → swapVertical-DUVJ2TCz.js} +1 -1
- package/dist/{telegram-BFBKVpZI.js → telegram-CWHjjMJD.js} +1 -1
- package/dist/{three-dots-BXLWvhTX.js → three-dots-DpcT07dz.js} +1 -1
- package/dist/{twitch-vPQp_UrR.js → twitch-DGYmy7ds.js} +1 -1
- package/dist/{twitterIcon-BTdtSUcd.js → twitterIcon-6o1rEIpq.js} +1 -1
- package/dist/{unsupportedProp-B0xHFsbt.js → unsupportedProp-CqrW5ONm.js} +1 -1
- package/dist/{useRegisterError-GWfXAUhh.js → useRegisterError-CgXIOMQ5.js} +1 -1
- package/dist/{verify-filled--sUq3p0p.js → verify-filled-Dqm20w60.js} +1 -1
- package/dist/{verify-BqBaMG0N.js → verify-nTHRV-dU.js} +1 -1
- package/dist/{w3m-modal-Cqjqluk4.js → w3m-modal-TrjUTxFF.js} +2 -2
- package/dist/{wallet-placeholder-CVMoX43_.js → wallet-placeholder-wR7aP7XH.js} +1 -1
- package/dist/{wallet-DA02Bm-G.js → wallet-v6WLuXPB.js} +1 -1
- package/dist/{walletconnect-DhxzAfJ6.js → walletconnect-Cebd_xmw.js} +1 -1
- package/dist/{warning-circle-Du5EYoE3.js → warning-circle-DnrQ8NUj.js} +1 -1
- package/dist/{x-B-Wz86Hz.js → x-BQskV_5A.js} +1 -1
- package/package.json +1 -1
- package/dist/TxnButton-BL3lSkDN.js +0 -215
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as C } from "./core-
|
1
|
+
import { m as C } from "./core-BdeortC8.js";
|
2
2
|
const t = C`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path d="M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z" fill="currentColor"/>
|
4
4
|
</svg>`;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as C } from "./core-
|
1
|
+
import { m as C } from "./core-BdeortC8.js";
|
2
2
|
const e = C`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
|
4
4
|
</svg>`;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as C } from "./core-
|
1
|
+
import { m as C } from "./core-BdeortC8.js";
|
2
2
|
const l = C`<svg width="60" height="16" viewBox="0 0 60 16" fill="none"">
|
3
3
|
<path d="M9.3335 4.66667C9.3335 2.08934 11.4229 0 14.0002 0H20.6669C23.2442 0 25.3335 2.08934 25.3335 4.66667V11.3333C25.3335 13.9106 23.2442 16 20.6669 16H14.0002C11.4229 16 9.3335 13.9106 9.3335 11.3333V4.66667Z" fill="#363636"/>
|
4
4
|
<path d="M15.6055 11.0003L17.9448 4.66699H18.6316L16.2923 11.0003H15.6055Z" fill="#F6F6F6"/>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as t } from "./core-
|
1
|
+
import { m as t } from "./core-BdeortC8.js";
|
2
2
|
const l = t`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path d="M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z" fill="#949E9E"/>
|
4
4
|
<path d="M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z" fill="#949E9E"/>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { p as process$1, P as PropTypes, d as _extends, e as clsx, _ as _objectWithoutPropertiesLoose, z as useTheme$1, T as THEME_ID, A as defaultTheme, b as generateUtilityClasses, g as generateUtilityClass, i as useDefaultProps, s as styled, f as capitalize, h as composeClasses, ac as css, E as keyframes, u as useStore, l as lodashExports, a as useWallet, n as getDefaultExportFromCjs, c as controllers } from "./index-
|
1
|
+
import { p as process$1, P as PropTypes, d as _extends, e as clsx, _ as _objectWithoutPropertiesLoose, z as useTheme$1, T as THEME_ID, A as defaultTheme, b as generateUtilityClasses, g as generateUtilityClass, i as useDefaultProps, s as styled, f as capitalize, h as composeClasses, ac as css, E as keyframes, u as useStore, l as lodashExports, a as useWallet, n as getDefaultExportFromCjs, c as controllers } from "./index-py3G4zgL.js";
|
2
2
|
import * as React from "react";
|
3
3
|
import React__default from "react";
|
4
4
|
import * as ReactDOM from "react-dom";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { w as ve, p as fe, s as ge, q as be, M as g, t as ne, R as l, i as v, r as P, a as f, x as o, u as K, e as ce, o as le, h as m, d as Y, j as ye, v as S, E as ie, O as I, C as q, y as oe, k as T, A as H, T as xe, z as Ce, b as ke, g as Se } from "./core-
|
2
|
-
import { c as u, n as d, r as w, o as F, U as We } from "./index-
|
1
|
+
import { w as ve, p as fe, s as ge, q as be, M as g, t as ne, R as l, i as v, r as P, a as f, x as o, u as K, e as ce, o as le, h as m, d as Y, j as ye, v as S, E as ie, O as I, C as q, y as oe, k as T, A as H, T as xe, z as Ce, b as ke, g as Se } from "./core-BdeortC8.js";
|
2
|
+
import { c as u, n as d, r as w, o as F, U as We } from "./index-DsvUp-b6.js";
|
3
3
|
const p = fe({
|
4
4
|
message: "",
|
5
5
|
open: !1,
|
package/package.json
CHANGED
@@ -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, aA as Me, aB as ue } from "./index-WJQti9-t.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-GWfXAUhh.js";
|
8
|
-
import { v as Qe } from "./validError-CDlJpg_f.js";
|
9
|
-
import { u as He, g as Je, p as Ke } from "./index-DCyDt3O-.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), m = 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: Q, chain: I } = Oe(), { address: H, isConnected: Ye } = _(), me = Re(), Ie = ve(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
|
37
|
-
chainData: e
|
38
|
-
}), { connected: J, 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 } = He(), 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: me,
|
41
|
-
throwForSwitchChainNotSupported: !0,
|
42
|
-
onError(t) {
|
43
|
-
Qe(t.message) && Se({ module: "wallet-error-switch", error: t.message });
|
44
|
-
}
|
45
|
-
}), y = Pe({
|
46
|
-
address: Q,
|
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") !== (I == null ? void 0 : I.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 Ie({ 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" ? Je(H) : 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" && Q === 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") !== (I == null ? void 0 : I.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, I == null ? void 0 : I.id, N, O, F, d, X, U, H]), `${(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
|
-
...m == null ? void 0 : m.gradientStyle,
|
201
|
-
boxShadow: m && m.customTheme && ((ae = (de = m.customTheme) == null ? void 0 : de.shadow) == null ? void 0 : ae.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
202
|
-
} : {
|
203
|
-
boxShadow: m && m.customTheme && ((oe = (le = m.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" && J && 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" && J && 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
|
-
};
|