@blockend/widget 1.0.64-beta.1 → 1.0.64-beta.2
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-LE9cWZeB.js → AllRoutes-DMXt2icG.js} +9 -9
- package/dist/{Box-enTvaMuT.js → Box-OCjP8qN8.js} +1 -1
- package/dist/{EstGas-dYUgQ9Qe.js → EstGas-DowW8FJ1.js} +7 -7
- package/dist/{Grow-eyk_Zfnc.js → Grow-Bi86flJS.js} +2 -2
- package/dist/{InputComp-2lj_yefI.js → InputComp-DCDGhaJT.js} +3 -3
- package/dist/{LoadRoute-CkB7ipYB.js → LoadRoute-B-ucolY6.js} +4 -4
- package/dist/{QuotesProgress-Cg3YfrOE.js → QuotesProgress-EZC3xwYB.js} +1 -1
- package/dist/{SwapAsset-DYt-MYtn.js → SwapAsset-CNazqxYR.js} +1 -1
- package/dist/{Tooltip-CacYddST.js → Tooltip-D7QeDqgH.js} +3 -3
- package/dist/TxnButton-9ZUQVjdz.js +222 -0
- package/dist/{add-C-TyNK0g.js → add-23Nwo5A8.js} +1 -1
- package/dist/{all-wallets-CgNqtyu9.js → all-wallets-DiFOI6HS.js} +1 -1
- package/dist/{app-store-zXnXluOu.js → app-store-w1nUkgkL.js} +1 -1
- package/dist/{apple-BPJBXoPp.js → apple-Co-m8EPY.js} +1 -1
- package/dist/{arrow-bottom-Du2cDDgq.js → arrow-bottom-BF7wja3J.js} +1 -1
- package/dist/{arrow-bottom-circle-BAR40VwR.js → arrow-bottom-circle-BBMgG_vt.js} +1 -1
- package/dist/{arrow-left-Cc_sswgX.js → arrow-left-BvHzvUG_.js} +1 -1
- package/dist/{arrow-right-RLdd8KYB.js → arrow-right-DmXyPg2s.js} +1 -1
- package/dist/{arrow-top-CIv-M-yw.js → arrow-top-BlkepDgh.js} +1 -1
- package/dist/{bank-BMtE46i7.js → bank-CU0Tahpo.js} +1 -1
- package/dist/{basic-CP8sTzUx.js → basic-DWGPNvta.js} +3 -3
- package/dist/{browser-Bc6J8GNZ.js → browser-0QXL2NJ5.js} +1 -1
- package/dist/{card-DN9OJBmB.js → card-CBuxFZes.js} +1 -1
- package/dist/{ccip-DFy641DN.js → ccip-BZXPPms9.js} +1 -1
- package/dist/{checkmark-CZQEkuFs.js → checkmark-BBEAGrxW.js} +1 -1
- package/dist/{checkmark-bold-Civkv-ln.js → checkmark-bold-g-5CBFG8.js} +1 -1
- package/dist/{chevron-bottom-D_kmKN4R.js → chevron-bottom-BP0qV5E9.js} +1 -1
- package/dist/{chevron-left-CGLdrE70.js → chevron-left-B489iib5.js} +1 -1
- package/dist/{chevron-right-BUYHsT9N.js → chevron-right-BD_vMkXl.js} +1 -1
- package/dist/{chevron-top-xsytHxFG.js → chevron-top-9pD5kwQn.js} +1 -1
- package/dist/{chrome-store-BpTDhujv.js → chrome-store-KXbEU92e.js} +1 -1
- package/dist/{clock-6cINCQU6.js → clock-BvjtV2wN.js} +1 -1
- package/dist/{close-DUmAEIWo.js → close-CVYDYZSm.js} +1 -1
- package/dist/{coinPlaceholder-C7N2yIBQ.js → coinPlaceholder-DvRqllH7.js} +1 -1
- package/dist/{compass-C0UHUt3T.js → compass-C0rx0T1o.js} +1 -1
- package/dist/{copy-B78hc7Cf.js → copy-BCyJuJTd.js} +1 -1
- package/dist/{core-CkGXhWe2.js → core-CmFLR_u6.js} +3 -3
- package/dist/{cursor-C0aw1WFT.js → cursor-DQIhoY_2.js} +1 -1
- package/dist/{cursor-transparent-B5_D5iSY.js → cursor-transparent-CCddZ-uf.js} +1 -1
- package/dist/{desktop-C5W_2BpA.js → desktop-WkrvV2Ke.js} +1 -1
- package/dist/{disconnect-C_LB1Ub0.js → disconnect-BY01W9dx.js} +1 -1
- package/dist/{discord-B11phxDo.js → discord-BiqVqdS-.js} +1 -1
- package/dist/{down-DSc-uQld.js → down-ByUSCi0G.js} +2 -2
- package/dist/{etherscan-5gwKY5sC.js → etherscan-Bf07jKyE.js} +1 -1
- package/dist/{exclamation-triangle-C9L2nnwt.js → exclamation-triangle-DhBDuh7X.js} +1 -1
- package/dist/{extension-Bpu1M0vE.js → extension-BuGkzn7p.js} +1 -1
- package/dist/{external-link-DcqhB7uz.js → external-link-Btp_KraR.js} +1 -1
- package/dist/{facebook-EM0XYN2N.js → facebook-CoUssMs4.js} +1 -1
- package/dist/{farcaster-ByOGdzq-.js → farcaster-Ctf08qbm.js} +1 -1
- package/dist/{filters-N8dVoHx_.js → filters-Cj-IA9DT.js} +1 -1
- package/dist/{getChainIds-Bbki8UI8.js → getChainIds-D_hM9ke4.js} +2 -2
- package/dist/{getCosmosAddress-Cu-nxVJv.js → getCosmosAddress-BAIoAQnF.js} +3 -3
- package/dist/{github-Zd0gy65d.js → github-BPOuu2xQ.js} +1 -1
- package/dist/{google-Qk8H6sP5.js → google-Bx_zaB37.js} +1 -1
- package/dist/{hamburger-ByNV4Pzn.js → hamburger-Dy2seiIA.js} +5 -5
- package/dist/{help-circle-6fbFHLbS.js → help-circle-DV4QKIA3.js} +1 -1
- package/dist/{id-D8X35cvb.js → id-EXVikcWp.js} +1 -1
- package/dist/{image-C-tzKUye.js → image-nfIsLI4T.js} +1 -1
- package/dist/{index-cmHKzIMO.js → index-BJSeeYVQ.js} +6 -6
- package/dist/{index-BQss3a0E.js → index-BMC5VoeA.js} +5 -5
- package/dist/{index-Igcxt7Jk.js → index-BVHn0jFU.js} +1 -1
- package/dist/{index-COdPn0Ao.js → index-BXe-HkXC.js} +4 -4
- package/dist/{index-BSdmmi8A.js → index-BnBM5MgH.js} +10 -10
- package/dist/{index-BcGnj640.js → index-Bs1n4ned.js} +78 -78
- package/dist/{index-i6f42fbp.js → index-CjDFHmMv.js} +7 -7
- package/dist/{index-BrsyTcRu.js → index-Cx-vqro8.js} +1 -1
- package/dist/{index-CUhbd8DT.js → index-DJoRzab4.js} +2 -2
- package/dist/{index-C4cJjJB6.js → index-DXA_xg2E.js} +11 -11
- package/dist/{index-w6rs7dxv.js → index-IotKLc1_.js} +4 -4
- package/dist/{index.es-BZ-wtvZ6.js → index.es-DLuz6e-D.js} +1 -1
- package/dist/{index.es-DVs5INhR.js → index.es-Dt5FH0Ap.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/{info-CETrRrlQ.js → info-DZYD2fvm.js} +1 -1
- package/dist/{info-circle-DN4lds8G.js → info-circle-5HB4Q4MZ.js} +1 -1
- package/dist/{lightbulb-DMGMlDzf.js → lightbulb-CshRIZY7.js} +1 -1
- package/dist/{mail-Bk3FR4eO.js → mail-Ch7Ebiit.js} +1 -1
- package/dist/{mobile-DQ9JcSGX.js → mobile-CAeTU6tr.js} +1 -1
- package/dist/{more-ikS7hGI-.js → more-BsHPeB5n.js} +1 -1
- package/dist/{network-placeholder-D4puuJC_.js → network-placeholder-DHclED9Q.js} +1 -1
- package/dist/{nftPlaceholder-DjX6Kk2s.js → nftPlaceholder-Wjip4MgI.js} +1 -1
- package/dist/{off-D1e31EBX.js → off-CIbw4jfP.js} +1 -1
- package/dist/{play-store-BCTwe6Jw.js → play-store-BIDEAlh2.js} +1 -1
- package/dist/{plus-BaUameNs.js → plus-C08SpYCp.js} +1 -1
- package/dist/{qr-code-BHnDmcne.js → qr-code-CfOTRof1.js} +1 -1
- package/dist/{recycle-horizontal-C8Ji69wn.js → recycle-horizontal-BYxDWEs9.js} +1 -1
- package/dist/{refresh-xeHYbEul.js → refresh-Bz2AGVgQ.js} +1 -1
- package/dist/{reown-logo-BMEoLSbm.js → reown-logo-DU11tKza.js} +1 -1
- package/dist/{search-BP6-sc3S.js → search-wXflIMv8.js} +1 -1
- package/dist/{secp256k1-ByAbRKi_.js → secp256k1-D_VWk6qp.js} +1 -1
- package/dist/{send-7yQwURAu.js → send-Nh_tNwTt.js} +1 -1
- package/dist/{swapHorizontal-BnaeKg1A.js → swapHorizontal-DmYNJG53.js} +1 -1
- package/dist/{swapHorizontalBold-DCSfQXdA.js → swapHorizontalBold-B-SagdbK.js} +1 -1
- package/dist/{swapHorizontalMedium-ByT0hAmq.js → swapHorizontalMedium-C0hqxE74.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-tJhUh3Sq.js → swapHorizontalRoundedBold-sNND0Ffb.js} +1 -1
- package/dist/{swapVertical-CgiLmaUY.js → swapVertical-CsML4n98.js} +1 -1
- package/dist/{telegram-B2Nxzm_z.js → telegram-JI6LasJU.js} +1 -1
- package/dist/{three-dots-CDB67hYw.js → three-dots-Dj2KvXp3.js} +1 -1
- package/dist/{twitch-9hJDPOlf.js → twitch-C5wHdMKV.js} +1 -1
- package/dist/{twitterIcon-Bi4istD3.js → twitterIcon-DGDl3C3X.js} +1 -1
- package/dist/{unsupportedProp-BsJMeV7Q.js → unsupportedProp-LjOKYKHc.js} +1 -1
- package/dist/{useRegisterError-BwJzpmZF.js → useRegisterError-sxww7XOx.js} +1 -1
- package/dist/{verify-BdQwQvOQ.js → verify-CrG0hACy.js} +1 -1
- package/dist/{verify-filled-BzwMHuT9.js → verify-filled-DtQA8g5a.js} +1 -1
- package/dist/{w3m-modal-DtG8x0s9.js → w3m-modal-C8-5zdce.js} +2 -2
- package/dist/{wallet-B2lG9Jee.js → wallet-CohD7fpy.js} +1 -1
- package/dist/{wallet-placeholder-DwDn2O3j.js → wallet-placeholder-BwjXx8Uc.js} +1 -1
- package/dist/{walletconnect-BmTY5Ve-.js → walletconnect-CM8ctaqc.js} +1 -1
- package/dist/{warning-circle-DHjR3HXX.js → warning-circle-CG2nFPj9.js} +1 -1
- package/dist/{x-DOy5S7_X.js → x-DVrAVXDZ.js} +1 -1
- package/package.json +1 -1
- package/dist/TxnButton-seJeiPsh.js +0 -215
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as C } from "./core-
|
|
1
|
+
import { m as C } from "./core-CmFLR_u6.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-CmFLR_u6.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-CmFLR_u6.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 { ak as xt, J as ft, K as st, al as Tt, N as F, am as Jt, an as te, ao as ee, ap as ne, aq as qt, ar as re, I as oe, as as ie } from "./index-
|
|
1
|
+
import { ak as xt, J as ft, K as st, al as Tt, N as F, am as Jt, an as te, ao as ee, ap as ne, aq as qt, ar as re, I as oe, as as ie } from "./index-BJSeeYVQ.js";
|
|
2
2
|
const St = /* @__PURE__ */ BigInt(0), Et = /* @__PURE__ */ BigInt(1);
|
|
3
3
|
function lt(e, n) {
|
|
4
4
|
if (typeof n != "boolean")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as t } from "./core-
|
|
1
|
+
import { m as t } from "./core-CmFLR_u6.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, X 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, X as css, E as keyframes, u as useStore, l as lodashExports, a as useWallet, n as getDefaultExportFromCjs, c as controllers } from "./index-BJSeeYVQ.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-CmFLR_u6.js";
|
|
2
|
+
import { c as u, n as d, r as w, o as F, U as We } from "./index-Bs1n4ned.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 f } 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 N, at as Me, au as ue } from "./index-cmHKzIMO.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-BwJzpmZF.js";
|
|
8
|
-
import { v as Qe } from "./validError-CDlJpg_f.js";
|
|
9
|
-
import { u as He, g as Je, p as Ke } from "./index-i6f42fbp.js";
|
|
10
|
-
function Ue(n) {
|
|
11
|
-
const { wallet: u, address: l } = _(), [h, B] = A(0);
|
|
12
|
-
async function g() {
|
|
13
|
-
const E = await window.tronWeb.trx.getBalance(l);
|
|
14
|
-
B(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: h };
|
|
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 = N((g) => g.fromChain), { primaryWallet: h } = xe();
|
|
26
|
-
async function B() {
|
|
27
|
-
let g = await h.getBalance();
|
|
28
|
-
u(Number(g) || 0);
|
|
29
|
-
}
|
|
30
|
-
return v(() => {
|
|
31
|
-
(l.networkType === "btc" || l.networkType === "sui") && B();
|
|
32
|
-
}, [l.networkType, h]), n;
|
|
33
|
-
}
|
|
34
|
-
function ds({ routesData: n, routes: u, amount: l, isAmountTyped: h, handleShowWallet: B, setConnectWalletField: g, handleConfirmClose: E, balanceSol: F, getCoinBalance: Ie, handleSuccess: q }) {
|
|
35
|
-
var k, C, ee, se, te, re, ce, ne, ie, de, ae, le, oe;
|
|
36
|
-
const o = N((t) => t.gradient), T = N((t) => t.configuration), e = N((t) => t.fromChain), i = N((t) => t.fromCoin), r = N((t) => t.toChain), w = N((t) => t.toCoin), { isConnected: L, address: Q, chain: m } = Oe(), { address: H, isConnected: Ye } = _(), Te = Re(), me = ve(), { getBothWalletConnection: Ne, getConnectWallet: he } = ge({
|
|
37
|
-
chainData: e
|
|
38
|
-
}), { connected: J, address: K, disconnect: Ze } = _(), z = N((t) => t.toDisconnect), d = N((t) => t.customWallet), { getWallet: Be } = ge({ chainData: e }), fe = he(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: Te,
|
|
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(Ie || 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 = Be(e)) == null ? void 0 : te.address) != null && re.length) : Ne(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 I = t / Math.pow(10, x);
|
|
88
|
-
return I < 1e-6 ? I.toFixed(20) : I;
|
|
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 I = Z;
|
|
117
|
-
if (Number(l) > Number(I))
|
|
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(I) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(I) && 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, I;
|
|
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 || !h ? 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.chainId) === (r == null ? void 0 : r.chainId) || (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) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) ? a({
|
|
176
|
-
text: "From and To asset can not be the same!",
|
|
177
|
-
isGradient: !1,
|
|
178
|
-
color: "bw-bg-border-primary"
|
|
179
|
-
}) : (I = (x = (t = u == null ? void 0 : u.data) == null ? void 0 : t.data) == null ? void 0 : x.quotes) != null && I.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, h, O, F, d, X, U, H]), `${(ne = e.chain) == null ? void 0 : ne.toLowerCase()}`, `${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, /* @__PURE__ */ f(
|
|
197
|
-
"button",
|
|
198
|
-
{
|
|
199
|
-
style: b != null && b.isGradient && R && V ? {
|
|
200
|
-
...T == null ? void 0 : T.gradientStyle,
|
|
201
|
-
boxShadow: T && T.customTheme && ((ae = (de = T.customTheme) == null ? void 0 : de.shadow) == null ? void 0 : ae.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
|
202
|
-
} : {
|
|
203
|
-
boxShadow: T && T.customTheme && ((oe = (le = T.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 || (B(!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) ? (B(!0), g("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? (B(!0), g("to")) : Fe();
|
|
208
|
-
},
|
|
209
|
-
children: /* @__PURE__ */ f("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__ */ f("p", { className: "bw-relative bw-z-20", children: R && V ? Ee ? /* @__PURE__ */ f("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ f(ye, { size: 22, thickness: 5, color: "inherit" }) }) : S ? b.text.length ? b.text : "Start Transaction" : `Connect ${fe} Wallet` : /* @__PURE__ */ f("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ f(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
export {
|
|
214
|
-
ds as default
|
|
215
|
-
};
|