@multiversx/sdk-dapp 5.0.0-alpha.1 → 5.0.0-alpha.10
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/README.md +311 -77
- package/out/__chunks__/{chunk-IXJOO5U4.mjs → chunk-266T724O.mjs} +2 -2
- package/out/__chunks__/{chunk-7OTTISMZ.mjs → chunk-26XVDGTO.mjs} +2 -2
- package/out/__chunks__/{chunk-X2JK27T3.mjs → chunk-2FD2AMKA.mjs} +2 -2
- package/out/__chunks__/chunk-2I4BJK55.mjs +2 -0
- package/out/__chunks__/chunk-2I4BJK55.mjs.map +7 -0
- package/out/__chunks__/{chunk-XU34NXIS.mjs → chunk-2ONA7QPD.mjs} +2 -2
- package/out/__chunks__/{chunk-675ZW4IF.mjs → chunk-2SOS3KAT.mjs} +2 -2
- package/out/__chunks__/chunk-35XMV5ZL.mjs +2 -0
- package/out/__chunks__/{chunk-UF45HLIK.mjs → chunk-3MWXXTQQ.mjs} +2 -2
- package/out/__chunks__/chunk-445MWKMT.mjs +2 -0
- package/out/__chunks__/chunk-445MWKMT.mjs.map +7 -0
- package/out/__chunks__/{chunk-TLKMUVQJ.mjs → chunk-45WVS4H5.mjs} +2 -2
- package/out/__chunks__/{chunk-2HWIJ4CV.mjs → chunk-4OEPT2V4.mjs} +2 -2
- package/out/__chunks__/chunk-55SACSMS.mjs +2 -0
- package/out/__chunks__/chunk-55SACSMS.mjs.map +7 -0
- package/out/__chunks__/chunk-5W4JJSFM.mjs +2 -0
- package/out/__chunks__/chunk-5W4JJSFM.mjs.map +7 -0
- package/out/__chunks__/{chunk-AJEWAECH.mjs → chunk-66JBXP4O.mjs} +2 -2
- package/out/__chunks__/chunk-6DNPTAY5.mjs +2 -0
- package/out/__chunks__/chunk-6F2QKI7Q.mjs +2 -0
- package/out/__chunks__/{chunk-C3KLB5TA.mjs.map → chunk-6F2QKI7Q.mjs.map} +1 -1
- package/out/__chunks__/chunk-6WF4B5EG.mjs +2 -0
- package/out/__chunks__/chunk-6WF4B5EG.mjs.map +7 -0
- package/out/__chunks__/{chunk-PEDR76UT.mjs → chunk-72PZKSKF.mjs} +2 -2
- package/out/__chunks__/chunk-76NGDJLC.mjs +2 -0
- package/out/__chunks__/chunk-76NGDJLC.mjs.map +7 -0
- package/out/__chunks__/{chunk-TYYA6E7F.mjs → chunk-7BP53CXF.mjs} +2 -2
- package/out/__chunks__/{chunk-M3C5NS6M.mjs → chunk-7ECP7Y7M.mjs} +2 -2
- package/out/__chunks__/chunk-7LUZJPO5.mjs +2 -0
- package/out/__chunks__/{chunk-UFMHCVBL.mjs.map → chunk-7LUZJPO5.mjs.map} +3 -3
- package/out/__chunks__/{chunk-PPA7AFVD.mjs → chunk-7WTWD4TL.mjs} +2 -2
- package/out/__chunks__/{chunk-2AAKENSP.mjs → chunk-A5EXECZV.mjs} +2 -2
- package/out/__chunks__/{chunk-LETBBKOK.mjs → chunk-ASWTHX52.mjs} +2 -2
- package/out/__chunks__/{chunk-PDT22D2C.mjs → chunk-AV4HSXYZ.mjs} +2 -2
- package/out/__chunks__/{chunk-3OKWBJFM.mjs → chunk-B2RDSGON.mjs} +2 -2
- package/out/__chunks__/{chunk-KMFYDHOY.mjs → chunk-BRBIUWAW.mjs} +2 -2
- package/out/__chunks__/{chunk-3NG7LKF4.mjs → chunk-BSWV5MEC.mjs} +2 -2
- package/out/__chunks__/chunk-BTRCRGTK.mjs +2 -0
- package/out/__chunks__/chunk-BTRCRGTK.mjs.map +7 -0
- package/out/__chunks__/{chunk-NCUYIZYI.mjs → chunk-BVYTCDU6.mjs} +2 -2
- package/out/__chunks__/{chunk-RNCF2III.mjs → chunk-C5TNEYN6.mjs} +2 -2
- package/out/__chunks__/chunk-C6E6XICI.mjs +2 -0
- package/out/__chunks__/{chunk-SBQJGS63.mjs → chunk-CCDTUFFG.mjs} +2 -2
- package/out/__chunks__/chunk-CEDRWVRS.mjs +2 -0
- package/out/__chunks__/chunk-CEDRWVRS.mjs.map +7 -0
- package/out/__chunks__/chunk-CNUQX7FI.mjs +2 -0
- package/out/__chunks__/{chunk-NJ73RJ4B.mjs → chunk-CNWR7SER.mjs} +2 -2
- package/out/__chunks__/{chunk-OBRX5K2D.mjs → chunk-D7NHU6UF.mjs} +2 -2
- package/out/__chunks__/{chunk-OBRX5K2D.mjs.map → chunk-D7NHU6UF.mjs.map} +2 -2
- package/out/__chunks__/chunk-DEMKQ3CQ.mjs +2 -0
- package/out/__chunks__/chunk-DEMKQ3CQ.mjs.map +7 -0
- package/out/__chunks__/chunk-DFNESXSW.mjs +2 -0
- package/out/__chunks__/{chunk-SNKFFCSF.mjs → chunk-DHPD6E7P.mjs} +2 -2
- package/out/__chunks__/{chunk-M6ATGCOM.mjs → chunk-DNHKXKYY.mjs} +2 -2
- package/out/__chunks__/{chunk-CN4RHVUE.mjs → chunk-DOUNJCQ4.mjs} +2 -2
- package/out/__chunks__/{chunk-CN4RHVUE.mjs.map → chunk-DOUNJCQ4.mjs.map} +2 -2
- package/out/__chunks__/chunk-DT6YLEPL.mjs +2 -0
- package/out/__chunks__/{chunk-OF6HBWFR.mjs → chunk-DV3XIKOX.mjs} +2 -2
- package/out/__chunks__/chunk-EDSX3LFL.mjs +2 -0
- package/out/__chunks__/chunk-EDSX3LFL.mjs.map +7 -0
- package/out/__chunks__/{chunk-LNABNVAO.mjs → chunk-EOX35D4L.mjs} +2 -2
- package/out/__chunks__/chunk-FEFZKA2B.mjs +2 -0
- package/out/__chunks__/{chunk-I66YT2S2.mjs → chunk-FMUDQBZE.mjs} +2 -2
- package/out/__chunks__/chunk-FPHLXGAT.mjs +2 -0
- package/out/__chunks__/chunk-FPHLXGAT.mjs.map +7 -0
- package/out/__chunks__/{chunk-3IYQANTT.mjs → chunk-FUYWIC54.mjs} +2 -2
- package/out/__chunks__/chunk-HEKAFHIA.mjs +2 -0
- package/out/__chunks__/chunk-HEKAFHIA.mjs.map +7 -0
- package/out/__chunks__/chunk-I7ODJJY3.mjs +2 -0
- package/out/__chunks__/chunk-I7ODJJY3.mjs.map +7 -0
- package/out/__chunks__/chunk-IEJARRBP.mjs +2 -0
- package/out/__chunks__/chunk-IEJARRBP.mjs.map +7 -0
- package/out/__chunks__/{chunk-FJIH6TWP.mjs → chunk-IJB6XDNR.mjs} +2 -2
- package/out/__chunks__/chunk-INBKWOKQ.mjs +2 -0
- package/out/__chunks__/{chunk-UYUKTC4X.mjs → chunk-IOE5AG2R.mjs} +2 -2
- package/out/__chunks__/{chunk-SF7XXVIO.mjs → chunk-ISPRIGOE.mjs} +2 -2
- package/out/__chunks__/{chunk-DZ5L5MZT.mjs → chunk-IWB45745.mjs} +2 -2
- package/out/__chunks__/chunk-IWB45745.mjs.map +7 -0
- package/out/__chunks__/{chunk-L2JWXTGG.mjs → chunk-J3YO25EK.mjs} +2 -2
- package/out/__chunks__/chunk-J4CPYFK6.mjs +2 -0
- package/out/__chunks__/{chunk-K3G3SPRT.mjs.map → chunk-J4CPYFK6.mjs.map} +1 -1
- package/out/__chunks__/{chunk-6ZDBHK76.mjs → chunk-JIJSBQEU.mjs} +2 -2
- package/out/__chunks__/chunk-JKSF2U3C.mjs +2 -0
- package/out/__chunks__/chunk-JKSF2U3C.mjs.map +7 -0
- package/out/__chunks__/chunk-JQEKTKZR.mjs +2 -0
- package/out/__chunks__/chunk-JQEKTKZR.mjs.map +7 -0
- package/out/__chunks__/chunk-JQU6F2FL.mjs +2 -0
- package/out/__chunks__/chunk-JSUJOYYB.mjs +2 -0
- package/out/__chunks__/{chunk-DZ3UVNJK.mjs.map → chunk-JSUJOYYB.mjs.map} +2 -2
- package/out/__chunks__/chunk-JZWEJ7SP.mjs +2 -0
- package/out/__chunks__/chunk-JZWEJ7SP.mjs.map +7 -0
- package/out/__chunks__/{chunk-G2DLIXFQ.mjs → chunk-K3WBBSXJ.mjs} +2 -2
- package/out/__chunks__/chunk-KN7QMGWV.mjs +2 -0
- package/out/__chunks__/{chunk-U2TDLWBA.mjs.map → chunk-KN7QMGWV.mjs.map} +1 -1
- package/out/__chunks__/{chunk-OYZFSQEK.mjs → chunk-KPDCSGZD.mjs} +2 -2
- package/out/__chunks__/chunk-KRBUXJ6B.mjs +2 -0
- package/out/__chunks__/chunk-KRBUXJ6B.mjs.map +7 -0
- package/out/__chunks__/{chunk-TAI3I5BS.mjs → chunk-KSKOSHYV.mjs} +2 -2
- package/out/__chunks__/{chunk-KJCZ5HAU.mjs → chunk-LM5SF2NG.mjs} +2 -2
- package/out/__chunks__/{chunk-SLLCCPCW.mjs → chunk-LOEJYVD2.mjs} +2 -2
- package/out/__chunks__/{chunk-SLLCCPCW.mjs.map → chunk-LOEJYVD2.mjs.map} +1 -1
- package/out/__chunks__/{chunk-243OAHYD.mjs → chunk-MQ5V5AJU.mjs} +2 -2
- package/out/__chunks__/chunk-MQ5V5AJU.mjs.map +7 -0
- package/out/__chunks__/chunk-N5FYAXCA.mjs +2 -0
- package/out/__chunks__/{chunk-4PV6SFXA.mjs → chunk-NBDECUQ3.mjs} +2 -2
- package/out/__chunks__/chunk-NHXPNROG.mjs +2 -0
- package/out/__chunks__/chunk-NHXPNROG.mjs.map +7 -0
- package/out/__chunks__/chunk-NO7YH2FT.mjs +2 -0
- package/out/__chunks__/chunk-O3V4TGXK.mjs +2 -0
- package/out/__chunks__/{chunk-GHDPXQZ5.mjs.map → chunk-O3V4TGXK.mjs.map} +3 -3
- package/out/__chunks__/{chunk-TVBOE2RK.mjs → chunk-OEPTRJEB.mjs} +1 -1
- package/out/__chunks__/{chunk-TVBOE2RK.mjs.map → chunk-OEPTRJEB.mjs.map} +1 -1
- package/out/__chunks__/chunk-OUNMWRYD.mjs +2 -0
- package/out/__chunks__/{chunk-YVVDA6LN.mjs.map → chunk-OUNMWRYD.mjs.map} +1 -1
- package/out/__chunks__/chunk-P2C5G6H6.mjs +2 -0
- package/out/__chunks__/chunk-P2C5G6H6.mjs.map +7 -0
- package/out/__chunks__/chunk-P5RR3CVM.mjs +2 -0
- package/out/__chunks__/{chunk-W4GE4ZDP.mjs → chunk-PRULMJH7.mjs} +2 -2
- package/out/__chunks__/chunk-QATM2UUN.mjs +2 -0
- package/out/__chunks__/chunk-QATM2UUN.mjs.map +7 -0
- package/out/__chunks__/{chunk-HQJG7CFV.mjs → chunk-QAVA2C6Y.mjs} +2 -2
- package/out/__chunks__/{chunk-LTF535HP.mjs → chunk-QJSB5NX4.mjs} +2 -2
- package/out/__chunks__/{chunk-WW4BBBLW.mjs → chunk-QKHHW26T.mjs} +2 -2
- package/out/__chunks__/{chunk-YRIDJGOK.mjs → chunk-QM67ZEC5.mjs} +2 -2
- package/out/__chunks__/{chunk-YAXVLGG3.mjs → chunk-QP2EL7IE.mjs} +2 -2
- package/out/__chunks__/{chunk-VIJUIJ4V.mjs → chunk-QSBLXZFC.mjs} +2 -2
- package/out/__chunks__/chunk-R53MCZI6.mjs +2 -0
- package/out/__chunks__/chunk-R53MCZI6.mjs.map +7 -0
- package/out/__chunks__/{chunk-YVD46DFI.mjs → chunk-RHFDU5Y4.mjs} +2 -2
- package/out/__chunks__/{chunk-5WVAF7RB.mjs → chunk-S5FDHOXH.mjs} +2 -2
- package/out/__chunks__/{chunk-NM3KJ3EA.mjs → chunk-SH5S4RA4.mjs} +2 -2
- package/out/__chunks__/{chunk-7RX2A4WD.mjs → chunk-SJYCKFH4.mjs} +2 -2
- package/out/__chunks__/{chunk-C4CJOZ4L.mjs → chunk-SYQ7SILM.mjs} +2 -2
- package/out/__chunks__/chunk-TEPQ5G4B.mjs +2 -0
- package/out/__chunks__/chunk-TEPQ5G4B.mjs.map +7 -0
- package/out/__chunks__/{chunk-7YGJXJUC.mjs → chunk-TMP3REGQ.mjs} +2 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs +2 -0
- package/out/__chunks__/chunk-TQA3JDNV.mjs.map +7 -0
- package/out/__chunks__/chunk-TR6FQZGE.mjs +2 -0
- package/out/__chunks__/chunk-TRMQFQOQ.mjs +1 -0
- package/out/__chunks__/chunk-UZWRIJVB.mjs +2 -0
- package/out/__chunks__/{chunk-PV5A7PX4.mjs.map → chunk-UZWRIJVB.mjs.map} +2 -2
- package/out/__chunks__/{chunk-LD4NALNZ.mjs → chunk-VCGAO6HH.mjs} +2 -2
- package/out/__chunks__/{chunk-QQ4OPT5A.mjs → chunk-VJ2DAL5M.mjs} +2 -2
- package/out/__chunks__/chunk-VMFJUT3G.mjs +2 -0
- package/out/__chunks__/chunk-VMFJUT3G.mjs.map +7 -0
- package/out/__chunks__/chunk-VSUCRJYB.mjs +2 -0
- package/out/__chunks__/chunk-WFAPPSOI.mjs +1 -0
- package/out/__chunks__/chunk-X7NCYKWT.mjs +2 -0
- package/out/__chunks__/chunk-X7NCYKWT.mjs.map +7 -0
- package/out/__chunks__/{chunk-JXO7XRIR.mjs → chunk-XFZOOFY5.mjs} +2 -2
- package/out/__chunks__/{chunk-RVW2ZWCR.mjs → chunk-XHIIMAIQ.mjs} +2 -2
- package/out/__chunks__/{chunk-JGULQG2H.mjs → chunk-XLHFU7XR.mjs} +2 -2
- package/out/__chunks__/chunk-XOJHIJKX.mjs +2 -0
- package/out/__chunks__/chunk-XOJHIJKX.mjs.map +7 -0
- package/out/__chunks__/{chunk-6GNOK3TJ.mjs → chunk-YB2E5WOO.mjs} +1 -1
- package/out/__chunks__/chunk-YB2E5WOO.mjs.map +7 -0
- package/out/__chunks__/{chunk-JTQCNFCR.mjs → chunk-YB7AHPBR.mjs} +2 -2
- package/out/__chunks__/chunk-YEXBSKXL.mjs +2 -0
- package/out/__chunks__/chunk-YEXBSKXL.mjs.map +7 -0
- package/out/__chunks__/{chunk-ENTPR3MV.mjs → chunk-YN5ARP6C.mjs} +2 -2
- package/out/__chunks__/{chunk-XO5D3FNU.mjs → chunk-YPCJBYUY.mjs} +2 -2
- package/out/__chunks__/{chunk-Y3YLDFXK.mjs → chunk-YQ3LRPGM.mjs} +2 -2
- package/out/__chunks__/{chunk-MCZUQPRA.mjs → chunk-YTFYVPZO.mjs} +2 -2
- package/out/__chunks__/chunk-Z5CDCI3Y.mjs +2 -0
- package/out/__chunks__/{chunk-OTBTZ3NI.mjs.map → chunk-Z5CDCI3Y.mjs.map} +1 -1
- package/out/__chunks__/chunk-Z6R3RDWW.mjs +2 -0
- package/out/__chunks__/{chunk-YPNKNMW5.mjs → chunk-ZEIGMAXW.mjs} +2 -2
- package/out/__chunks__/chunk-ZEUNADU7.mjs +2 -0
- package/out/__chunks__/{chunk-HC5QPKZT.mjs → chunk-ZHIYA3M7.mjs} +2 -2
- package/out/__chunks__/{chunk-42KJRIAT.mjs → chunk-ZK5BKLTG.mjs} +2 -2
- package/out/__chunks__/chunk-ZU4LTEAC.mjs +2 -0
- package/out/__chunks__/chunk-ZU4LTEAC.mjs.map +7 -0
- package/out/__mocks__/accountConfig.mjs +1 -1
- package/out/__mocks__/data/index.mjs +1 -1
- package/out/__mocks__/index.mjs +1 -1
- package/out/__mocks__/server.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs.map +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/UITags.enum.d.ts +2 -2
- package/out/constants/UITags.enum.js +2 -2
- package/out/constants/UITags.enum.js.map +1 -1
- package/out/constants/UITags.enum.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/providerFactory.constants.d.ts +2 -1
- package/out/constants/providerFactory.constants.js +1 -0
- package/out/constants/providerFactory.constants.js.map +1 -1
- package/out/constants/providerFactory.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.d.ts +1 -0
- package/out/constants/window.constants.js +2 -1
- package/out/constants/window.constants.js.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/FormatAmountController/FormatAmountController.mjs +1 -1
- package/out/controllers/FormatAmountController/index.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.d.ts +2 -2
- package/out/controllers/TransactionsTableController/TransactionsTableController.js +2 -2
- package/out/controllers/TransactionsTableController/TransactionsTableController.js.map +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/transactionsTableController.types.d.ts +8 -11
- package/out/controllers/index.mjs +1 -1
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.d.ts +10 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js +45 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.js.map +1 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +2 -0
- package/out/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs.map +7 -0
- package/out/index.mjs +1 -1
- package/out/lib/sdkCore.d.ts +1 -1
- package/out/lib/sdkCore.js +2 -1
- package/out/lib/sdkCore.js.map +1 -1
- package/out/lib/sdkCore.mjs +1 -1
- package/out/lib/sdkDappUi.d.ts +2 -2
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/lib/sdkDappUtils.d.ts +1 -1
- package/out/lib/sdkDappUtils.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.d.ts +7 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js +6 -2
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js.map +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.d.ts +3 -5
- package/out/managers/TransactionManager/TransactionManager.js +2 -1
- package/out/managers/TransactionManager/TransactionManager.js.map +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.types.d.ts +12 -0
- package/out/managers/TransactionManager/TransactionManager.types.js +3 -0
- package/out/managers/TransactionManager/TransactionManager.types.js.map +1 -0
- package/out/managers/TransactionManager/TransactionManager.types.mjs +1 -0
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.js +5 -4
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.js.map +1 -1
- package/out/managers/TransactionManager/helpers/isCrossShardTransaction.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/TransactionManager/tests/isCrossShardTransaction.test.js +0 -37
- package/out/managers/TransactionManager/tests/isCrossShardTransaction.test.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.d.ts +13 -8
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js +32 -13
- package/out/managers/UnlockPanelManager/UnlockPanelManager.js.map +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.d.ts +21 -14
- package/out/managers/UnlockPanelManager/UnlockPanelManager.types.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.d.ts +2 -2
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.js +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.js.map +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js +2 -2
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.js.map +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.d.ts +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.js +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.js.map +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.d.ts +2 -2
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.js.map +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.js +5 -16
- package/out/methods/initApp/initApp.js.map +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/initApp.types.d.ts +38 -0
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.d.ts +14 -0
- package/out/methods/loginInfo/getLoginInfo.js +14 -0
- package/out/methods/loginInfo/getLoginInfo.js.map +1 -0
- package/out/methods/loginInfo/getLoginInfo.mjs +2 -0
- package/out/methods/loginInfo/getLoginInfo.mjs.map +7 -0
- package/out/methods/network/getEgldLabel.js +2 -2
- package/out/methods/network/getEgldLabel.js.map +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.js +2 -2
- package/out/methods/network/getExplorerAddress.js.map +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.d.ts +1 -1
- package/out/methods/network/getNetworkConfig.js +2 -2
- package/out/methods/network/getNetworkConfig.js.map +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.d.ts +1 -0
- package/out/methods/transactions/getFailedTransactions.js +10 -0
- package/out/methods/transactions/getFailedTransactions.js.map +1 -0
- package/out/methods/transactions/getFailedTransactions.mjs +2 -0
- package/out/methods/transactions/getFailedTransactions.mjs.map +7 -0
- package/out/methods/transactions/getFailedTransactionsSessions.d.ts +1 -0
- package/out/methods/transactions/getFailedTransactionsSessions.js +10 -0
- package/out/methods/transactions/getFailedTransactionsSessions.js.map +1 -0
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +2 -0
- package/out/methods/transactions/getFailedTransactionsSessions.mjs.map +7 -0
- package/out/methods/transactions/getPendingTransactions.d.ts +1 -0
- package/out/methods/transactions/getPendingTransactions.js +10 -0
- package/out/methods/transactions/getPendingTransactions.js.map +1 -0
- package/out/methods/transactions/getPendingTransactions.mjs +2 -0
- package/out/methods/transactions/getPendingTransactions.mjs.map +7 -0
- package/out/methods/transactions/getPendingTransactionsSessions.d.ts +1 -0
- package/out/methods/transactions/getPendingTransactionsSessions.js +10 -0
- package/out/methods/transactions/getPendingTransactionsSessions.js.map +1 -0
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +2 -0
- package/out/methods/transactions/getPendingTransactionsSessions.mjs.map +7 -0
- package/out/methods/transactions/getSuccessfulTransactions.d.ts +1 -0
- package/out/methods/transactions/getSuccessfulTransactions.js +10 -0
- package/out/methods/transactions/getSuccessfulTransactions.js.map +1 -0
- package/out/methods/transactions/getSuccessfulTransactions.mjs +2 -0
- package/out/methods/transactions/getSuccessfulTransactions.mjs.map +7 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.d.ts +1 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.js +10 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.js.map +1 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +2 -0
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs.map +7 -0
- package/out/methods/transactions/getTransactionSessions.d.ts +1 -0
- package/out/methods/transactions/getTransactionSessions.js +10 -0
- package/out/methods/transactions/getTransactionSessions.js.map +1 -0
- package/out/methods/transactions/getTransactionSessions.mjs +2 -0
- package/out/methods/transactions/getTransactionSessions.mjs.map +7 -0
- package/out/providers/DappProvider/DappProvider.d.ts +14 -48
- package/out/providers/DappProvider/DappProvider.js +11 -3
- package/out/providers/DappProvider/DappProvider.js.map +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.d.ts +3 -1
- package/out/providers/DappProvider/helpers/login/login.js +16 -8
- package/out/providers/DappProvider/helpers/login/login.js.map +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.d.ts +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.js +3 -1
- package/out/providers/DappProvider/helpers/logout/logout.js.map +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/getVerifier.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.d.ts +1 -2
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.js.map +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/verifyMessage.d.ts +1 -1
- package/out/providers/DappProvider/helpers/signMessage/verifyMessage.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.js +25 -23
- package/out/providers/ProviderFactory.js.map +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/clearInitiatedLogins.d.ts +2 -2
- package/out/providers/helpers/clearInitiatedLogins.js.map +1 -1
- package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
- package/out/providers/helpers/emptyProvider.d.ts +2 -2
- package/out/providers/helpers/emptyProvider.js.map +1 -1
- package/out/providers/helpers/emptyProvider.mjs +1 -1
- package/out/providers/helpers/restoreProvider.js +11 -1
- package/out/providers/helpers/restoreProvider.js.map +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.d.ts +25 -12
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.js +30 -12
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.js.map +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +14 -10
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js +41 -55
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.d.ts +14 -9
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.js +36 -42
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.js.map +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.d.ts +18 -11
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.js +59 -55
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.js.map +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/types/iframe.types.d.ts +1 -0
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.d.ts +22 -11
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.js +57 -43
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.js.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.js +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.js.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.d.ts +28 -17
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js +150 -169
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.d.ts +14 -9
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js +36 -39
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.js +18 -3
- package/out/providers/strategies/helpers/signMessage/signMessage.js.map +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeInFiat.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.js +14 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.js +21 -24
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getPpuOptions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getRecommendedGasPrice.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js +6 -6
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/tests/getCommonData.test.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js +8 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.js.map +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/providers/types/providerFactory.types.d.ts +18 -17
- package/out/providers/types/providerFactory.types.js +10 -11
- package/out/providers/types/providerFactory.types.js.map +1 -1
- package/out/providers/types/providerFactory.types.mjs +1 -1
- package/out/react/account/useGetAccount.js.map +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccount.mjs.map +2 -2
- package/out/react/account/useGetAccountInfo.js.map +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs.map +2 -2
- package/out/react/account/useGetIsLoggedIn.js.map +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs.map +2 -2
- package/out/react/account/useGetLatestNonce.js.map +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs.map +2 -2
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.d.ts +1 -44
- package/out/react/loginInfo/useGetLoginInfo.js.map +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs.map +2 -2
- package/out/react/network/useGetNetworkConfig.js.map +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs.map +2 -2
- package/out/react/store/getReactStore.js +1 -1
- package/out/react/store/getReactStore.js.map +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/getReactStore.mjs.map +4 -4
- package/out/react/store/useSelector.js +1 -1
- package/out/react/store/useSelector.js.map +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.d.ts +1 -0
- package/out/react/transactions/useGetFailedTransactions.js +11 -0
- package/out/react/transactions/useGetFailedTransactions.js.map +1 -0
- package/out/react/transactions/useGetFailedTransactions.mjs +2 -0
- package/out/react/transactions/useGetFailedTransactions.mjs.map +7 -0
- package/out/react/transactions/useGetFailedTransactionsSessions copy.d.ts +1 -0
- package/out/react/transactions/useGetFailedTransactionsSessions copy.js +11 -0
- package/out/react/transactions/useGetFailedTransactionsSessions copy.js.map +1 -0
- package/out/react/transactions/useGetFailedTransactionsSessions copy.mjs +2 -0
- package/out/react/transactions/useGetFailedTransactionsSessions copy.mjs.map +7 -0
- package/out/react/transactions/useGetPendingTransactions.js.map +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs.map +2 -2
- package/out/react/transactions/useGetPendingTransactionsSessions.d.ts +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.js +3 -3
- package/out/react/transactions/useGetPendingTransactionsSessions.js.map +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs.map +3 -3
- package/out/react/transactions/useGetSuccessfulTransactions.d.ts +1 -0
- package/out/react/transactions/useGetSuccessfulTransactions.js +11 -0
- package/out/react/transactions/useGetSuccessfulTransactions.js.map +1 -0
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +2 -0
- package/out/react/transactions/useGetSuccessfulTransactions.mjs.map +7 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.d.ts +1 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.js +11 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.js.map +1 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +2 -0
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs.map +7 -0
- package/out/react/transactions/useGetTransactionSessions.js.map +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs.map +2 -2
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.d.ts +2 -2
- package/out/store/actions/loginInfo/loginInfoActions.js.map +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.d.ts +3 -3
- package/out/store/actions/sharedActions/sharedActions.js.map +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.d.ts +4 -2
- package/out/store/actions/transactions/transactionsActions.js +3 -2
- package/out/store/actions/transactions/transactionsActions.js.map +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/selectors/accountSelectors.mjs +1 -1
- package/out/store/selectors/index.mjs +1 -1
- package/out/store/selectors/loginInfoSelectors.d.ts +2 -45
- package/out/store/selectors/transactionsSelector.d.ts +2 -0
- package/out/store/selectors/transactionsSelector.js +29 -1
- package/out/store/selectors/transactionsSelector.js.map +1 -1
- package/out/store/selectors/transactionsSelector.mjs +1 -1
- package/out/store/slices/account/accountSlice.mjs +1 -1
- package/out/store/slices/account/emptyAccount.mjs +1 -1
- package/out/store/slices/account/index.mjs +1 -1
- package/out/store/slices/index.mjs +1 -1
- package/out/store/slices/loginInfo/loginInfo.types.d.ts +3 -3
- package/out/store/slices/loginInfo/loginInfoSlice.d.ts +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.js +2 -1
- package/out/store/storage/storageCallback.js.map +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/types/index.d.ts +1 -1
- package/out/types/index.js +1 -1
- package/out/types/index.js.map +1 -1
- package/out/types/index.mjs +1 -1
- package/out/types/serverTransactions.types.d.ts +6 -6
- package/out/types/serverTransactions.types.mjs +1 -1
- package/out/types/suspiciousLink.types.d.ts +17 -0
- package/out/types/{misc.types.js → suspiciousLink.types.js} +1 -1
- package/out/types/suspiciousLink.types.js.map +1 -0
- package/out/types/suspiciousLink.types.mjs +2 -0
- package/out/types/transactions.types.d.ts +4 -0
- package/out/types/transactions.types.mjs.map +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.js +1 -1
- package/out/utils/account/refreshAccount.js.map +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/createUIElement.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/operations/trimAmountDecimals.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getEgldValueData.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTransactionActionNftText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromActions.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromDataField.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getVisibleOperations.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMethod.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionTransferType.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getScamFlag.d.ts +8 -0
- package/out/utils/transactions/getScamFlag.js +78 -0
- package/out/utils/transactions/getScamFlag.js.map +1 -0
- package/out/utils/transactions/getScamFlag.mjs +2 -0
- package/out/utils/transactions/getScamFlag.mjs.map +7 -0
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getAssetAmount.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getAssetPrice.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionActionTransferLabel.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAssets.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.mjs +1 -1
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +9 -7
- package/out/__chunks__/chunk-243OAHYD.mjs.map +0 -7
- package/out/__chunks__/chunk-2CNSQULM.mjs +0 -2
- package/out/__chunks__/chunk-2CNSQULM.mjs.map +0 -7
- package/out/__chunks__/chunk-2X7ENE6Y.mjs +0 -2
- package/out/__chunks__/chunk-2X7ENE6Y.mjs.map +0 -7
- package/out/__chunks__/chunk-42SCXW2U.mjs +0 -2
- package/out/__chunks__/chunk-42SCXW2U.mjs.map +0 -7
- package/out/__chunks__/chunk-43CV6VGD.mjs +0 -2
- package/out/__chunks__/chunk-43CV6VGD.mjs.map +0 -7
- package/out/__chunks__/chunk-45H34XLJ.mjs +0 -2
- package/out/__chunks__/chunk-4LEA6EXQ.mjs +0 -2
- package/out/__chunks__/chunk-4YIFSKYR.mjs +0 -2
- package/out/__chunks__/chunk-672ZNZKR.mjs +0 -2
- package/out/__chunks__/chunk-6746F2FY.mjs +0 -2
- package/out/__chunks__/chunk-6GNOK3TJ.mjs.map +0 -7
- package/out/__chunks__/chunk-7JA77EJQ.mjs +0 -2
- package/out/__chunks__/chunk-7JA77EJQ.mjs.map +0 -7
- package/out/__chunks__/chunk-7Q3M4L6V.mjs +0 -2
- package/out/__chunks__/chunk-7Q3M4L6V.mjs.map +0 -7
- package/out/__chunks__/chunk-7QCBLUWB.mjs +0 -2
- package/out/__chunks__/chunk-7QCBLUWB.mjs.map +0 -7
- package/out/__chunks__/chunk-7TOTBAGV.mjs +0 -2
- package/out/__chunks__/chunk-7TOTBAGV.mjs.map +0 -7
- package/out/__chunks__/chunk-AGI2ZR6R.mjs +0 -2
- package/out/__chunks__/chunk-AGI2ZR6R.mjs.map +0 -7
- package/out/__chunks__/chunk-AL42X4Q3.mjs +0 -2
- package/out/__chunks__/chunk-AL42X4Q3.mjs.map +0 -7
- package/out/__chunks__/chunk-ARD5PCMI.mjs +0 -2
- package/out/__chunks__/chunk-ARD5PCMI.mjs.map +0 -7
- package/out/__chunks__/chunk-B5IOGCMT.mjs +0 -2
- package/out/__chunks__/chunk-B5IOGCMT.mjs.map +0 -7
- package/out/__chunks__/chunk-BQL3NILA.mjs +0 -2
- package/out/__chunks__/chunk-BXKFACG5.mjs +0 -2
- package/out/__chunks__/chunk-BXUBAIBU.mjs +0 -2
- package/out/__chunks__/chunk-C3KLB5TA.mjs +0 -2
- package/out/__chunks__/chunk-C4CJSICS.mjs +0 -2
- package/out/__chunks__/chunk-C4CJSICS.mjs.map +0 -7
- package/out/__chunks__/chunk-CBIH5QMT.mjs +0 -2
- package/out/__chunks__/chunk-CQZVU4RB.mjs +0 -1
- package/out/__chunks__/chunk-DZ3UVNJK.mjs +0 -2
- package/out/__chunks__/chunk-DZ5L5MZT.mjs.map +0 -7
- package/out/__chunks__/chunk-EFVHT26M.mjs +0 -2
- package/out/__chunks__/chunk-EFVHT26M.mjs.map +0 -7
- package/out/__chunks__/chunk-EXLTOUB5.mjs +0 -2
- package/out/__chunks__/chunk-EXLTOUB5.mjs.map +0 -7
- package/out/__chunks__/chunk-FTFAEXVE.mjs +0 -2
- package/out/__chunks__/chunk-G57SJWVR.mjs +0 -1
- package/out/__chunks__/chunk-GAOXEYHA.mjs +0 -1
- package/out/__chunks__/chunk-GHDPXQZ5.mjs +0 -2
- package/out/__chunks__/chunk-GUG3HFGL.mjs +0 -2
- package/out/__chunks__/chunk-GUG3HFGL.mjs.map +0 -7
- package/out/__chunks__/chunk-GUHNF5RM.mjs +0 -2
- package/out/__chunks__/chunk-GUHNF5RM.mjs.map +0 -7
- package/out/__chunks__/chunk-HP5OTXWV.mjs +0 -2
- package/out/__chunks__/chunk-HP5OTXWV.mjs.map +0 -7
- package/out/__chunks__/chunk-IGA7KHXY.mjs +0 -2
- package/out/__chunks__/chunk-IGA7KHXY.mjs.map +0 -7
- package/out/__chunks__/chunk-JO3DZYEB.mjs +0 -2
- package/out/__chunks__/chunk-JR3FBBRR.mjs +0 -2
- package/out/__chunks__/chunk-JR3FBBRR.mjs.map +0 -7
- package/out/__chunks__/chunk-K3G3SPRT.mjs +0 -2
- package/out/__chunks__/chunk-KQ3I46X7.mjs +0 -2
- package/out/__chunks__/chunk-KQ3I46X7.mjs.map +0 -7
- package/out/__chunks__/chunk-MCOVQEK7.mjs +0 -2
- package/out/__chunks__/chunk-MCOVQEK7.mjs.map +0 -7
- package/out/__chunks__/chunk-O4J75OI6.mjs +0 -2
- package/out/__chunks__/chunk-O4J75OI6.mjs.map +0 -7
- package/out/__chunks__/chunk-OOJVPJOX.mjs +0 -1
- package/out/__chunks__/chunk-OTBTZ3NI.mjs +0 -2
- package/out/__chunks__/chunk-OYA4AQFY.mjs +0 -2
- package/out/__chunks__/chunk-OYA4AQFY.mjs.map +0 -7
- package/out/__chunks__/chunk-PLFZHJOX.mjs +0 -2
- package/out/__chunks__/chunk-PV5A7PX4.mjs +0 -2
- package/out/__chunks__/chunk-PVNL2LED.mjs +0 -1
- package/out/__chunks__/chunk-PVNL2LED.mjs.map +0 -7
- package/out/__chunks__/chunk-PVTRVIAK.mjs +0 -2
- package/out/__chunks__/chunk-QI2QMNTG.mjs +0 -2
- package/out/__chunks__/chunk-QI2QMNTG.mjs.map +0 -7
- package/out/__chunks__/chunk-RZ4YTKD7.mjs +0 -2
- package/out/__chunks__/chunk-RZ4YTKD7.mjs.map +0 -7
- package/out/__chunks__/chunk-SHNEF3SC.mjs +0 -2
- package/out/__chunks__/chunk-SHNEF3SC.mjs.map +0 -7
- package/out/__chunks__/chunk-THQWNWSE.mjs +0 -2
- package/out/__chunks__/chunk-THQWNWSE.mjs.map +0 -7
- package/out/__chunks__/chunk-TOGPOKIP.mjs +0 -2
- package/out/__chunks__/chunk-TOGPOKIP.mjs.map +0 -7
- package/out/__chunks__/chunk-U2TDLWBA.mjs +0 -2
- package/out/__chunks__/chunk-U5GPHLUX.mjs +0 -2
- package/out/__chunks__/chunk-U5GPHLUX.mjs.map +0 -7
- package/out/__chunks__/chunk-UBD2YVBI.mjs +0 -2
- package/out/__chunks__/chunk-UBD2YVBI.mjs.map +0 -7
- package/out/__chunks__/chunk-UFMHCVBL.mjs +0 -2
- package/out/__chunks__/chunk-VLHG5NVE.mjs +0 -2
- package/out/__chunks__/chunk-VLHG5NVE.mjs.map +0 -7
- package/out/__chunks__/chunk-W2WAVVF5.mjs +0 -2
- package/out/__chunks__/chunk-W2WAVVF5.mjs.map +0 -7
- package/out/__chunks__/chunk-WGOZYG4T.mjs +0 -2
- package/out/__chunks__/chunk-WTCFHVW3.mjs +0 -2
- package/out/__chunks__/chunk-WVTCO3AV.mjs +0 -2
- package/out/__chunks__/chunk-WVTCO3AV.mjs.map +0 -7
- package/out/__chunks__/chunk-WZNCESVG.mjs +0 -2
- package/out/__chunks__/chunk-WZNCESVG.mjs.map +0 -7
- package/out/__chunks__/chunk-XG2BS23C.mjs +0 -2
- package/out/__chunks__/chunk-XG2BS23C.mjs.map +0 -7
- package/out/__chunks__/chunk-XKBQDG5H.mjs +0 -1
- package/out/__chunks__/chunk-XKBQDG5H.mjs.map +0 -7
- package/out/__chunks__/chunk-XNEYOZ7M.mjs +0 -1
- package/out/__chunks__/chunk-XNEYOZ7M.mjs.map +0 -7
- package/out/__chunks__/chunk-YQTGKHGB.mjs +0 -2
- package/out/__chunks__/chunk-YVVDA6LN.mjs +0 -2
- package/out/__chunks__/chunk-ZC3TMTLB.mjs +0 -2
- package/out/__chunks__/chunk-ZC3TMTLB.mjs.map +0 -7
- package/out/managers/TransactionManager/helpers/getShardOfAddress.d.ts +0 -1
- package/out/managers/TransactionManager/helpers/getShardOfAddress.js +0 -38
- package/out/managers/TransactionManager/helpers/getShardOfAddress.js.map +0 -1
- package/out/managers/TransactionManager/helpers/getShardOfAddress.mjs +0 -2
- package/out/managers/TransactionManager/helpers/getShardOfAddress.mjs.map +0 -7
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.d.ts +0 -1
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.js +0 -19
- package/out/managers/TransactionManager/tests/getShardOfAddress.test.js.map +0 -1
- package/out/types/misc.types.d.ts +0 -1
- package/out/types/misc.types.js.map +0 -1
- package/out/types/misc.types.mjs +0 -2
- package/out/types/misc.types.mjs.map +0 -7
- /package/out/__chunks__/{chunk-IXJOO5U4.mjs.map → chunk-266T724O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7OTTISMZ.mjs.map → chunk-26XVDGTO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X2JK27T3.mjs.map → chunk-2FD2AMKA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XU34NXIS.mjs.map → chunk-2ONA7QPD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-675ZW4IF.mjs.map → chunk-2SOS3KAT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BXKFACG5.mjs.map → chunk-35XMV5ZL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UF45HLIK.mjs.map → chunk-3MWXXTQQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TLKMUVQJ.mjs.map → chunk-45WVS4H5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2HWIJ4CV.mjs.map → chunk-4OEPT2V4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AJEWAECH.mjs.map → chunk-66JBXP4O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6746F2FY.mjs.map → chunk-6DNPTAY5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PEDR76UT.mjs.map → chunk-72PZKSKF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TYYA6E7F.mjs.map → chunk-7BP53CXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M3C5NS6M.mjs.map → chunk-7ECP7Y7M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PPA7AFVD.mjs.map → chunk-7WTWD4TL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2AAKENSP.mjs.map → chunk-A5EXECZV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LETBBKOK.mjs.map → chunk-ASWTHX52.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PDT22D2C.mjs.map → chunk-AV4HSXYZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3OKWBJFM.mjs.map → chunk-B2RDSGON.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KMFYDHOY.mjs.map → chunk-BRBIUWAW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3NG7LKF4.mjs.map → chunk-BSWV5MEC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NCUYIZYI.mjs.map → chunk-BVYTCDU6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RNCF2III.mjs.map → chunk-C5TNEYN6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CBIH5QMT.mjs.map → chunk-C6E6XICI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SBQJGS63.mjs.map → chunk-CCDTUFFG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BQL3NILA.mjs.map → chunk-CNUQX7FI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NJ73RJ4B.mjs.map → chunk-CNWR7SER.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-672ZNZKR.mjs.map → chunk-DFNESXSW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SNKFFCSF.mjs.map → chunk-DHPD6E7P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M6ATGCOM.mjs.map → chunk-DNHKXKYY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4YIFSKYR.mjs.map → chunk-DT6YLEPL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OF6HBWFR.mjs.map → chunk-DV3XIKOX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LNABNVAO.mjs.map → chunk-EOX35D4L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BXUBAIBU.mjs.map → chunk-FEFZKA2B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I66YT2S2.mjs.map → chunk-FMUDQBZE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3IYQANTT.mjs.map → chunk-FUYWIC54.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FJIH6TWP.mjs.map → chunk-IJB6XDNR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WTCFHVW3.mjs.map → chunk-INBKWOKQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UYUKTC4X.mjs.map → chunk-IOE5AG2R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SF7XXVIO.mjs.map → chunk-ISPRIGOE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L2JWXTGG.mjs.map → chunk-J3YO25EK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ZDBHK76.mjs.map → chunk-JIJSBQEU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YQTGKHGB.mjs.map → chunk-JQU6F2FL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G2DLIXFQ.mjs.map → chunk-K3WBBSXJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OYZFSQEK.mjs.map → chunk-KPDCSGZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TAI3I5BS.mjs.map → chunk-KSKOSHYV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KJCZ5HAU.mjs.map → chunk-LM5SF2NG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JO3DZYEB.mjs.map → chunk-N5FYAXCA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PV6SFXA.mjs.map → chunk-NBDECUQ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FTFAEXVE.mjs.map → chunk-NO7YH2FT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WGOZYG4T.mjs.map → chunk-P5RR3CVM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W4GE4ZDP.mjs.map → chunk-PRULMJH7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HQJG7CFV.mjs.map → chunk-QAVA2C6Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LTF535HP.mjs.map → chunk-QJSB5NX4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WW4BBBLW.mjs.map → chunk-QKHHW26T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YRIDJGOK.mjs.map → chunk-QM67ZEC5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YAXVLGG3.mjs.map → chunk-QP2EL7IE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VIJUIJ4V.mjs.map → chunk-QSBLXZFC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YVD46DFI.mjs.map → chunk-RHFDU5Y4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5WVAF7RB.mjs.map → chunk-S5FDHOXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NM3KJ3EA.mjs.map → chunk-SH5S4RA4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7RX2A4WD.mjs.map → chunk-SJYCKFH4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C4CJOZ4L.mjs.map → chunk-SYQ7SILM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7YGJXJUC.mjs.map → chunk-TMP3REGQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PVTRVIAK.mjs.map → chunk-TR6FQZGE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CQZVU4RB.mjs.map → chunk-TRMQFQOQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LD4NALNZ.mjs.map → chunk-VCGAO6HH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QQ4OPT5A.mjs.map → chunk-VJ2DAL5M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PLFZHJOX.mjs.map → chunk-VSUCRJYB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G57SJWVR.mjs.map → chunk-WFAPPSOI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JXO7XRIR.mjs.map → chunk-XFZOOFY5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RVW2ZWCR.mjs.map → chunk-XHIIMAIQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JGULQG2H.mjs.map → chunk-XLHFU7XR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JTQCNFCR.mjs.map → chunk-YB7AHPBR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ENTPR3MV.mjs.map → chunk-YN5ARP6C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XO5D3FNU.mjs.map → chunk-YPCJBYUY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y3YLDFXK.mjs.map → chunk-YQ3LRPGM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MCZUQPRA.mjs.map → chunk-YTFYVPZO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-45H34XLJ.mjs.map → chunk-Z6R3RDWW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YPNKNMW5.mjs.map → chunk-ZEIGMAXW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4LEA6EXQ.mjs.map → chunk-ZEUNADU7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HC5QPKZT.mjs.map → chunk-ZHIYA3M7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-42KJRIAT.mjs.map → chunk-ZK5BKLTG.mjs.map} +0 -0
- /package/out/{__chunks__/chunk-GAOXEYHA.mjs.map → managers/TransactionManager/TransactionManager.types.mjs.map} +0 -0
- /package/out/{__chunks__/chunk-OOJVPJOX.mjs.map → types/suspiciousLink.types.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/internal/WalletConnectStateManager/WalletConnectStateManager.ts"],
|
|
4
|
+
"sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxWalletConnect } from 'lib/sdkDappUi';\nimport { UnlockPanelEventsEnum } from 'managers/UnlockPanelManager/UnlockPanelManager.types';\nimport {\n WalletConnectEventsEnum,\n IWalletConnectModalData\n} from 'providers/strategies/WalletConnectProviderStrategy/types/walletConnect.types';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\nexport class WalletConnectStateManager extends UIBaseManager<\n MvxWalletConnect,\n IWalletConnectModalData,\n WalletConnectEventsEnum\n> {\n private static instance: WalletConnectStateManager;\n\n protected initialData: IWalletConnectModalData = {\n wcURI: ''\n };\n\n public static getInstance(): WalletConnectStateManager {\n if (!WalletConnectStateManager.instance) {\n WalletConnectStateManager.instance = new WalletConnectStateManager();\n }\n return WalletConnectStateManager.instance;\n }\n\n constructor() {\n super({\n uiDataUpdateEvent: WalletConnectEventsEnum.DATA_UPDATE,\n uiTag: UITagsEnum.WALLET_CONNECT\n });\n this.data = { ...this.initialData };\n }\n\n public handleClose(options?: { isLoginFinished?: boolean }) {\n if (options?.isLoginFinished) {\n return;\n }\n\n if (this.anchor) {\n this.anchor.dispatchEvent(\n new CustomEvent(UnlockPanelEventsEnum.ANCHOR_CLOSE, {\n composed: false,\n bubbles: false\n })\n );\n } else {\n this.destroy();\n }\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(\n WalletConnectEventsEnum.CLOSE,\n this.handleClose.bind(this)\n );\n\n this.eventBus.subscribe(\n WalletConnectEventsEnum.UI_DISCONNECTED,\n this.destroy.bind(this)\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "yCASO,IAAMA,EAAN,MAAMC,UAAkCC,CAI7C,CAcA,aAAc,CACZ,MAAM,CACJ,gCACA,0BACF,CAAC,EAfH,KAAU,YAAuC,CAC/C,MAAO,EACT,EAcE,KAAK,KAAO,CAAE,GAAG,KAAK,WAAY,CACpC,CAbA,OAAc,aAAyC,CACrD,OAAKD,EAA0B,WAC7BA,EAA0B,SAAW,IAAIA,GAEpCA,EAA0B,QACnC,CAUO,YAAYE,EAAyC,CACtDA,GAAS,kBAIT,KAAK,OACP,KAAK,OAAO,cACV,IAAI,2BAAgD,CAClD,SAAU,GACV,QAAS,EACX,CAAC,CACH,EAEA,KAAK,QAAQ,EAEjB,CAEA,MAAgB,qBAAsB,CAC/B,KAAK,WAIV,KAAK,SAAS,kBAEZ,KAAK,YAAY,KAAK,IAAI,CAC5B,EAEA,KAAK,SAAS,4BAEZ,KAAK,QAAQ,KAAK,IAAI,CACxB,EACF,CACF",
|
|
6
|
+
"names": ["WalletConnectStateManager", "_WalletConnectStateManager", "UIBaseManager", "options"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-K3WBBSXJ.mjs";import{c as n}from"./chunk-DOUNJCQ4.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DFNESXSW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-FEFZKA2B.mjs";import{c as a}from"./chunk-TI37DKBT.mjs";import l from"bignumber.js";var o=!1;function u(e){try{let n=a(e.data).replace(`${e.action?.name}@`,""),r=new l(n,16);if(!r.isNaN())return t(r.toString(10))}catch{o||(console.error(`Unable to extract value for txHash: ${e.txHash}`),o=!0)}return t(e.value)}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DHPD6E7P.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as n}from"./chunk-J4CPYFK6.mjs";import l from"bignumber.js";var P=({amount:c,minimumPositiveDecimals:e})=>{let[i,t]=c.split("."),m=(t?t.split(""):[]).reduce((r,o,s)=>{let a=new l(r).isGreaterThan(n),u=s>e-1;return a&&u&&e>0?r:r.concat(o)},"");return m?`${i}.${m}`:i};export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DNHKXKYY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as a}from"./chunk-VNLGNNIL.mjs";import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-BTRCRGTK.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{a as T}from"./chunk-SUN3MVLZ.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
|
|
2
|
+
//# sourceMappingURL=chunk-DOUNJCQ4.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/store.ts", "../../src/store/middleware/logoutMiddleware.ts", "../../src/store/middleware/applyMiddlewares.ts", "../../src/store/actions/loginInfo/loginInfoActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport {\n networkSlice,\n accountSlice,\n loginInfoSlice,\n configSlice,\n toastSlice,\n cacheSlice,\n uiSlice\n} from './slices';\nimport { transactionsSlice } from './slices/transactions';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n )\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n return setDAppStore(createDAppStore(getStorageCallback));\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector,\n loginExpiresAtSelector\n} from 'store/selectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).hex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore);\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import {
|
|
5
|
-
"mappings": "wjBAAA,OAAS,qBAAAA,EAAmB,YAAAC,EAAU,WAAAC,MAAe,qBACrD,OAAS,SAAAC,MAAa,2BACtB,OAAS,eAAAC,MAAmB,kBCgBrB,IAAMC,EAAcC,GAAoC,CAC7DA,EAAM,QAAUC,EAChBD,EAAM,UAAYC,EAClBD,EAAM,aAAeC,EACrBD,EAAM,OAASC,CACjB,EAEO,SAASC,GAA8B,CAC5C,OAAO,IAAI,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,EAAI,EAAE,CACvD,CAEO,SAASC,EAAkBC,EAA0B,CAC1D,GAAIA,GAAa,KAAM,CACrBC,EAAqB,EACrB,MACF,CACAC,EAAkBF,CAAS,CAC7B,CAEO,IAAMG,EAAoBC,GAAqB,CACpD,IAAMC,EAAaC,EAAmBF,CAAK,EACrCG,EAAiBC,EAAuBJ,CAAK,EAC7C,CAAE,QAAAK,EAAS,UAAAC,CAAU,EAAIC,EAAoBP,CAAK,EAMxD,GAJIK,GAAWC,IAAc,IAAIE,EAAQH,CAAO,EAAE,IAAI,GACpDd,EAAWS,CAAK,EAGd,CAACC,EACH,OAGF,GAAIE,GAAkB,KAAM,CAC1BR,EAAkBD,EAA4B,CAAC,EAC/C,MACF,CAEA,IAAMe,EAAM,KAAK,IAAI,EACHN,EAAiBM,EAAM,IAIvCd,EAAkB,IAAI,EACtBe,EAAS,EAAE,SAASnB,CAAU,EAElC,EC5DO,IAAMoB,EAAmB,CAACC,EAAkBC,IAA0B,CAC3EC,EAAiBF,CAAK,CACxB,EF4BO,IAAMG,EAAmBC,GAAwC,CACtE,IAAMC,EAAQC,EACZC,EACEC,EACEC,EAAM,IAAIC,KAAU,CAClB,QAASC,EAAa,GAAGD,CAAI,EAC7B,QAASE,EAAa,GAAGF,CAAI,EAC7B,UAAWG,EAAe,GAAGH,CAAI,EACjC,OAAQI,EAAY,GAAGJ,CAAI,EAC3B,aAAcK,EAAkB,GAAGL,CAAI,EACvC,OAAQM,EAAW,GAAGN,CAAI,EAC1B,MAAOO,EAAW,GAAGP,CAAI,EACzB,GAAIQ,EAAQ,GAAGR,CAAI,CACrB,EAAE,EACF,CACE,KAAM,iBACN,QAASS,EAAkBf,CAAkB,CAC/C,CACF,CACF,CACF,EACA,OAAAC,EAAM,UAAUe,CAAgB,EACzBf,CACT,EAIIA,EAESgB,EAAgBC,GAAqB,CAChDjB,EAAQiB,CACV,EAEaC,EAAW,KACjBlB,GACHgB,EAAalB,EAAgB,IAAM,IAAIqB,CAAiB,CAAC,EAEpDnB,GAgBIoB,GAAY,CAACrB,EAAqBsB,IACtCL,EAAalB,EAAgBC,CAAkB,CAAC,EAG5CuB,GAAW,IAAMJ,EAAS,EAAE,SAAS,
|
|
4
|
+
"sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport {\n networkSlice,\n accountSlice,\n loginInfoSlice,\n configSlice,\n toastSlice,\n cacheSlice,\n uiSlice\n} from './slices';\nimport { transactionsSlice } from './slices/transactions';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n )\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n return setDAppStore(createDAppStore(getStorageCallback));\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector,\n loginExpiresAtSelector\n} from 'store/selectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).hex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore);\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport {\n LedgerLoginType,\n LoginInfoType,\n WalletConnectLoginType\n} from 'store/slices/loginInfo/loginInfo.types';\nimport { getStore } from 'store/store';\nimport { TokenLoginType } from 'types/login.types';\n\nexport const setProviderType = <T extends ProviderType = ProviderType>(\n providerType: T\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.providerType = providerType;\n },\n false,\n 'setProviderType'\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n 'setTokenLogin'\n );\n\nexport const setLoginToken = (loginToken: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state.tokenLogin != null) {\n state.tokenLogin.loginToken = loginToken;\n return;\n }\n state.tokenLogin = {\n loginToken\n };\n },\n false,\n 'setLoginToken'\n );\n\nexport const setTokenLoginSignature = (signature: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state?.tokenLogin != null) {\n state.tokenLogin.signature = signature;\n }\n },\n false,\n 'setTokenLoginSignature'\n );\n\nexport const setWalletLogin = (walletLogin: LoginInfoType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletLogin = walletLogin;\n },\n false,\n 'setWalletLogin'\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n 'setWalletConnectLogin'\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n 'setLedgerLogin'\n );\n\nexport const setLogoutRoute = (logoutRoute: string | undefined) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.logoutRoute = logoutRoute;\n },\n false,\n 'setLogoutRoute'\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n 'setIsWalletConnectV2Initialized'\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n 'removeLoginExpiresAt'\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n 'addLoginExpiresAt'\n );\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["createJSONStorage", "devtools", "persist", "immer", "createStore", "resetStore", "store", "initialState", "getNewLoginExpiresTimestamp", "setLoginExpiresAt", "expiresAt", "removeLoginExpiresAt", "addLoginExpiresAt", "logoutMiddleware", "state", "isLoggedIn", "isLoggedInSelector", "loginTimestamp", "loginExpiresAtSelector", "address", "publicKey", "accountInfoSelector", "Address", "now", "getStore", "applyMiddlewares", "state", "_prevState", "logoutMiddleware", "createDAppStore", "getStorageCallback", "store", "createStore", "devtools", "persist", "immer", "args", "networkSlice", "accountSlice", "loginInfoSlice", "configSlice", "transactionsSlice", "toastSlice", "cacheSlice", "uiSlice", "createJSONStorage", "applyMiddlewares", "setDAppStore", "_store", "getStore", "InMemoryStorage", "initStore", "defaultStorageCallback", "getState", "setProviderType", "providerType", "getStore", "state", "setTokenLogin", "tokenLogin", "setLoginToken", "loginToken", "setTokenLoginSignature", "signature", "setWalletLogin", "walletLogin", "setWalletConnectLogin", "walletConnectLogin", "setLedgerLogin", "ledgerLogin", "setLogoutRoute", "logoutRoute", "setIsWalletConnectV2Initialized", "isInitialized", "removeLoginExpiresAt", "addLoginExpiresAt", "expiresAt"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-2I4BJK55.mjs";import{c as o}from"./chunk-BSWV5MEC.mjs";var u=(r,s=1)=>r?.length?r.reduce((e,{receiver:a,data:i})=>{let n=o({receiver:a,data:i??""});return n==null?e:e&&t({receiverAddress:n,senderShard:s})},!0):!0;export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DT6YLEPL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-YGI3KXMZ.mjs";import{a as e,c as a,f as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-YGI3KXMZ.mjs";import{a as e,c as a,f as i}from"./chunk-J4CPYFK6.mjs";var m=({feeLimit:o,egldPriceInUsd:r,hideEqualSign:l})=>{let s=i({input:o,decimals:a,digits:e,showLastNonZeroDecimal:!0}),t=n({amount:s,usd:r,decimals:e});return l?t:`\u2248 ${t}`};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DV3XIKOX.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-LM5SF2NG.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EDSX3LFL.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.ts"],
|
|
4
|
+
"sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\n\nimport { MvxLedgerConnect } from 'lib/sdkDappUi';\nimport { UnlockPanelEventsEnum } from 'managers/UnlockPanelManager/UnlockPanelManager.types';\nimport {\n IAccountScreenData,\n ILedgerAccount,\n ILedgerConnectPanelData,\n IConnectScreenData,\n IConfirmScreenData\n} from 'providers/strategies/LedgerProviderStrategy/types/ledger.types';\nimport { LedgerConnectEventsEnum } from './types';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\ntype AuthEventsParams = {\n handleCancel: () => Promise<void>;\n handleAccessWallet: (payload: {\n addressIndex: number;\n selectedAddress: string;\n }) => Promise<void>;\n handleGoToPage: (page: number) => Promise<void>;\n};\n\ntype ProviderInitEventsParams = {\n handleRetry: () => void;\n handleCancel: () => void;\n};\n\nexport class LedgerConnectStateManager extends UIBaseManager<\n MvxLedgerConnect,\n ILedgerConnectPanelData,\n LedgerConnectEventsEnum\n> {\n private static instance: LedgerConnectStateManager;\n\n public static getInstance(): LedgerConnectStateManager {\n if (!LedgerConnectStateManager.instance) {\n LedgerConnectStateManager.instance = new LedgerConnectStateManager();\n }\n return LedgerConnectStateManager.instance;\n }\n\n public readonly addressesPerPage = 10;\n\n private allAccounts: ILedgerAccount[] = [];\n\n // first screen data\n private initialConnectScreenData: IConnectScreenData = {};\n private connectScreenData: IConnectScreenData = {\n ...this.initialConnectScreenData\n };\n\n // second screen data\n private initialAccountScreenData: IAccountScreenData = {\n accounts: this.allAccounts,\n startIndex: 0,\n addressesPerPage: this.addressesPerPage,\n isLoading: true\n };\n\n private accountScreenData: IAccountScreenData = {\n ...this.initialAccountScreenData\n };\n\n // third screen data\n private initialConfirmScreenData: IConfirmScreenData = {\n selectedAddress: '',\n explorerLink: ''\n };\n\n private confirmScreenData: IConfirmScreenData = {\n ...this.initialConfirmScreenData\n };\n\n protected initialData: ILedgerConnectPanelData = {\n connectScreenData: this.initialConnectScreenData,\n accountScreenData: this.initialAccountScreenData,\n confirmScreenData: this.initialConfirmScreenData\n };\n\n constructor() {\n super({\n uiDataUpdateEvent: LedgerConnectEventsEnum.DATA_UPDATE,\n uiTag: UITagsEnum.LEDGER_CONNECT\n });\n this.data = this.getInitialData();\n }\n\n public updateAllAccounts(accounts: ILedgerAccount[]): void {\n this.allAccounts = accounts;\n this.accountScreenData.accounts = accounts;\n }\n\n public updateStartIndex(startIndex: number): void {\n this.accountScreenData.startIndex = startIndex;\n }\n\n public updateConnectScreen(members: Partial<IConnectScreenData>): void {\n this.connectScreenData = {\n ...this.connectScreenData,\n ...members\n };\n\n this.data.confirmScreenData = null;\n this.data.accountScreenData = null;\n this.data.connectScreenData = this.connectScreenData;\n this.notifyDataUpdate();\n }\n\n public updateAccountScreen(members: Partial<IAccountScreenData>): void {\n this.accountScreenData = {\n ...this.accountScreenData,\n ...members\n };\n this.data.confirmScreenData = null;\n this.data.accountScreenData = this.accountScreenData;\n this.notifyDataUpdate();\n }\n\n public updateConfirmScreen(members: Partial<IConfirmScreenData>): void {\n this.confirmScreenData = {\n ...this.confirmScreenData,\n ...members\n };\n this.data.accountScreenData = null;\n this.data.confirmScreenData = this.confirmScreenData;\n this.notifyDataUpdate();\n }\n\n public getAccountScreenData(): IAccountScreenData | null {\n return this.data.accountScreenData;\n }\n\n public getConfirmScreenData(): IConfirmScreenData | null {\n return this.data.confirmScreenData;\n }\n\n public getAllAccounts(): ILedgerAccount[] {\n return this.allAccounts;\n }\n\n public subscribeToProviderInit({\n handleRetry,\n handleCancel\n }: ProviderInitEventsParams): void {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.CONNECT_DEVICE,\n handleRetry\n );\n this.eventBus.subscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.UI_DISCONNECTED,\n this.destroy.bind(this)\n );\n }\n\n public unsubscribeFromProviderInit({\n handleRetry,\n handleCancel\n }: ProviderInitEventsParams): void {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.CONNECT_DEVICE,\n handleRetry\n );\n this.eventBus.unsubscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.UI_DISCONNECTED,\n this.destroy.bind(this)\n );\n }\n\n public subscribeToAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n }: AuthEventsParams) {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.ACCESS_WALLET,\n handleAccessWallet\n );\n this.eventBus.subscribe(LedgerConnectEventsEnum.GO_TO_PAGE, handleGoToPage);\n }\n public unsubscribeFromAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n }: AuthEventsParams) {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.unsubscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.ACCESS_WALLET,\n handleAccessWallet\n );\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.GO_TO_PAGE,\n handleGoToPage\n );\n }\n\n public handleClose() {\n if (this.anchor) {\n this.anchor?.dispatchEvent(\n new CustomEvent(UnlockPanelEventsEnum.ANCHOR_CLOSE, {\n composed: false,\n bubbles: false\n })\n );\n } else {\n this.destroy();\n }\n }\n\n protected resetData(): void {\n this.accountScreenData = { ...this.initialAccountScreenData };\n this.confirmScreenData = { ...this.initialConfirmScreenData };\n this.connectScreenData = { ...this.initialConnectScreenData };\n super.resetData();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.CLOSE,\n this.handleClose.bind(this)\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["LedgerConnectStateManager", "_LedgerConnectStateManager", "UIBaseManager", "accounts", "startIndex", "members", "handleRetry", "handleCancel", "handleAccessWallet", "handleGoToPage"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as T}from"./chunk-HMHP5DPL.mjs";import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as T}from"./chunk-HMHP5DPL.mjs";import{a as u}from"./chunk-QSBLXZFC.mjs";import{a as d}from"./chunk-TX7PTLVP.mjs";import I from"lodash.startcase";import C from"lodash.uniq";var M=(e=>(e.mex="mex",e.stake="stake",e))(M||{}),R=({currentUserAddress:g,transaction:t,egldLabel:e,isPending:A=!1})=>{if(A)return{name:"Pending..."};let l={},y=Object.entries(T).reduce((s,[x,D])=>Object.assign(s,{[x]:D}),l),n=t.action,r=n&&n.arguments,i=n&&n.category?n.category:null,b=r&&n.name==="transfer",a=r&&Array.isArray(r.transfers)?r.transfers:[],c=a.map(s=>s.type),[m]=C(c),L=e??"EGLD",p=d({transaction:t,transferType:m,currentUserAddress:g}),E=u({allTransferTypes:c,transferType:m,transactionTransfers:a}),h=i&&["mex","stake"].includes(i),o=n&&h?n.description:void 0,f=t.function&&t.function!=="transfer"?y[t.function]??I(t.function):null;return b&&r?{name:`${p} ${E}`,description:o}:f?{name:f,description:o}:{name:`${p} ${L}`,description:o}};export{M as a,R as b};
|
|
2
|
+
//# sourceMappingURL=chunk-EOX35D4L.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{h}from"./chunk-
|
|
1
|
+
import{h}from"./chunk-OEPTRJEB.mjs";import{a as g}from"./chunk-HH5SA7BX.mjs";import{a as m,b as D}from"./chunk-WRLZ5ICK.mjs";import{a as f}from"./chunk-I3MK6KZJ.mjs";import{Address as V}from"@multiversx/sdk-core";import y from"bignumber.js";var x=e=>{let r=[];return e&&!m(e)&&r.push(`Invalid Hex characters on argument @${e}`),e&&!D(e)&&r.push(`Odd number of Hex characters on argument @${e}`),r},a=(e,r,n)=>{switch(r){case"text":try{return Buffer.from(e,"hex").toString("utf8")}catch{return e}case"decimal":return e!==""?new y(e,16).toString(10):"";case"smart":try{let t=V.newFromHex(e).toString();if(f(t))return t}catch{}try{let t=Buffer.from(e,"hex").toString("utf8");if(g(t))return t;{if(n&&[...n.esdts,...n.nfts].some(s=>t.includes(s)))return t;let i=new y(e,16);return i.isFinite()?i.toString(10):e}}catch{return e}case"raw":default:return e}},P=({parts:e,decodedParts:r,identifier:n})=>{let t=[...r];if(e[0]==="ESDTNFTTransfer"&&e[2]&&(t[2]=a(e[2],"decimal")),n==="ESDTNFTTransfer"&&e[1]){let i=Buffer.from(String(e[1]),"base64");t[1]=a(i.toString("hex"),"decimal")}return t},E=({parts:e,decodeMethod:r,identifier:n,decodedData:t})=>{let i=e.map((s,d)=>{if(e.length>=2&&(d===0&&s.length<64||d===1&&!e[0]))return/[^a-z0-9]/gi.test(s)?a(s,r):s;let c=x(s);return c?.length&&(t.validationWarnings=Array.from(new Set([...t.validationWarnings,...c]))),a(s,r)});return r==="smart"?P({parts:e,decodedParts:i,identifier:n}):i},T=({parts:e,decodeMethod:r,identifier:n,initialDecodedParts:t})=>r==="smart"?P({parts:e,decodedParts:t,identifier:n}):t,p=({data:e,identifier:r,decodeMethod:n,delimiter:t})=>{let i=e.split("@"),o=i.map(d=>a(d,n));return T({parts:i,initialDecodedParts:o,identifier:r,decodeMethod:n}).join(t)},H=({data:e,identifier:r,decodeMethod:n,highlight:t})=>{let i={displayValue:"",validationWarnings:[],highlight:t},o=e.includes("@"),s=e.includes(`
|
|
2
2
|
`);if(!o&&!s)return{...i,displayValue:a(e,n),highlight:t&&a(t,n)};if(o){let d=e.split("@"),c=E({parts:d,decodeMethod:n,identifier:r,decodedData:i}),l=t?p({data:t,identifier:r,decodeMethod:n,delimiter:"@"}):null;return{...i,displayValue:c.join("@"),highlight:l}}if(s){let d=e.split(`
|
|
3
3
|
`),c=d.map(u=>n==="raw"?u:a(Buffer.from(u,"base64").toString("hex"),n)),l=T({parts:d,initialDecodedParts:c,identifier:r,decodeMethod:n}),S=t?p({data:t,identifier:r,decodeMethod:n,delimiter:`
|
|
4
4
|
`}):null;return{...i,displayValue:l.join(`
|
|
5
5
|
`),highlight:S}}return i},k=({data:e,highlight:r,identifier:n})=>{let t={};return Object.values(h).forEach(i=>{let o=H({data:e,identifier:n,decodeMethod:i,highlight:r});t[i]=o}),t};export{k as a};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-FMUDQBZE.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-445MWKMT.mjs";import{a as t}from"./chunk-NHXPNROG.mjs";import{b as e}from"./chunk-KRBUXJ6B.mjs";import{WebviewProvider as n}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var s=class extends o{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=n.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return t.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(e);return this.address&&this.setAccount({address:this.address}),r}};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FPHLXGAT.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.ts"],
|
|
4
|
+
"sourcesContent": ["import { WebviewProvider } from '@multiversx/sdk-webview-provider/out/WebviewProvider';\nimport { version } from 'constants/window.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\n\ntype WebviewProviderProps = {\n address?: string;\n};\n\nexport class WebviewProviderStrategy extends BaseProviderStrategy {\n private readonly provider: WebviewProvider;\n\n constructor(config?: WebviewProviderProps) {\n super(config?.address);\n this.provider = WebviewProvider.getInstance();\n this._login = this.provider.login.bind(this.provider);\n }\n\n async init(): Promise<boolean> {\n this.initializeAddress();\n return this.initializeProvider();\n }\n\n logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.webview;\n }\n\n getAddress(): Promise<string | undefined> {\n throw new Error('Method not implemented.');\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider.setAccount(account);\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n private async initializeProvider() {\n const isInitialized = await this.provider.init(version);\n\n if (this.address) {\n this.setAccount({ address: this.address });\n }\n\n return isInitialized;\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (transactions: Transaction[]) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedTransactions =\n await this.provider.signTransactions(transactions);\n return signedTransactions || [];\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedMessage = await this.provider.signMessage(message);\n return signedMessage;\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n}\n"],
|
|
5
|
+
"mappings": "2HAAA,OAAS,mBAAAA,MAAuB,uDAezB,IAAMC,EAAN,cAAsCC,CAAqB,CAGhE,YAAYC,EAA+B,CACzC,MAAMA,GAAQ,OAAO,EAwCvB,kBAAe,SAAY,CACzB,KAAK,SAAS,aAAa,CAC7B,EAEA,sBAAmB,MAAOC,GAAgC,CACxD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAGF,OADE,MAAM,KAAK,SAAS,iBAAiBA,CAAY,GACtB,CAAC,CAChC,OAASC,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EAEA,iBAAc,MAAOC,GAAqB,CACxC,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAEF,OADsB,MAAM,KAAK,SAAS,YAAYA,CAAO,CAE/D,OAASD,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EAtEE,KAAK,SAAWE,EAAgB,YAAY,EAC5C,KAAK,OAAS,KAAK,SAAS,MAAM,KAAK,KAAK,QAAQ,CACtD,CAEA,MAAM,MAAyB,CAC7B,YAAK,kBAAkB,EAChB,KAAK,mBAAmB,CACjC,CAEA,QAA2B,CACzB,OAAO,KAAK,SAAS,OAAO,CAC9B,CAEA,SAAwB,CACtB,OAAOC,EAAiB,OAC1B,CAEA,YAA0C,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,WAAWC,EAAqC,CAC9C,OAAO,KAAK,SAAS,WAAWA,CAAO,CACzC,CAEA,eAAyB,CACvB,OAAO,KAAK,SAAS,cAAc,CACrC,CAEA,MAAc,oBAAqB,CACjC,IAAMC,EAAgB,MAAM,KAAK,SAAS,KAAKC,CAAO,EAEtD,OAAI,KAAK,SACP,KAAK,WAAW,CAAE,QAAS,KAAK,OAAQ,CAAC,EAGpCD,CACT,CAkCF",
|
|
6
|
+
"names": ["WebviewProvider", "WebviewProviderStrategy", "BaseProviderStrategy", "config", "transactions", "error", "message", "WebviewProvider", "ProviderTypeEnum", "account", "isInitialized", "version"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-DOUNJCQ4.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FUYWIC54.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S}from"./chunk-TR6FQZGE.mjs";import{a as f}from"./chunk-EAJBSX6Y.mjs";import{a as y}from"./chunk-Y3BNMQFP.mjs";import{g as l}from"./chunk-P2C5G6H6.mjs";import{h as u}from"./chunk-QD3CFFVT.mjs";import{a as g}from"./chunk-C6E6XICI.mjs";import{a as m}from"./chunk-X7NCYKWT.mjs";import{a as T}from"./chunk-L3MWDI6J.mjs";import{u as p}from"./chunk-DOUNJCQ4.mjs";import{b as c}from"./chunk-SAAOQW7P.mjs";import{e as d}from"./chunk-R53MCZI6.mjs";import h from"axios";var r=class r{constructor(){this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!f(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(i=>({...i,status:i.status??"pending"})),e=T(n),o=m({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:e??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return o;let s=S(a);return l({toastId:o,totalDuration:s}),o};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=c(p()),e=a.map(s=>h.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}));return(await Promise.all(e)).map(({data:s})=>({...s,status:"pending",hash:s.txHash}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=g(),{apiAddress:n,apiTimeout:e}=c(p());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let o=this.buildBatchId(t),i={transactions:a.map(A=>A.map(w=>this.parseSignedTransaction(w))),id:o},{data:b}=await h.post(`${n}/batch`,i,{timeout:Number(e)});return{data:b}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t));this.parseSignedTransaction=a=>{let t=new d,n={...a.toPlainObject(),hash:t.computeTransactionHash(a),status:"pending"};return y({data:n.data})&&(delete n.senderUsername,delete n.receiverUsername),n}}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var I=r;export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HEKAFHIA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/TransactionManager/TransactionManager.ts"],
|
|
4
|
+
"sourcesContent": ["import axios, { AxiosError } from 'axios';\nimport { BATCH_TRANSACTIONS_ID_SEPARATOR } from 'constants/transactions.constants';\nimport { Transaction, TransactionComputer } from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport { addTransactionToast } from 'store/actions/toasts/toastsActions';\nimport { createTransactionsSession } from 'store/actions/transactions/transactionsActions';\nimport { networkSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { BatchTransactionsResponseType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { isGuardianTx } from 'utils/transactions/isGuardianTx';\nimport { getToastDuration } from './helpers/getToastDuration';\nimport { getTransactionsSessionStatus } from './helpers/getTransactionsStatus';\nimport { isBatchTransaction } from './helpers/isBatchTransaction';\nimport { TransactionManagerTrackOptionsType } from './TransactionManager.types';\n\nexport class TransactionManager {\n private static instance: TransactionManager | null = null;\n\n public static getInstance(): TransactionManager {\n if (!TransactionManager.instance) {\n TransactionManager.instance = new TransactionManager();\n }\n return TransactionManager.instance;\n }\n\n public send = async (\n signedTransactions: Transaction[] | Transaction[][]\n ): Promise<SignedTransactionType[] | SignedTransactionType[][]> => {\n if (signedTransactions.length === 0) {\n throw new Error('No transactions to send');\n }\n\n try {\n if (!isBatchTransaction(signedTransactions)) {\n const flatTransactions =\n await this.sendSignedTransactions(signedTransactions);\n\n return flatTransactions;\n }\n\n const sentTransactions =\n await this.sendSignedBatchTransactions(signedTransactions);\n\n if (!sentTransactions.data || sentTransactions.data.error) {\n throw new Error(\n sentTransactions.data?.error ?? 'Failed to send transactions'\n );\n }\n\n const groupedTransactions = sentTransactions.data.transactions;\n\n return groupedTransactions;\n } catch (error) {\n const responseData = <{ message: string }>(\n (error as AxiosError).response?.data\n );\n throw responseData?.message ?? (error as any).message;\n }\n };\n\n public track = async (\n sentTransactions: SignedTransactionType[] | SignedTransactionType[][],\n options: TransactionManagerTrackOptionsType = { disableToasts: false }\n ): Promise<string> => {\n const flatTransactions = this.sequentialToFlatArray(sentTransactions).map(\n (transaction) => ({\n ...transaction,\n status: transaction.status ?? TransactionServerStatusesEnum.pending\n })\n );\n\n const status = getTransactionsSessionStatus(flatTransactions);\n\n const sessionId = createTransactionsSession({\n transactions: flatTransactions,\n transactionsDisplayInfo: options.transactionsDisplayInfo,\n status: status ?? TransactionBatchStatusesEnum.sent,\n sessionInformation: options.sessionInformation\n });\n\n if (options.disableToasts === true) {\n return sessionId;\n }\n\n const totalDuration = getToastDuration(sentTransactions);\n addTransactionToast({\n toastId: sessionId,\n totalDuration\n });\n\n return sessionId;\n };\n\n private readonly sendSignedTransactions = async (\n signedTransactions: Transaction[]\n ): Promise<SignedTransactionType[]> => {\n const { apiAddress, apiTimeout } = networkSelector(getState());\n\n const promises = signedTransactions.map((transaction) =>\n axios.post(`${apiAddress}/transactions`, transaction.toPlainObject(), {\n timeout: Number(apiTimeout)\n })\n );\n\n const response = await Promise.all(promises);\n\n return response.map(({ data }) => ({\n ...data,\n status: TransactionServerStatusesEnum.pending,\n hash: data.txHash\n }));\n };\n\n private readonly sendSignedBatchTransactions = async (\n signedTransactions: Transaction[][]\n ) => {\n const { address } = getAccount();\n const { apiAddress, apiTimeout } = networkSelector(getState());\n\n if (!address) {\n return {\n error:\n 'Invalid address provided. You need to be logged in to send transactions'\n };\n }\n\n const batchId = this.buildBatchId(address);\n const parsedTransactions = signedTransactions.map((transactions) =>\n transactions.map((transaction) =>\n this.parseSignedTransaction(transaction)\n )\n );\n\n const payload = {\n transactions: parsedTransactions,\n id: batchId\n };\n\n const { data } = await axios.post<BatchTransactionsResponseType>(\n `${apiAddress}/batch`,\n payload,\n {\n timeout: Number(apiTimeout)\n }\n );\n\n return { data };\n };\n\n private readonly buildBatchId = (address: string) => {\n const sessionId = Date.now().toString();\n return `${sessionId}${BATCH_TRANSACTIONS_ID_SEPARATOR}${address}`;\n };\n private readonly sequentialToFlatArray = (\n transactions: SignedTransactionType[] | SignedTransactionType[][] = []\n ) =>\n this.getIsSequential(transactions)\n ? transactions.flat()\n : (transactions as SignedTransactionType[]);\n\n private readonly getIsSequential = (\n transactions?: SignedTransactionType[] | SignedTransactionType[][]\n ) => transactions?.every((transaction) => Array.isArray(transaction));\n\n private readonly parseSignedTransaction = (\n signedTransaction: Transaction\n ): SignedTransactionType => {\n const transactionComputer = new TransactionComputer();\n\n const parsedTransaction = {\n ...signedTransaction.toPlainObject(),\n hash: transactionComputer.computeTransactionHash(signedTransaction),\n status: TransactionServerStatusesEnum.pending\n };\n\n // Remove when the protocol supports usernames for guardian transactions\n if (isGuardianTx({ data: parsedTransaction.data })) {\n delete parsedTransaction.senderUsername;\n delete parsedTransaction.receiverUsername;\n }\n\n return parsedTransaction;\n };\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["axios", "_TransactionManager", "signedTransactions", "isBatchTransaction", "sentTransactions", "error", "options", "flatTransactions", "transaction", "status", "getTransactionsSessionStatus", "sessionId", "createTransactionsSession", "totalDuration", "getToastDuration", "addTransactionToast", "apiAddress", "apiTimeout", "networkSelector", "getState", "promises", "axios", "data", "address", "getAccount", "batchId", "payload", "transactions", "BATCH_TRANSACTIONS_ID_SEPARATOR", "signedTransaction", "transactionComputer", "TransactionComputer", "parsedTransaction", "isGuardianTx", "TransactionManager"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-NHXPNROG.mjs";var s={[e.crossWindow]:"MultiversX Web Wallet",[e.extension]:"MultiversX Wallet Extension",[e.walletConnect]:"xPortal App",[e.ledger]:"Ledger",[e.metamask]:"MetaMask Snap",[e.passkey]:"Passkey",[e.webview]:"Webview",[e.none]:""};export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-I7ODJJY3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants/providerFactory.constants.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\n\nexport const providerLabels: Record<ProviderType, string> = {\n [ProviderTypeEnum.crossWindow]: 'MultiversX Web Wallet',\n [ProviderTypeEnum.extension]: 'MultiversX Wallet Extension',\n [ProviderTypeEnum.walletConnect]: 'xPortal App',\n [ProviderTypeEnum.ledger]: 'Ledger',\n [ProviderTypeEnum.metamask]: 'MetaMask Snap',\n [ProviderTypeEnum.passkey]: 'Passkey',\n [ProviderTypeEnum.webview]: 'Webview',\n [ProviderTypeEnum.none]: ''\n};\n"],
|
|
5
|
+
"mappings": "yCAKO,IAAMA,EAA+C,CAC1D,CAACC,EAAiB,WAAW,EAAG,wBAChC,CAACA,EAAiB,SAAS,EAAG,8BAC9B,CAACA,EAAiB,aAAa,EAAG,cAClC,CAACA,EAAiB,MAAM,EAAG,SAC3B,CAACA,EAAiB,QAAQ,EAAG,gBAC7B,CAACA,EAAiB,OAAO,EAAG,UAC5B,CAACA,EAAiB,OAAO,EAAG,UAC5B,CAACA,EAAiB,IAAI,EAAG,EAC3B",
|
|
6
|
+
"names": ["providerLabels", "ProviderTypeEnum"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-FFNSZC37.mjs";import{a as i}from"./chunk-NHXPNROG.mjs";var p=t=>(Object.values(i).forEach(r=>{if(r!==t?.skipLoginMethod)switch(r){case i.crossWindow:{let e=o.getInstance();e.isInitialized()&&e.dispose();break}case i.metamask:case i.passkey:{let e=s.getInstance();e.isInitialized()&&e.dispose();break}default:break}}),null);export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IEJARRBP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/helpers/clearInitiatedLogins.ts"],
|
|
4
|
+
"sourcesContent": ["import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { IframeProvider } from 'lib/sdkWebWalletIframeProvider';\nimport { ProviderTypeEnum, ProviderType } from '../types/providerFactory.types';\n\nexport const clearInitiatedLogins = (\n props?: {\n skipLoginMethod: ProviderType;\n } | null\n) => {\n Object.values(ProviderTypeEnum).forEach((method) => {\n if (method === props?.skipLoginMethod) {\n return;\n }\n\n switch (method) {\n case ProviderTypeEnum.crossWindow: {\n const crossWindowProvider = CrossWindowProvider.getInstance();\n if (crossWindowProvider.isInitialized()) {\n crossWindowProvider.dispose();\n }\n break;\n }\n\n case ProviderTypeEnum.metamask:\n case ProviderTypeEnum.passkey: {\n const iframeProvider = IframeProvider.getInstance();\n if (iframeProvider.isInitialized()) {\n iframeProvider.dispose();\n }\n break;\n }\n\n default:\n break;\n }\n });\n\n return null;\n};\n"],
|
|
5
|
+
"mappings": "2HAIO,IAAMA,EACXC,IAIA,OAAO,OAAOC,CAAgB,EAAE,QAASC,GAAW,CAClD,GAAIA,IAAWF,GAAO,gBAItB,OAAQE,EAAQ,CACd,KAAKD,EAAiB,YAAa,CACjC,IAAME,EAAsBC,EAAoB,YAAY,EACxDD,EAAoB,cAAc,GACpCA,EAAoB,QAAQ,EAE9B,KACF,CAEA,KAAKF,EAAiB,SACtB,KAAKA,EAAiB,QAAS,CAC7B,IAAMI,EAAiBC,EAAe,YAAY,EAC9CD,EAAe,cAAc,GAC/BA,EAAe,QAAQ,EAEzB,KACF,CAEA,QACE,KACJ,CACF,CAAC,EAEM",
|
|
6
|
+
"names": ["clearInitiatedLogins", "props", "ProviderTypeEnum", "method", "crossWindowProvider", "CrossWindowProvider", "iframeProvider", "IframeProvider"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-CNUQX7FI.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{p as c}from"./chunk-P2C5G6H6.mjs";import{u as n}from"./chunk-DOUNJCQ4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IJB6XDNR.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-KRBUXJ6B.mjs";var E=async({name:t,anchor:o})=>{if(await m(e),!e.document)return{};let n=e.document.createElement(t);return(o||e.document.body).appendChild(n),await customElements.whenDefined(t),n};export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-INBKWOKQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-DOUNJCQ4.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-IOE5AG2R.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-54B3EIZC.mjs";import{a as T}from"./chunk-QJ7MRSGB.mjs";import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-54B3EIZC.mjs";import{a as T}from"./chunk-QJ7MRSGB.mjs";import{a as e}from"./chunk-BSWV5MEC.mjs";var C=({receiver:n,sender:a,senderAssets:l,receiverAssets:u,transactionAssets:s,showDefaultState:f=!1,status:r})=>{let i=n===a,I=i?e(a):e(n),g=T({senderAssets:l,receiverAssets:u,userIsReceiver:i}),[t]=s??[],p=s.length>1,S=t?.type==="NonFungibleESDT",o=t?.type==="SemiFungibleESDT",A=s?.every(d=>t&&d.assetTicker===t.assetTicker)??!1,F=m(r),c=r==="pending";return(c||F)&&!f?{icon:c?"faHourglass":"faTimes"}:p&&!A?{icon:"faCoins"}:t?.assetImage?{imageUrl:t.assetImage}:S||o?{text:o?"sft":"nft"}:I?{imageUrl:g||void 0}:null};export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ISPRIGOE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-DOUNJCQ4.mjs";import{e as a}from"./chunk-QJSB5NX4.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IWB45745.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/account/getLatestNonce.ts"],
|
|
4
|
+
"sourcesContent": ["import { accountNonceSelector } from '../../store/selectors/accountSelectors';\nimport { transactionsSliceSelector } from '../../store/selectors/transactionsSelector';\nimport { getState } from '../../store/store';\nimport { AccountType } from '../../types/account.types';\n\nexport function getLatestNonce(apiAccount: AccountType | null) {\n const state = getState();\n const transactionsSessions = transactionsSliceSelector(state);\n const currentAccountNonce = accountNonceSelector(state);\n\n // Get the max transactions nonce\n let lastTransactionNonce = Object.keys(transactionsSessions)\n .map(Number) // Convert keys to numbers (timestamps)\n .reduce((maxNonce, timestamp) => {\n const transactions = transactionsSessions[timestamp]?.transactions || [];\n return Math.max(maxNonce, ...transactions.map((tx) => tx.nonce), 0);\n }, 0);\n\n if (lastTransactionNonce > 0) {\n lastTransactionNonce += 1; // Increment only if there's at least one pending transaction\n }\n\n if (apiAccount == null) {\n const currentStoreNonce = Math.max(\n lastTransactionNonce,\n currentAccountNonce\n );\n return currentStoreNonce;\n }\n\n const currentNonce = Math.max(\n lastTransactionNonce || apiAccount.nonce,\n currentAccountNonce\n );\n\n return currentNonce;\n}\n"],
|
|
5
|
+
"mappings": "2HAKO,SAASA,EAAeC,EAAgC,CAC7D,IAAMC,EAAQC,EAAS,EACjBC,EAAuBC,EAA0BH,CAAK,EACtDI,EAAsBC,EAAqBL,CAAK,EAGlDM,EAAuB,OAAO,KAAKJ,CAAoB,EACxD,IAAI,MAAM,EACV,OAAO,CAACK,EAAUC,IAAc,CAC/B,IAAMC,EAAeP,EAAqBM,CAAS,GAAG,cAAgB,CAAC,EACvE,OAAO,KAAK,IAAID,EAAU,GAAGE,EAAa,IAAKC,GAAOA,EAAG,KAAK,EAAG,CAAC,CACpE,EAAG,CAAC,EAMN,OAJIJ,EAAuB,IACzBA,GAAwB,GAGtBP,GAAc,KACU,KAAK,IAC7BO,EACAF,CACF,EAImB,KAAK,IACxBE,GAAwBP,EAAW,MACnCK,CACF,CAGF",
|
|
6
|
+
"names": ["getLatestNonce", "apiAccount", "state", "getState", "transactionsSessions", "transactionsSliceSelector", "currentAccountNonce", "accountNonceSelector", "lastTransactionNonce", "maxNonce", "timestamp", "transactions", "tx"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-72PZKSKF.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J3YO25EK.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DIGITS as t,ZERO as e,DECIMALS as p}from"@multiversx/sdk-dapp-utils/out/constants";import{stringIsInteger as s}from"@multiversx/sdk-dapp-utils/out/helpers/stringIsInteger";import{stringIsFloat as d}from"@multiversx/sdk-dapp-utils/out/helpers/stringIsFloat";import{formatAmount as I,FormatAmountPropsType as a}from"@multiversx/sdk-dapp-utils/out/helpers/formatAmount";import{recommendGasPrice as x}from"@multiversx/sdk-dapp-utils/out/helpers/recommendGasPrice";export{t as a,e as b,p as c,s as d,d as e,I as f,a as g,x as h};
|
|
2
|
+
//# sourceMappingURL=chunk-J4CPYFK6.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/sdkDappUtils.ts"],
|
|
4
|
-
"sourcesContent": ["export {\n DIGITS,\n ZERO,\n DECIMALS\n} from '@multiversx/sdk-dapp-utils/out/constants';\nexport { stringIsInteger } from '@multiversx/sdk-dapp-utils/out/helpers/stringIsInteger';\nexport { stringIsFloat } from '@multiversx/sdk-dapp-utils/out/helpers/stringIsFloat';\nexport {\n formatAmount,\n FormatAmountPropsType\n} from '@multiversx/sdk-dapp-utils/out/helpers/formatAmount';\nexport { recommendGasPrice } from '@multiversx/sdk-dapp-utils/out/helpers/recommendGasPrice';\nexport type {
|
|
4
|
+
"sourcesContent": ["export {\n DIGITS,\n ZERO,\n DECIMALS\n} from '@multiversx/sdk-dapp-utils/out/constants';\nexport { stringIsInteger } from '@multiversx/sdk-dapp-utils/out/helpers/stringIsInteger';\nexport { stringIsFloat } from '@multiversx/sdk-dapp-utils/out/helpers/stringIsFloat';\nexport {\n formatAmount,\n FormatAmountPropsType\n} from '@multiversx/sdk-dapp-utils/out/helpers/formatAmount';\nexport { recommendGasPrice } from '@multiversx/sdk-dapp-utils/out/helpers/recommendGasPrice';\nexport type {\n IDAppProviderOptions,\n IDAppProviderAccount\n} from '@multiversx/sdk-dapp-utils/out/models/dappProviderBase';\n"],
|
|
5
5
|
"mappings": "AAAA,OACE,UAAAA,EACA,QAAAC,EACA,YAAAC,MACK,2CACP,OAAS,mBAAAC,MAAuB,yDAChC,OAAS,iBAAAC,MAAqB,uDAC9B,OACE,gBAAAC,EACA,yBAAAC,MACK,sDACP,OAAS,qBAAAC,MAAyB",
|
|
6
6
|
"names": ["DIGITS", "ZERO", "DECIMALS", "stringIsInteger", "stringIsFloat", "formatAmount", "FormatAmountPropsType", "recommendGasPrice"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as l}from"./chunk-J4CPYFK6.mjs";import{a as m}from"./chunk-DBIIY2TX.mjs";function g({token:t,noValue:n,showLastNonZeroDecimal:i}){let o=!n&&t.value&&t.type!=="NonFungibleESDT",r=t.decimals!=null,e="";t.type==="NonFungibleESDT"&&(e="NFT"),t.type==="SemiFungibleESDT"&&(e="SFT"),t.type==="MetaESDT"&&(e="Meta-ESDT");let a="";o&&r&&(a=r?l({input:t.value,decimals:t.decimals,digits:2,showLastNonZeroDecimal:i}):Number(t.value).toLocaleString("en"));let T=m.nftDetails(String(t.identifier)),c=t.ticker===t.collection?t.identifier??t.ticker:t.ticker;return{badgeText:e,tokenFormattedAmount:o?a:null,tokenExplorerLink:T,tokenLinkText:c,token:t,noValue:n,showLastNonZeroDecimal:i}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JIJSBQEU.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/network/getNetworkConfig.ts"],
|
|
4
|
+
"sourcesContent": ["import { networkConfigSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\n\nexport function getNetworkConfig(state = getState()) {\n return networkConfigSelector(state);\n}\n"],
|
|
5
|
+
"mappings": "kFAGO,SAASA,EAAiBC,EAAQC,EAAS,EAAG,CACnD,OAAOC,EAAsBF,CAAK,CACpC",
|
|
6
|
+
"names": ["getNetworkConfig", "state", "getState", "networkConfigSelector"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as s}from"./chunk-XOJHIJKX.mjs";import{a as p}from"./chunk-NBDECUQ3.mjs";import{u as c}from"./chunk-DOUNJCQ4.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-I7ODJJY3.mjs";import{a}from"./chunk-NHXPNROG.mjs";var n=class n extends p{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&n.onClose&&n.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!n.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(n.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),n.loginHandler()):n.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(r){console.error(r),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,r=[...Object.values(a).filter(i=>i!==a.none&&i!==a.webview),...e.map(i=>i.type)],P=e.reduce((i,t)=>(i[t.type]=t.name,i),{}),l={...v,...P};return(n.allowedProviders?n?.allowedProviders.map(i=>i.type).filter(i=>r.includes(i)):r).map(i=>{let t=e.find(g=>g.type===i);return t||{name:i in l?l[i]:i,type:i}})}};n.loginHandler=null,n.onClose=null,n.allowedProviders=null;var u=n;export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JQEKTKZR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/UnlockPanelManager/UnlockPanelManager.ts"],
|
|
4
|
+
"sourcesContent": ["import { providerLabels } from 'constants/providerFactory.constants';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxUnlockPanel } from 'lib/sdkDappUi';\nimport { ProviderFactory } from 'providers/ProviderFactory';\nimport {\n IProviderBase,\n IProviderFactory,\n ICustomProvider,\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport {\n OnCloseUnlockPanelType,\n LoginHandlerType,\n UnlockPanelEventsEnum,\n UnlockPanelManagerInitParamsType\n} from './UnlockPanelManager.types';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager';\n\ninterface IUnlockPanelManagerData {\n providers: IProviderBase[] | null;\n walletAddress: string | null;\n}\n\nexport class UnlockPanelManager extends SidePanelBaseManager<\n MvxUnlockPanel,\n IUnlockPanelManagerData,\n UnlockPanelEventsEnum\n> {\n protected initialData: IUnlockPanelManagerData = {\n providers: null,\n walletAddress: null\n };\n\n private static instance: UnlockPanelManager;\n private static loginHandler: LoginHandlerType | null = null;\n private static onClose: OnCloseUnlockPanelType | null = null;\n private static allowedProviders?: ICustomProvider[] | null = null;\n\n constructor() {\n super({\n uiTag: UITagsEnum.UNLOCK_PANEL,\n uiDataUpdateEvent: UnlockPanelEventsEnum.OPEN\n });\n\n this.data = this.initialData;\n }\n\n public static getInstance(): UnlockPanelManager {\n if (!UnlockPanelManager.instance) {\n UnlockPanelManager.instance = new UnlockPanelManager();\n }\n return UnlockPanelManager.instance;\n }\n\n public static init(params: UnlockPanelManagerInitParamsType) {\n this.loginHandler = params.loginHandler;\n this.allowedProviders = params.allowedProviders;\n\n if (params.onClose) {\n this.onClose = params.onClose;\n }\n\n return this.getInstance();\n }\n\n public openUnlockPanel = async () => {\n const { walletAddress } = networkSelector(getState());\n\n this.data = {\n providers: this.getProvidersList(),\n walletAddress\n };\n\n await this.openUI();\n this.notifyDataUpdate();\n };\n\n protected setupEventListeners = async () => {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(UnlockPanelEventsEnum.LOGIN, this.handleLogin);\n this.subscribeToEventBus(\n UnlockPanelEventsEnum.CANCEL_LOGIN,\n this.handleCancelLogin\n );\n this.subscribeToEventBus(UnlockPanelEventsEnum.CLOSE, this.handleCloseUI);\n };\n\n private readonly handleCloseUI = async (options?: {\n isLoginFinished?: boolean;\n }) => {\n if (!options?.isLoginFinished && UnlockPanelManager.onClose) {\n UnlockPanelManager.onClose();\n }\n\n this.closeUI();\n };\n\n private readonly handleLogin = async ({ type, anchor }: IProviderFactory) => {\n if (!UnlockPanelManager.loginHandler) {\n throw new Error(\n 'Login callback not initialized. Please call `init()` first.'\n );\n }\n\n try {\n if (this.isSimpleLoginCallback(UnlockPanelManager.loginHandler)) {\n const provider = await ProviderFactory.create({ type, anchor });\n await provider.login();\n UnlockPanelManager.loginHandler();\n } else {\n UnlockPanelManager.loginHandler({ type, anchor });\n }\n await this.handleCloseUI({ isLoginFinished: true });\n } catch (error) {\n console.error(error);\n this.eventBus?.publish(\n UnlockPanelEventsEnum.CANCEL_IN_PROVIDER,\n this.data\n );\n }\n };\n\n private readonly handleCancelLogin = async () => {\n await ProviderFactory.destroy();\n };\n\n private readonly isSimpleLoginCallback = (\n login: LoginHandlerType\n ): login is () => void => {\n const takesZeroArguments = login.length === 0;\n return takesZeroArguments;\n };\n\n private getProvidersList(): IProviderBase[] {\n const customProviders = ProviderFactory.customProviders;\n\n const defaultProviderTypes = Object.values(ProviderTypeEnum).filter(\n (type) =>\n type !== ProviderTypeEnum.none && type !== ProviderTypeEnum.webview\n );\n\n const allAvailableProviderTypes = [\n ...defaultProviderTypes,\n ...customProviders.map((p) => p.type)\n ];\n\n const customProviderLabels = customProviders.reduce(\n (acc, provider) => {\n acc[provider.type] = provider.name;\n return acc;\n },\n {} as Record<ProviderType, string>\n );\n\n const allAvailableLabels = {\n ...providerLabels,\n ...customProviderLabels\n };\n\n const allowedProviderTypes = UnlockPanelManager.allowedProviders\n ? UnlockPanelManager?.allowedProviders\n .map((p) => p.type)\n .filter((type) => allAvailableProviderTypes.includes(type))\n : allAvailableProviderTypes;\n\n const providerList = allowedProviderTypes.map((type) => {\n const custom = customProviders.find(\n (customProvider) => customProvider.type === type\n );\n if (custom) {\n return custom;\n }\n\n return {\n name: type in allAvailableLabels ? allAvailableLabels[type] : type,\n type\n };\n });\n\n return providerList;\n }\n}\n"],
|
|
5
|
+
"mappings": "iPA0BO,IAAMA,EAAN,MAAMA,UAA2BC,CAItC,CAWA,aAAc,CACZ,MAAM,CACJ,yBACA,wBACF,CAAC,EAdH,KAAU,YAAuC,CAC/C,UAAW,KACX,cAAe,IACjB,EAkCA,KAAO,gBAAkB,SAAY,CACnC,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAgBC,EAAS,CAAC,EAEpD,KAAK,KAAO,CACV,UAAW,KAAK,iBAAiB,EACjC,cAAAF,CACF,EAEA,MAAM,KAAK,OAAO,EAClB,KAAK,iBAAiB,CACxB,EAEA,KAAU,oBAAsB,SAAY,CACrC,KAAK,WAIV,KAAK,4BAAiD,KAAK,WAAW,EACtE,KAAK,mCAEH,KAAK,iBACP,EACA,KAAK,4BAAiD,KAAK,aAAa,EAC1E,EAEA,KAAiB,cAAgB,MAAOG,GAElC,CACA,CAACA,GAAS,iBAAmBL,EAAmB,SAClDA,EAAmB,QAAQ,EAG7B,KAAK,QAAQ,CACf,EAEA,KAAiB,YAAc,MAAO,CAAE,KAAAM,EAAM,OAAAC,CAAO,IAAwB,CAC3E,GAAI,CAACP,EAAmB,aACtB,MAAM,IAAI,MACR,6DACF,EAGF,GAAI,CACE,KAAK,sBAAsBA,EAAmB,YAAY,GAE5D,MADiB,MAAMQ,EAAgB,OAAO,CAAE,KAAAF,EAAM,OAAAC,CAAO,CAAC,GAC/C,MAAM,EACrBP,EAAmB,aAAa,GAEhCA,EAAmB,aAAa,CAAE,KAAAM,EAAM,OAAAC,CAAO,CAAC,EAElD,MAAM,KAAK,cAAc,CAAE,gBAAiB,EAAK,CAAC,CACpD,OAASE,EAAO,CACd,QAAQ,MAAMA,CAAK,EACnB,KAAK,UAAU,6BAEb,KAAK,IACP,CACF,CACF,EAEA,KAAiB,kBAAoB,SAAY,CAC/C,MAAMD,EAAgB,QAAQ,CAChC,EAEA,KAAiB,sBACfE,GAE2BA,EAAM,SAAW,EAxF5C,KAAK,KAAO,KAAK,WACnB,CAEA,OAAc,aAAkC,CAC9C,OAAKV,EAAmB,WACtBA,EAAmB,SAAW,IAAIA,GAE7BA,EAAmB,QAC5B,CAEA,OAAc,KAAKW,EAA0C,CAC3D,YAAK,aAAeA,EAAO,aAC3B,KAAK,iBAAmBA,EAAO,iBAE3BA,EAAO,UACT,KAAK,QAAUA,EAAO,SAGjB,KAAK,YAAY,CAC1B,CAyEQ,kBAAoC,CAC1C,IAAMC,EAAkBJ,EAAgB,gBAOlCK,EAA4B,CAChC,GAN2B,OAAO,OAAOC,CAAgB,EAAE,OAC1DR,GACCA,IAASQ,EAAiB,MAAQR,IAASQ,EAAiB,OAChE,EAIE,GAAGF,EAAgB,IAAKG,GAAMA,EAAE,IAAI,CACtC,EAEMC,EAAuBJ,EAAgB,OAC3C,CAACK,EAAKC,KACJD,EAAIC,EAAS,IAAI,EAAIA,EAAS,KACvBD,GAET,CAAC,CACH,EAEME,EAAqB,CACzB,GAAGC,EACH,GAAGJ,CACL,EAsBA,OApB6BhB,EAAmB,iBAC5CA,GAAoB,iBACjB,IAAKe,GAAMA,EAAE,IAAI,EACjB,OAAQT,GAASO,EAA0B,SAASP,CAAI,CAAC,EAC5DO,GAEsC,IAAKP,GAAS,CACtD,IAAMe,EAAST,EAAgB,KAC5BU,GAAmBA,EAAe,OAAShB,CAC9C,EACA,OAAIe,GAIG,CACL,KAAMf,KAAQa,EAAqBA,EAAmBb,CAAI,EAAIA,EAC9D,KAAAA,CACF,CACF,CAAC,CAGH,CACF,EAjKaN,EAWI,aAAwC,KAX5CA,EAYI,QAAyC,KAZ7CA,EAaI,iBAA8C,KAbxD,IAAMuB,EAANvB",
|
|
6
|
+
"names": ["_UnlockPanelManager", "SidePanelBaseManager", "walletAddress", "networkSelector", "getState", "options", "type", "anchor", "ProviderFactory", "error", "login", "params", "customProviders", "allAvailableProviderTypes", "ProviderTypeEnum", "p", "customProviderLabels", "acc", "provider", "allAvailableLabels", "providerLabels", "custom", "customProvider", "UnlockPanelManager"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as A}from"./chunk-EDSX3LFL.mjs";import{a as s}from"./chunk-QATM2UUN.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-6F2QKI7Q.mjs";import{b as I}from"./chunk-QP2EL7IE.mjs";import{g as p}from"./chunk-DOUNJCQ4.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-NHXPNROG.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:L({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),I({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JSUJOYYB.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.ts"],
|
|
4
4
|
"sourcesContent": ["import { HWProvider } from '@multiversx/sdk-hw-provider/out';\nimport { BigNumber } from 'bignumber.js';\n\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls';\nimport { IEventBus } from 'lib/sdkDappUi';\nimport { LedgerConnectStateManager } from 'managers/internal/LedgerConnectStateManager/LedgerConnectStateManager';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { setLedgerAccount } from 'store/actions';\nimport { setLedgerLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\n\nimport { getAuthTokenText } from './getAuthTokenText';\nimport { updateAccountsList } from './updateAccountsList';\nimport {\n LedgerConfigType,\n LedgerLoginType\n} from '../types/ledgerProvider.types';\n\ninterface IGetLedgerLogin {\n options?: {\n callbackUrl?: string;\n token?: string;\n };\n config: LedgerConfigType;\n provider: HWProvider | null;\n eventBus?: IEventBus | null;\n login: LedgerLoginType | null;\n}\n\ninterface ISelectedAccount {\n address: string;\n signature: string;\n addressIndex: number;\n}\n\nexport async function authenticateLedgerAccount({\n options,\n config,\n provider,\n login\n}: IGetLedgerLogin) {\n const manager = LedgerConnectStateManager.getInstance();\n\n const explorerAddress = getExplorerAddress();\n\n const authData = getAuthTokenText({\n loginToken: options?.token,\n version: config.version\n });\n\n const accountsListProps = {\n manager,\n provider\n };\n\n // refresh account list\n await updateAccountsList(accountsListProps);\n\n // cycle trough accounts until user makes a choice\n const selectedAccount = await new Promise<ISelectedAccount>(async function (\n resolve,\n reject\n ) {\n async function handleGoToPage(page: number) {\n const addressesPerPage = manager ? manager.addressesPerPage ?? 1 : 1;\n const startIndex = new BigNumber(page - 1).times(addressesPerPage);\n\n manager?.updateStartIndex(Math.max(0, parseInt(startIndex.toString())));\n await updateAccountsList(accountsListProps);\n }\n\n async function handleAccessWallet(payload: {\n addressIndex: number;\n selectedAddress: string;\n }) {\n if (!provider || !login) {\n return;\n }\n\n manager?.updateConfirmScreen({\n ...authData,\n selectedAddress: payload.selectedAddress,\n explorerLink: getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${payload.selectedAddress}`,\n explorerAddress\n })\n });\n\n try {\n const loginInfo = options?.token\n ? await provider.tokenLogin({\n token: Buffer.from(`${options?.token}{}`),\n addressIndex: payload.addressIndex\n })\n : await login({\n addressIndex: payload.addressIndex\n });\n\n resolve({\n address: loginInfo.address,\n signature: loginInfo.signature\n ? loginInfo.signature.toString('hex')\n : '',\n addressIndex: payload.addressIndex\n });\n } catch (err) {\n console.error('User rejected login:', err);\n\n const shouldGoBack = Boolean(manager?.getConfirmScreenData());\n if (shouldGoBack) {\n await updateAccountsList(accountsListProps);\n }\n }\n }\n\n async function handleCancel() {\n await updateAccountsList(accountsListProps);\n manager.unsubscribeFromAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n });\n reject('User cancelled login');\n }\n\n manager.subscribeToAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n });\n });\n\n const { version, dataEnabled } = config;\n\n // login is finished, data can be persisted in the store\n setLedgerLogin({\n index: selectedAccount.addressIndex,\n loginType: ProviderTypeEnum.ledger\n });\n\n setLedgerAccount({\n address: selectedAccount.address,\n index: selectedAccount.addressIndex,\n version,\n hasContractDataEnabled: dataEnabled\n });\n\n return {\n address: selectedAccount.address,\n signature: selectedAccount.signature\n };\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["BigNumber", "authenticateLedgerAccount", "options", "config", "provider", "login", "manager", "LedgerConnectStateManager", "explorerAddress", "getExplorerAddress", "authData", "getAuthTokenText", "accountsListProps", "updateAccountsList", "selectedAccount", "resolve", "reject", "handleGoToPage", "page", "addressesPerPage", "startIndex", "BigNumber", "handleAccessWallet", "payload", "getExplorerLink", "ACCOUNTS_ENDPOINT", "loginInfo", "err", "handleCancel", "version", "dataEnabled", "setLedgerLogin", "setLedgerAccount"]
|
|
5
|
+
"mappings": "iXACA,OAAS,aAAAA,MAAiB,eAmC1B,eAAsBC,EAA0B,CAC9C,QAAAC,EACA,OAAAC,EACA,SAAAC,EACA,MAAAC,CACF,EAAoB,CAClB,IAAMC,EAAUC,EAA0B,YAAY,EAEhDC,EAAkBC,EAAmB,EAErCC,EAAWC,EAAiB,CAChC,WAAYT,GAAS,MACrB,QAASC,EAAO,OAClB,CAAC,EAEKS,EAAoB,CACxB,QAAAN,EACA,SAAAF,CACF,EAGA,MAAMS,EAAmBD,CAAiB,EAG1C,IAAME,EAAkB,MAAM,IAAI,QAA0B,eAC1DC,EACAC,EACA,CACA,eAAeC,EAAeC,EAAc,CAC1C,IAAMC,EAAmBb,EAAUA,EAAQ,kBAAoB,EAAI,EAC7Dc,EAAa,IAAIC,EAAUH,EAAO,CAAC,EAAE,MAAMC,CAAgB,EAEjEb,GAAS,iBAAiB,KAAK,IAAI,EAAG,SAASc,EAAW,SAAS,CAAC,CAAC,CAAC,EACtE,MAAMP,EAAmBD,CAAiB,CAC5C,CAEA,eAAeU,EAAmBC,EAG/B,CACD,GAAI,GAACnB,GAAY,CAACC,GAIlB,CAAAC,GAAS,oBAAoB,CAC3B,GAAGI,EACH,gBAAiBa,EAAQ,gBACzB,aAAcC,EAAgB,CAC5B,GAAI,IAAIC,CAAiB,IAAIF,EAAQ,eAAe,GACpD,gBAAAf,CACF,CAAC,CACH,CAAC,EAED,GAAI,CACF,IAAMkB,EAAYxB,GAAS,MACvB,MAAME,EAAS,WAAW,CACxB,MAAO,OAAO,KAAK,GAAGF,GAAS,KAAK,IAAI,EACxC,aAAcqB,EAAQ,YACxB,CAAC,EACD,MAAMlB,EAAM,CACV,aAAckB,EAAQ,YACxB,CAAC,EAELR,EAAQ,CACN,QAASW,EAAU,QACnB,UAAWA,EAAU,UACjBA,EAAU,UAAU,SAAS,KAAK,EAClC,GACJ,aAAcH,EAAQ,YACxB,CAAC,CACH,OAASI,EAAK,CACZ,QAAQ,MAAM,uBAAwBA,CAAG,EAEpB,EAAQrB,GAAS,qBAAqB,GAEzD,MAAMO,EAAmBD,CAAiB,CAE9C,EACF,CAEA,eAAegB,GAAe,CAC5B,MAAMf,EAAmBD,CAAiB,EAC1CN,EAAQ,0BAA0B,CAChC,aAAAsB,EACA,mBAAAN,EACA,eAAAL,CACF,CAAC,EACDD,EAAO,sBAAsB,CAC/B,CAEAV,EAAQ,sBAAsB,CAC5B,aAAAsB,EACA,mBAAAN,EACA,eAAAL,CACF,CAAC,CACH,CAAC,EAEK,CAAE,QAAAY,EAAS,YAAAC,CAAY,EAAI3B,EAGjC,OAAA4B,EAAe,CACb,MAAOjB,EAAgB,aACvB,UAAWkB,EAAiB,MAC9B,CAAC,EAEDC,EAAiB,CACf,QAASnB,EAAgB,QACzB,MAAOA,EAAgB,aACvB,QAAAe,EACA,uBAAwBC,CAC1B,CAAC,EAEM,CACL,QAAShB,EAAgB,QACzB,UAAWA,EAAgB,SAC7B,CACF",
|
|
6
|
+
"names": ["BigNumber", "authenticateLedgerAccount", "options", "config", "provider", "login", "manager", "LedgerConnectStateManager", "explorerAddress", "getExplorerAddress", "authData", "getAuthTokenText", "accountsListProps", "updateAccountsList", "selectedAccount", "resolve", "reject", "handleGoToPage", "page", "addressesPerPage", "startIndex", "BigNumber", "handleAccessWallet", "payload", "getExplorerLink", "ACCOUNTS_ENDPOINT", "loginInfo", "err", "handleCancel", "version", "dataEnabled", "setLedgerLogin", "ProviderTypeEnum", "setLedgerAccount"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as p}from"./chunk-XOJHIJKX.mjs";import{a as f}from"./chunk-CNUQX7FI.mjs";import{o as n}from"./chunk-P2C5G6H6.mjs";import{u as i}from"./chunk-DOUNJCQ4.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-NHXPNROG.mjs";import{a as m}from"./chunk-66JBXP4O.mjs";async function y(){let c=m(),s=f(),r=c?e.webview:t(i());if(!r)return;let o=await p.create({type:r});if(!o)throw new Error("Provider not found");!s&&r===e.webview&&await o.login(),n(o)}export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JZWEJ7SP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/helpers/restoreProvider.ts"],
|
|
4
|
+
"sourcesContent": ["import { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { providerTypeSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { getIsInIframe } from 'utils/window/getIsInIframe';\nimport { setAccountProvider } from './accountProvider';\nimport { ProviderFactory } from '../ProviderFactory';\n\nexport async function restoreProvider() {\n const isInIframe = getIsInIframe();\n const isLoggedIn = getIsLoggedIn();\n\n const type = isInIframe\n ? ProviderTypeEnum.webview\n : providerTypeSelector(getState());\n\n if (!type) {\n return;\n }\n\n const provider = await ProviderFactory.create({\n type\n });\n\n if (!provider) {\n throw new Error('Provider not found');\n }\n\n if (!isLoggedIn && type === ProviderTypeEnum.webview) {\n await provider.login();\n }\n\n setAccountProvider(provider);\n}\n"],
|
|
5
|
+
"mappings": "+RAQA,eAAsBA,GAAkB,CACtC,IAAMC,EAAaC,EAAc,EAC3BC,EAAaC,EAAc,EAE3BC,EAAOJ,EACTK,EAAiB,QACjBC,EAAqBC,EAAS,CAAC,EAEnC,GAAI,CAACH,EACH,OAGF,IAAMI,EAAW,MAAMC,EAAgB,OAAO,CAC5C,KAAAL,CACF,CAAC,EAED,GAAI,CAACI,EACH,MAAM,IAAI,MAAM,oBAAoB,EAGlC,CAACN,GAAcE,IAASC,EAAiB,SAC3C,MAAMG,EAAS,MAAM,EAGvBE,EAAmBF,CAAQ,CAC7B",
|
|
6
|
+
"names": ["restoreProvider", "isInIframe", "getIsInIframe", "isLoggedIn", "getIsLoggedIn", "type", "ProviderTypeEnum", "providerTypeSelector", "getState", "provider", "ProviderFactory", "setAccountProvider"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-PRULMJH7.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-K3WBBSXJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-Y3BNMQFP.mjs";import{b as o,d as c,e as g}from"./chunk-J4CPYFK6.mjs";import{a as m,c as t,e as d}from"./chunk-R53MCZI6.mjs";import{c as u,d as f,e as l}from"./chunk-LHEH7L4L.mjs";import P from"bignumber.js";var I={from:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa",to:"erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa"};function _({minGasLimit:r=String(5e4),gasLimit:e,gasPrice:i,data:k,gasPerDataByte:v,gasPriceModifier:G,defaultGasPrice:h=String(1e9),chainId:a}){let n=k||"",B=c(e)?e:r,L=p({data:n})?5e4:0,T=new P(B).plus(L).toNumber(),y=g(i)?i:h,x=new m({nonce:BigInt(0),value:BigInt(0),receiver:new t(I.to),sender:new t(I.to),gasPrice:BigInt(y),gasLimit:BigInt(T),data:Buffer.from(n.trim()),chainID:a,version:1});try{return new d().computeTransactionFee(x,{gasPerDataByte:BigInt(v),minGasLimit:BigInt(r),gasPriceModifier:parseFloat(G),chainID:a}).toString(10)}catch(s){return console.error(s),o}}export{_ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KN7QMGWV.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.ts"],
|
|
4
4
|
"sourcesContent": ["import BigNumber from 'bignumber.js';\nimport {\n EXTRA_GAS_LIMIT_GUARDED_TX,\n GAS_LIMIT,\n GAS_PRICE\n} from 'constants/index';\nimport { Transaction, Address, TransactionComputer } from 'lib/sdkCore';\nimport { stringIsFloat, stringIsInteger, ZERO } from 'lib/sdkDappUtils';\nimport { isGuardianTx } from 'utils/transactions/isGuardianTx';\n\nexport interface CalculateFeeLimitType {\n gasLimit: string;\n gasPrice: string;\n data: string;\n gasPerDataByte: string;\n gasPriceModifier: string;\n chainId: string;\n minGasLimit?: string;\n defaultGasPrice?: string;\n}\nconst placeholderData = {\n from: 'erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa',\n to: 'erd12dnfhej64s6c56ka369gkyj3hwv5ms0y5rxgsk2k7hkd2vuk7rvqxkalsa'\n};\nexport function calculateFeeLimit({\n minGasLimit = String(GAS_LIMIT),\n gasLimit,\n gasPrice,\n data: inputData,\n gasPerDataByte,\n gasPriceModifier,\n defaultGasPrice = String(GAS_PRICE),\n chainId\n}: CalculateFeeLimitType) {\n const data = inputData || '';\n const validGasLimit = stringIsInteger(gasLimit) ? gasLimit : minGasLimit;\n\n // We need to add extra gas fee for guardian transactions\n const extraGasLimit = isGuardianTx({ data }) ? EXTRA_GAS_LIMIT_GUARDED_TX : 0;\n const usedGasLimit = new BigNumber(validGasLimit)\n .plus(extraGasLimit)\n .toNumber();\n\n const validGasPrice = stringIsFloat(gasPrice) ? gasPrice : defaultGasPrice;\n const transaction = new Transaction({\n nonce: BigInt(0),\n value: BigInt(0),\n receiver: new Address(placeholderData.to),\n sender: new Address(placeholderData.to),\n gasPrice: BigInt(validGasPrice),\n gasLimit: BigInt(usedGasLimit),\n data: Buffer.from(data.trim()),\n chainID: chainId,\n version: 1\n });\n\n try {\n const transactionComputer = new TransactionComputer();\n const bNfee = transactionComputer.computeTransactionFee(transaction, {\n gasPerDataByte: BigInt(gasPerDataByte),\n minGasLimit: BigInt(minGasLimit),\n gasPriceModifier: parseFloat(gasPriceModifier),\n chainID: chainId\n });\n return bNfee.toString(10);\n } catch (err) {\n console.error(err);\n return ZERO;\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "8MAAA,OAAOA,MAAe,eAoBtB,IAAMC,EAAkB,CACtB,KAAM,iEACN,GAAI,gEACN,EACO,SAASC,EAAkB,CAChC,YAAAC,EAAc,OAAO,GAAS,EAC9B,SAAAC,EACA,SAAAC,EACA,KAAMC,EACN,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EAAkB,OAAO,GAAS,EAClC,QAAAC,CACF,EAA0B,CACxB,IAAMC,EAAOL,GAAa,GACpBM,EAAgBC,EAAgBT,CAAQ,EAAIA,EAAWD,EAGvDW,EAAgBC,EAAa,CAAE,KAAAJ,CAAK,CAAC,EAAI,IAA6B,EACtEK,EAAe,IAAIC,EAAUL,CAAa,EAC7C,KAAKE,CAAa,EAClB,SAAS,EAENI,EAAgBC,EAAcd,CAAQ,EAAIA,EAAWI,EACrDW,EAAc,IAAIC,EAAY,CAClC,MAAO,OAAO,CAAC,EACf,MAAO,OAAO,CAAC,EACf,SAAU,IAAIC,EAAQrB,EAAgB,EAAE,EACxC,OAAQ,IAAIqB,EAAQrB,EAAgB,EAAE,EACtC,SAAU,OAAOiB,CAAa,EAC9B,SAAU,OAAOF,CAAY,EAC7B,KAAM,OAAO,KAAKL,EAAK,KAAK,CAAC,EAC7B,QAASD,EACT,QAAS,CACX,CAAC,EAED,GAAI,CAQF,OAP4B,IAAIa,EAAoB,EAClB,sBAAsBH,EAAa,CACnE,eAAgB,OAAOb,CAAc,EACrC,YAAa,OAAOJ,CAAW,EAC/B,iBAAkB,WAAWK,CAAgB,EAC7C,QAASE,CACX,CAAC,EACY,SAAS,EAAE,CAC1B,OAASc,EAAK,CACZ,eAAQ,MAAMA,CAAG,EACVC,CACT,CACF",
|
|
6
6
|
"names": ["BigNumber", "placeholderData", "calculateFeeLimit", "minGasLimit", "gasLimit", "gasPrice", "inputData", "gasPerDataByte", "gasPriceModifier", "defaultGasPrice", "chainId", "data", "validGasLimit", "stringIsInteger", "extraGasLimit", "isGuardianTx", "usedGasLimit", "BigNumber", "validGasPrice", "stringIsFloat", "transaction", "Transaction", "Address", "TransactionComputer", "err", "ZERO"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-IJB6XDNR.mjs";import{a as c}from"./chunk-CNUQX7FI.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KPDCSGZD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.0-alpha.10'; // will be replaced at build time\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
|
+
"names": ["safeWindow", "version"]
|
|
7
|
+
}
|