@reown/appkit-cdn 1.8.15-e95f0d61c614677233e13ea9f055d3f75fcdba81.0 → 1.8.15-viem-upgrade.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/dist/ConstantsUtil-C2Ed2H2U.js +0 -24
- package/dist/ConstantsUtil-C2Ed2H2U.js.map +0 -1
- package/dist/ExchangeController-h_95bqSB.js +0 -265
- package/dist/ExchangeController-h_95bqSB.js.map +0 -1
- package/dist/HelpersUtil-xYeUfp1A.js +0 -141
- package/dist/HelpersUtil-xYeUfp1A.js.map +0 -1
- package/dist/NavigationUtil-Ci15WS4K.js +0 -9
- package/dist/NavigationUtil-Ci15WS4K.js.map +0 -1
- package/dist/PhArrowCircleDown-B41iUlWV.js +0 -74
- package/dist/PhArrowCircleDown-B41iUlWV.js.map +0 -1
- package/dist/PhArrowClockwise-BY8u5n41.js +0 -74
- package/dist/PhArrowClockwise-BY8u5n41.js.map +0 -1
- package/dist/PhArrowDown-ClD8GZ65.js +0 -74
- package/dist/PhArrowDown-ClD8GZ65.js.map +0 -1
- package/dist/PhArrowLeft-B8MXUz60.js +0 -74
- package/dist/PhArrowLeft-B8MXUz60.js.map +0 -1
- package/dist/PhArrowRight-Cewa_Slb.js +0 -74
- package/dist/PhArrowRight-Cewa_Slb.js.map +0 -1
- package/dist/PhArrowSquareOut-whgWh-lD.js +0 -74
- package/dist/PhArrowSquareOut-whgWh-lD.js.map +0 -1
- package/dist/PhArrowUp-B1HXBxie.js +0 -74
- package/dist/PhArrowUp-B1HXBxie.js.map +0 -1
- package/dist/PhArrowUpRight-CfFYe4FP.js +0 -74
- package/dist/PhArrowUpRight-CfFYe4FP.js.map +0 -1
- package/dist/PhArrowsClockwise-gL1Gkrtx.js +0 -74
- package/dist/PhArrowsClockwise-gL1Gkrtx.js.map +0 -1
- package/dist/PhArrowsDownUp-BqUEdUQr.js +0 -74
- package/dist/PhArrowsDownUp-BqUEdUQr.js.map +0 -1
- package/dist/PhArrowsLeftRight-BlZU63eY.js +0 -74
- package/dist/PhArrowsLeftRight-BlZU63eY.js.map +0 -1
- package/dist/PhBank-gbg_jlI7.js +0 -74
- package/dist/PhBank-gbg_jlI7.js.map +0 -1
- package/dist/PhBrowser-CMlD-YJw.js +0 -74
- package/dist/PhBrowser-CMlD-YJw.js.map +0 -1
- package/dist/PhCaretDown-3agTO8Jp.js +0 -74
- package/dist/PhCaretDown-3agTO8Jp.js.map +0 -1
- package/dist/PhCaretLeft-_MTni7Z5.js +0 -74
- package/dist/PhCaretLeft-_MTni7Z5.js.map +0 -1
- package/dist/PhCaretRight-Ci9fAHPG.js +0 -74
- package/dist/PhCaretRight-Ci9fAHPG.js.map +0 -1
- package/dist/PhCaretUp-vFG4Fame.js +0 -74
- package/dist/PhCaretUp-vFG4Fame.js.map +0 -1
- package/dist/PhCheck-mChGK6K_.js +0 -74
- package/dist/PhCheck-mChGK6K_.js.map +0 -1
- package/dist/PhCircleHalf-DZ7-vfxf.js +0 -74
- package/dist/PhCircleHalf-DZ7-vfxf.js.map +0 -1
- package/dist/PhClock-Bc5XWXb6.js +0 -74
- package/dist/PhClock-Bc5XWXb6.js.map +0 -1
- package/dist/PhCompass-Cu2MB-55.js +0 -74
- package/dist/PhCompass-Cu2MB-55.js.map +0 -1
- package/dist/PhCopy-BGUjyTts.js +0 -74
- package/dist/PhCopy-BGUjyTts.js.map +0 -1
- package/dist/PhCreditCard-vxFWID4B.js +0 -74
- package/dist/PhCreditCard-vxFWID4B.js.map +0 -1
- package/dist/PhCurrencyDollar-BfOoDhJr.js +0 -74
- package/dist/PhCurrencyDollar-BfOoDhJr.js.map +0 -1
- package/dist/PhDesktop-Cq6jwzbS.js +0 -74
- package/dist/PhDesktop-Cq6jwzbS.js.map +0 -1
- package/dist/PhDeviceMobile-BCtTp6jj.js +0 -74
- package/dist/PhDeviceMobile-BCtTp6jj.js.map +0 -1
- package/dist/PhDotsThree-BGgD-WIO.js +0 -74
- package/dist/PhDotsThree-BGgD-WIO.js.map +0 -1
- package/dist/PhEnvelope-CQiV0-zG.js +0 -74
- package/dist/PhEnvelope-CQiV0-zG.js.map +0 -1
- package/dist/PhFunnelSimple-BHGtxTNf.js +0 -74
- package/dist/PhFunnelSimple-BHGtxTNf.js.map +0 -1
- package/dist/PhGlobe-Q8oVkf6X.js +0 -74
- package/dist/PhGlobe-Q8oVkf6X.js.map +0 -1
- package/dist/PhIdentificationCard-Cz9LzvVR.js +0 -74
- package/dist/PhIdentificationCard-Cz9LzvVR.js.map +0 -1
- package/dist/PhImage-CP5_qKk-.js +0 -74
- package/dist/PhImage-CP5_qKk-.js.map +0 -1
- package/dist/PhInfo-CTlE1X9Z.js +0 -74
- package/dist/PhInfo-CTlE1X9Z.js.map +0 -1
- package/dist/PhLightbulb-CcLpnAAb.js +0 -74
- package/dist/PhLightbulb-CcLpnAAb.js.map +0 -1
- package/dist/PhMagnifyingGlass-n58GUAck.js +0 -74
- package/dist/PhMagnifyingGlass-n58GUAck.js.map +0 -1
- package/dist/PhPaperPlaneRight-C0sf2XV8.js +0 -74
- package/dist/PhPaperPlaneRight-C0sf2XV8.js.map +0 -1
- package/dist/PhPlus-BJxvt7Uc.js +0 -74
- package/dist/PhPlus-BJxvt7Uc.js.map +0 -1
- package/dist/PhPower-BvktxO2-.js +0 -74
- package/dist/PhPower-BvktxO2-.js.map +0 -1
- package/dist/PhPuzzlePiece-CDDyUPYo.js +0 -74
- package/dist/PhPuzzlePiece-CDDyUPYo.js.map +0 -1
- package/dist/PhQrCode-BlGI8529.js +0 -74
- package/dist/PhQrCode-BlGI8529.js.map +0 -1
- package/dist/PhQuestion-DGZj6iDZ.js +0 -74
- package/dist/PhQuestion-DGZj6iDZ.js.map +0 -1
- package/dist/PhQuestionMark-CTmeI7MQ.js +0 -74
- package/dist/PhQuestionMark-CTmeI7MQ.js.map +0 -1
- package/dist/PhSealCheck-BSlqkxnH.js +0 -74
- package/dist/PhSealCheck-BSlqkxnH.js.map +0 -1
- package/dist/PhSignOut-CEXxlRk3.js +0 -74
- package/dist/PhSignOut-CEXxlRk3.js.map +0 -1
- package/dist/PhSpinner-Do1pY8fG.js +0 -74
- package/dist/PhSpinner-Do1pY8fG.js.map +0 -1
- package/dist/PhTrash-JNKavmpg.js +0 -74
- package/dist/PhTrash-JNKavmpg.js.map +0 -1
- package/dist/PhUser-BW7E-xYg.js +0 -74
- package/dist/PhUser-BW7E-xYg.js.map +0 -1
- package/dist/PhVault-mzxUgBYN.js +0 -74
- package/dist/PhVault-mzxUgBYN.js.map +0 -1
- package/dist/PhWallet-BR9JThKU.js +0 -74
- package/dist/PhWallet-BR9JThKU.js.map +0 -1
- package/dist/PhWarning-DxuQ70WM.js +0 -74
- package/dist/PhWarning-DxuQ70WM.js.map +0 -1
- package/dist/PhWarningCircle-DCI0JC1F.js +0 -74
- package/dist/PhWarningCircle-DCI0JC1F.js.map +0 -1
- package/dist/PhX-CWNXqpGn.js +0 -74
- package/dist/PhX-CWNXqpGn.js.map +0 -1
- package/dist/SwapController-CwWMKLPL.js +0 -684
- package/dist/SwapController-CwWMKLPL.js.map +0 -1
- package/dist/WebCryptoP256-B0F1BoHd.js +0 -3299
- package/dist/WebCryptoP256-B0F1BoHd.js.map +0 -1
- package/dist/add-emiZFWKE.js +0 -20
- package/dist/add-emiZFWKE.js.map +0 -1
- package/dist/all-wallets-BsUQMPgW.js +0 -11
- package/dist/all-wallets-BsUQMPgW.js.map +0 -1
- package/dist/app-store-C_L7BoYc.js +0 -22
- package/dist/app-store-C_L7BoYc.js.map +0 -1
- package/dist/appkit-DY7XpK4K.js +0 -118074
- package/dist/appkit-DY7XpK4K.js.map +0 -1
- package/dist/appkit.js +0 -11
- package/dist/appkit.js.map +0 -1
- package/dist/apple-c3IhsqlY.js +0 -23
- package/dist/apple-c3IhsqlY.js.map +0 -1
- package/dist/arrow-bottom-BZnD_9In.js +0 -13
- package/dist/arrow-bottom-BZnD_9In.js.map +0 -1
- package/dist/arrow-bottom-circle-C9HRc3sW.js +0 -16
- package/dist/arrow-bottom-circle-C9HRc3sW.js.map +0 -1
- package/dist/arrow-left-DFlXkOXB.js +0 -13
- package/dist/arrow-left-DFlXkOXB.js.map +0 -1
- package/dist/arrow-right-_EPGORWI.js +0 -13
- package/dist/arrow-right-_EPGORWI.js.map +0 -1
- package/dist/arrow-top-CrBCvUsj.js +0 -13
- package/dist/arrow-top-CrBCvUsj.js.map +0 -1
- package/dist/async-directive-CEBoIWb8.js +0 -73
- package/dist/async-directive-CEBoIWb8.js.map +0 -1
- package/dist/bank-IrtkQnW0.js +0 -19
- package/dist/bank-IrtkQnW0.js.map +0 -1
- package/dist/basic-CCVK4Xb-.js +0 -4914
- package/dist/basic-CCVK4Xb-.js.map +0 -1
- package/dist/browser-5XoTmr4n.js +0 -1991
- package/dist/browser-5XoTmr4n.js.map +0 -1
- package/dist/browser-DGJ1T57R.js +0 -19
- package/dist/browser-DGJ1T57R.js.map +0 -1
- package/dist/card-euIrImBb.js +0 -19
- package/dist/card-euIrImBb.js.map +0 -1
- package/dist/ccip-BnHcw2Q9.js +0 -164
- package/dist/ccip-BnHcw2Q9.js.map +0 -1
- package/dist/checkmark-DOfVZz7v.js +0 -16
- package/dist/checkmark-DOfVZz7v.js.map +0 -1
- package/dist/checkmark-bold-CBk9rneH.js +0 -13
- package/dist/checkmark-bold-CBk9rneH.js.map +0 -1
- package/dist/chevron-bottom-DqxWxVi0.js +0 -13
- package/dist/chevron-bottom-DqxWxVi0.js.map +0 -1
- package/dist/chevron-left-JKsYvrX0.js +0 -13
- package/dist/chevron-left-JKsYvrX0.js.map +0 -1
- package/dist/chevron-right-0IHVmnlN.js +0 -13
- package/dist/chevron-right-0IHVmnlN.js.map +0 -1
- package/dist/chevron-top-q1UXuE7C.js +0 -13
- package/dist/chevron-top-q1UXuE7C.js.map +0 -1
- package/dist/chrome-store-C1gUHLGC.js +0 -66
- package/dist/chrome-store-C1gUHLGC.js.map +0 -1
- package/dist/class-map-CqyLxUs0.js +0 -101
- package/dist/class-map-CqyLxUs0.js.map +0 -1
- package/dist/clock-CRgBEN3N.js +0 -13
- package/dist/clock-CRgBEN3N.js.map +0 -1
- package/dist/close-DqwtanuV.js +0 -13
- package/dist/close-DqwtanuV.js.map +0 -1
- package/dist/clsx.m-D57qXwfE.js +0 -21
- package/dist/clsx.m-D57qXwfE.js.map +0 -1
- package/dist/coinPlaceholder-DGuEyon3.js +0 -13
- package/dist/coinPlaceholder-DGuEyon3.js.map +0 -1
- package/dist/compass-D3Lk_JmD.js +0 -13
- package/dist/compass-D3Lk_JmD.js.map +0 -1
- package/dist/copy-0bHy8N_r.js +0 -20
- package/dist/copy-0bHy8N_r.js.map +0 -1
- package/dist/core-C111yg8v.js +0 -16288
- package/dist/core-C111yg8v.js.map +0 -1
- package/dist/cursor-Bnlh8YKu.js +0 -8
- package/dist/cursor-Bnlh8YKu.js.map +0 -1
- package/dist/cursor-transparent-BqTVTA3D.js +0 -17
- package/dist/cursor-transparent-BqTVTA3D.js.map +0 -1
- package/dist/data-capture-BtdmOx65.js +0 -549
- package/dist/data-capture-BtdmOx65.js.map +0 -1
- package/dist/desktop-BKaI6I0c.js +0 -14
- package/dist/desktop-BKaI6I0c.js.map +0 -1
- package/dist/disconnect-CJtwIHdJ.js +0 -13
- package/dist/disconnect-CJtwIHdJ.js.map +0 -1
- package/dist/discord-oHqb6ClE.js +0 -22
- package/dist/discord-oHqb6ClE.js.map +0 -1
- package/dist/email-9QNGgeQQ.js +0 -421
- package/dist/email-9QNGgeQQ.js.map +0 -1
- package/dist/embedded-wallet-C_CLs-ZL.js +0 -952
- package/dist/embedded-wallet-C_CLs-ZL.js.map +0 -1
- package/dist/etherscan-Dkkz1Mfh.js +0 -11
- package/dist/etherscan-Dkkz1Mfh.js.map +0 -1
- package/dist/exclamation-triangle-BQbUCEhi.js +0 -9
- package/dist/exclamation-triangle-BQbUCEhi.js.map +0 -1
- package/dist/extension-C2hKzEZZ.js +0 -13
- package/dist/extension-C2hKzEZZ.js.map +0 -1
- package/dist/external-link-CIjsnb3X.js +0 -13
- package/dist/external-link-CIjsnb3X.js.map +0 -1
- package/dist/facebook-1Hufe3sI.js +0 -31
- package/dist/facebook-1Hufe3sI.js.map +0 -1
- package/dist/farcaster-DlSxA8AD.js +0 -17
- package/dist/farcaster-DlSxA8AD.js.map +0 -1
- package/dist/features-CubAsZN1.js +0 -319
- package/dist/features-CubAsZN1.js.map +0 -1
- package/dist/filters-Bx5zOyri.js +0 -13
- package/dist/filters-Bx5zOyri.js.map +0 -1
- package/dist/github-CT_NtR6h.js +0 -23
- package/dist/github-CT_NtR6h.js.map +0 -1
- package/dist/google-Dkv0ZPY6.js +0 -23
- package/dist/google-Dkv0ZPY6.js.map +0 -1
- package/dist/hashTypedData-Q6QDIxse.js +0 -262
- package/dist/hashTypedData-Q6QDIxse.js.map +0 -1
- package/dist/help-circle-Dh0SYux9.js +0 -17
- package/dist/help-circle-Dh0SYux9.js.map +0 -1
- package/dist/id-Dc_gfIHE.js +0 -17
- package/dist/id-Dc_gfIHE.js.map +0 -1
- package/dist/if-defined-B5CxFQec.js +0 -11
- package/dist/if-defined-B5CxFQec.js.map +0 -1
- package/dist/image-DPwaTi09.js +0 -9
- package/dist/image-DPwaTi09.js.map +0 -1
- package/dist/index-AsDH-m9e.js +0 -456
- package/dist/index-AsDH-m9e.js.map +0 -1
- package/dist/index-B-AePZns.js +0 -1514
- package/dist/index-B-AePZns.js.map +0 -1
- package/dist/index-B0nuzWGd.js +0 -153
- package/dist/index-B0nuzWGd.js.map +0 -1
- package/dist/index-BFK8rn8f.js +0 -985
- package/dist/index-BFK8rn8f.js.map +0 -1
- package/dist/index-BGtDVhOX.js +0 -218
- package/dist/index-BGtDVhOX.js.map +0 -1
- package/dist/index-BXRoNn9X.js +0 -147
- package/dist/index-BXRoNn9X.js.map +0 -1
- package/dist/index-BYnWTIsP.js +0 -257
- package/dist/index-BYnWTIsP.js.map +0 -1
- package/dist/index-B_yrV2-r.js +0 -7258
- package/dist/index-B_yrV2-r.js.map +0 -1
- package/dist/index-BcCvzVg5.js +0 -716
- package/dist/index-BcCvzVg5.js.map +0 -1
- package/dist/index-BeSFhM_p.js +0 -120
- package/dist/index-BeSFhM_p.js.map +0 -1
- package/dist/index-BgnNrRDq.js +0 -967
- package/dist/index-BgnNrRDq.js.map +0 -1
- package/dist/index-BqpTTobE.js +0 -984
- package/dist/index-BqpTTobE.js.map +0 -1
- package/dist/index-BxPoDEMu.js +0 -7481
- package/dist/index-BxPoDEMu.js.map +0 -1
- package/dist/index-ByLuz3My.js +0 -182
- package/dist/index-ByLuz3My.js.map +0 -1
- package/dist/index-BzPjzg08.js +0 -62
- package/dist/index-BzPjzg08.js.map +0 -1
- package/dist/index-C2E-8AS5.js +0 -249
- package/dist/index-C2E-8AS5.js.map +0 -1
- package/dist/index-C4icMnjM.js +0 -521
- package/dist/index-C4icMnjM.js.map +0 -1
- package/dist/index-C8av2G6v.js +0 -136
- package/dist/index-C8av2G6v.js.map +0 -1
- package/dist/index-CE9D5nR3.js +0 -441
- package/dist/index-CE9D5nR3.js.map +0 -1
- package/dist/index-CI83C2eb.js +0 -124
- package/dist/index-CI83C2eb.js.map +0 -1
- package/dist/index-CK8vtUMI.js +0 -181
- package/dist/index-CK8vtUMI.js.map +0 -1
- package/dist/index-CY_gr4c7.js +0 -286
- package/dist/index-CY_gr4c7.js.map +0 -1
- package/dist/index-CZmyXVNe.js +0 -198
- package/dist/index-CZmyXVNe.js.map +0 -1
- package/dist/index-CemyBXIP.js +0 -8825
- package/dist/index-CemyBXIP.js.map +0 -1
- package/dist/index-CkrKEace.js +0 -180
- package/dist/index-CkrKEace.js.map +0 -1
- package/dist/index-Cl94CXn7.js +0 -110
- package/dist/index-Cl94CXn7.js.map +0 -1
- package/dist/index-CwK6o8Hz.js +0 -18322
- package/dist/index-CwK6o8Hz.js.map +0 -1
- package/dist/index-Cy1DAN6W.js +0 -542
- package/dist/index-Cy1DAN6W.js.map +0 -1
- package/dist/index-CziMS40-.js +0 -281
- package/dist/index-CziMS40-.js.map +0 -1
- package/dist/index-D6qUKJRD.js +0 -1178
- package/dist/index-D6qUKJRD.js.map +0 -1
- package/dist/index-DDYN4XOm.js +0 -211
- package/dist/index-DDYN4XOm.js.map +0 -1
- package/dist/index-DHcBAN0Q.js +0 -9350
- package/dist/index-DHcBAN0Q.js.map +0 -1
- package/dist/index-DPEv06yg.js +0 -520
- package/dist/index-DPEv06yg.js.map +0 -1
- package/dist/index-DShG1B5f.js +0 -131
- package/dist/index-DShG1B5f.js.map +0 -1
- package/dist/index-DTOiAL1i.js +0 -52
- package/dist/index-DTOiAL1i.js.map +0 -1
- package/dist/index-DVyI9O5i.js +0 -92
- package/dist/index-DVyI9O5i.js.map +0 -1
- package/dist/index-DvXemhcG.js +0 -611
- package/dist/index-DvXemhcG.js.map +0 -1
- package/dist/index-Fvw4sbfL.js +0 -198
- package/dist/index-Fvw4sbfL.js.map +0 -1
- package/dist/index-PiXpeN5n.js +0 -3987
- package/dist/index-PiXpeN5n.js.map +0 -1
- package/dist/index-btvyw5xW.js +0 -126
- package/dist/index-btvyw5xW.js.map +0 -1
- package/dist/index-dsKNiJml.js +0 -70
- package/dist/index-dsKNiJml.js.map +0 -1
- package/dist/index-gEaD8hfK.js +0 -109
- package/dist/index-gEaD8hfK.js.map +0 -1
- package/dist/index-isOxTzum.js +0 -147
- package/dist/index-isOxTzum.js.map +0 -1
- package/dist/index-nWSgWKaF.js +0 -2277
- package/dist/index-nWSgWKaF.js.map +0 -1
- package/dist/index-qQiVpif7.js +0 -1372
- package/dist/index-qQiVpif7.js.map +0 -1
- package/dist/index-tv-dalA1.js +0 -73
- package/dist/index-tv-dalA1.js.map +0 -1
- package/dist/index.es-BzCqYMc8.js +0 -8391
- package/dist/index.es-BzCqYMc8.js.map +0 -1
- package/dist/info-4ssFoXJS.js +0 -8
- package/dist/info-4ssFoXJS.js.map +0 -1
- package/dist/info-circle-BnqHwvcX.js +0 -17
- package/dist/info-circle-BnqHwvcX.js.map +0 -1
- package/dist/jsxRuntime.module-CWsrm3KZ.js +0 -14
- package/dist/jsxRuntime.module-CWsrm3KZ.js.map +0 -1
- package/dist/lightbulb-BEEbBBZQ.js +0 -8
- package/dist/lightbulb-BEEbBBZQ.js.map +0 -1
- package/dist/localBatchGatewayRequest-Dryp85EG.js +0 -103
- package/dist/localBatchGatewayRequest-Dryp85EG.js.map +0 -1
- package/dist/mail-CJLCh290.js +0 -13
- package/dist/mail-CJLCh290.js.map +0 -1
- package/dist/metamask-sdk-4u4X6Xn3.js +0 -16699
- package/dist/metamask-sdk-4u4X6Xn3.js.map +0 -1
- package/dist/mobile-Deau0Za4.js +0 -14
- package/dist/mobile-Deau0Za4.js.map +0 -1
- package/dist/more-BeXo-Pwn.js +0 -16
- package/dist/more-BeXo-Pwn.js.map +0 -1
- package/dist/native-DOlbMZnh.js +0 -17
- package/dist/native-DOlbMZnh.js.map +0 -1
- package/dist/network-placeholder-BoityKSt.js +0 -19
- package/dist/network-placeholder-BoityKSt.js.map +0 -1
- package/dist/nftPlaceholder-PTHT5Ulj.js +0 -13
- package/dist/nftPlaceholder-PTHT5Ulj.js.map +0 -1
- package/dist/off-BWWypY2E.js +0 -13
- package/dist/off-BWWypY2E.js.map +0 -1
- package/dist/onramp-DnL6ChSq.js +0 -979
- package/dist/onramp-DnL6ChSq.js.map +0 -1
- package/dist/parseAbiParameters-DfJcIE_w.js +0 -757
- package/dist/parseAbiParameters-DfJcIE_w.js.map +0 -1
- package/dist/parseSignature-CxTkG24t.js +0 -4690
- package/dist/parseSignature-CxTkG24t.js.map +0 -1
- package/dist/pay-with-exchange-CpuGLivJ.js +0 -603
- package/dist/pay-with-exchange-CpuGLivJ.js.map +0 -1
- package/dist/play-store-DkxQRJyA.js +0 -37
- package/dist/play-store-DkxQRJyA.js.map +0 -1
- package/dist/plus-DaGtBhNd.js +0 -18
- package/dist/plus-DaGtBhNd.js.map +0 -1
- package/dist/property-8UcTqffH.js +0 -623
- package/dist/property-8UcTqffH.js.map +0 -1
- package/dist/qr-code-DGvMTPaF.js +0 -11
- package/dist/qr-code-DGvMTPaF.js.map +0 -1
- package/dist/receive-CVWmkRpl.js +0 -262
- package/dist/receive-CVWmkRpl.js.map +0 -1
- package/dist/recycle-horizontal-DDVEtj7J.js +0 -14
- package/dist/recycle-horizontal-DDVEtj7J.js.map +0 -1
- package/dist/ref-DAjgVrGH.js +0 -43
- package/dist/ref-DAjgVrGH.js.map +0 -1
- package/dist/refresh-BmNFE8Pg.js +0 -13
- package/dist/refresh-BmNFE8Pg.js.map +0 -1
- package/dist/reown-logo-B-UO-SeO.js +0 -17
- package/dist/reown-logo-B-UO-SeO.js.map +0 -1
- package/dist/search-DR_B_4SQ.js +0 -13
- package/dist/search-DR_B_4SQ.js.map +0 -1
- package/dist/secp256k1-DnXqhCKw.js +0 -2031
- package/dist/secp256k1-DnXqhCKw.js.map +0 -1
- package/dist/send-BNU8VrfM.js +0 -20
- package/dist/send-BNU8VrfM.js.map +0 -1
- package/dist/send-DHzM4I8V.js +0 -1365
- package/dist/send-DHzM4I8V.js.map +0 -1
- package/dist/socials-DsoFf1B8.js +0 -796
- package/dist/socials-DsoFf1B8.js.map +0 -1
- package/dist/swapHorizontal-BQOjfwRW.js +0 -13
- package/dist/swapHorizontal-BQOjfwRW.js.map +0 -1
- package/dist/swapHorizontalBold-DMKR9Zys.js +0 -13
- package/dist/swapHorizontalBold-DMKR9Zys.js.map +0 -1
- package/dist/swapHorizontalMedium-DVsqt18q.js +0 -21
- package/dist/swapHorizontalMedium-DVsqt18q.js.map +0 -1
- package/dist/swapHorizontalRoundedBold-CM5U-o8X.js +0 -13
- package/dist/swapHorizontalRoundedBold-CM5U-o8X.js.map +0 -1
- package/dist/swapVertical-P9UnfCR-.js +0 -13
- package/dist/swapVertical-P9UnfCR-.js.map +0 -1
- package/dist/swaps-F0roy6mK.js +0 -2121
- package/dist/swaps-F0roy6mK.js.map +0 -1
- package/dist/telegram-Bd4DGbnk.js +0 -21
- package/dist/telegram-Bd4DGbnk.js.map +0 -1
- package/dist/three-dots-M94oc7-3.js +0 -10
- package/dist/three-dots-M94oc7-3.js.map +0 -1
- package/dist/transactions-DwtZvXx1.js +0 -38
- package/dist/transactions-DwtZvXx1.js.map +0 -1
- package/dist/twitch--lJ-X_Y6.js +0 -23
- package/dist/twitch--lJ-X_Y6.js.map +0 -1
- package/dist/twitterIcon-DDp_lnzc.js +0 -11
- package/dist/twitterIcon-DDp_lnzc.js.map +0 -1
- package/dist/vanilla-CgG5xMJO.js +0 -448
- package/dist/vanilla-CgG5xMJO.js.map +0 -1
- package/dist/verify-Doojt-tK.js +0 -13
- package/dist/verify-Doojt-tK.js.map +0 -1
- package/dist/verify-filled-EHdbo2B7.js +0 -13
- package/dist/verify-filled-EHdbo2B7.js.map +0 -1
- package/dist/w3m-modal-CVsid-gN.js +0 -1725
- package/dist/w3m-modal-CVsid-gN.js.map +0 -1
- package/dist/w3m-modal-CZ4s4A2R.js +0 -2008
- package/dist/w3m-modal-CZ4s4A2R.js.map +0 -1
- package/dist/wallet-CowxEORz.js +0 -13
- package/dist/wallet-CowxEORz.js.map +0 -1
- package/dist/wallet-placeholder-B7p7Oae2.js +0 -19
- package/dist/wallet-placeholder-B7p7Oae2.js.map +0 -1
- package/dist/wallet-standard-BUMbKbZo.js +0 -523
- package/dist/wallet-standard-BUMbKbZo.js.map +0 -1
- package/dist/walletconnect-CKMr88Pk.js +0 -39
- package/dist/walletconnect-CKMr88Pk.js.map +0 -1
- package/dist/warning-circle-CjIPgJnm.js +0 -17
- package/dist/warning-circle-CjIPgJnm.js.map +0 -1
- package/dist/x-CaxhfhgU.js +0 -17
- package/dist/x-CaxhfhgU.js.map +0 -1
package/dist/send-DHzM4I8V.js
DELETED
|
@@ -1,1365 +0,0 @@
|
|
|
1
|
-
import { m as css, o as i, a as CoreHelperUtil, C as ChainController, t as ConnectionController, aZ as SendController, x, R as RouterController, N as NumberUtil, a3 as ModalController, S as SnackController, d as ConstantsUtil, D as BalanceUtil, a4 as AssetUtil, r as resetStyles, n as elementStyles, b5 as AppKitError, b6 as ErrorUtil, u as ConstantsUtil$1, E as EventsController } from "./appkit-DY7XpK4K.js";
|
|
2
|
-
import { n, r } from "./class-map-CqyLxUs0.js";
|
|
3
|
-
import { c as customElement, U as UiHelperUtil } from "./index-D6qUKJRD.js";
|
|
4
|
-
import "./index-BGtDVhOX.js";
|
|
5
|
-
import "./index-btvyw5xW.js";
|
|
6
|
-
import "./index-DTOiAL1i.js";
|
|
7
|
-
import { e, n as n$1 } from "./ref-DAjgVrGH.js";
|
|
8
|
-
import "./index-CkrKEace.js";
|
|
9
|
-
import "./index-BeSFhM_p.js";
|
|
10
|
-
import "./index-DDYN4XOm.js";
|
|
11
|
-
import { S as SwapController } from "./SwapController-CwWMKLPL.js";
|
|
12
|
-
import "./index-C2E-8AS5.js";
|
|
13
|
-
import "./index-DShG1B5f.js";
|
|
14
|
-
import "./index-isOxTzum.js";
|
|
15
|
-
import "./index-Cl94CXn7.js";
|
|
16
|
-
import { o } from "./if-defined-B5CxFQec.js";
|
|
17
|
-
const styles$8 = css`
|
|
18
|
-
:host {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100px;
|
|
21
|
-
border-radius: ${({ borderRadius }) => borderRadius["5"]};
|
|
22
|
-
border: 1px solid ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
23
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
24
|
-
transition: background-color ${({ durations }) => durations["lg"]}
|
|
25
|
-
${({ easings }) => easings["ease-out-power-1"]};
|
|
26
|
-
will-change: background-color;
|
|
27
|
-
position: relative;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host(:hover) {
|
|
31
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
wui-flex {
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: fit-content;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
wui-button {
|
|
40
|
-
display: ruby;
|
|
41
|
-
color: ${({ tokens }) => tokens.theme.textPrimary};
|
|
42
|
-
margin: 0 ${({ spacing }) => spacing["2"]};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.instruction {
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 50%;
|
|
48
|
-
transform: translateY(-50%);
|
|
49
|
-
z-index: 2;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.paste {
|
|
53
|
-
display: inline-flex;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
textarea {
|
|
57
|
-
background: transparent;
|
|
58
|
-
width: 100%;
|
|
59
|
-
font-family: ${({ fontFamily }) => fontFamily.regular};
|
|
60
|
-
font-style: normal;
|
|
61
|
-
font-size: ${({ textSize }) => textSize.large};
|
|
62
|
-
font-weight: ${({ fontWeight }) => fontWeight.regular};
|
|
63
|
-
line-height: ${({ typography }) => typography["lg-regular"].lineHeight};
|
|
64
|
-
letter-spacing: ${({ typography }) => typography["lg-regular"].letterSpacing};
|
|
65
|
-
color: ${({ tokens }) => tokens.theme.textSecondary};
|
|
66
|
-
caret-color: ${({ tokens }) => tokens.core.backgroundAccentPrimary};
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
-webkit-appearance: none;
|
|
69
|
-
-moz-appearance: textfield;
|
|
70
|
-
padding: 0px;
|
|
71
|
-
border: none;
|
|
72
|
-
outline: none;
|
|
73
|
-
appearance: none;
|
|
74
|
-
resize: none;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
}
|
|
77
|
-
`;
|
|
78
|
-
var __decorate$8 = function(decorators, target, key, desc) {
|
|
79
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
80
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
81
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
82
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
83
|
-
};
|
|
84
|
-
let W3mInputAddress = class W3mInputAddress2 extends i {
|
|
85
|
-
constructor() {
|
|
86
|
-
super(...arguments);
|
|
87
|
-
this.inputElementRef = e();
|
|
88
|
-
this.instructionElementRef = e();
|
|
89
|
-
this.readOnly = false;
|
|
90
|
-
this.instructionHidden = Boolean(this.value);
|
|
91
|
-
this.pasting = false;
|
|
92
|
-
this.onDebouncedSearch = CoreHelperUtil.debounce(async (value) => {
|
|
93
|
-
if (!value.length) {
|
|
94
|
-
this.setReceiverAddress("");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const activeChain = ChainController.state.activeChain;
|
|
98
|
-
const isValidAddress = CoreHelperUtil.isAddress(value, activeChain);
|
|
99
|
-
if (isValidAddress) {
|
|
100
|
-
this.setReceiverAddress(value);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
const resolvedAddress = await ConnectionController.getEnsAddress(value);
|
|
105
|
-
if (resolvedAddress) {
|
|
106
|
-
SendController.setReceiverProfileName(value);
|
|
107
|
-
SendController.setReceiverAddress(resolvedAddress);
|
|
108
|
-
const avatar = await ConnectionController.getEnsAvatar(value);
|
|
109
|
-
SendController.setReceiverProfileImageUrl(avatar || void 0);
|
|
110
|
-
}
|
|
111
|
-
} catch (error) {
|
|
112
|
-
this.setReceiverAddress(value);
|
|
113
|
-
} finally {
|
|
114
|
-
SendController.setLoading(false);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
firstUpdated() {
|
|
119
|
-
if (this.value) {
|
|
120
|
-
this.instructionHidden = true;
|
|
121
|
-
}
|
|
122
|
-
this.checkHidden();
|
|
123
|
-
}
|
|
124
|
-
render() {
|
|
125
|
-
if (this.readOnly) {
|
|
126
|
-
return x` <wui-flex
|
|
127
|
-
flexDirection="column"
|
|
128
|
-
justifyContent="center"
|
|
129
|
-
gap="01"
|
|
130
|
-
.padding=${["8", "4", "5", "4"]}
|
|
131
|
-
>
|
|
132
|
-
<textarea
|
|
133
|
-
spellcheck="false"
|
|
134
|
-
?disabled=${true}
|
|
135
|
-
autocomplete="off"
|
|
136
|
-
.value=${this.value ?? ""}
|
|
137
|
-
>
|
|
138
|
-
${this.value ?? ""}</textarea
|
|
139
|
-
>
|
|
140
|
-
</wui-flex>`;
|
|
141
|
-
}
|
|
142
|
-
return x` <wui-flex
|
|
143
|
-
@click=${this.onBoxClick.bind(this)}
|
|
144
|
-
flexDirection="column"
|
|
145
|
-
justifyContent="center"
|
|
146
|
-
gap="01"
|
|
147
|
-
.padding=${["8", "4", "5", "4"]}
|
|
148
|
-
>
|
|
149
|
-
<wui-text
|
|
150
|
-
${n$1(this.instructionElementRef)}
|
|
151
|
-
class="instruction"
|
|
152
|
-
color="secondary"
|
|
153
|
-
variant="md-medium"
|
|
154
|
-
>
|
|
155
|
-
Type or
|
|
156
|
-
<wui-button
|
|
157
|
-
class="paste"
|
|
158
|
-
size="md"
|
|
159
|
-
variant="neutral-secondary"
|
|
160
|
-
iconLeft="copy"
|
|
161
|
-
@click=${this.onPasteClick.bind(this)}
|
|
162
|
-
>
|
|
163
|
-
<wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon>
|
|
164
|
-
Paste
|
|
165
|
-
</wui-button>
|
|
166
|
-
address
|
|
167
|
-
</wui-text>
|
|
168
|
-
<textarea
|
|
169
|
-
spellcheck="false"
|
|
170
|
-
?disabled=${!this.instructionHidden}
|
|
171
|
-
${n$1(this.inputElementRef)}
|
|
172
|
-
@input=${this.onInputChange.bind(this)}
|
|
173
|
-
@blur=${this.onBlur.bind(this)}
|
|
174
|
-
.value=${this.value ?? ""}
|
|
175
|
-
autocomplete="off"
|
|
176
|
-
>
|
|
177
|
-
${this.value ?? ""}</textarea
|
|
178
|
-
>
|
|
179
|
-
</wui-flex>`;
|
|
180
|
-
}
|
|
181
|
-
async focusInput() {
|
|
182
|
-
var _a;
|
|
183
|
-
if (this.instructionElementRef.value) {
|
|
184
|
-
this.instructionHidden = true;
|
|
185
|
-
await this.toggleInstructionFocus(false);
|
|
186
|
-
this.instructionElementRef.value.style.pointerEvents = "none";
|
|
187
|
-
(_a = this.inputElementRef.value) == null ? void 0 : _a.focus();
|
|
188
|
-
if (this.inputElementRef.value) {
|
|
189
|
-
this.inputElementRef.value.selectionStart = this.inputElementRef.value.selectionEnd = this.inputElementRef.value.value.length;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
async focusInstruction() {
|
|
194
|
-
var _a;
|
|
195
|
-
if (this.instructionElementRef.value) {
|
|
196
|
-
this.instructionHidden = false;
|
|
197
|
-
await this.toggleInstructionFocus(true);
|
|
198
|
-
this.instructionElementRef.value.style.pointerEvents = "auto";
|
|
199
|
-
(_a = this.inputElementRef.value) == null ? void 0 : _a.blur();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
async toggleInstructionFocus(focus) {
|
|
203
|
-
if (this.instructionElementRef.value) {
|
|
204
|
-
await this.instructionElementRef.value.animate([{ opacity: focus ? 0 : 1 }, { opacity: focus ? 1 : 0 }], {
|
|
205
|
-
duration: 100,
|
|
206
|
-
easing: "ease",
|
|
207
|
-
fill: "forwards"
|
|
208
|
-
}).finished;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
onBoxClick() {
|
|
212
|
-
if (!this.value && !this.instructionHidden) {
|
|
213
|
-
this.focusInput();
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
onBlur() {
|
|
217
|
-
if (!this.value && this.instructionHidden && !this.pasting) {
|
|
218
|
-
this.focusInstruction();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
checkHidden() {
|
|
222
|
-
if (this.instructionHidden) {
|
|
223
|
-
this.focusInput();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
async onPasteClick() {
|
|
227
|
-
this.pasting = true;
|
|
228
|
-
const text = await navigator.clipboard.readText();
|
|
229
|
-
SendController.setReceiverAddress(text);
|
|
230
|
-
this.focusInput();
|
|
231
|
-
}
|
|
232
|
-
onInputChange(e2) {
|
|
233
|
-
var _a;
|
|
234
|
-
const element = e2.target;
|
|
235
|
-
this.pasting = false;
|
|
236
|
-
this.value = (_a = e2.target) == null ? void 0 : _a.value;
|
|
237
|
-
if (element.value && !this.instructionHidden) {
|
|
238
|
-
this.focusInput();
|
|
239
|
-
}
|
|
240
|
-
SendController.setLoading(true);
|
|
241
|
-
this.onDebouncedSearch(element.value);
|
|
242
|
-
}
|
|
243
|
-
setReceiverAddress(address) {
|
|
244
|
-
SendController.setReceiverAddress(address);
|
|
245
|
-
SendController.setReceiverProfileName(void 0);
|
|
246
|
-
SendController.setReceiverProfileImageUrl(void 0);
|
|
247
|
-
SendController.setLoading(false);
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
W3mInputAddress.styles = styles$8;
|
|
251
|
-
__decorate$8([
|
|
252
|
-
n()
|
|
253
|
-
], W3mInputAddress.prototype, "value", void 0);
|
|
254
|
-
__decorate$8([
|
|
255
|
-
n({ type: Boolean })
|
|
256
|
-
], W3mInputAddress.prototype, "readOnly", void 0);
|
|
257
|
-
__decorate$8([
|
|
258
|
-
r()
|
|
259
|
-
], W3mInputAddress.prototype, "instructionHidden", void 0);
|
|
260
|
-
__decorate$8([
|
|
261
|
-
r()
|
|
262
|
-
], W3mInputAddress.prototype, "pasting", void 0);
|
|
263
|
-
W3mInputAddress = __decorate$8([
|
|
264
|
-
customElement("w3m-input-address")
|
|
265
|
-
], W3mInputAddress);
|
|
266
|
-
const styles$7 = css`
|
|
267
|
-
:host {
|
|
268
|
-
width: 100%;
|
|
269
|
-
height: 100px;
|
|
270
|
-
border-radius: ${({ borderRadius }) => borderRadius["5"]};
|
|
271
|
-
border: 1px solid ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
272
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
273
|
-
transition: background-color ${({ durations }) => durations["lg"]}
|
|
274
|
-
${({ easings }) => easings["ease-out-power-1"]};
|
|
275
|
-
will-change: background-color;
|
|
276
|
-
transition: all ${({ easings }) => easings["ease-out-power-1"]}
|
|
277
|
-
${({ durations }) => durations["lg"]};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
:host(:hover) {
|
|
281
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundSecondary};
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
wui-flex {
|
|
285
|
-
width: 100%;
|
|
286
|
-
height: fit-content;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
wui-button {
|
|
290
|
-
width: 100%;
|
|
291
|
-
display: flex;
|
|
292
|
-
justify-content: flex-end;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
wui-input-amount {
|
|
296
|
-
mask-image: linear-gradient(
|
|
297
|
-
270deg,
|
|
298
|
-
transparent 0px,
|
|
299
|
-
transparent 8px,
|
|
300
|
-
black 24px,
|
|
301
|
-
black 25px,
|
|
302
|
-
black 32px,
|
|
303
|
-
black 100%
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.totalValue {
|
|
308
|
-
width: 100%;
|
|
309
|
-
}
|
|
310
|
-
`;
|
|
311
|
-
var __decorate$7 = function(decorators, target, key, desc) {
|
|
312
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
313
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
314
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
315
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
316
|
-
};
|
|
317
|
-
let W3mInputToken = class W3mInputToken2 extends i {
|
|
318
|
-
constructor() {
|
|
319
|
-
super(...arguments);
|
|
320
|
-
this.readOnly = false;
|
|
321
|
-
this.isInsufficientBalance = false;
|
|
322
|
-
}
|
|
323
|
-
render() {
|
|
324
|
-
const isDisabled = this.readOnly || !this.token;
|
|
325
|
-
return x` <wui-flex
|
|
326
|
-
flexDirection="column"
|
|
327
|
-
gap="01"
|
|
328
|
-
.padding=${["5", "3", "4", "3"]}
|
|
329
|
-
>
|
|
330
|
-
<wui-flex alignItems="center">
|
|
331
|
-
<wui-input-amount
|
|
332
|
-
@inputChange=${this.onInputChange.bind(this)}
|
|
333
|
-
?disabled=${isDisabled}
|
|
334
|
-
.value=${this.sendTokenAmount ? String(this.sendTokenAmount) : ""}
|
|
335
|
-
?error=${Boolean(this.isInsufficientBalance)}
|
|
336
|
-
></wui-input-amount>
|
|
337
|
-
${this.buttonTemplate()}
|
|
338
|
-
</wui-flex>
|
|
339
|
-
${this.bottomTemplate()}
|
|
340
|
-
</wui-flex>`;
|
|
341
|
-
}
|
|
342
|
-
buttonTemplate() {
|
|
343
|
-
if (this.token) {
|
|
344
|
-
return x`<wui-token-button
|
|
345
|
-
text=${this.token.symbol}
|
|
346
|
-
imageSrc=${this.token.iconUrl}
|
|
347
|
-
@click=${this.handleSelectButtonClick.bind(this)}
|
|
348
|
-
>
|
|
349
|
-
</wui-token-button>`;
|
|
350
|
-
}
|
|
351
|
-
return x`<wui-button
|
|
352
|
-
size="md"
|
|
353
|
-
variant="neutral-secondary"
|
|
354
|
-
@click=${this.handleSelectButtonClick.bind(this)}
|
|
355
|
-
>Select token</wui-button
|
|
356
|
-
>`;
|
|
357
|
-
}
|
|
358
|
-
handleSelectButtonClick() {
|
|
359
|
-
if (!this.readOnly) {
|
|
360
|
-
RouterController.push("WalletSendSelectToken");
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
sendValueTemplate() {
|
|
364
|
-
if (!this.readOnly && this.token && this.sendTokenAmount) {
|
|
365
|
-
const price = this.token.price;
|
|
366
|
-
const totalValue = price * this.sendTokenAmount;
|
|
367
|
-
return x`<wui-text class="totalValue" variant="sm-regular" color="secondary"
|
|
368
|
-
>${totalValue ? `$${NumberUtil.formatNumberToLocalString(totalValue, 2)}` : "Incorrect value"}</wui-text
|
|
369
|
-
>`;
|
|
370
|
-
}
|
|
371
|
-
return null;
|
|
372
|
-
}
|
|
373
|
-
maxAmountTemplate() {
|
|
374
|
-
if (this.token) {
|
|
375
|
-
return x` <wui-text variant="sm-regular" color="secondary">
|
|
376
|
-
${UiHelperUtil.roundNumber(Number(this.token.quantity.numeric), 6, 5)}
|
|
377
|
-
</wui-text>`;
|
|
378
|
-
}
|
|
379
|
-
return null;
|
|
380
|
-
}
|
|
381
|
-
actionTemplate() {
|
|
382
|
-
if (this.token) {
|
|
383
|
-
return x`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`;
|
|
384
|
-
}
|
|
385
|
-
return null;
|
|
386
|
-
}
|
|
387
|
-
bottomTemplate() {
|
|
388
|
-
if (this.readOnly) {
|
|
389
|
-
return null;
|
|
390
|
-
}
|
|
391
|
-
return x`<wui-flex alignItems="center" justifyContent="space-between">
|
|
392
|
-
${this.sendValueTemplate()}
|
|
393
|
-
<wui-flex alignItems="center" gap="01" justifyContent="flex-end">
|
|
394
|
-
${this.maxAmountTemplate()} ${this.actionTemplate()}
|
|
395
|
-
</wui-flex>
|
|
396
|
-
</wui-flex>`;
|
|
397
|
-
}
|
|
398
|
-
onInputChange(event) {
|
|
399
|
-
SendController.setTokenAmount(event.detail);
|
|
400
|
-
}
|
|
401
|
-
onMaxClick() {
|
|
402
|
-
if (this.token) {
|
|
403
|
-
const maxValue = NumberUtil.bigNumber(this.token.quantity.numeric);
|
|
404
|
-
SendController.setTokenAmount(Number(maxValue.toFixed(20)));
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
W3mInputToken.styles = styles$7;
|
|
409
|
-
__decorate$7([
|
|
410
|
-
n({ type: Object })
|
|
411
|
-
], W3mInputToken.prototype, "token", void 0);
|
|
412
|
-
__decorate$7([
|
|
413
|
-
n({ type: Boolean })
|
|
414
|
-
], W3mInputToken.prototype, "readOnly", void 0);
|
|
415
|
-
__decorate$7([
|
|
416
|
-
n({ type: Number })
|
|
417
|
-
], W3mInputToken.prototype, "sendTokenAmount", void 0);
|
|
418
|
-
__decorate$7([
|
|
419
|
-
n({ type: Boolean })
|
|
420
|
-
], W3mInputToken.prototype, "isInsufficientBalance", void 0);
|
|
421
|
-
W3mInputToken = __decorate$7([
|
|
422
|
-
customElement("w3m-input-token")
|
|
423
|
-
], W3mInputToken);
|
|
424
|
-
const styles$6 = css`
|
|
425
|
-
:host {
|
|
426
|
-
display: block;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
wui-flex {
|
|
430
|
-
position: relative;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
wui-icon-box {
|
|
434
|
-
width: 32px;
|
|
435
|
-
height: 32px;
|
|
436
|
-
border-radius: ${({ borderRadius }) => borderRadius["10"]} !important;
|
|
437
|
-
border: 4px solid ${({ tokens }) => tokens.theme.backgroundPrimary};
|
|
438
|
-
background: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
439
|
-
position: absolute;
|
|
440
|
-
top: 50%;
|
|
441
|
-
left: 50%;
|
|
442
|
-
transform: translate(-50%, -50%);
|
|
443
|
-
z-index: 3;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
wui-button {
|
|
447
|
-
--local-border-radius: ${({ borderRadius }) => borderRadius["4"]} !important;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.inputContainer {
|
|
451
|
-
height: fit-content;
|
|
452
|
-
}
|
|
453
|
-
`;
|
|
454
|
-
var __decorate$6 = function(decorators, target, key, desc) {
|
|
455
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
456
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
457
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
458
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
459
|
-
};
|
|
460
|
-
const SEND_BUTTON_MESSAGE = {
|
|
461
|
-
INSUFFICIENT_FUNDS: "Insufficient Funds",
|
|
462
|
-
INCORRECT_VALUE: "Incorrect Value",
|
|
463
|
-
INVALID_ADDRESS: "Invalid Address",
|
|
464
|
-
ADD_ADDRESS: "Add Address",
|
|
465
|
-
ADD_AMOUNT: "Add Amount",
|
|
466
|
-
SELECT_TOKEN: "Select Token",
|
|
467
|
-
PREVIEW_SEND: "Preview Send"
|
|
468
|
-
};
|
|
469
|
-
let W3mWalletSendView = class W3mWalletSendView2 extends i {
|
|
470
|
-
constructor() {
|
|
471
|
-
var _a, _b;
|
|
472
|
-
super();
|
|
473
|
-
this.unsubscribe = [];
|
|
474
|
-
this.isTryingToChooseDifferentWallet = false;
|
|
475
|
-
this.token = SendController.state.token;
|
|
476
|
-
this.sendTokenAmount = SendController.state.sendTokenAmount;
|
|
477
|
-
this.receiverAddress = SendController.state.receiverAddress;
|
|
478
|
-
this.receiverProfileName = SendController.state.receiverProfileName;
|
|
479
|
-
this.loading = SendController.state.loading;
|
|
480
|
-
this.params = (_a = RouterController.state.data) == null ? void 0 : _a.send;
|
|
481
|
-
this.caipAddress = (_b = ChainController.getAccountData()) == null ? void 0 : _b.caipAddress;
|
|
482
|
-
this.message = SEND_BUTTON_MESSAGE.PREVIEW_SEND;
|
|
483
|
-
this.disconnecting = false;
|
|
484
|
-
if (this.token && !this.params) {
|
|
485
|
-
this.fetchBalances();
|
|
486
|
-
this.fetchNetworkPrice();
|
|
487
|
-
}
|
|
488
|
-
const unsubscribe = ChainController.subscribeKey("activeCaipAddress", (val) => {
|
|
489
|
-
if (!val && this.isTryingToChooseDifferentWallet) {
|
|
490
|
-
this.isTryingToChooseDifferentWallet = false;
|
|
491
|
-
ModalController.open({
|
|
492
|
-
view: "Connect",
|
|
493
|
-
data: {
|
|
494
|
-
redirectView: "WalletSend"
|
|
495
|
-
}
|
|
496
|
-
}).catch(() => null);
|
|
497
|
-
unsubscribe();
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
this.unsubscribe.push(...[
|
|
501
|
-
ChainController.subscribeAccountStateProp("caipAddress", (val) => {
|
|
502
|
-
this.caipAddress = val;
|
|
503
|
-
}),
|
|
504
|
-
SendController.subscribe((val) => {
|
|
505
|
-
this.token = val.token;
|
|
506
|
-
this.sendTokenAmount = val.sendTokenAmount;
|
|
507
|
-
this.receiverAddress = val.receiverAddress;
|
|
508
|
-
this.receiverProfileName = val.receiverProfileName;
|
|
509
|
-
this.loading = val.loading;
|
|
510
|
-
})
|
|
511
|
-
]);
|
|
512
|
-
}
|
|
513
|
-
disconnectedCallback() {
|
|
514
|
-
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
515
|
-
}
|
|
516
|
-
async firstUpdated() {
|
|
517
|
-
await this.handleSendParameters();
|
|
518
|
-
}
|
|
519
|
-
render() {
|
|
520
|
-
this.getMessage();
|
|
521
|
-
const isReadOnly = Boolean(this.params);
|
|
522
|
-
return x` <wui-flex flexDirection="column" .padding=${["0", "4", "4", "4"]}>
|
|
523
|
-
<wui-flex class="inputContainer" gap="2" flexDirection="column">
|
|
524
|
-
<w3m-input-token
|
|
525
|
-
.token=${this.token}
|
|
526
|
-
.sendTokenAmount=${this.sendTokenAmount}
|
|
527
|
-
?readOnly=${isReadOnly}
|
|
528
|
-
?isInsufficientBalance=${this.message === SEND_BUTTON_MESSAGE.INSUFFICIENT_FUNDS}
|
|
529
|
-
></w3m-input-token>
|
|
530
|
-
<wui-icon-box size="md" variant="secondary" icon="arrowBottom"></wui-icon-box>
|
|
531
|
-
<w3m-input-address
|
|
532
|
-
?readOnly=${isReadOnly}
|
|
533
|
-
.value=${this.receiverProfileName ? this.receiverProfileName : this.receiverAddress}
|
|
534
|
-
></w3m-input-address>
|
|
535
|
-
</wui-flex>
|
|
536
|
-
${this.buttonTemplate()}
|
|
537
|
-
</wui-flex>`;
|
|
538
|
-
}
|
|
539
|
-
async fetchBalances() {
|
|
540
|
-
await SendController.fetchTokenBalance();
|
|
541
|
-
SendController.fetchNetworkBalance();
|
|
542
|
-
}
|
|
543
|
-
async fetchNetworkPrice() {
|
|
544
|
-
await SwapController.getNetworkTokenPrice();
|
|
545
|
-
}
|
|
546
|
-
onButtonClick() {
|
|
547
|
-
RouterController.push("WalletSendPreview", {
|
|
548
|
-
send: this.params
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
onFundWalletClick() {
|
|
552
|
-
RouterController.push("FundWallet", {
|
|
553
|
-
redirectView: "WalletSend"
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
async onConnectDifferentWalletClick() {
|
|
557
|
-
try {
|
|
558
|
-
this.isTryingToChooseDifferentWallet = true;
|
|
559
|
-
this.disconnecting = true;
|
|
560
|
-
await ConnectionController.disconnect();
|
|
561
|
-
} finally {
|
|
562
|
-
this.disconnecting = false;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
getMessage() {
|
|
566
|
-
var _a;
|
|
567
|
-
this.message = SEND_BUTTON_MESSAGE.PREVIEW_SEND;
|
|
568
|
-
if (this.receiverAddress && !CoreHelperUtil.isAddress(this.receiverAddress, ChainController.state.activeChain)) {
|
|
569
|
-
this.message = SEND_BUTTON_MESSAGE.INVALID_ADDRESS;
|
|
570
|
-
}
|
|
571
|
-
if (!this.receiverAddress) {
|
|
572
|
-
this.message = SEND_BUTTON_MESSAGE.ADD_ADDRESS;
|
|
573
|
-
}
|
|
574
|
-
if (this.sendTokenAmount && this.token && this.sendTokenAmount > Number(this.token.quantity.numeric)) {
|
|
575
|
-
this.message = SEND_BUTTON_MESSAGE.INSUFFICIENT_FUNDS;
|
|
576
|
-
}
|
|
577
|
-
if (!this.sendTokenAmount) {
|
|
578
|
-
this.message = SEND_BUTTON_MESSAGE.ADD_AMOUNT;
|
|
579
|
-
}
|
|
580
|
-
if (this.sendTokenAmount && ((_a = this.token) == null ? void 0 : _a.price)) {
|
|
581
|
-
const value = this.sendTokenAmount * this.token.price;
|
|
582
|
-
if (!value) {
|
|
583
|
-
this.message = SEND_BUTTON_MESSAGE.INCORRECT_VALUE;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
if (!this.token) {
|
|
587
|
-
this.message = SEND_BUTTON_MESSAGE.SELECT_TOKEN;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
buttonTemplate() {
|
|
591
|
-
const isDisabled = !this.message.startsWith(SEND_BUTTON_MESSAGE.PREVIEW_SEND);
|
|
592
|
-
const isInsufficientBalance = this.message === SEND_BUTTON_MESSAGE.INSUFFICIENT_FUNDS;
|
|
593
|
-
const isReadOnly = Boolean(this.params);
|
|
594
|
-
if (isInsufficientBalance && !isReadOnly) {
|
|
595
|
-
return x`
|
|
596
|
-
<wui-flex .margin=${["4", "0", "0", "0"]} flexDirection="column" gap="4">
|
|
597
|
-
<wui-button
|
|
598
|
-
@click=${this.onFundWalletClick.bind(this)}
|
|
599
|
-
size="lg"
|
|
600
|
-
variant="accent-secondary"
|
|
601
|
-
fullWidth
|
|
602
|
-
>
|
|
603
|
-
Fund Wallet
|
|
604
|
-
</wui-button>
|
|
605
|
-
|
|
606
|
-
<wui-separator data-testid="wui-separator" text="or"></wui-separator>
|
|
607
|
-
|
|
608
|
-
<wui-button
|
|
609
|
-
@click=${this.onConnectDifferentWalletClick.bind(this)}
|
|
610
|
-
size="lg"
|
|
611
|
-
variant="neutral-secondary"
|
|
612
|
-
fullWidth
|
|
613
|
-
?loading=${this.disconnecting}
|
|
614
|
-
>
|
|
615
|
-
Connect a different wallet
|
|
616
|
-
</wui-button>
|
|
617
|
-
</wui-flex>
|
|
618
|
-
`;
|
|
619
|
-
}
|
|
620
|
-
return x`<wui-flex .margin=${["4", "0", "0", "0"]}>
|
|
621
|
-
<wui-button
|
|
622
|
-
@click=${this.onButtonClick.bind(this)}
|
|
623
|
-
?disabled=${isDisabled}
|
|
624
|
-
size="lg"
|
|
625
|
-
variant="accent-primary"
|
|
626
|
-
?loading=${this.loading}
|
|
627
|
-
fullWidth
|
|
628
|
-
>
|
|
629
|
-
${this.message}
|
|
630
|
-
</wui-button>
|
|
631
|
-
</wui-flex>`;
|
|
632
|
-
}
|
|
633
|
-
async handleSendParameters() {
|
|
634
|
-
this.loading = true;
|
|
635
|
-
if (!this.params) {
|
|
636
|
-
this.loading = false;
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
const amount = Number(this.params.amount);
|
|
640
|
-
if (isNaN(amount)) {
|
|
641
|
-
SnackController.showError("Invalid amount");
|
|
642
|
-
this.loading = false;
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
const { namespace, chainId, assetAddress } = this.params;
|
|
646
|
-
if (!ConstantsUtil.SEND_PARAMS_SUPPORTED_CHAINS.includes(namespace)) {
|
|
647
|
-
SnackController.showError(`Chain "${namespace}" is not supported for send parameters`);
|
|
648
|
-
this.loading = false;
|
|
649
|
-
return;
|
|
650
|
-
}
|
|
651
|
-
const caipNetwork = ChainController.getCaipNetworkById(chainId, namespace);
|
|
652
|
-
if (!caipNetwork) {
|
|
653
|
-
SnackController.showError(`Network with id "${chainId}" not found`);
|
|
654
|
-
this.loading = false;
|
|
655
|
-
return;
|
|
656
|
-
}
|
|
657
|
-
try {
|
|
658
|
-
const { balance, name, symbol, decimals } = await BalanceUtil.fetchERC20Balance({
|
|
659
|
-
caipAddress: this.caipAddress,
|
|
660
|
-
assetAddress,
|
|
661
|
-
caipNetwork
|
|
662
|
-
});
|
|
663
|
-
if (!name || !symbol || !decimals || !balance) {
|
|
664
|
-
SnackController.showError("Token not found");
|
|
665
|
-
return;
|
|
666
|
-
}
|
|
667
|
-
SendController.setToken({
|
|
668
|
-
name,
|
|
669
|
-
symbol,
|
|
670
|
-
chainId: caipNetwork.id.toString(),
|
|
671
|
-
address: `${caipNetwork.chainNamespace}:${caipNetwork.id}:${assetAddress}`,
|
|
672
|
-
value: 0,
|
|
673
|
-
price: 0,
|
|
674
|
-
quantity: {
|
|
675
|
-
decimals: decimals.toString(),
|
|
676
|
-
numeric: balance.toString()
|
|
677
|
-
},
|
|
678
|
-
iconUrl: AssetUtil.getTokenImage(symbol) ?? ""
|
|
679
|
-
});
|
|
680
|
-
SendController.setTokenAmount(amount);
|
|
681
|
-
SendController.setReceiverAddress(this.params.to);
|
|
682
|
-
} catch (err) {
|
|
683
|
-
console.error("Failed to load token information:", err);
|
|
684
|
-
SnackController.showError("Failed to load token information");
|
|
685
|
-
} finally {
|
|
686
|
-
this.loading = false;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
W3mWalletSendView.styles = styles$6;
|
|
691
|
-
__decorate$6([
|
|
692
|
-
r()
|
|
693
|
-
], W3mWalletSendView.prototype, "token", void 0);
|
|
694
|
-
__decorate$6([
|
|
695
|
-
r()
|
|
696
|
-
], W3mWalletSendView.prototype, "sendTokenAmount", void 0);
|
|
697
|
-
__decorate$6([
|
|
698
|
-
r()
|
|
699
|
-
], W3mWalletSendView.prototype, "receiverAddress", void 0);
|
|
700
|
-
__decorate$6([
|
|
701
|
-
r()
|
|
702
|
-
], W3mWalletSendView.prototype, "receiverProfileName", void 0);
|
|
703
|
-
__decorate$6([
|
|
704
|
-
r()
|
|
705
|
-
], W3mWalletSendView.prototype, "loading", void 0);
|
|
706
|
-
__decorate$6([
|
|
707
|
-
r()
|
|
708
|
-
], W3mWalletSendView.prototype, "params", void 0);
|
|
709
|
-
__decorate$6([
|
|
710
|
-
r()
|
|
711
|
-
], W3mWalletSendView.prototype, "caipAddress", void 0);
|
|
712
|
-
__decorate$6([
|
|
713
|
-
r()
|
|
714
|
-
], W3mWalletSendView.prototype, "message", void 0);
|
|
715
|
-
__decorate$6([
|
|
716
|
-
r()
|
|
717
|
-
], W3mWalletSendView.prototype, "disconnecting", void 0);
|
|
718
|
-
W3mWalletSendView = __decorate$6([
|
|
719
|
-
customElement("w3m-wallet-send-view")
|
|
720
|
-
], W3mWalletSendView);
|
|
721
|
-
const styles$5 = css`
|
|
722
|
-
.contentContainer {
|
|
723
|
-
height: 440px;
|
|
724
|
-
overflow: scroll;
|
|
725
|
-
scrollbar-width: none;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.contentContainer::-webkit-scrollbar {
|
|
729
|
-
display: none;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
wui-icon-box {
|
|
733
|
-
width: 40px;
|
|
734
|
-
height: 40px;
|
|
735
|
-
border-radius: ${({ borderRadius }) => borderRadius["3"]};
|
|
736
|
-
}
|
|
737
|
-
`;
|
|
738
|
-
var __decorate$5 = function(decorators, target, key, desc) {
|
|
739
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
740
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
741
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
742
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
743
|
-
};
|
|
744
|
-
let W3mSendSelectTokenView = class W3mSendSelectTokenView2 extends i {
|
|
745
|
-
constructor() {
|
|
746
|
-
super();
|
|
747
|
-
this.unsubscribe = [];
|
|
748
|
-
this.tokenBalances = SendController.state.tokenBalances;
|
|
749
|
-
this.search = "";
|
|
750
|
-
this.onDebouncedSearch = CoreHelperUtil.debounce((value) => {
|
|
751
|
-
this.search = value;
|
|
752
|
-
});
|
|
753
|
-
this.fetchBalancesAndNetworkPrice();
|
|
754
|
-
this.unsubscribe.push(...[
|
|
755
|
-
SendController.subscribe((val) => {
|
|
756
|
-
this.tokenBalances = val.tokenBalances;
|
|
757
|
-
})
|
|
758
|
-
]);
|
|
759
|
-
}
|
|
760
|
-
disconnectedCallback() {
|
|
761
|
-
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
762
|
-
}
|
|
763
|
-
render() {
|
|
764
|
-
return x`
|
|
765
|
-
<wui-flex flexDirection="column">
|
|
766
|
-
${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()}
|
|
767
|
-
</wui-flex>
|
|
768
|
-
`;
|
|
769
|
-
}
|
|
770
|
-
async fetchBalancesAndNetworkPrice() {
|
|
771
|
-
var _a;
|
|
772
|
-
if (!this.tokenBalances || ((_a = this.tokenBalances) == null ? void 0 : _a.length) === 0) {
|
|
773
|
-
await this.fetchBalances();
|
|
774
|
-
await this.fetchNetworkPrice();
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
async fetchBalances() {
|
|
778
|
-
await SendController.fetchTokenBalance();
|
|
779
|
-
SendController.fetchNetworkBalance();
|
|
780
|
-
}
|
|
781
|
-
async fetchNetworkPrice() {
|
|
782
|
-
await SwapController.getNetworkTokenPrice();
|
|
783
|
-
}
|
|
784
|
-
templateSearchInput() {
|
|
785
|
-
return x`
|
|
786
|
-
<wui-flex gap="2" padding="3">
|
|
787
|
-
<wui-input-text
|
|
788
|
-
@inputChange=${this.onInputChange.bind(this)}
|
|
789
|
-
class="network-search-input"
|
|
790
|
-
size="sm"
|
|
791
|
-
placeholder="Search token"
|
|
792
|
-
icon="search"
|
|
793
|
-
></wui-input-text>
|
|
794
|
-
</wui-flex>
|
|
795
|
-
`;
|
|
796
|
-
}
|
|
797
|
-
templateTokens() {
|
|
798
|
-
var _a, _b;
|
|
799
|
-
this.tokens = (_a = this.tokenBalances) == null ? void 0 : _a.filter((token) => {
|
|
800
|
-
var _a2;
|
|
801
|
-
return token.chainId === ((_a2 = ChainController.state.activeCaipNetwork) == null ? void 0 : _a2.caipNetworkId);
|
|
802
|
-
});
|
|
803
|
-
if (this.search) {
|
|
804
|
-
this.filteredTokens = (_b = this.tokenBalances) == null ? void 0 : _b.filter((token) => token.name.toLowerCase().includes(this.search.toLowerCase()));
|
|
805
|
-
} else {
|
|
806
|
-
this.filteredTokens = this.tokens;
|
|
807
|
-
}
|
|
808
|
-
return x`
|
|
809
|
-
<wui-flex
|
|
810
|
-
class="contentContainer"
|
|
811
|
-
flexDirection="column"
|
|
812
|
-
.padding=${["0", "3", "0", "3"]}
|
|
813
|
-
>
|
|
814
|
-
<wui-flex justifyContent="flex-start" .padding=${["4", "3", "3", "3"]}>
|
|
815
|
-
<wui-text variant="md-medium" color="secondary">Your tokens</wui-text>
|
|
816
|
-
</wui-flex>
|
|
817
|
-
<wui-flex flexDirection="column" gap="2">
|
|
818
|
-
${this.filteredTokens && this.filteredTokens.length > 0 ? this.filteredTokens.map((token) => x`<wui-list-token
|
|
819
|
-
@click=${this.handleTokenClick.bind(this, token)}
|
|
820
|
-
?clickable=${true}
|
|
821
|
-
tokenName=${token.name}
|
|
822
|
-
tokenImageUrl=${token.iconUrl}
|
|
823
|
-
tokenAmount=${token.quantity.numeric}
|
|
824
|
-
tokenValue=${token.value}
|
|
825
|
-
tokenCurrency=${token.symbol}
|
|
826
|
-
></wui-list-token>`) : x`<wui-flex
|
|
827
|
-
.padding=${["20", "0", "0", "0"]}
|
|
828
|
-
alignItems="center"
|
|
829
|
-
flexDirection="column"
|
|
830
|
-
gap="4"
|
|
831
|
-
>
|
|
832
|
-
<wui-icon-box icon="coinPlaceholder" color="default" size="lg"></wui-icon-box>
|
|
833
|
-
<wui-flex
|
|
834
|
-
class="textContent"
|
|
835
|
-
gap="2"
|
|
836
|
-
flexDirection="column"
|
|
837
|
-
justifyContent="center"
|
|
838
|
-
flexDirection="column"
|
|
839
|
-
>
|
|
840
|
-
<wui-text variant="lg-medium" align="center" color="primary">
|
|
841
|
-
No tokens found
|
|
842
|
-
</wui-text>
|
|
843
|
-
<wui-text variant="lg-regular" align="center" color="secondary">
|
|
844
|
-
Your tokens will appear here
|
|
845
|
-
</wui-text>
|
|
846
|
-
</wui-flex>
|
|
847
|
-
<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>
|
|
848
|
-
</wui-flex>`}
|
|
849
|
-
</wui-flex>
|
|
850
|
-
</wui-flex>
|
|
851
|
-
`;
|
|
852
|
-
}
|
|
853
|
-
onBuyClick() {
|
|
854
|
-
RouterController.push("OnRampProviders");
|
|
855
|
-
}
|
|
856
|
-
onInputChange(event) {
|
|
857
|
-
this.onDebouncedSearch(event.detail);
|
|
858
|
-
}
|
|
859
|
-
handleTokenClick(token) {
|
|
860
|
-
SendController.setToken(token);
|
|
861
|
-
SendController.setTokenAmount(void 0);
|
|
862
|
-
RouterController.goBack();
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
W3mSendSelectTokenView.styles = styles$5;
|
|
866
|
-
__decorate$5([
|
|
867
|
-
r()
|
|
868
|
-
], W3mSendSelectTokenView.prototype, "tokenBalances", void 0);
|
|
869
|
-
__decorate$5([
|
|
870
|
-
r()
|
|
871
|
-
], W3mSendSelectTokenView.prototype, "tokens", void 0);
|
|
872
|
-
__decorate$5([
|
|
873
|
-
r()
|
|
874
|
-
], W3mSendSelectTokenView.prototype, "filteredTokens", void 0);
|
|
875
|
-
__decorate$5([
|
|
876
|
-
r()
|
|
877
|
-
], W3mSendSelectTokenView.prototype, "search", void 0);
|
|
878
|
-
W3mSendSelectTokenView = __decorate$5([
|
|
879
|
-
customElement("w3m-wallet-send-select-token-view")
|
|
880
|
-
], W3mSendSelectTokenView);
|
|
881
|
-
const styles$4 = css`
|
|
882
|
-
:host {
|
|
883
|
-
height: 32px;
|
|
884
|
-
display: flex;
|
|
885
|
-
align-items: center;
|
|
886
|
-
gap: ${({ spacing }) => spacing[1]};
|
|
887
|
-
border-radius: ${({ borderRadius }) => borderRadius[32]};
|
|
888
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
889
|
-
padding: ${({ spacing }) => spacing[1]};
|
|
890
|
-
padding-left: ${({ spacing }) => spacing[2]};
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
wui-avatar,
|
|
894
|
-
wui-image {
|
|
895
|
-
width: 24px;
|
|
896
|
-
height: 24px;
|
|
897
|
-
border-radius: ${({ borderRadius }) => borderRadius[16]};
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
wui-icon {
|
|
901
|
-
border-radius: ${({ borderRadius }) => borderRadius[16]};
|
|
902
|
-
}
|
|
903
|
-
`;
|
|
904
|
-
var __decorate$4 = function(decorators, target, key, desc) {
|
|
905
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
906
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
907
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
908
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
909
|
-
};
|
|
910
|
-
let WuiPreviewItem = class WuiPreviewItem2 extends i {
|
|
911
|
-
constructor() {
|
|
912
|
-
super(...arguments);
|
|
913
|
-
this.text = "";
|
|
914
|
-
}
|
|
915
|
-
render() {
|
|
916
|
-
return x`<wui-text variant="lg-regular" color="primary">${this.text}</wui-text>
|
|
917
|
-
${this.imageTemplate()}`;
|
|
918
|
-
}
|
|
919
|
-
imageTemplate() {
|
|
920
|
-
if (this.address) {
|
|
921
|
-
return x`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`;
|
|
922
|
-
} else if (this.imageSrc) {
|
|
923
|
-
return x`<wui-image src=${this.imageSrc}></wui-image>`;
|
|
924
|
-
}
|
|
925
|
-
return x`<wui-icon size="lg" color="inverse" name="networkPlaceholder"></wui-icon>`;
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
WuiPreviewItem.styles = [resetStyles, elementStyles, styles$4];
|
|
929
|
-
__decorate$4([
|
|
930
|
-
n({ type: String })
|
|
931
|
-
], WuiPreviewItem.prototype, "text", void 0);
|
|
932
|
-
__decorate$4([
|
|
933
|
-
n({ type: String })
|
|
934
|
-
], WuiPreviewItem.prototype, "address", void 0);
|
|
935
|
-
__decorate$4([
|
|
936
|
-
n({ type: String })
|
|
937
|
-
], WuiPreviewItem.prototype, "imageSrc", void 0);
|
|
938
|
-
WuiPreviewItem = __decorate$4([
|
|
939
|
-
customElement("wui-preview-item")
|
|
940
|
-
], WuiPreviewItem);
|
|
941
|
-
const styles$3 = css`
|
|
942
|
-
:host {
|
|
943
|
-
display: flex;
|
|
944
|
-
padding: ${({ spacing }) => spacing[4]} ${({ spacing }) => spacing[3]};
|
|
945
|
-
width: 100%;
|
|
946
|
-
background-color: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
947
|
-
border-radius: ${({ borderRadius }) => borderRadius[4]};
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
wui-image {
|
|
951
|
-
width: 20px;
|
|
952
|
-
height: 20px;
|
|
953
|
-
border-radius: ${({ borderRadius }) => borderRadius[16]};
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
wui-icon {
|
|
957
|
-
width: 20px;
|
|
958
|
-
height: 20px;
|
|
959
|
-
}
|
|
960
|
-
`;
|
|
961
|
-
var __decorate$3 = function(decorators, target, key, desc) {
|
|
962
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
963
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
964
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
965
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
966
|
-
};
|
|
967
|
-
let WuiListContent = class WuiListContent2 extends i {
|
|
968
|
-
constructor() {
|
|
969
|
-
super(...arguments);
|
|
970
|
-
this.imageSrc = void 0;
|
|
971
|
-
this.textTitle = "";
|
|
972
|
-
this.textValue = void 0;
|
|
973
|
-
}
|
|
974
|
-
render() {
|
|
975
|
-
return x`
|
|
976
|
-
<wui-flex justifyContent="space-between" alignItems="center">
|
|
977
|
-
<wui-text variant="lg-regular" color="primary"> ${this.textTitle} </wui-text>
|
|
978
|
-
${this.templateContent()}
|
|
979
|
-
</wui-flex>
|
|
980
|
-
`;
|
|
981
|
-
}
|
|
982
|
-
templateContent() {
|
|
983
|
-
if (this.imageSrc) {
|
|
984
|
-
return x`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`;
|
|
985
|
-
} else if (this.textValue) {
|
|
986
|
-
return x` <wui-text variant="md-regular" color="secondary"> ${this.textValue} </wui-text>`;
|
|
987
|
-
}
|
|
988
|
-
return x`<wui-icon size="inherit" color="default" name="networkPlaceholder"></wui-icon>`;
|
|
989
|
-
}
|
|
990
|
-
};
|
|
991
|
-
WuiListContent.styles = [resetStyles, elementStyles, styles$3];
|
|
992
|
-
__decorate$3([
|
|
993
|
-
n()
|
|
994
|
-
], WuiListContent.prototype, "imageSrc", void 0);
|
|
995
|
-
__decorate$3([
|
|
996
|
-
n()
|
|
997
|
-
], WuiListContent.prototype, "textTitle", void 0);
|
|
998
|
-
__decorate$3([
|
|
999
|
-
n()
|
|
1000
|
-
], WuiListContent.prototype, "textValue", void 0);
|
|
1001
|
-
WuiListContent = __decorate$3([
|
|
1002
|
-
customElement("wui-list-content")
|
|
1003
|
-
], WuiListContent);
|
|
1004
|
-
const styles$2 = css`
|
|
1005
|
-
:host {
|
|
1006
|
-
display: flex;
|
|
1007
|
-
width: auto;
|
|
1008
|
-
flex-direction: column;
|
|
1009
|
-
gap: ${({ spacing }) => spacing["1"]};
|
|
1010
|
-
border-radius: ${({ borderRadius }) => borderRadius["5"]};
|
|
1011
|
-
background: ${({ tokens }) => tokens.theme.foregroundPrimary};
|
|
1012
|
-
padding: ${({ spacing }) => spacing["3"]} ${({ spacing }) => spacing["2"]}
|
|
1013
|
-
${({ spacing }) => spacing["2"]} ${({ spacing }) => spacing["2"]};
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
wui-list-content {
|
|
1017
|
-
width: -webkit-fill-available !important;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
wui-text {
|
|
1021
|
-
padding: 0 ${({ spacing }) => spacing["2"]};
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
wui-flex {
|
|
1025
|
-
margin-top: ${({ spacing }) => spacing["2"]};
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
.network {
|
|
1029
|
-
cursor: pointer;
|
|
1030
|
-
transition: background-color ${({ durations }) => durations["lg"]}
|
|
1031
|
-
${({ easings }) => easings["ease-out-power-1"]};
|
|
1032
|
-
will-change: background-color;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.network:focus-visible {
|
|
1036
|
-
border: 1px solid ${({ tokens }) => tokens.core.textAccentPrimary};
|
|
1037
|
-
background-color: ${({ tokens }) => tokens.core.glass010};
|
|
1038
|
-
-webkit-box-shadow: 0px 0px 0px 4px ${({ tokens }) => tokens.core.foregroundAccent010};
|
|
1039
|
-
-moz-box-shadow: 0px 0px 0px 4px ${({ tokens }) => tokens.core.foregroundAccent010};
|
|
1040
|
-
box-shadow: 0px 0px 0px 4px ${({ tokens }) => tokens.core.foregroundAccent010};
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
.network:hover {
|
|
1044
|
-
background-color: ${({ tokens }) => tokens.core.glass010};
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
.network:active {
|
|
1048
|
-
background-color: ${({ tokens }) => tokens.core.glass010};
|
|
1049
|
-
}
|
|
1050
|
-
`;
|
|
1051
|
-
var __decorate$2 = function(decorators, target, key, desc) {
|
|
1052
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1053
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1054
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1055
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1056
|
-
};
|
|
1057
|
-
let W3mWalletSendDetails = class W3mWalletSendDetails2 extends i {
|
|
1058
|
-
constructor() {
|
|
1059
|
-
var _a;
|
|
1060
|
-
super(...arguments);
|
|
1061
|
-
this.params = (_a = RouterController.state.data) == null ? void 0 : _a.send;
|
|
1062
|
-
}
|
|
1063
|
-
render() {
|
|
1064
|
-
return x` <wui-text variant="sm-regular" color="secondary">Details</wui-text>
|
|
1065
|
-
<wui-flex flexDirection="column" gap="1">
|
|
1066
|
-
<wui-list-content
|
|
1067
|
-
textTitle="Address"
|
|
1068
|
-
textValue=${UiHelperUtil.getTruncateString({
|
|
1069
|
-
string: this.receiverAddress ?? "",
|
|
1070
|
-
charsStart: 4,
|
|
1071
|
-
charsEnd: 4,
|
|
1072
|
-
truncate: "middle"
|
|
1073
|
-
})}
|
|
1074
|
-
>
|
|
1075
|
-
</wui-list-content>
|
|
1076
|
-
${this.networkTemplate()}
|
|
1077
|
-
</wui-flex>`;
|
|
1078
|
-
}
|
|
1079
|
-
networkTemplate() {
|
|
1080
|
-
var _a;
|
|
1081
|
-
if ((_a = this.caipNetwork) == null ? void 0 : _a.name) {
|
|
1082
|
-
return x` <wui-list-content
|
|
1083
|
-
@click=${() => this.onNetworkClick(this.caipNetwork)}
|
|
1084
|
-
class="network"
|
|
1085
|
-
textTitle="Network"
|
|
1086
|
-
imageSrc=${o(AssetUtil.getNetworkImage(this.caipNetwork))}
|
|
1087
|
-
></wui-list-content>`;
|
|
1088
|
-
}
|
|
1089
|
-
return null;
|
|
1090
|
-
}
|
|
1091
|
-
onNetworkClick(network) {
|
|
1092
|
-
if (network && !this.params) {
|
|
1093
|
-
RouterController.push("Networks", { network });
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
};
|
|
1097
|
-
W3mWalletSendDetails.styles = styles$2;
|
|
1098
|
-
__decorate$2([
|
|
1099
|
-
n()
|
|
1100
|
-
], W3mWalletSendDetails.prototype, "receiverAddress", void 0);
|
|
1101
|
-
__decorate$2([
|
|
1102
|
-
n({ type: Object })
|
|
1103
|
-
], W3mWalletSendDetails.prototype, "caipNetwork", void 0);
|
|
1104
|
-
__decorate$2([
|
|
1105
|
-
r()
|
|
1106
|
-
], W3mWalletSendDetails.prototype, "params", void 0);
|
|
1107
|
-
W3mWalletSendDetails = __decorate$2([
|
|
1108
|
-
customElement("w3m-wallet-send-details")
|
|
1109
|
-
], W3mWalletSendDetails);
|
|
1110
|
-
const styles$1 = css`
|
|
1111
|
-
wui-avatar,
|
|
1112
|
-
wui-image {
|
|
1113
|
-
display: ruby;
|
|
1114
|
-
width: 32px;
|
|
1115
|
-
height: 32px;
|
|
1116
|
-
border-radius: ${({ borderRadius }) => borderRadius["20"]};
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
.sendButton {
|
|
1120
|
-
width: 70%;
|
|
1121
|
-
--local-width: 100% !important;
|
|
1122
|
-
--local-border-radius: ${({ borderRadius }) => borderRadius["4"]} !important;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
.cancelButton {
|
|
1126
|
-
width: 30%;
|
|
1127
|
-
--local-width: 100% !important;
|
|
1128
|
-
--local-border-radius: ${({ borderRadius }) => borderRadius["4"]} !important;
|
|
1129
|
-
}
|
|
1130
|
-
`;
|
|
1131
|
-
var __decorate$1 = function(decorators, target, key, desc) {
|
|
1132
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1133
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1134
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1135
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1136
|
-
};
|
|
1137
|
-
let W3mWalletSendPreviewView = class W3mWalletSendPreviewView2 extends i {
|
|
1138
|
-
constructor() {
|
|
1139
|
-
var _a;
|
|
1140
|
-
super();
|
|
1141
|
-
this.unsubscribe = [];
|
|
1142
|
-
this.token = SendController.state.token;
|
|
1143
|
-
this.sendTokenAmount = SendController.state.sendTokenAmount;
|
|
1144
|
-
this.receiverAddress = SendController.state.receiverAddress;
|
|
1145
|
-
this.receiverProfileName = SendController.state.receiverProfileName;
|
|
1146
|
-
this.receiverProfileImageUrl = SendController.state.receiverProfileImageUrl;
|
|
1147
|
-
this.caipNetwork = ChainController.state.activeCaipNetwork;
|
|
1148
|
-
this.loading = SendController.state.loading;
|
|
1149
|
-
this.params = (_a = RouterController.state.data) == null ? void 0 : _a.send;
|
|
1150
|
-
this.unsubscribe.push(...[
|
|
1151
|
-
SendController.subscribe((val) => {
|
|
1152
|
-
this.token = val.token;
|
|
1153
|
-
this.sendTokenAmount = val.sendTokenAmount;
|
|
1154
|
-
this.receiverAddress = val.receiverAddress;
|
|
1155
|
-
this.receiverProfileName = val.receiverProfileName;
|
|
1156
|
-
this.receiverProfileImageUrl = val.receiverProfileImageUrl;
|
|
1157
|
-
this.loading = val.loading;
|
|
1158
|
-
}),
|
|
1159
|
-
ChainController.subscribeKey("activeCaipNetwork", (val) => this.caipNetwork = val)
|
|
1160
|
-
]);
|
|
1161
|
-
}
|
|
1162
|
-
disconnectedCallback() {
|
|
1163
|
-
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
1164
|
-
}
|
|
1165
|
-
render() {
|
|
1166
|
-
var _a, _b;
|
|
1167
|
-
return x` <wui-flex flexDirection="column" .padding=${["0", "4", "4", "4"]}>
|
|
1168
|
-
<wui-flex gap="2" flexDirection="column" .padding=${["0", "2", "0", "2"]}>
|
|
1169
|
-
<wui-flex alignItems="center" justifyContent="space-between">
|
|
1170
|
-
<wui-flex flexDirection="column" gap="01">
|
|
1171
|
-
<wui-text variant="sm-regular" color="secondary">Send</wui-text>
|
|
1172
|
-
${this.sendValueTemplate()}
|
|
1173
|
-
</wui-flex>
|
|
1174
|
-
<wui-preview-item
|
|
1175
|
-
text="${this.sendTokenAmount ? UiHelperUtil.roundNumber(this.sendTokenAmount, 6, 5) : "unknown"} ${(_a = this.token) == null ? void 0 : _a.symbol}"
|
|
1176
|
-
.imageSrc=${(_b = this.token) == null ? void 0 : _b.iconUrl}
|
|
1177
|
-
></wui-preview-item>
|
|
1178
|
-
</wui-flex>
|
|
1179
|
-
<wui-flex>
|
|
1180
|
-
<wui-icon color="default" size="md" name="arrowBottom"></wui-icon>
|
|
1181
|
-
</wui-flex>
|
|
1182
|
-
<wui-flex alignItems="center" justifyContent="space-between">
|
|
1183
|
-
<wui-text variant="sm-regular" color="secondary">To</wui-text>
|
|
1184
|
-
<wui-preview-item
|
|
1185
|
-
text="${this.receiverProfileName ? UiHelperUtil.getTruncateString({
|
|
1186
|
-
string: this.receiverProfileName,
|
|
1187
|
-
charsStart: 20,
|
|
1188
|
-
charsEnd: 0,
|
|
1189
|
-
truncate: "end"
|
|
1190
|
-
}) : UiHelperUtil.getTruncateString({
|
|
1191
|
-
string: this.receiverAddress ? this.receiverAddress : "",
|
|
1192
|
-
charsStart: 4,
|
|
1193
|
-
charsEnd: 4,
|
|
1194
|
-
truncate: "middle"
|
|
1195
|
-
})}"
|
|
1196
|
-
address=${this.receiverAddress ?? ""}
|
|
1197
|
-
.imageSrc=${this.receiverProfileImageUrl ?? void 0}
|
|
1198
|
-
.isAddress=${true}
|
|
1199
|
-
></wui-preview-item>
|
|
1200
|
-
</wui-flex>
|
|
1201
|
-
</wui-flex>
|
|
1202
|
-
<wui-flex flexDirection="column" .padding=${["6", "0", "0", "0"]}>
|
|
1203
|
-
<w3m-wallet-send-details
|
|
1204
|
-
.caipNetwork=${this.caipNetwork}
|
|
1205
|
-
.receiverAddress=${this.receiverAddress}
|
|
1206
|
-
></w3m-wallet-send-details>
|
|
1207
|
-
<wui-flex justifyContent="center" gap="1" .padding=${["3", "0", "0", "0"]}>
|
|
1208
|
-
<wui-icon size="sm" color="default" name="warningCircle"></wui-icon>
|
|
1209
|
-
<wui-text variant="sm-regular" color="secondary">Review transaction carefully</wui-text>
|
|
1210
|
-
</wui-flex>
|
|
1211
|
-
<wui-flex justifyContent="center" gap="3" .padding=${["4", "0", "0", "0"]}>
|
|
1212
|
-
<wui-button
|
|
1213
|
-
class="cancelButton"
|
|
1214
|
-
@click=${this.onCancelClick.bind(this)}
|
|
1215
|
-
size="lg"
|
|
1216
|
-
variant="neutral-secondary"
|
|
1217
|
-
>
|
|
1218
|
-
Cancel
|
|
1219
|
-
</wui-button>
|
|
1220
|
-
<wui-button
|
|
1221
|
-
class="sendButton"
|
|
1222
|
-
@click=${this.onSendClick.bind(this)}
|
|
1223
|
-
size="lg"
|
|
1224
|
-
variant="accent-primary"
|
|
1225
|
-
.loading=${this.loading}
|
|
1226
|
-
>
|
|
1227
|
-
Send
|
|
1228
|
-
</wui-button>
|
|
1229
|
-
</wui-flex>
|
|
1230
|
-
</wui-flex></wui-flex
|
|
1231
|
-
>`;
|
|
1232
|
-
}
|
|
1233
|
-
sendValueTemplate() {
|
|
1234
|
-
if (!this.params && this.token && this.sendTokenAmount) {
|
|
1235
|
-
const price = this.token.price;
|
|
1236
|
-
const totalValue = price * this.sendTokenAmount;
|
|
1237
|
-
return x`<wui-text variant="md-regular" color="primary"
|
|
1238
|
-
>$${totalValue.toFixed(2)}</wui-text
|
|
1239
|
-
>`;
|
|
1240
|
-
}
|
|
1241
|
-
return null;
|
|
1242
|
-
}
|
|
1243
|
-
async onSendClick() {
|
|
1244
|
-
if (!this.sendTokenAmount || !this.receiverAddress) {
|
|
1245
|
-
SnackController.showError("Please enter a valid amount and receiver address");
|
|
1246
|
-
return;
|
|
1247
|
-
}
|
|
1248
|
-
try {
|
|
1249
|
-
await SendController.sendToken();
|
|
1250
|
-
if (this.params) {
|
|
1251
|
-
RouterController.reset("WalletSendConfirmed");
|
|
1252
|
-
} else {
|
|
1253
|
-
SnackController.showSuccess("Transaction started");
|
|
1254
|
-
RouterController.replace("Account");
|
|
1255
|
-
}
|
|
1256
|
-
} catch (error) {
|
|
1257
|
-
let errMessage = "Failed to send transaction. Please try again.";
|
|
1258
|
-
const isUserRejectedRequestError = error instanceof AppKitError && error.originalName === ErrorUtil.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST;
|
|
1259
|
-
if (ChainController.state.activeChain === ConstantsUtil$1.CHAIN.SOLANA || isUserRejectedRequestError) {
|
|
1260
|
-
if (error instanceof Error) {
|
|
1261
|
-
errMessage = error.message;
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
EventsController.sendEvent({
|
|
1265
|
-
type: "track",
|
|
1266
|
-
event: isUserRejectedRequestError ? "SEND_REJECTED" : "SEND_ERROR",
|
|
1267
|
-
properties: SendController.getSdkEventProperties(error)
|
|
1268
|
-
});
|
|
1269
|
-
SnackController.showError(errMessage);
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
onCancelClick() {
|
|
1273
|
-
RouterController.goBack();
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
W3mWalletSendPreviewView.styles = styles$1;
|
|
1277
|
-
__decorate$1([
|
|
1278
|
-
r()
|
|
1279
|
-
], W3mWalletSendPreviewView.prototype, "token", void 0);
|
|
1280
|
-
__decorate$1([
|
|
1281
|
-
r()
|
|
1282
|
-
], W3mWalletSendPreviewView.prototype, "sendTokenAmount", void 0);
|
|
1283
|
-
__decorate$1([
|
|
1284
|
-
r()
|
|
1285
|
-
], W3mWalletSendPreviewView.prototype, "receiverAddress", void 0);
|
|
1286
|
-
__decorate$1([
|
|
1287
|
-
r()
|
|
1288
|
-
], W3mWalletSendPreviewView.prototype, "receiverProfileName", void 0);
|
|
1289
|
-
__decorate$1([
|
|
1290
|
-
r()
|
|
1291
|
-
], W3mWalletSendPreviewView.prototype, "receiverProfileImageUrl", void 0);
|
|
1292
|
-
__decorate$1([
|
|
1293
|
-
r()
|
|
1294
|
-
], W3mWalletSendPreviewView.prototype, "caipNetwork", void 0);
|
|
1295
|
-
__decorate$1([
|
|
1296
|
-
r()
|
|
1297
|
-
], W3mWalletSendPreviewView.prototype, "loading", void 0);
|
|
1298
|
-
__decorate$1([
|
|
1299
|
-
r()
|
|
1300
|
-
], W3mWalletSendPreviewView.prototype, "params", void 0);
|
|
1301
|
-
W3mWalletSendPreviewView = __decorate$1([
|
|
1302
|
-
customElement("w3m-wallet-send-preview-view")
|
|
1303
|
-
], W3mWalletSendPreviewView);
|
|
1304
|
-
const styles = css`
|
|
1305
|
-
.icon-box {
|
|
1306
|
-
width: 64px;
|
|
1307
|
-
height: 64px;
|
|
1308
|
-
border-radius: 16px;
|
|
1309
|
-
background-color: ${({ spacing }) => spacing[16]};
|
|
1310
|
-
border: 8px solid ${({ tokens }) => tokens.theme.borderPrimary};
|
|
1311
|
-
border-radius: ${({ borderRadius }) => borderRadius.round};
|
|
1312
|
-
}
|
|
1313
|
-
`;
|
|
1314
|
-
var __decorate = function(decorators, target, key, desc) {
|
|
1315
|
-
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1316
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r2 = Reflect.decorate(decorators, target, key, desc);
|
|
1317
|
-
else for (var i2 = decorators.length - 1; i2 >= 0; i2--) if (d = decorators[i2]) r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
1318
|
-
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
1319
|
-
};
|
|
1320
|
-
let W3mSendConfirmedView = class W3mSendConfirmedView2 extends i {
|
|
1321
|
-
constructor() {
|
|
1322
|
-
super();
|
|
1323
|
-
this.unsubscribe = [];
|
|
1324
|
-
this.unsubscribe.push(...[]);
|
|
1325
|
-
}
|
|
1326
|
-
render() {
|
|
1327
|
-
return x`
|
|
1328
|
-
<wui-flex
|
|
1329
|
-
flexDirection="column"
|
|
1330
|
-
alignItems="center"
|
|
1331
|
-
gap="4"
|
|
1332
|
-
.padding="${["1", "3", "4", "3"]}"
|
|
1333
|
-
>
|
|
1334
|
-
<wui-flex justifyContent="center" alignItems="center" class="icon-box">
|
|
1335
|
-
<wui-icon size="xxl" color="success" name="checkmark"></wui-icon>
|
|
1336
|
-
</wui-flex>
|
|
1337
|
-
|
|
1338
|
-
<wui-text variant="h6-medium" color="primary">You successfully sent asset</wui-text>
|
|
1339
|
-
|
|
1340
|
-
<wui-button
|
|
1341
|
-
fullWidth
|
|
1342
|
-
@click=${this.onCloseClick.bind(this)}
|
|
1343
|
-
size="lg"
|
|
1344
|
-
variant="neutral-secondary"
|
|
1345
|
-
>
|
|
1346
|
-
Close
|
|
1347
|
-
</wui-button>
|
|
1348
|
-
</wui-flex>
|
|
1349
|
-
`;
|
|
1350
|
-
}
|
|
1351
|
-
onCloseClick() {
|
|
1352
|
-
ModalController.close();
|
|
1353
|
-
}
|
|
1354
|
-
};
|
|
1355
|
-
W3mSendConfirmedView.styles = styles;
|
|
1356
|
-
W3mSendConfirmedView = __decorate([
|
|
1357
|
-
customElement("w3m-send-confirmed-view")
|
|
1358
|
-
], W3mSendConfirmedView);
|
|
1359
|
-
export {
|
|
1360
|
-
W3mSendConfirmedView,
|
|
1361
|
-
W3mSendSelectTokenView,
|
|
1362
|
-
W3mWalletSendPreviewView,
|
|
1363
|
-
W3mWalletSendView
|
|
1364
|
-
};
|
|
1365
|
-
//# sourceMappingURL=send-DHzM4I8V.js.map
|