@multiversx/sdk-dapp 5.2.4 → 5.2.6
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/out/__chunks__/{chunk-DVPFOACI.mjs → chunk-2K2QZVBC.mjs} +2 -2
- package/out/__chunks__/{chunk-TZDM7KH7.mjs → chunk-2NF5HX3H.mjs} +2 -2
- package/out/__chunks__/chunk-2TCIBFJT.mjs +2 -0
- package/out/__chunks__/chunk-2TCIBFJT.mjs.map +7 -0
- package/out/__chunks__/{chunk-VTNFUJCE.mjs → chunk-2VRRMEOY.mjs} +2 -2
- package/out/__chunks__/{chunk-7ZUH3TQ2.mjs → chunk-2Y66XRQK.mjs} +2 -2
- package/out/__chunks__/{chunk-E5H5BPFX.mjs → chunk-3OEO7IVT.mjs} +2 -2
- package/out/__chunks__/{chunk-LGAWIVRO.mjs → chunk-3QWTD55I.mjs} +2 -2
- package/out/__chunks__/chunk-4B3YTXMB.mjs +2 -0
- package/out/__chunks__/chunk-4B3YTXMB.mjs.map +7 -0
- package/out/__chunks__/chunk-4MWQKLVG.mjs +2 -0
- package/out/__chunks__/chunk-4MWQKLVG.mjs.map +7 -0
- package/out/__chunks__/{chunk-KWUIUJYQ.mjs → chunk-4QPWKBSQ.mjs} +2 -2
- package/out/__chunks__/{chunk-OOVV574D.mjs → chunk-4VA2SULD.mjs} +2 -2
- package/out/__chunks__/{chunk-HDRB2QL6.mjs → chunk-4VUMAG4J.mjs} +2 -2
- package/out/__chunks__/{chunk-DSVSX4ZT.mjs → chunk-5DILKRFV.mjs} +2 -2
- package/out/__chunks__/{chunk-6DWUEZO7.mjs → chunk-5KVNYLOM.mjs} +2 -2
- package/out/__chunks__/{chunk-KTOQBOOK.mjs → chunk-5O725H7M.mjs} +2 -2
- package/out/__chunks__/{chunk-52PGMMOM.mjs → chunk-5OMQOYP7.mjs} +2 -2
- package/out/__chunks__/chunk-5WVYRVED.mjs +2 -0
- package/out/__chunks__/chunk-5WVYRVED.mjs.map +7 -0
- package/out/__chunks__/{chunk-NOLOZJ37.mjs → chunk-67JAXZGA.mjs} +2 -2
- package/out/__chunks__/{chunk-HYHCFQ2X.mjs → chunk-6CUDZR72.mjs} +2 -2
- package/out/__chunks__/chunk-6LOIZTC6.mjs +2 -0
- package/out/__chunks__/chunk-6LOIZTC6.mjs.map +7 -0
- package/out/__chunks__/{chunk-PRIEU2AB.mjs → chunk-6ME6A43J.mjs} +2 -2
- package/out/__chunks__/chunk-6OIZTWJQ.mjs +2 -0
- package/out/__chunks__/chunk-6R2WFQ7U.mjs +2 -0
- package/out/__chunks__/{chunk-ZVIKYGX5.mjs.map → chunk-6R2WFQ7U.mjs.map} +3 -3
- package/out/__chunks__/{chunk-HMHP5DPL.mjs → chunk-6UMOECOW.mjs} +1 -1
- package/out/__chunks__/chunk-6UMOECOW.mjs.map +7 -0
- package/out/__chunks__/{chunk-SLOQOCEU.mjs → chunk-72VXBZOB.mjs} +2 -2
- package/out/__chunks__/{chunk-SRY5QN4N.mjs → chunk-74JXPSSX.mjs} +2 -2
- package/out/__chunks__/{chunk-IOTN5P72.mjs → chunk-775THAIS.mjs} +2 -2
- package/out/__chunks__/chunk-7C3DDRSK.mjs +2 -0
- package/out/__chunks__/chunk-7C3DDRSK.mjs.map +7 -0
- package/out/__chunks__/chunk-7GZRWUJQ.mjs +2 -0
- package/out/__chunks__/{chunk-3YSWYYBW.mjs → chunk-7QYO4UOP.mjs} +2 -2
- package/out/__chunks__/chunk-7UJCMFKV.mjs +2 -0
- package/out/__chunks__/chunk-7VHTZYM2.mjs +2 -0
- package/out/__chunks__/chunk-7VHTZYM2.mjs.map +7 -0
- package/out/__chunks__/{chunk-7ORWWRDO.mjs → chunk-7XASUTI2.mjs} +2 -2
- package/out/__chunks__/{chunk-ULL2LOGL.mjs → chunk-ANIJIRAY.mjs} +2 -2
- package/out/__chunks__/{chunk-OXYCJJ2S.mjs → chunk-BCODBYYR.mjs} +2 -2
- package/out/__chunks__/chunk-BMSWZIEX.mjs +2 -0
- package/out/__chunks__/{chunk-GB2K574L.mjs → chunk-CLUVDWX6.mjs} +2 -2
- package/out/__chunks__/chunk-CLUVDWX6.mjs.map +7 -0
- package/out/__chunks__/{chunk-RLHETJG2.mjs → chunk-CMJSKAR5.mjs} +2 -2
- package/out/__chunks__/{chunk-SMFNVU6B.mjs → chunk-CO23VS2O.mjs} +2 -2
- package/out/__chunks__/chunk-CUMJOJXJ.mjs +2 -0
- package/out/__chunks__/{chunk-O4E4JGDU.mjs.map → chunk-CUMJOJXJ.mjs.map} +3 -3
- package/out/__chunks__/chunk-DLCBEPEX.mjs +2 -0
- package/out/__chunks__/chunk-DLCBEPEX.mjs.map +7 -0
- package/out/__chunks__/chunk-DMF2DF5I.mjs +2 -0
- package/out/__chunks__/chunk-DOBSLHLX.mjs +2 -0
- package/out/__chunks__/{chunk-Q5Z34JFU.mjs → chunk-DRYIE3UL.mjs} +2 -2
- package/out/__chunks__/chunk-E2GGD7D4.mjs +2 -0
- package/out/__chunks__/chunk-E2GGD7D4.mjs.map +7 -0
- package/out/__chunks__/{chunk-XCVEFI4B.mjs → chunk-EAXWH64Z.mjs} +2 -2
- package/out/__chunks__/{chunk-BQX7MJR6.mjs → chunk-ELQR4QMU.mjs} +2 -2
- package/out/__chunks__/{chunk-I3KT7K7E.mjs → chunk-ET5L4CEA.mjs} +2 -2
- package/out/__chunks__/chunk-EUBOWXIH.mjs +2 -0
- package/out/__chunks__/chunk-EZKCZPIE.mjs +2 -0
- package/out/__chunks__/chunk-EZKCZPIE.mjs.map +7 -0
- package/out/__chunks__/chunk-FE5FK7I6.mjs +2 -0
- package/out/__chunks__/{chunk-GLWYAOLR.mjs → chunk-FULNMU6J.mjs} +2 -2
- package/out/__chunks__/chunk-G7GU37XI.mjs +2 -0
- package/out/__chunks__/{chunk-Z4KZH4G3.mjs → chunk-GMP2DZ26.mjs} +2 -2
- package/out/__chunks__/{chunk-EAH7XGM3.mjs → chunk-GUAXMODN.mjs} +2 -2
- package/out/__chunks__/chunk-HAPHEGVZ.mjs +2 -0
- package/out/__chunks__/{chunk-ZG5S2DYH.mjs → chunk-HOBCDZ2D.mjs} +2 -2
- package/out/__chunks__/chunk-HZGRS7HG.mjs +2 -0
- package/out/__chunks__/chunk-IE4SA26O.mjs +2 -0
- package/out/__chunks__/chunk-IHU6TBZQ.mjs +2 -0
- package/out/__chunks__/{chunk-HX3GPSEV.mjs → chunk-JDLVFGXF.mjs} +2 -2
- package/out/__chunks__/{chunk-DCYZQKT5.mjs → chunk-JDTTHSQL.mjs} +2 -2
- package/out/__chunks__/{chunk-UNBTFF6K.mjs → chunk-JSSRK6RP.mjs} +2 -2
- package/out/__chunks__/chunk-JTV664SG.mjs +2 -0
- package/out/__chunks__/chunk-JTV664SG.mjs.map +7 -0
- package/out/__chunks__/{chunk-PZHQ37I6.mjs → chunk-K373M2BG.mjs} +2 -2
- package/out/__chunks__/chunk-K3VVHPG3.mjs +2 -0
- package/out/__chunks__/{chunk-QFYMQSDX.mjs → chunk-KHBRO4FY.mjs} +2 -2
- package/out/__chunks__/chunk-LJX4MW7B.mjs +2 -0
- package/out/__chunks__/chunk-LJX4MW7B.mjs.map +7 -0
- package/out/__chunks__/chunk-M2KI5WFN.mjs +2 -0
- package/out/__chunks__/chunk-M2KI5WFN.mjs.map +7 -0
- package/out/__chunks__/{chunk-2IUBMLF4.mjs → chunk-M6MN4RXG.mjs} +1 -1
- package/out/__chunks__/{chunk-2IUBMLF4.mjs.map → chunk-M6MN4RXG.mjs.map} +2 -2
- package/out/__chunks__/{chunk-7AAHDJYY.mjs → chunk-MBBXTAA3.mjs} +2 -2
- package/out/__chunks__/{chunk-GULZHAFR.mjs → chunk-MXNCPIER.mjs} +2 -2
- package/out/__chunks__/{chunk-L3MWDI6J.mjs → chunk-N55JEIM6.mjs} +2 -2
- package/out/__chunks__/chunk-NGM3AVCY.mjs +2 -0
- package/out/__chunks__/chunk-NGM3AVCY.mjs.map +7 -0
- package/out/__chunks__/{chunk-BHAHZQVO.mjs → chunk-NTPPBM7T.mjs} +2 -2
- package/out/__chunks__/{chunk-WWV3ASWP.mjs → chunk-O3YM7WCC.mjs} +2 -2
- package/out/__chunks__/{chunk-WTHOSLUO.mjs → chunk-O7KFAU3B.mjs} +2 -2
- package/out/__chunks__/{chunk-TTSG76TF.mjs → chunk-OD6C4XKP.mjs} +2 -2
- package/out/__chunks__/chunk-OLPFN3HZ.mjs +2 -0
- package/out/__chunks__/{chunk-E5T25VDS.mjs → chunk-OU5Y3UTY.mjs} +2 -2
- package/out/__chunks__/chunk-OVBYKKMB.mjs +2 -0
- package/out/__chunks__/chunk-OVBYKKMB.mjs.map +7 -0
- package/out/__chunks__/{chunk-5UBTVBPC.mjs → chunk-OXC2IURR.mjs} +2 -2
- package/out/__chunks__/chunk-OYQAXY6H.mjs +2 -0
- package/out/__chunks__/chunk-PDKESLKC.mjs +2 -0
- package/out/__chunks__/chunk-PKDR5ERF.mjs +2 -0
- package/out/__chunks__/chunk-PKDR5ERF.mjs.map +7 -0
- package/out/__chunks__/{chunk-UAPKL5IP.mjs → chunk-PT2OF4QJ.mjs} +2 -2
- package/out/__chunks__/chunk-Q4OG6NMJ.mjs +2 -0
- package/out/__chunks__/{chunk-6NK63AU5.mjs.map → chunk-Q4OG6NMJ.mjs.map} +1 -1
- package/out/__chunks__/{chunk-T7LCG3ZL.mjs → chunk-QJZ5YIXI.mjs} +2 -2
- package/out/__chunks__/{chunk-6FKT2TIN.mjs → chunk-R3U4ONSV.mjs} +2 -2
- package/out/__chunks__/{chunk-D6TVFZA6.mjs → chunk-RCNZOLEM.mjs} +2 -2
- package/out/__chunks__/{chunk-RBSHB26S.mjs → chunk-RL2G66LY.mjs} +2 -2
- package/out/__chunks__/chunk-SKNUG6M5.mjs +2 -0
- package/out/__chunks__/{chunk-PGGS4CPP.mjs → chunk-SUHXBGYR.mjs} +2 -2
- package/out/__chunks__/{chunk-W3WUNRIB.mjs → chunk-SV4C4UPN.mjs} +2 -2
- package/out/__chunks__/{chunk-RS5NVDUR.mjs → chunk-SWZ5LDC3.mjs} +2 -2
- package/out/__chunks__/{chunk-OEPTRJEB.mjs → chunk-TCDMXBPB.mjs} +1 -1
- package/out/__chunks__/{chunk-OEPTRJEB.mjs.map → chunk-TCDMXBPB.mjs.map} +2 -2
- package/out/__chunks__/chunk-TFCXKUX5.mjs +2 -0
- package/out/__chunks__/{chunk-QXU7U2E2.mjs → chunk-TFDVHULP.mjs} +2 -2
- package/out/__chunks__/{chunk-DMLHCYO2.mjs → chunk-TQIB47S6.mjs} +2 -2
- package/out/__chunks__/chunk-U2IPYFJX.mjs +2 -0
- package/out/__chunks__/chunk-U2IPYFJX.mjs.map +7 -0
- package/out/__chunks__/{chunk-AJC3F2YT.mjs → chunk-U3MIDVR7.mjs} +2 -2
- package/out/__chunks__/chunk-U54BL4SU.mjs +2 -0
- package/out/__chunks__/{chunk-Q2J2GZXF.mjs.map → chunk-U54BL4SU.mjs.map} +2 -2
- package/out/__chunks__/{chunk-MMY7MLSC.mjs → chunk-UCCJLDG6.mjs} +2 -2
- package/out/__chunks__/{chunk-S6NHNEQK.mjs → chunk-UCRVRBTA.mjs} +2 -2
- package/out/__chunks__/chunk-UZTMRUVT.mjs +2 -0
- package/out/__chunks__/chunk-UZTMRUVT.mjs.map +7 -0
- package/out/__chunks__/{chunk-AXUYY4T7.mjs → chunk-VJGOUAZ2.mjs} +2 -2
- package/out/__chunks__/{chunk-BX2RQZG2.mjs → chunk-VQULIVGX.mjs} +2 -2
- package/out/__chunks__/chunk-VRLS225Q.mjs +2 -0
- package/out/__chunks__/{chunk-DDCSKHZU.mjs → chunk-VVZ2I6CL.mjs} +2 -2
- package/out/__chunks__/chunk-W37M2LIA.mjs +2 -0
- package/out/__chunks__/{chunk-LV5G3A3I.mjs → chunk-WK4PPAAJ.mjs} +2 -2
- package/out/__chunks__/chunk-WQZKREPI.mjs +2 -0
- package/out/__chunks__/{chunk-F2HEHTHJ.mjs → chunk-XA3AGZCX.mjs} +2 -2
- package/out/__chunks__/{chunk-NTTKKJIS.mjs → chunk-XHM77HFZ.mjs} +2 -2
- package/out/__chunks__/chunk-XJPXTYIE.mjs +2 -0
- package/out/__chunks__/chunk-XXV6KGR4.mjs +2 -0
- package/out/__chunks__/chunk-XXV6KGR4.mjs.map +7 -0
- package/out/__chunks__/{chunk-QAZET2LQ.mjs → chunk-YHNOFYGM.mjs} +2 -2
- package/out/__chunks__/chunk-YSPLCVKY.mjs +2 -0
- package/out/__chunks__/chunk-YSPLCVKY.mjs.map +7 -0
- package/out/__chunks__/{chunk-UPBPNO3G.mjs → chunk-YTIAXTQR.mjs} +2 -2
- package/out/__chunks__/{chunk-KBKZR473.mjs → chunk-YX7TMA3N.mjs} +2 -2
- package/out/__chunks__/{chunk-ENQBQ3K2.mjs → chunk-Z5AFLXOE.mjs} +2 -2
- package/out/__chunks__/{chunk-IMB7RORC.mjs → chunk-ZDJN4F3W.mjs} +2 -2
- package/out/__chunks__/{chunk-N342XMFH.mjs → chunk-ZRSYQ3MT.mjs} +2 -2
- package/out/__chunks__/{chunk-2GG67TZD.mjs → chunk-ZS4EBCWC.mjs} +2 -2
- package/out/__chunks__/{chunk-5FTIQVXR.mjs → chunk-ZTUC7FCA.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/account/index.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/configuration/index.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedToken.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.cjs +4 -3
- package/out/apiCalls/transactions/getServerTransactionsByHashes.cjs.map +2 -2
- package/out/apiCalls/transactions/getServerTransactionsByHashes.d.ts +3 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/network.constants.cjs +3 -3
- package/out/constants/network.constants.cjs.map +1 -1
- package/out/constants/network.constants.mjs +1 -1
- package/out/constants/providerFactory.constants.cjs +4 -0
- package/out/constants/providerFactory.constants.cjs.map +2 -2
- package/out/constants/providerFactory.constants.d.ts +1 -0
- package/out/constants/providerFactory.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/transactions.constants.cjs +3 -3
- package/out/constants/transactions.constants.cjs.map +1 -1
- package/out/constants/transactions.constants.d.ts +1 -1
- package/out/constants/transactions.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs +5 -12
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs.map +2 -2
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.d.ts +2 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.cjs +28 -102
- package/out/managers/ToastManager/ToastManager.cjs.map +2 -2
- package/out/managers/ToastManager/ToastManager.d.ts +13 -31
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.cjs +126 -0
- package/out/managers/ToastManager/ToastUICoordinator.cjs.map +7 -0
- package/out/managers/ToastManager/ToastUICoordinator.d.ts +30 -0
- package/out/managers/ToastManager/ToastUICoordinator.mjs +2 -0
- package/out/managers/ToastManager/ToastUICoordinator.mjs.map +7 -0
- package/out/managers/ToastManager/helpers/LifetimeManager.cjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.cjs.map +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs +12 -14
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs.map +2 -2
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.d.ts +3 -7
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/helpers/createTransactionToast.cjs.map +2 -2
- package/out/managers/ToastManager/helpers/createTransactionToast.d.ts +2 -3
- package/out/managers/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/ToastManager/helpers/getToastTransactionsStatus.mjs +1 -1
- package/out/managers/ToastManager/helpers/tests/mocks/cache.d.ts +14 -0
- package/out/managers/ToastManager/helpers/tests/mocks/transactions.d.ts +34 -0
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/ToastManager/types/index.mjs +1 -1
- package/out/managers/ToastManager/types/toast.types.cjs.map +2 -2
- package/out/managers/ToastManager/types/toast.types.d.ts +2 -2
- package/out/managers/ToastManager/types/toast.types.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- 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/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +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.mjs +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/UIBaseManager/UIBaseManager.mjs +1 -1
- 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.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +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/getPendingTransactions.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.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +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.mjs +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/signMessageWithProvider.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.cjs +18 -9
- package/out/providers/ProviderFactory.cjs.map +3 -3
- 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.mjs +1 -1
- package/out/providers/helpers/emptyProvider.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +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.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +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.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +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/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +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.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs.map +2 -2
- 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/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +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.cjs +1 -0
- package/out/providers/types/providerFactory.types.cjs.map +2 -2
- package/out/providers/types/providerFactory.types.d.ts +1 -0
- package/out/providers/types/providerFactory.types.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.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.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.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/transactionStateByStatus.cjs.map +2 -2
- package/out/store/actions/transactions/transactionStateByStatus.d.ts +23 -24
- package/out/store/actions/transactions/transactionStateByStatus.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.cjs +1 -3
- package/out/store/actions/transactions/transactionsActions.cjs.map +2 -2
- 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/index.mjs +1 -1
- package/out/store/selectors/networkSelectors.cjs +9 -0
- package/out/store/selectors/networkSelectors.cjs.map +2 -2
- package/out/store/selectors/networkSelectors.d.ts +3 -0
- package/out/store/selectors/networkSelectors.mjs +1 -1
- package/out/store/selectors/toastsSelectors.mjs +1 -1
- package/out/store/selectors/toastsSelectors.mjs.map +4 -4
- package/out/store/selectors/transactionsSelector.cjs +3 -3
- package/out/store/selectors/transactionsSelector.cjs.map +2 -2
- package/out/store/selectors/transactionsSelector.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/types/serverTransactions.types.cjs.map +2 -2
- package/out/types/serverTransactions.types.d.ts +1 -1
- package/out/types/serverTransactions.types.mjs +1 -1
- package/out/types/transaction-list-item.types.cjs.map +2 -2
- package/out/types/transaction-list-item.types.d.ts +1 -6
- package/out/types/transaction-list-item.types.mjs +1 -1
- package/out/types/transactions.types.cjs.map +2 -2
- package/out/types/transactions.types.d.ts +4 -4
- package/out/types/transactions.types.mjs.map +2 -2
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/fetchAccount.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/helpers/index.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/index.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/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/getTokenFromData.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/getTransactionsHistory/getTransactionsHistory.cjs +2 -8
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.cjs.map +2 -2
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.d.ts +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.cjs +2 -2
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.cjs.map +2 -2
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.d.ts +2 -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/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.cjs +15 -9
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.cjs.map +2 -2
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.d.ts +3 -4
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.cjs +2 -2
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.cjs.map +2 -2
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.d.ts +5 -3
- 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/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.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 +2 -4
- package/out/__chunks__/chunk-2A6ODBDO.mjs +0 -2
- package/out/__chunks__/chunk-2A6ODBDO.mjs.map +0 -7
- package/out/__chunks__/chunk-344SJWHZ.mjs +0 -2
- package/out/__chunks__/chunk-344SJWHZ.mjs.map +0 -7
- package/out/__chunks__/chunk-34D6F2ZD.mjs +0 -2
- package/out/__chunks__/chunk-3L7HZ2SO.mjs +0 -2
- package/out/__chunks__/chunk-3L7HZ2SO.mjs.map +0 -7
- package/out/__chunks__/chunk-3MW2H273.mjs +0 -2
- package/out/__chunks__/chunk-3MW2H273.mjs.map +0 -7
- package/out/__chunks__/chunk-3TYENBPS.mjs +0 -2
- package/out/__chunks__/chunk-5NEP4WM3.mjs +0 -2
- package/out/__chunks__/chunk-5NEP4WM3.mjs.map +0 -7
- package/out/__chunks__/chunk-5Z3MOBIC.mjs +0 -2
- package/out/__chunks__/chunk-65L5EBBL.mjs +0 -2
- package/out/__chunks__/chunk-65L5EBBL.mjs.map +0 -7
- package/out/__chunks__/chunk-6NK63AU5.mjs +0 -2
- package/out/__chunks__/chunk-7AIQVQRI.mjs +0 -2
- package/out/__chunks__/chunk-7NJ4ME6K.mjs +0 -2
- package/out/__chunks__/chunk-ALXGPWX7.mjs +0 -2
- package/out/__chunks__/chunk-AWHIX3FQ.mjs +0 -2
- package/out/__chunks__/chunk-GB2K574L.mjs.map +0 -7
- package/out/__chunks__/chunk-HMHP5DPL.mjs.map +0 -7
- package/out/__chunks__/chunk-IQ6TLUA6.mjs +0 -2
- package/out/__chunks__/chunk-KWAUHAGX.mjs +0 -2
- package/out/__chunks__/chunk-MFUQ5NBC.mjs +0 -2
- package/out/__chunks__/chunk-NZYB675D.mjs +0 -2
- package/out/__chunks__/chunk-O2CA5SYO.mjs +0 -2
- package/out/__chunks__/chunk-O2CA5SYO.mjs.map +0 -7
- package/out/__chunks__/chunk-O4E4JGDU.mjs +0 -2
- package/out/__chunks__/chunk-O5IYHOPF.mjs +0 -2
- package/out/__chunks__/chunk-O5IYHOPF.mjs.map +0 -7
- package/out/__chunks__/chunk-PLMCHSS6.mjs +0 -2
- package/out/__chunks__/chunk-Q2J2GZXF.mjs +0 -2
- package/out/__chunks__/chunk-RYPO7VR2.mjs +0 -2
- package/out/__chunks__/chunk-RYPO7VR2.mjs.map +0 -7
- package/out/__chunks__/chunk-SAAOQW7P.mjs +0 -2
- package/out/__chunks__/chunk-SAAOQW7P.mjs.map +0 -7
- package/out/__chunks__/chunk-SKXGLO3R.mjs +0 -2
- package/out/__chunks__/chunk-T7CVBDC6.mjs +0 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs +0 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs.map +0 -7
- package/out/__chunks__/chunk-TTNGTT4H.mjs +0 -2
- package/out/__chunks__/chunk-ULUZWP2P.mjs +0 -2
- package/out/__chunks__/chunk-ULUZWP2P.mjs.map +0 -7
- package/out/__chunks__/chunk-V6VNRFXC.mjs +0 -2
- package/out/__chunks__/chunk-WIHUEHY3.mjs +0 -2
- package/out/__chunks__/chunk-WJQVMI33.mjs +0 -2
- package/out/__chunks__/chunk-XU34NXIS.mjs +0 -2
- package/out/__chunks__/chunk-YAONXG5V.mjs +0 -2
- package/out/__chunks__/chunk-YAONXG5V.mjs.map +0 -7
- package/out/__chunks__/chunk-YGT2XHMA.mjs +0 -2
- package/out/__chunks__/chunk-YSF6K5W7.mjs +0 -2
- package/out/__chunks__/chunk-ZEUNADU7.mjs +0 -2
- package/out/__chunks__/chunk-ZMTIF2D2.mjs +0 -2
- package/out/__chunks__/chunk-ZONHCECO.mjs +0 -2
- package/out/__chunks__/chunk-ZONHCECO.mjs.map +0 -7
- package/out/__chunks__/chunk-ZVIKYGX5.mjs +0 -2
- /package/out/__chunks__/{chunk-DVPFOACI.mjs.map → chunk-2K2QZVBC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TZDM7KH7.mjs.map → chunk-2NF5HX3H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VTNFUJCE.mjs.map → chunk-2VRRMEOY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ZUH3TQ2.mjs.map → chunk-2Y66XRQK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E5H5BPFX.mjs.map → chunk-3OEO7IVT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LGAWIVRO.mjs.map → chunk-3QWTD55I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KWUIUJYQ.mjs.map → chunk-4QPWKBSQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OOVV574D.mjs.map → chunk-4VA2SULD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HDRB2QL6.mjs.map → chunk-4VUMAG4J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DSVSX4ZT.mjs.map → chunk-5DILKRFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6DWUEZO7.mjs.map → chunk-5KVNYLOM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KTOQBOOK.mjs.map → chunk-5O725H7M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-52PGMMOM.mjs.map → chunk-5OMQOYP7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NOLOZJ37.mjs.map → chunk-67JAXZGA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HYHCFQ2X.mjs.map → chunk-6CUDZR72.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PRIEU2AB.mjs.map → chunk-6ME6A43J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ALXGPWX7.mjs.map → chunk-6OIZTWJQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SLOQOCEU.mjs.map → chunk-72VXBZOB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SRY5QN4N.mjs.map → chunk-74JXPSSX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IOTN5P72.mjs.map → chunk-775THAIS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-34D6F2ZD.mjs.map → chunk-7GZRWUJQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3YSWYYBW.mjs.map → chunk-7QYO4UOP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZMTIF2D2.mjs.map → chunk-7UJCMFKV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ORWWRDO.mjs.map → chunk-7XASUTI2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ULL2LOGL.mjs.map → chunk-ANIJIRAY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OXYCJJ2S.mjs.map → chunk-BCODBYYR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T7CVBDC6.mjs.map → chunk-BMSWZIEX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RLHETJG2.mjs.map → chunk-CMJSKAR5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SMFNVU6B.mjs.map → chunk-CO23VS2O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V6VNRFXC.mjs.map → chunk-DMF2DF5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YGT2XHMA.mjs.map → chunk-DOBSLHLX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q5Z34JFU.mjs.map → chunk-DRYIE3UL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XCVEFI4B.mjs.map → chunk-EAXWH64Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BQX7MJR6.mjs.map → chunk-ELQR4QMU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I3KT7K7E.mjs.map → chunk-ET5L4CEA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7NJ4ME6K.mjs.map → chunk-EUBOWXIH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TTNGTT4H.mjs.map → chunk-FE5FK7I6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GLWYAOLR.mjs.map → chunk-FULNMU6J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NZYB675D.mjs.map → chunk-G7GU37XI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z4KZH4G3.mjs.map → chunk-GMP2DZ26.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EAH7XGM3.mjs.map → chunk-GUAXMODN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SKXGLO3R.mjs.map → chunk-HAPHEGVZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZG5S2DYH.mjs.map → chunk-HOBCDZ2D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJQVMI33.mjs.map → chunk-HZGRS7HG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AWHIX3FQ.mjs.map → chunk-IE4SA26O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KWAUHAGX.mjs.map → chunk-IHU6TBZQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HX3GPSEV.mjs.map → chunk-JDLVFGXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DCYZQKT5.mjs.map → chunk-JDTTHSQL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UNBTFF6K.mjs.map → chunk-JSSRK6RP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PZHQ37I6.mjs.map → chunk-K373M2BG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WIHUEHY3.mjs.map → chunk-K3VVHPG3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QFYMQSDX.mjs.map → chunk-KHBRO4FY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7AAHDJYY.mjs.map → chunk-MBBXTAA3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GULZHAFR.mjs.map → chunk-MXNCPIER.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L3MWDI6J.mjs.map → chunk-N55JEIM6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BHAHZQVO.mjs.map → chunk-NTPPBM7T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WWV3ASWP.mjs.map → chunk-O3YM7WCC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WTHOSLUO.mjs.map → chunk-O7KFAU3B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TTSG76TF.mjs.map → chunk-OD6C4XKP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PLMCHSS6.mjs.map → chunk-OLPFN3HZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E5T25VDS.mjs.map → chunk-OU5Y3UTY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5UBTVBPC.mjs.map → chunk-OXC2IURR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5Z3MOBIC.mjs.map → chunk-OYQAXY6H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YSF6K5W7.mjs.map → chunk-PDKESLKC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UAPKL5IP.mjs.map → chunk-PT2OF4QJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T7LCG3ZL.mjs.map → chunk-QJZ5YIXI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6FKT2TIN.mjs.map → chunk-R3U4ONSV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D6TVFZA6.mjs.map → chunk-RCNZOLEM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RBSHB26S.mjs.map → chunk-RL2G66LY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3TYENBPS.mjs.map → chunk-SKNUG6M5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PGGS4CPP.mjs.map → chunk-SUHXBGYR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W3WUNRIB.mjs.map → chunk-SV4C4UPN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RS5NVDUR.mjs.map → chunk-SWZ5LDC3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XU34NXIS.mjs.map → chunk-TFCXKUX5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QXU7U2E2.mjs.map → chunk-TFDVHULP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DMLHCYO2.mjs.map → chunk-TQIB47S6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AJC3F2YT.mjs.map → chunk-U3MIDVR7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MMY7MLSC.mjs.map → chunk-UCCJLDG6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S6NHNEQK.mjs.map → chunk-UCRVRBTA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AXUYY4T7.mjs.map → chunk-VJGOUAZ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BX2RQZG2.mjs.map → chunk-VQULIVGX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MFUQ5NBC.mjs.map → chunk-VRLS225Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DDCSKHZU.mjs.map → chunk-VVZ2I6CL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IQ6TLUA6.mjs.map → chunk-W37M2LIA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LV5G3A3I.mjs.map → chunk-WK4PPAAJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7AIQVQRI.mjs.map → chunk-WQZKREPI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F2HEHTHJ.mjs.map → chunk-XA3AGZCX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NTTKKJIS.mjs.map → chunk-XHM77HFZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEUNADU7.mjs.map → chunk-XJPXTYIE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QAZET2LQ.mjs.map → chunk-YHNOFYGM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UPBPNO3G.mjs.map → chunk-YTIAXTQR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KBKZR473.mjs.map → chunk-YX7TMA3N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ENQBQ3K2.mjs.map → chunk-Z5AFLXOE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IMB7RORC.mjs.map → chunk-ZDJN4F3W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N342XMFH.mjs.map → chunk-ZRSYQ3MT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2GG67TZD.mjs.map → chunk-ZS4EBCWC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5FTIQVXR.mjs.map → chunk-ZTUC7FCA.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\nimport { IBaseTransactionParams } from 'types/transaction-list-item.types';\nimport { explorerUrlBuilder } from 'utils/transactions/explorerUrlBuilder';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getReceiverData } from 'utils/transactions/getTransactionsHistory/helpers/getReceiverData';\nimport { getTransactionAction } from './getTransactionAction';\nimport { getTransactionAmount } from './getTransactionAmount';\nimport { getTransactionAsset } from './getTransactionAsset';\nimport { getTransactionAssets } from './getTransactionAssets';\n\ninterface IMapTransactionToListItemParamsType extends IBaseTransactionParams {\n transaction: ServerTransactionType;\n isPending?: boolean;\n profileImages?: Record<string, string>;\n}\n\nexport const mapTransactionToListItem = ({\n transaction,\n address,\n explorerAddress,\n egldLabel,\n isPending = false\n}: IMapTransactionToListItemParamsType): ITransactionListItem => {\n const { receiver, receiverAssets } = getReceiverData(transaction);\n const isIncomingTransaction = address === receiver;\n\n const action = getTransactionAction({\n transaction,\n currentUserAddress: address,\n egldLabel,\n isPending\n });\n\n const transactionAssets = getTransactionAssets({\n userIsReceiver: receiver === address,\n transaction,\n egldLabel\n });\n\n const hash = transaction.originalTxHash ?? transaction.txHash;\n\n const transactionListItem: ITransactionListItem = {\n asset: getTransactionAsset({\n ...transaction,\n transactionAssets,\n showDefaultState: isPending,\n status: transaction.status as TransactionServerStatusesEnum\n }),\n interactor: isIncomingTransaction ? transaction.sender : receiver,\n interactorAsset: isIncomingTransaction\n ? transaction.senderAssets?.iconSvg ?? transaction.senderAssets?.iconPng\n : receiverAssets?.iconSvg ?? receiverAssets?.iconPng,\n directionLabel: isIncomingTransaction ? 'From' : 'To',\n action,\n amount: getTransactionAmount({\n transactionAssets,\n isIncomingTransaction\n }),\n hash,\n status: transaction.status as TransactionServerStatusesEnum,\n timestamp: transaction.timestamp,\n link: getExplorerLink({\n explorerAddress,\n to: explorerUrlBuilder.transactionDetails(hash)\n })\n };\n\n return transactionListItem;\n};\n"],
|
|
5
|
-
"mappings": "+RAkBO,IAAMA,EAA2B,CAAC,CACvC,YAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,UAAAC,EAAY,EACd,IAAiE,CAC/D,GAAM,CAAE,SAAAC,EAAU,eAAAC,CAAe,EAAIC,EAAgBP,CAAW,EAC1DQ,EAAwBP,IAAYI,EAEpCI,EAASC,EAAqB,CAClC,YAAAV,EACA,mBAAoBC,EACpB,UAAAE,EACA,UAAAC,CACF,CAAC,EAEKO,EAAoBC,EAAqB,CAC7C,eAAgBP,IAAaJ,EAC7B,YAAAD,EACA,UAAAG,CACF,CAAC,EAEKU,EAAOb,EAAY,gBAAkBA,EAAY,OA4BvD,MA1BkD,CAChD,MAAOc,EAAoB,CACzB,GAAGd,EACH,kBAAAW,EACA,iBAAkBP,EAClB,OAAQJ,EAAY,MACtB,CAAC,EACD,WAAYQ,EAAwBR,EAAY,OAASK,EACzD,gBAAiBG,EACbR,EAAY,cAAc,SAAWA,EAAY,cAAc,QAC/DM,GAAgB,SAAWA,GAAgB,QAC/C,eAAgBE,EAAwB,OAAS,KACjD,OAAAC,EACA,OAAQM,EAAqB,CAC3B,kBAAAJ,EACA,sBAAAH,CACF,CAAC,EACD,KAAAK,EACA,OAAQb,EAAY,OACpB,UAAWA,EAAY,UACvB,KAAMgB,EAAgB,CACpB,gBAAAd,EACA,GAAIe,EAAmB,mBAAmBJ,CAAI,CAChD,CAAC,CACH,CAGF",
|
|
6
|
-
"names": ["mapTransactionToListItem", "transaction", "address", "explorerAddress", "egldLabel", "isPending", "receiver", "receiverAssets", "getReceiverData", "isIncomingTransaction", "action", "getTransactionAction", "transactionAssets", "getTransactionAssets", "hash", "getTransactionAsset", "getTransactionAmount", "getExplorerLink", "explorerUrlBuilder"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-AJC3F2YT.mjs";import{b as n}from"./chunk-DGMI66QS.mjs";import{j as s}from"./chunk-65L5EBBL.mjs";var l=({toastId:a,address:o,status:e,transactions:t,transactionsDisplayInfo:i,startTime:c,endTime:T})=>{let m=t.some(f=>s(f.status)),u=t[0]?.action?.name,p=n({address:o,sender:t[0]?.interactor??"",toastId:a,status:e,transactionsDisplayInfo:i,txActionName:u}),S=r(t);return{toastDataState:p,processedTransactionsStatus:S,transactionProgressState:m?{endTime:T,startTime:c}:null,toastId:a,transactions:t}};export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-3MW2H273.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/managers/ToastManager/helpers/createTransactionToast.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\nimport { getToastDataStateByStatus } from './getToastDataStateByStatus';\nimport { getToastTransactionsStatus } from './getToastTransactionsStatus';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateTransactionToastParamsType {\n toastId: string;\n address: string;\n status: TransactionServerStatusesEnum | TransactionBatchStatusesEnum;\n transactions: ITransactionListItem[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n explorerAddress: string;\n startTime: number;\n endTime: number;\n}\n\nexport const createTransactionToast = ({\n toastId,\n address,\n status,\n transactions,\n transactionsDisplayInfo,\n startTime,\n endTime\n}: CreateTransactionToastParamsType): ITransactionToast => {\n const hasPendingTransaction = transactions.some((tx) =>\n getIsTransactionPending(\n tx.status as TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n )\n );\n // Extracts action name from the first transaction\n const txActionName = transactions[0]?.action?.name;\n\n const toastDataState = getToastDataStateByStatus({\n address,\n sender: transactions[0]?.interactor ?? '',\n toastId,\n status,\n transactionsDisplayInfo,\n txActionName\n });\n\n const processedTransactionsStatus = getToastTransactionsStatus(transactions);\n\n const transactionProgressState = hasPendingTransaction\n ? {\n endTime,\n startTime\n }\n : null;\n\n return {\n toastDataState,\n processedTransactionsStatus,\n transactionProgressState,\n toastId,\n transactions\n };\n};\n"],
|
|
5
|
-
"mappings": "2HAqBO,IAAMA,EAAyB,CAAC,CACrC,QAAAC,EACA,QAAAC,EACA,OAAAC,EACA,aAAAC,EACA,wBAAAC,EACA,UAAAC,EACA,QAAAC,CACF,IAA2D,CACzD,IAAMC,EAAwBJ,EAAa,KAAMK,GAC/CC,EACED,EAAG,MACL,CACF,EAEME,EAAeP,EAAa,CAAC,GAAG,QAAQ,KAExCQ,EAAiBC,EAA0B,CAC/C,QAAAX,EACA,OAAQE,EAAa,CAAC,GAAG,YAAc,GACvC,QAAAH,EACA,OAAAE,EACA,wBAAAE,EACA,aAAAM,CACF,CAAC,EAEKG,EAA8BC,EAA2BX,CAAY,EAS3E,MAAO,CACL,eAAAQ,EACA,4BAAAE,EACA,yBAV+BN,EAC7B,CACE,QAAAD,EACA,UAAAD,CACF,EACA,KAMF,QAAAL,EACA,aAAAG,CACF,CACF",
|
|
6
|
-
"names": ["createTransactionToast", "toastId", "address", "status", "transactions", "transactionsDisplayInfo", "startTime", "endTime", "hasPendingTransaction", "tx", "getIsTransactionPending", "txActionName", "toastDataState", "getToastDataStateByStatus", "processedTransactionsStatus", "getToastTransactionsStatus"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-O2CA5SYO.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
|
|
2
|
-
//# sourceMappingURL=chunk-5NEP4WM3.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/transactions/getTransactionsHistory/getTransactionsHistory.ts"],
|
|
4
|
-
"sourcesContent": ["import isEmpty from 'lodash.isempty';\nimport { ITransactionListItem } from 'lib/sdkDappUi';\nimport type { IGetHistoricalTransactionsParams } from 'types/transaction-list-item.types';\nimport {\n createTransactionsHistoryFromSessions,\n mapServerTransactionsToListItems\n} from './helpers';\n\nexport const getTransactionsHistory = async ({\n transactionsSessions,\n address,\n explorerAddress,\n egldLabel\n}: IGetHistoricalTransactionsParams): Promise<ITransactionListItem[]> => {\n if (isEmpty(transactionsSessions)) {\n return [];\n }\n\n const signedTransactions =\n createTransactionsHistoryFromSessions(transactionsSessions);\n\n return mapServerTransactionsToListItems({\n transactions: signedTransactions,\n address,\n explorerAddress,\n egldLabel\n });\n};\n"],
|
|
5
|
-
"mappings": "kFAAA,OAAOA,MAAa,iBAQb,IAAMC,EAAyB,MAAO,CAC3C,qBAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,UAAAC,CACF,IAAyE,CACvE,GAAIC,EAAQJ,CAAoB,EAC9B,MAAO,CAAC,EAGV,IAAMK,EACJC,EAAsCN,CAAoB,EAE5D,OAAOO,EAAiC,CACtC,aAAcF,EACd,QAAAJ,EACA,gBAAAC,EACA,UAAAC,CACF,CAAC,CACH",
|
|
6
|
-
"names": ["isEmpty", "getTransactionsHistory", "transactionsSessions", "address", "explorerAddress", "egldLabel", "isEmpty", "signedTransactions", "createTransactionsHistoryFromSessions", "mapServerTransactionsToListItems"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-HYHCFQ2X.mjs";import{c as n}from"./chunk-D6TVFZA6.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-5Z3MOBIC.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=["sent"],a=["success"],e=["fail","cancelled","timedOut"],s=["invalid"],r=["timedOut"],c=["pending"],u=["success"],i=["fail","invalid"],o=["not executed"];function g(n){return n!=null&&(S(n)||d(n))}function I(n){return n!=null&&(T(n)||p(n))}function O(n){return n!=null&&(l(n)||x(n))}function F(n){return n!=null&&(m(n)||h(n))}function P(n){return n!=null&&E(n)}function S(n){return n!=null&&t.includes(n)}function T(n){return n!=null&&a.includes(n)}function l(n){return n!=null&&e.includes(n)}function m(n){return n!=null&&s.includes(n)}function E(n){return n!=null&&r.includes(n)}function d(n){return n!=null&&c.includes(n)}function p(n){return n!=null&&u.includes(n)}function x(n){return n!=null&&i.includes(n)}function h(n){return n!=null&&o.includes(n)}export{t as a,a as b,e as c,s as d,r as e,c as f,u as g,i as h,o as i,g as j,I as k,O as l,F as m,P as n,S as o,T as p,l as q,m as r,E as s,d as t,p as u,x as v,h as w};
|
|
2
|
-
//# sourceMappingURL=chunk-65L5EBBL.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/actions/transactions/transactionStateByStatus.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\n\nexport const pendingBatchTransactionsStates = [\n TransactionBatchStatusesEnum.sent\n];\n\nexport const successBatchTransactionsStates = [\n TransactionBatchStatusesEnum.success\n];\n\nexport const failBatchTransactionsStates = [\n TransactionBatchStatusesEnum.fail,\n TransactionBatchStatusesEnum.cancelled,\n TransactionBatchStatusesEnum.timedOut\n];\n\nexport const invalidBatchTransactionsStates = [\n TransactionBatchStatusesEnum.invalid\n];\n\nexport const timedOutBatchTransactionsStates = [\n TransactionBatchStatusesEnum.timedOut\n];\n\nexport const pendingServerTransactionsStatuses = [\n TransactionServerStatusesEnum.pending\n];\n\nexport const successServerTransactionsStates = [\n TransactionServerStatusesEnum.success\n];\n\nexport const failServerTransactionsStates = [\n TransactionServerStatusesEnum.fail,\n TransactionServerStatusesEnum.invalid\n];\n\nexport const notExecutedServerTransactionsStates = [\n TransactionServerStatusesEnum.notExecuted\n];\n\nexport function getIsTransactionPending(\n status?: TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n) {\n return (\n status != null &&\n (isBatchTransactionPending(status as TransactionBatchStatusesEnum) ||\n isServerTransactionPending(status as TransactionServerStatusesEnum))\n );\n}\n\nexport function getIsTransactionSuccessful(\n status?: TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n) {\n return (\n status != null &&\n (isBatchTransactionSuccessful(status as TransactionBatchStatusesEnum) ||\n isServerTransactionSuccessful(status as TransactionServerStatusesEnum))\n );\n}\n\nexport function getIsTransactionFailed(\n status?: TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n) {\n return (\n status != null &&\n (isBatchTransactionFailed(status as TransactionBatchStatusesEnum) ||\n isServerTransactionFailed(status as TransactionServerStatusesEnum))\n );\n}\n\nexport function getIsTransactionNotExecuted(\n status?: TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n) {\n return (\n status != null &&\n (isBatchTransactionInvalid(status as TransactionBatchStatusesEnum) ||\n isServerTransactionNotExecuted(status as TransactionServerStatusesEnum))\n );\n}\n\nexport function getIsTransactionTimedOut(\n status?: TransactionServerStatusesEnum | TransactionBatchStatusesEnum\n) {\n return (\n status != null &&\n isBatchTransactionTimedOut(status as TransactionBatchStatusesEnum)\n );\n}\n\nexport function isBatchTransactionPending(\n status?: TransactionBatchStatusesEnum\n) {\n return status != null && pendingBatchTransactionsStates.includes(status);\n}\n\nexport function isBatchTransactionSuccessful(\n status: TransactionBatchStatusesEnum\n) {\n return status != null && successBatchTransactionsStates.includes(status);\n}\n\nexport function isBatchTransactionFailed(status: TransactionBatchStatusesEnum) {\n return status != null && failBatchTransactionsStates.includes(status);\n}\n\nexport function isBatchTransactionInvalid(\n status: TransactionBatchStatusesEnum\n) {\n return status != null && invalidBatchTransactionsStates.includes(status);\n}\n\nexport function isBatchTransactionTimedOut(\n status?: TransactionBatchStatusesEnum\n) {\n return status != null && timedOutBatchTransactionsStates.includes(status);\n}\n\nexport function isServerTransactionPending(\n status?: TransactionServerStatusesEnum\n) {\n return status != null && pendingServerTransactionsStatuses.includes(status);\n}\nexport function isServerTransactionSuccessful(\n status: TransactionServerStatusesEnum\n) {\n return status != null && successServerTransactionsStates.includes(status);\n}\n\nexport function isServerTransactionFailed(\n status: TransactionServerStatusesEnum\n) {\n return status != null && failServerTransactionsStates.includes(status);\n}\n\nexport function isServerTransactionNotExecuted(\n status: TransactionServerStatusesEnum\n) {\n return status != null && notExecutedServerTransactionsStates.includes(status);\n}\n"],
|
|
5
|
-
"mappings": "AAKO,IAAMA,EAAiC,OAE9C,EAEaC,EAAiC,UAE9C,EAEaC,EAA8B,8BAI3C,EAEaC,EAAiC,UAE9C,EAEaC,EAAkC,WAE/C,EAEaC,EAAoC,UAEjD,EAEaC,EAAkC,UAE/C,EAEaC,EAA+B,iBAG5C,EAEaC,EAAsC,eAEnD,EAEO,SAASC,EACdC,EACA,CACA,OACEA,GAAU,OACTC,EAA0BD,CAAsC,GAC/DE,EAA2BF,CAAuC,EAExE,CAEO,SAASG,EACdH,EACA,CACA,OACEA,GAAU,OACTI,EAA6BJ,CAAsC,GAClEK,EAA8BL,CAAuC,EAE3E,CAEO,SAASM,EACdN,EACA,CACA,OACEA,GAAU,OACTO,EAAyBP,CAAsC,GAC9DQ,EAA0BR,CAAuC,EAEvE,CAEO,SAASS,EACdT,EACA,CACA,OACEA,GAAU,OACTU,EAA0BV,CAAsC,GAC/DW,EAA+BX,CAAuC,EAE5E,CAEO,SAASY,EACdZ,EACA,CACA,OACEA,GAAU,MACVa,EAA2Bb,CAAsC,CAErE,CAEO,SAASC,EACdD,EACA,CACA,OAAOA,GAAU,MAAQV,EAA+B,SAASU,CAAM,CACzE,CAEO,SAASI,EACdJ,EACA,CACA,OAAOA,GAAU,MAAQT,EAA+B,SAASS,CAAM,CACzE,CAEO,SAASO,EAAyBP,EAAsC,CAC7E,OAAOA,GAAU,MAAQR,EAA4B,SAASQ,CAAM,CACtE,CAEO,SAASU,EACdV,EACA,CACA,OAAOA,GAAU,MAAQP,EAA+B,SAASO,CAAM,CACzE,CAEO,SAASa,EACdb,EACA,CACA,OAAOA,GAAU,MAAQN,EAAgC,SAASM,CAAM,CAC1E,CAEO,SAASE,EACdF,EACA,CACA,OAAOA,GAAU,MAAQL,EAAkC,SAASK,CAAM,CAC5E,CACO,SAASK,EACdL,EACA,CACA,OAAOA,GAAU,MAAQJ,EAAgC,SAASI,CAAM,CAC1E,CAEO,SAASQ,EACdR,EACA,CACA,OAAOA,GAAU,MAAQH,EAA6B,SAASG,CAAM,CACvE,CAEO,SAASW,EACdX,EACA,CACA,OAAOA,GAAU,MAAQF,EAAoC,SAASE,CAAM,CAC9E",
|
|
6
|
-
"names": ["pendingBatchTransactionsStates", "successBatchTransactionsStates", "failBatchTransactionsStates", "invalidBatchTransactionsStates", "timedOutBatchTransactionsStates", "pendingServerTransactionsStatuses", "successServerTransactionsStates", "failServerTransactionsStates", "notExecutedServerTransactionsStates", "getIsTransactionPending", "status", "isBatchTransactionPending", "isServerTransactionPending", "getIsTransactionSuccessful", "isBatchTransactionSuccessful", "isServerTransactionSuccessful", "getIsTransactionFailed", "isBatchTransactionFailed", "isServerTransactionFailed", "getIsTransactionNotExecuted", "isBatchTransactionInvalid", "isServerTransactionNotExecuted", "getIsTransactionTimedOut", "isBatchTransactionTimedOut"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/managers/ToastManager/types/toast.types.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n txActionName?: string;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
|
|
5
|
-
"mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,IA0CAC,OACVA,EAAA,wBAA0B,0BAC1BA,EAAA,MAAQ,cAERA,EAAA,8BAAgC,gCAEhCA,EAAA,yBAA2B,2BAC3BA,EAAA,KAAO,kBACPA,EAAA,KAAO,kBARGA,OAAA",
|
|
6
|
-
"names": ["TransactionsDefaultTitles", "ToastEventsEnum"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/types/transaction-list-item.types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { SessionTransactionType } from 'types/transactions.types';\n\nexport enum TransactionIconTypeEnum {\n FAILED = 'failed',\n MULTIPLE_ASSETS = 'multiple_assets',\n ASSET = 'asset',\n NFT = 'nft',\n SFT = 'sft',\n CONTRACT = 'contract',\n SYMBOL = 'symbol'\n}\nexport interface IBaseTransactionParams {\n address: string;\n explorerAddress: string;\n egldLabel: string;\n}\n\nexport interface IGetHistoricalTransactionsParams\n extends IBaseTransactionParams {\n transactionsSessions: Record<string, SessionTransactionType>;\n}\n\nexport enum TransactionActionMethodTypeEnum {\n transfer = 'Transfer',\n delegate = 'Delegate',\n stake = 'Stake',\n unDelegate = 'Undelegate',\n stakeClaimRewards = 'Stake Claim Rewards',\n reDelegateRewards = 'Redelegate Rewards',\n withdraw = 'Withdraw',\n claimLockedAssets = 'Claim Locked Assets',\n swapTokensFixedInput = 'Swap',\n swapTokensFixedOutput = 'Swap',\n swap = 'Swap',\n multiPairSwap = 'Multiple Pair Swap',\n aggregateEgld = 'Aggregate EGLD',\n addLiquidity = 'Add Liquidity',\n addLiquidityProxy = 'Add Liquidity Proxy',\n removeLiquidity = 'Remove Liquidity',\n removeLiquidityProxy = 'Remove Liquidity Proxy',\n enterFarm = 'Enter Farm',\n enterFarmProxy = 'Enter Farm Proxy',\n enterFarmAndLockRewards = 'Enter Farm & Lock Rewards',\n enterFarmAndLockRewardsProxy = 'Enter Farm & Lock Rewards Proxy',\n exitFarm = 'Exit Farm',\n exitFarmProxy = 'Exit Farm Proxy',\n claimRewards = 'Claim Rewards',\n claimRewardsProxy = 'Claim Rewards Proxy',\n compoundRewards = 'Reinvest Rewards',\n compoundRewardsProxy = 'Reinvest Rewards Proxy',\n createNftMinter = 'Create NFT Minter',\n scDeploy = 'Smart Contract Deploy',\n wrapEgld = 'Wrap EGLD',\n unwrapEgld = 'Unwrap EGLD',\n lockAssets = 'Lock Assets',\n unlockAssets = 'Unlock Assets',\n mergeLockedAssetTokens = 'Merge Locked Tokens',\n stakeFarm = 'Stake Farm',\n stakeFarmProxy = 'Stake Farm Proxy',\n stakeFarmTokens = 'Stake Farm Tokens',\n stakeFarmTokensProxy = 'Stake Farm Tokens Proxy',\n unstakeFarm = 'Unstake Farm',\n unstakeFarmProxy = 'Unstake Farm Proxy Proxy',\n unstakeFarmTokens = 'Unstake Farm Tokens',\n unstakeFarmTokensProxy = 'Unstake Farm Proxy',\n claimDualYield = 'Claim Dual Yield',\n claimDualYieldProxy = 'Claim Dual Yield Proxy',\n unbondFarm = 'Unbond Farm',\n ClaimDeveloperRewards = 'Claim Developer Rewards',\n ChangeOwnerAddress = 'Change Owner Address',\n SetUserName = 'Set Username',\n SaveKeyValue = 'Save Key Value',\n ESDTTransfer = 'Transfer ESDT',\n ESDTBurn = 'Burn ESDT',\n ESDTFreeze = 'Freeze ESDT',\n ESDTUnFreeze = 'Unfreeze ESDT',\n ESDTWipe = 'Wipe ESDT',\n ESDTPause = 'Pause ESDT',\n ESDTUnPause = 'Unpause ESDTBurn',\n ESDTSetRole = 'Set ESDT Role',\n ESDTUnSetRole = 'Unset ESDT Role',\n ESDTSetLimitedTransfer = 'Set ESDT Limited Transfer',\n ESDTUnSetLimitedTransfer = 'Unset ESDT Limited Transfer',\n ESDTLocalBurn = 'Local ESDT Burn',\n ESDTLocalMint = 'Local ESDT Mint',\n ESDTNFTTransfer = 'Transfer ESDT/NFT',\n ESDTNFTCreate = 'Create ESDT/NFT',\n ESDTNFTAddQuantity = 'Add ESDT/NFT Quantity',\n ESDTNFTBurn = 'Burn ESDT/NFT',\n ESDTNFTAddURI = 'Add ESDT/NFT URI',\n ESDTNFTUpdateAttributes = 'Update ESDT/NFT Attributes',\n MultiESDTNFTTransfer = 'Multiple ESDT/NFT Transfer',\n SetGuardian = 'Register Guardian',\n GuardAccount = 'Activate Guardian',\n UnGuardAccount = 'Deactivate Guardian'\n}\n"],
|
|
5
|
-
"mappings": "AAEO,IAAKA,OACVA,EAAA,OAAS,SACTA,EAAA,gBAAkB,kBAClBA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,SAAW,WACXA,EAAA,OAAS,SAPCA,OAAA,IAoBAC,OACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,WAAa,aACbA,EAAA,kBAAoB,sBACpBA,EAAA,kBAAoB,qBACpBA,EAAA,SAAW,WACXA,EAAA,kBAAoB,sBACpBA,EAAA,qBAAuB,OACvBA,EAAA,sBAAwB,OACxBA,EAAA,KAAO,OACPA,EAAA,cAAgB,qBAChBA,EAAA,cAAgB,iBAChBA,EAAA,aAAe,gBACfA,EAAA,kBAAoB,sBACpBA,EAAA,gBAAkB,mBAClBA,EAAA,qBAAuB,yBACvBA,EAAA,UAAY,aACZA,EAAA,eAAiB,mBACjBA,EAAA,wBAA0B,4BAC1BA,EAAA,6BAA+B,kCAC/BA,EAAA,SAAW,YACXA,EAAA,cAAgB,kBAChBA,EAAA,aAAe,gBACfA,EAAA,kBAAoB,sBACpBA,EAAA,gBAAkB,mBAClBA,EAAA,qBAAuB,yBACvBA,EAAA,gBAAkB,oBAClBA,EAAA,SAAW,wBACXA,EAAA,SAAW,YACXA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,uBAAyB,sBACzBA,EAAA,UAAY,aACZA,EAAA,eAAiB,mBACjBA,EAAA,gBAAkB,oBAClBA,EAAA,qBAAuB,0BACvBA,EAAA,YAAc,eACdA,EAAA,iBAAmB,2BACnBA,EAAA,kBAAoB,sBACpBA,EAAA,uBAAyB,qBACzBA,EAAA,eAAiB,mBACjBA,EAAA,oBAAsB,yBACtBA,EAAA,WAAa,cACbA,EAAA,sBAAwB,0BACxBA,EAAA,mBAAqB,uBACrBA,EAAA,YAAc,eACdA,EAAA,aAAe,iBACfA,EAAA,aAAe,gBACfA,EAAA,SAAW,YACXA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,SAAW,YACXA,EAAA,UAAY,aACZA,EAAA,YAAc,mBACdA,EAAA,YAAc,gBACdA,EAAA,cAAgB,kBAChBA,EAAA,uBAAyB,4BACzBA,EAAA,yBAA2B,8BAC3BA,EAAA,cAAgB,kBAChBA,EAAA,cAAgB,kBAChBA,EAAA,gBAAkB,oBAClBA,EAAA,cAAgB,kBAChBA,EAAA,mBAAqB,wBACrBA,EAAA,YAAc,gBACdA,EAAA,cAAgB,mBAChBA,EAAA,wBAA0B,6BAC1BA,EAAA,qBAAuB,6BACvBA,EAAA,YAAc,oBACdA,EAAA,aAAe,oBACfA,EAAA,eAAiB,sBAxEPA,OAAA",
|
|
6
|
-
"names": ["TransactionIconTypeEnum", "TransactionActionMethodTypeEnum"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-O4E4JGDU.mjs";import{v as m}from"./chunk-YAONXG5V.mjs";import{s as n}from"./chunk-D6TVFZA6.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-ZONHCECO.mjs";import{a as p}from"./chunk-LV5G3A3I.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
|
|
2
|
-
//# sourceMappingURL=chunk-IQ6TLUA6.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-RYPO7VR2.mjs";import{a as d}from"./chunk-3YSWYYBW.mjs";import{a as f}from"./chunk-2A6ODBDO.mjs";import{a as h}from"./chunk-3L7HZ2SO.mjs";var g=t=>t.sort((n,i)=>i.timestamp-n.timestamp),k=async({transactions:t,address:n,explorerAddress:i,egldLabel:u,skipFetchingTransactions:I=!1})=>{let o=[],e=[];if(t.forEach(s=>{let a=f(s.hash);a?o.push(a):e.push(s.hash)}),e.length===0)return g(o);let c=I?t.map(s=>({...s,txHash:s.hash})):await p(e),l=c.map(s=>s.txHash),T=e.filter(s=>!l.includes(s));if(T.length>0){let a=t.filter(r=>T.includes(r.hash)).map(r=>({...r,txHash:r.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...a)}let m=new Map;return o.forEach(s=>{let a=s.hash;a&&m.set(String(a),s)}),c.forEach(s=>{let a=h({transaction:s,address:n,explorerAddress:i,egldLabel:u});a.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:a}),m.set(s.txHash,a)}),g(Array.from(m.values()))};export{k as a};
|
|
2
|
-
//# sourceMappingURL=chunk-O2CA5SYO.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.ts"],
|
|
4
|
-
"sourcesContent": ["import { getServerTransactionsByHashes } from 'apiCalls/transactions/getServerTransactionsByHashes';\nimport { ITransactionListItem } from 'lib/sdkDappUi';\nimport { saveToCache } from 'store/actions/cache/cacheActions';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { getCachedTransactionListItem } from './getCachedTransactionListItem';\nimport { mapTransactionToListItem } from './mapTransactionToListItem';\n\ninterface IMapServerTransactionsToListItemsParams {\n transactions: SignedTransactionType[];\n address: string;\n explorerAddress: string;\n egldLabel: string;\n skipFetchingTransactions?: boolean;\n}\n\nconst sortTransactionsByTimestamp = (transactions: ITransactionListItem[]) =>\n transactions.sort((a, b) => b.timestamp - a.timestamp);\n\nexport const mapServerTransactionsToListItems = async ({\n transactions,\n address,\n explorerAddress,\n egldLabel,\n skipFetchingTransactions = false\n}: IMapServerTransactionsToListItemsParams): Promise<\n ITransactionListItem[]\n> => {\n const cachedTransactions: ITransactionListItem[] = [];\n const hashesToFetch: string[] = [];\n\n transactions.forEach((transaction) => {\n const cachedTransaction = getCachedTransactionListItem(transaction.hash);\n if (cachedTransaction) {\n cachedTransactions.push(cachedTransaction);\n } else {\n hashesToFetch.push(transaction.hash);\n }\n });\n\n if (hashesToFetch.length === 0) {\n return sortTransactionsByTimestamp(cachedTransactions);\n }\n\n const newTransactions: ServerTransactionType[] = skipFetchingTransactions\n ? transactions.map((tx) => ({\n // casting is correct since store transaction was replaced with fetched server transaction\n ...(tx as unknown as ServerTransactionType),\n txHash: tx.hash\n }))\n : await getServerTransactionsByHashes(hashesToFetch);\n\n const retrievedHashes = newTransactions.map((tx) => tx.txHash);\n const missingHashes = hashesToFetch.filter(\n (hash) => !retrievedHashes.includes(hash)\n );\n\n if (missingHashes.length > 0) {\n const filteredTransactions = transactions.filter((transaction) =>\n missingHashes.includes(transaction.hash)\n );\n\n // In case the transactions were not found, we create a dummy transaction with the pending status\n // until all pending transactions are returned from the API\n const pendingDummyTransactions = filteredTransactions.map(\n (transaction) =>\n ({\n ...transaction,\n txHash: transaction.hash,\n price: 0,\n status: TransactionServerStatusesEnum.pending,\n gasUsed: 0,\n miniBlockHash: '',\n receiverShard: 0,\n round: 0,\n senderShard: 0,\n timestamp: Date.now()\n }) as ServerTransactionType\n );\n\n newTransactions.push(...pendingDummyTransactions);\n }\n\n const uniqueTransactionsMap = new Map<string, ITransactionListItem>();\n\n cachedTransactions.forEach((item) => {\n const key = item.hash;\n if (!key) {\n return;\n }\n uniqueTransactionsMap.set(String(key), item);\n });\n\n newTransactions.forEach((transaction) => {\n const transactionListItem = mapTransactionToListItem({\n transaction,\n address,\n explorerAddress,\n egldLabel\n });\n\n if (transactionListItem.status !== TransactionServerStatusesEnum.pending) {\n saveToCache({\n key: `transaction-${transaction.txHash}`,\n value: transactionListItem\n });\n }\n\n uniqueTransactionsMap.set(transaction.txHash, transactionListItem);\n });\n\n return sortTransactionsByTimestamp(\n Array.from(uniqueTransactionsMap.values())\n );\n};\n"],
|
|
5
|
-
"mappings": "oKAiBA,IAAMA,EAA+BC,GACnCA,EAAa,KAAK,CAACC,EAAGC,IAAMA,EAAE,UAAYD,EAAE,SAAS,EAE1CE,EAAmC,MAAO,CACrD,aAAAH,EACA,QAAAI,EACA,gBAAAC,EACA,UAAAC,EACA,yBAAAC,EAA2B,EAC7B,IAEK,CACH,IAAMC,EAA6C,CAAC,EAC9CC,EAA0B,CAAC,EAWjC,GATAT,EAAa,QAASU,GAAgB,CACpC,IAAMC,EAAoBC,EAA6BF,EAAY,IAAI,EACnEC,EACFH,EAAmB,KAAKG,CAAiB,EAEzCF,EAAc,KAAKC,EAAY,IAAI,CAEvC,CAAC,EAEGD,EAAc,SAAW,EAC3B,OAAOV,EAA4BS,CAAkB,EAGvD,IAAMK,EAA2CN,EAC7CP,EAAa,IAAKc,IAAQ,CAExB,GAAIA,EACJ,OAAQA,EAAG,IACb,EAAE,EACF,MAAMC,EAA8BN,CAAa,EAE/CO,EAAkBH,EAAgB,IAAKC,GAAOA,EAAG,MAAM,EACvDG,EAAgBR,EAAc,OACjCS,GAAS,CAACF,EAAgB,SAASE,CAAI,CAC1C,EAEA,GAAID,EAAc,OAAS,EAAG,CAO5B,IAAME,EANuBnB,EAAa,OAAQU,GAChDO,EAAc,SAASP,EAAY,IAAI,CACzC,EAIsD,IACnDA,IACE,CACC,GAAGA,EACH,OAAQA,EAAY,KACpB,MAAO,EACP,iBACA,QAAS,EACT,cAAe,GACf,cAAe,EACf,MAAO,EACP,YAAa,EACb,UAAW,KAAK,IAAI,CACtB,EACJ,EAEAG,EAAgB,KAAK,GAAGM,CAAwB,CAClD,CAEA,IAAMC,EAAwB,IAAI,IAElC,OAAAZ,EAAmB,QAASa,GAAS,CACnC,IAAMC,EAAMD,EAAK,KACZC,GAGLF,EAAsB,IAAI,OAAOE,CAAG,EAAGD,CAAI,CAC7C,CAAC,EAEDR,EAAgB,QAASH,GAAgB,CACvC,IAAMa,EAAsBC,EAAyB,CACnD,YAAAd,EACA,QAAAN,EACA,gBAAAC,EACA,UAAAC,CACF,CAAC,EAEGiB,EAAoB,oBACtBE,EAAY,CACV,IAAK,eAAef,EAAY,MAAM,GACtC,MAAOa,CACT,CAAC,EAGHH,EAAsB,IAAIV,EAAY,OAAQa,CAAmB,CACnE,CAAC,EAEMxB,EACL,MAAM,KAAKqB,EAAsB,OAAO,CAAC,CAC3C,CACF",
|
|
6
|
-
"names": ["sortTransactionsByTimestamp", "transactions", "a", "b", "mapServerTransactionsToListItems", "address", "explorerAddress", "egldLabel", "skipFetchingTransactions", "cachedTransactions", "hashesToFetch", "transaction", "cachedTransaction", "getCachedTransactionListItem", "newTransactions", "tx", "getServerTransactionsByHashes", "retrievedHashes", "missingHashes", "hash", "pendingDummyTransactions", "uniqueTransactionsMap", "item", "key", "transactionListItem", "mapTransactionToListItem", "saveToCache"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-IOTN5P72.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-E5H5BPFX.mjs";import{a as R}from"./chunk-SRY5QN4N.mjs";import{a as oe}from"./chunk-QXU7U2E2.mjs";import{a as te}from"./chunk-NOLOZJ37.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-W3WUNRIB.mjs";import{a as p}from"./chunk-E5T25VDS.mjs";import{a as ee}from"./chunk-RLHETJG2.mjs";import{a as b}from"./chunk-HX3GPSEV.mjs";import{a as ne}from"./chunk-I3KT7K7E.mjs";import{a as L}from"./chunk-QJGFIK7H.mjs";import{b as Z}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Q}from"./chunk-NRXYSTRW.mjs";import{j as Y,l as U,u as E,v as y,w as M}from"./chunk-YAONXG5V.mjs";import{a as P}from"./chunk-AWHIX3FQ.mjs";import{a as $}from"./chunk-ALXGPWX7.mjs";import{a as N}from"./chunk-4TBVQD27.mjs";import{a as J}from"./chunk-6FKT2TIN.mjs";import{g as X}from"./chunk-2IUBMLF4.mjs";import{a as F,q as K,s as l}from"./chunk-D6TVFZA6.mjs";import{f as B}from"./chunk-UERJ6AKK.mjs";import{b as A,c as H}from"./chunk-SAAOQW7P.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as j,c as q}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-ZVIKYGX5.mjs";import{a as n}from"./chunk-ZONHCECO.mjs";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await ie({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await b({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await te({shouldInitProvider:!0});this.provider=r}catch(r){throw Y({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((i,s)=>oe({manager:e,resolve:i,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ge=3e4,ve=5e3,me=3e3,z=class a{constructor(){this.store=K();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=G(o),r=B(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=Z(l());if(!(!this.shouldCheckConnection()||o))try{await M().getProvider().getAddress()}catch{if(U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,ve)}},ge))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new f({shouldInitProvider:!0});await o.init();let e=new E(o);o.getType=()=>n.ledger,y(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,U.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:me,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let i=await this.provider.signTransactions(e)??[];return await ne(i)}catch(i){throw await r({shouldCancelAction:!0}),i}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=L.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=A(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as he}from"@multiversx/sdk-extension-provider/out/extensionProvider";var W=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!1}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=he.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var x=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await b({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(i){throw await t({shouldCancelAction:!0}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[n.metamask]})};this.walletUrl=r??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=A(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as fe}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{i.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:fe.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:i}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??N.walletConnectDeepLink;this._approval=i,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=H(l());if(j(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{J()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,w=new Q(v,t,D,m,O);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:i="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??N.walletConnectDeepLink;t.updateData({wcURI:i,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(i)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:i="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!i}),{address:i,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var T=class{static set customProviders(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new W;break}case n.crossWindow:{r=new k;break}case n.ledger:{r=new f({anchor:e}),await z.getInstance().init();break}case n.metamask:{r=new x;break}case n.walletConnect:{let s=q(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=$();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new E(r);y(t);let i="provider"in r&&r.provider instanceof L;return se(i?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){M().cancelLogin(),y(null),F(n.none)}};T._customProviders=[];var we=(a,o)=>a.some(e=>e.type===o);async function g({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){return await new Promise(async(i,s)=>{let{manager:d,onClose:h}=await ee({cancelAction:e}),v=Object.values(T.customProviders),m=v.reduce((u,V)=>(u[V.type]=V.name,u),{}),O={...c,...m},D=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let w=we(v,r)?r:n.none;d.updateData({name:O[w],type:w});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:o}){try{return await g({message:a,handleSignMessage:o,providerType:c.ledger})}catch(e){let{errorMessage:r}=re(e);throw r?{message:r}:e}}export{ce as a,f as b,z as c,T as d,g as e,k as f,W as g,x as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-O4E4JGDU.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunk-3MW2H273.mjs";import{a as l}from"./chunk-3TYENBPS.mjs";import{a as u}from"./chunk-YGT2XHMA.mjs";import{j as m,k as p,l as d,n as f}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-O2CA5SYO.mjs";var z=async({toastList:g,transactionsSessions:S,account:o,existingCompletedTransactions:y=[],skipFetchingTransactions:F=!1})=>{let n=[],a=[...y],e=l(),C=u();for(let t of g.transactionToasts){let r=S[t.toastId];if(!r?.status)continue;let{status:s,transactions:P,transactionsDisplayInfo:x}=r,A=await T({transactions:P,address:o.address,explorerAddress:e,egldLabel:C,skipFetchingTransactions:F}),E=f(s),L=d(s),b=p(s),i=E||L||b,h=m(s),{startTime:v,endTime:R}=t;if(i&&a.some(O=>O.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:A,transactionsDisplayInfo:x,explorerAddress:e,startTime:v,endTime:R});i&&a.push(c),h&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{z as a};
|
|
2
|
-
//# sourceMappingURL=chunk-O5IYHOPF.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/managers/ToastManager/helpers/createToastsFromTransactions.ts"],
|
|
4
|
-
"sourcesContent": ["import { getEgldLabel } from 'methods/network/getEgldLabel';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport {\n getIsTransactionFailed,\n getIsTransactionPending,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\nimport { AccountSliceType } from 'store/slices/account/account.types';\nimport { ToastsSliceType } from 'store/slices/toast/toastSlice.types';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { SessionTransactionType } from 'types/transactions.types';\nimport { mapServerTransactionsToListItems } from 'utils/transactions/getTransactionsHistory/helpers';\nimport { createTransactionToast } from './createTransactionToast';\nimport { ITransactionToast } from '../types/toast.types';\ninterface CreateToastsFromTransactionsReturnType {\n pendingTransactionToasts: ITransactionToast[];\n completedTransactionToasts: ITransactionToast[];\n}\n\ninterface CreateToastsFromTransactionsParamsType {\n toastList: ToastsSliceType;\n transactionsSessions: Record<string, SessionTransactionType>;\n account: AccountSliceType;\n existingCompletedTransactions?: ITransactionToast[];\n skipFetchingTransactions?: boolean;\n}\n\nexport const createToastsFromTransactions = async ({\n toastList,\n transactionsSessions,\n account,\n existingCompletedTransactions = [],\n skipFetchingTransactions = false\n}: CreateToastsFromTransactionsParamsType): Promise<CreateToastsFromTransactionsReturnType> => {\n const pendingTransactionToasts: ITransactionToast[] = [];\n const completedTransactionToasts: ITransactionToast[] = [\n ...existingCompletedTransactions\n ];\n const explorerAddress = getExplorerAddress();\n const egldLabel = getEgldLabel();\n\n for (const toast of toastList.transactionToasts) {\n const transactionSession = transactionsSessions[toast.toastId];\n if (!transactionSession?.status) {\n continue;\n }\n\n const { status, transactions, transactionsDisplayInfo } =\n transactionSession;\n\n const interprettedTransactions = await mapServerTransactionsToListItems({\n transactions,\n address: account.address,\n explorerAddress,\n egldLabel,\n skipFetchingTransactions\n });\n\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isTimedOut || isFailed || isSuccessful;\n const isPending = getIsTransactionPending(status);\n const { startTime, endTime } = toast;\n\n if (\n isCompleted &&\n completedTransactionToasts.some((t) => t.toastId === toast.toastId)\n ) {\n continue;\n }\n\n const transactionToast = createTransactionToast({\n toastId: toast.toastId,\n address: account.address,\n status: status as TransactionServerStatusesEnum,\n transactions: interprettedTransactions,\n transactionsDisplayInfo,\n explorerAddress,\n startTime,\n endTime\n });\n\n if (isCompleted) {\n completedTransactionToasts.push(transactionToast);\n }\n\n if (isPending) {\n pendingTransactionToasts.push(transactionToast);\n }\n }\n\n return {\n pendingTransactionToasts,\n completedTransactionToasts\n };\n};\n"],
|
|
5
|
-
"mappings": "kOA4BO,IAAMA,EAA+B,MAAO,CACjD,UAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,8BAAAC,EAAgC,CAAC,EACjC,yBAAAC,EAA2B,EAC7B,IAA+F,CAC7F,IAAMC,EAAgD,CAAC,EACjDC,EAAkD,CACtD,GAAGH,CACL,EACMI,EAAkBC,EAAmB,EACrCC,EAAYC,EAAa,EAE/B,QAAWC,KAASX,EAAU,kBAAmB,CAC/C,IAAMY,EAAqBX,EAAqBU,EAAM,OAAO,EAC7D,GAAI,CAACC,GAAoB,OACvB,SAGF,GAAM,CAAE,OAAAC,EAAQ,aAAAC,EAAc,wBAAAC,CAAwB,EACpDH,EAEII,EAA2B,MAAMC,EAAiC,CACtE,aAAAH,EACA,QAASZ,EAAQ,QACjB,gBAAAK,EACA,UAAAE,EACA,yBAAAL,CACF,CAAC,EAEKc,EAAaC,EAAyBN,CAAM,EAC5CO,EAAWC,EAAuBR,CAAM,EACxCS,EAAeC,EAA2BV,CAAM,EAChDW,EAAcN,GAAcE,GAAYE,EACxCG,EAAYC,EAAwBb,CAAM,EAC1C,CAAE,UAAAc,EAAW,QAAAC,CAAQ,EAAIjB,EAE/B,GACEa,GACAlB,EAA2B,KAAMuB,GAAMA,EAAE,UAAYlB,EAAM,OAAO,EAElE,SAGF,IAAMmB,EAAmBC,EAAuB,CAC9C,QAASpB,EAAM,QACf,QAAST,EAAQ,QACjB,OAAQW,EACR,aAAcG,EACd,wBAAAD,EACA,gBAAAR,EACA,UAAAoB,EACA,QAAAC,CACF,CAAC,EAEGJ,GACFlB,EAA2B,KAAKwB,CAAgB,EAG9CL,GACFpB,EAAyB,KAAKyB,CAAgB,CAElD,CAEA,MAAO,CACL,yBAAAzB,EACA,2BAAAC,CACF,CACF",
|
|
6
|
-
"names": ["createToastsFromTransactions", "toastList", "transactionsSessions", "account", "existingCompletedTransactions", "skipFetchingTransactions", "pendingTransactionToasts", "completedTransactionToasts", "explorerAddress", "getExplorerAddress", "egldLabel", "getEgldLabel", "toast", "transactionSession", "status", "transactions", "transactionsDisplayInfo", "interprettedTransactions", "mapServerTransactionsToListItems", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "isPending", "getIsTransactionPending", "startTime", "endTime", "t", "transactionToast", "createTransactionToast"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-N342XMFH.mjs";import{h as o}from"./chunk-OEPTRJEB.mjs";var D=({data:r,highlight:a,identifier:i})=>{let e={};return Object.values(o).forEach(t=>{let c=d({data:r,identifier:i,decodeMethod:t,highlight:a});e[t]=c}),e};export{D as a};
|
|
2
|
-
//# sourceMappingURL=chunk-PLMCHSS6.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as U}from"./chunk-PLMCHSS6.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-LN5UXO64.mjs";import{a as B}from"./chunk-PHOF3Z5D.mjs";import{a as $}from"./chunk-RBZC4PEU.mjs";import{a as _}from"./chunk-BQX7MJR6.mjs";import{a as R}from"./chunk-URJQWHBM.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-WWV3ASWP.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{w as v}from"./chunk-YAONXG5V.mjs";import{a as x}from"./chunk-3TYENBPS.mjs";import{a as G}from"./chunk-BRJNX4JF.mjs";import{a as C,c as F,f}from"./chunk-PJWJZHIS.mjs";import{a as b}from"./chunk-KD2IQ32V.mjs";import{c as L}from"./chunk-TI37DKBT.mjs";import{k as h}from"./chunk-LHEH7L4L.mjs";import{a as A}from"./chunk-6NK63AU5.mjs";import{BigNumber as Dt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:s,egldLabel:n,network:e,gasPriceData:m,price:S,address:c,username:q,shard:H,signedIndexes:i,parsedTransactionsByDataField:K}){let p=T[s],W=p?.transaction?.sender.toString(),d=p?.transaction,o=d.toPlainObject(),D=null,I=null,t=await _({egldLabel:n,sender:W,apiAddress:e.apiAddress,address:c,parsedTransactionsByDataField:K})(p),g=!t?.transactionTokenInfo?.tokenId,{tokenId:l,nonce:u,amount:y=""}=t?.transactionTokenInfo??{},Z=l&&u&&u.length>0?`${l}-${u}`:l,J=await w({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")I={type:r,identifier:a,amount:y,imageURL:Y};else{let P=({addCommas:St})=>f({input:g?d.value.toString():y,decimals:g?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:St}),lt=P({addCommas:!0}),ut=P({addCommas:!1}),ft=Number(g?S:Q),Tt=M({amount:ut,usd:ft,addEqualSign:!0});D={identifier:(a===h?n:a)??n,amount:lt,usdValue:Tt}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:d,price:S}),nt=V({shard:H,initialGasPrice:m.initialGasPrice,transaction:o,gasStationMetadata:e.gasStationMetadata}),et=B({transaction:o,gasPriceData:m}),it=v().getType(),rt=O(it),N=T.length,at=i.length>0?i[i.length-1]+1:0,k=L(o?.data??""),E=$(t?.transactionTokenInfo),st=U({data:k,identifier:a,highlight:E}),mt=x(),ct=G({to:`/${b}/${c}`,explorerAddress:mt}),pt=N===1||t?.needsSigning&&!i.includes(s),dt=f({input:et.toString(),decimals:F,addCommas:!0,digits:C}),gt=new Dt(o.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:o.receiver.toString(),data:k,decodedData:st,gasPrice:dt,gasLimit:gt,explorerLink:ct,ppu:m.ppu,ppuOptions:nt,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:N,currentIndex:s,currentIndexToSign:at,highlight:E,scCall:z(t?.transactionTokenInfo),needsSigning:pt,isEditable:t?.needsSigning,providerName:rt,address:c,username:q,origin:A.location?.origin},tokenTransaction:D,fungibleTransaction:I}}export{Kt as a};
|
|
2
|
-
//# sourceMappingURL=chunk-Q2J2GZXF.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./chunk-D6TVFZA6.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
|
|
2
|
-
//# sourceMappingURL=chunk-RYPO7VR2.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/apiCalls/transactions/getServerTransactionsByHashes.ts"],
|
|
4
|
-
"sourcesContent": ["import axios from 'axios';\nimport { TRANSACTIONS_ENDPOINT } from 'apiCalls/endpoints';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\n\nexport const getServerTransactionsByHashes = async (\n hashes: string[]\n): Promise<ServerTransactionType[]> => {\n const { apiAddress } = networkSelector(getState());\n const { data } = await axios.get<ServerTransactionType[]>(\n `${apiAddress}/${TRANSACTIONS_ENDPOINT}`,\n {\n params: {\n hashes: hashes.join(','),\n withScResults: true\n }\n }\n );\n\n return data;\n};\n"],
|
|
5
|
-
"mappings": "2HAAA,OAAOA,MAAW,QAMX,IAAMC,EAAgC,MAC3CC,GACqC,CACrC,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAgBC,EAAS,CAAC,EAC3C,CAAE,KAAAC,CAAK,EAAI,MAAMC,EAAM,IAC3B,GAAGJ,CAAU,IAAIK,CAAqB,GACtC,CACE,OAAQ,CACN,OAAQN,EAAO,KAAK,GAAG,EACvB,cAAe,EACjB,CACF,CACF,EAEA,OAAOI,CACT",
|
|
6
|
-
"names": ["axios", "getServerTransactionsByHashes", "hashes", "apiAddress", "networkSelector", "getState", "data", "axios", "TRANSACTIONS_ENDPOINT"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/selectors/networkSelectors.ts"],
|
|
4
|
-
"sourcesContent": ["import { StoreType } from 'store/store.types';\n\nexport const networkConfigSelector = ({ network }: StoreType) => network;\n\nexport const networkSelector = ({ network }: StoreType) => network.network;\n\nexport const chainIdSelector = ({ network: { network } }: StoreType) =>\n network.chainId;\n\nexport const walletAddressSelector = ({ network: { network } }: StoreType) =>\n network.walletAddress;\n\nexport const roundDurationSelectorSelector = ({\n network: { network }\n}: StoreType) => network.roundDuration;\n"],
|
|
5
|
-
"mappings": "AAEO,IAAMA,EAAwB,CAAC,CAAE,QAAAC,CAAQ,IAAiBA,EAEpDC,EAAkB,CAAC,CAAE,QAAAD,CAAQ,IAAiBA,EAAQ,QAEtDE,EAAkB,CAAC,CAAE,QAAS,CAAE,QAAAF,CAAQ,CAAE,IACrDA,EAAQ,QAEGG,EAAwB,CAAC,CAAE,QAAS,CAAE,QAAAH,CAAQ,CAAE,IAC3DA,EAAQ,cAEGI,EAAgC,CAAC,CAC5C,QAAS,CAAE,QAAAJ,CAAQ,CACrB,IAAiBA,EAAQ",
|
|
6
|
-
"names": ["networkConfigSelector", "network", "networkSelector", "chainIdSelector", "walletAddressSelector", "roundDurationSelectorSelector"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var T=({transactions:e})=>e,u=({transactions:e})=>{let n={};return Object.entries(e).forEach(([t,s])=>{s.transactions.some(({status:o})=>o==="pending")&&s.status==="sent"&&(n[t]=s)}),n},p=({transactions:e})=>{let n={};return Object.entries(e).forEach(([t,s])=>{s.transactions.some(({status:o})=>o==="success")&&s.status==="sent"&&(n[t]=s)}),n},S=({transactions:e})=>{let n={};return Object.entries(e).forEach(([t,s])=>{s.transactions.some(({status:o})=>o&&["fail","invalid","cancelled","timedOut"].includes(o))&&s.status==="sent"&&(n[t]=s)}),n},l=({transactions:e})=>{let n=[];return Object.values(e).forEach(({transactions:t})=>{t.forEach(s=>{s.status&&["pending","sent"].includes(s.status)&&n.push(s)})}),n},f=({transactions:e})=>{let n=[];return Object.values(e).forEach(({transactions:t})=>{t.forEach(s=>{s.status==="success"&&n.push(s)})}),n},d=({transactions:e})=>{let n=[];return Object.values(e).forEach(({transactions:t})=>{t.forEach(s=>{s.status&&["fail","invalid","cancelled","timedOut"].includes(s.status)&&n.push(s)})}),n},h=({transactions:e})=>{let n=[];return Object.values(e).forEach(({transactions:t})=>{t.forEach(s=>{s.status==="timedOut"&&n.push(s)})}),n};export{T as a,u as b,p as c,S as d,l as e,f,d as g,h};
|
|
2
|
-
//# sourceMappingURL=chunk-TQA3JDNV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/selectors/transactionsSelector.ts"],
|
|
4
|
-
"sourcesContent": ["import { StoreType } from 'store/store.types';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n SignedTransactionType,\n SessionTransactionType\n} from 'types/transactions.types';\n\nexport const transactionsSliceSelector = ({ transactions }: StoreType) =>\n transactions;\n\nexport const pendingTransactionsSessionsSelector = ({\n transactions: state\n}: StoreType): Record<string, SessionTransactionType> => {\n const pendingSessions: Record<string, SessionTransactionType> = {};\n\n Object.entries(state).forEach(([sessionId, data]) => {\n const hasPendingTransactions = data.transactions.some(\n ({ status }) => status === TransactionServerStatusesEnum.pending\n );\n if (hasPendingTransactions && data.status === 'sent') {\n pendingSessions[sessionId] = data;\n }\n });\n\n return pendingSessions;\n};\n\nexport const successfulTransactionsSessionsSelector = ({\n transactions: state\n}: StoreType): Record<string, SessionTransactionType> => {\n const successfulSessions: Record<string, SessionTransactionType> = {};\n\n Object.entries(state).forEach(([sessionId, data]) => {\n const hasSuccessfulTransactions = data.transactions.some(\n ({ status }) => status === TransactionServerStatusesEnum.success\n );\n if (hasSuccessfulTransactions && data.status === 'sent') {\n successfulSessions[sessionId] = data;\n }\n });\n\n return successfulSessions;\n};\n\nexport const failedTransactionsSessionsSelector = ({\n transactions: state\n}: StoreType): Record<string, SessionTransactionType> => {\n const failedSessions: Record<string, SessionTransactionType> = {};\n\n Object.entries(state).forEach(([sessionId, data]) => {\n const hasFailedTransactions = data.transactions.some(\n ({ status }) =>\n status &&\n [\n TransactionServerStatusesEnum.fail,\n TransactionServerStatusesEnum.invalid,\n TransactionBatchStatusesEnum.cancelled,\n TransactionBatchStatusesEnum.timedOut\n ].includes(status)\n );\n if (hasFailedTransactions && data.status === 'sent') {\n failedSessions[sessionId] = data;\n }\n });\n\n return failedSessions;\n};\n\nexport const pendingTransactionsSelector = ({\n transactions: state\n}: StoreType): SignedTransactionType[] => {\n const pendingTransactions: SignedTransactionType[] = [];\n\n Object.values(state).forEach(({ transactions }) => {\n transactions.forEach((transaction) => {\n if (\n transaction.status &&\n [\n TransactionServerStatusesEnum.pending,\n TransactionBatchStatusesEnum.sent\n ].includes(transaction.status)\n ) {\n pendingTransactions.push(transaction);\n }\n });\n });\n\n return pendingTransactions;\n};\n\nexport const successfulTransactionsSelector = ({\n transactions: state\n}: StoreType) => {\n const successfulTransactions: SignedTransactionType[] = [];\n\n Object.values(state).forEach(({ transactions }) => {\n transactions.forEach((transaction) => {\n if (transaction.status === TransactionServerStatusesEnum.success) {\n successfulTransactions.push(transaction);\n }\n });\n });\n\n return successfulTransactions;\n};\n\nexport const failedTransactionsSelector = ({\n transactions: state\n}: StoreType) => {\n const failedTransactions: SignedTransactionType[] = [];\n\n Object.values(state).forEach(({ transactions }) => {\n transactions.forEach((transaction) => {\n if (\n transaction.status &&\n [\n TransactionServerStatusesEnum.fail,\n TransactionServerStatusesEnum.invalid,\n TransactionBatchStatusesEnum.cancelled,\n TransactionBatchStatusesEnum.timedOut\n ].includes(transaction.status)\n ) {\n failedTransactions.push(transaction);\n }\n });\n });\n\n return failedTransactions;\n};\n\nexport const timedOutTransactionsSelector = ({\n transactions: state\n}: StoreType) => {\n const timedOutTransactions: SignedTransactionType[] = [];\n\n Object.values(state).forEach(({ transactions }) => {\n transactions.forEach((transaction) => {\n if (transaction.status === TransactionBatchStatusesEnum.timedOut) {\n timedOutTransactions.push(transaction);\n }\n });\n });\n\n return timedOutTransactions;\n};\n"],
|
|
5
|
-
"mappings": "AAUO,IAAMA,EAA4B,CAAC,CAAE,aAAAC,CAAa,IACvDA,EAEWC,EAAsC,CAAC,CAClD,aAAcC,CAChB,IAAyD,CACvD,IAAMC,EAA0D,CAAC,EAEjE,cAAO,QAAQD,CAAK,EAAE,QAAQ,CAAC,CAACE,EAAWC,CAAI,IAAM,CACpBA,EAAK,aAAa,KAC/C,CAAC,CAAE,OAAAC,CAAO,IAAMA,aAClB,GAC8BD,EAAK,SAAW,SAC5CF,EAAgBC,CAAS,EAAIC,EAEjC,CAAC,EAEMF,CACT,EAEaI,EAAyC,CAAC,CACrD,aAAcL,CAChB,IAAyD,CACvD,IAAMM,EAA6D,CAAC,EAEpE,cAAO,QAAQN,CAAK,EAAE,QAAQ,CAAC,CAACE,EAAWC,CAAI,IAAM,CACjBA,EAAK,aAAa,KAClD,CAAC,CAAE,OAAAC,CAAO,IAAMA,aAClB,GACiCD,EAAK,SAAW,SAC/CG,EAAmBJ,CAAS,EAAIC,EAEpC,CAAC,EAEMG,CACT,EAEaC,EAAqC,CAAC,CACjD,aAAcP,CAChB,IAAyD,CACvD,IAAMQ,EAAyD,CAAC,EAEhE,cAAO,QAAQR,CAAK,EAAE,QAAQ,CAAC,CAACE,EAAWC,CAAI,IAAM,CACrBA,EAAK,aAAa,KAC9C,CAAC,CAAE,OAAAC,CAAO,IACRA,GACA,wCAKA,EAAE,SAASA,CAAM,CACrB,GAC6BD,EAAK,SAAW,SAC3CK,EAAeN,CAAS,EAAIC,EAEhC,CAAC,EAEMK,CACT,EAEaC,EAA8B,CAAC,CAC1C,aAAcT,CAChB,IAA0C,CACxC,IAAMU,EAA+C,CAAC,EAEtD,cAAO,OAAOV,CAAK,EAAE,QAAQ,CAAC,CAAE,aAAAF,CAAa,IAAM,CACjDA,EAAa,QAASa,GAAgB,CAElCA,EAAY,QACZ,iBAGA,EAAE,SAASA,EAAY,MAAM,GAE7BD,EAAoB,KAAKC,CAAW,CAExC,CAAC,CACH,CAAC,EAEMD,CACT,EAEaE,EAAiC,CAAC,CAC7C,aAAcZ,CAChB,IAAiB,CACf,IAAMa,EAAkD,CAAC,EAEzD,cAAO,OAAOb,CAAK,EAAE,QAAQ,CAAC,CAAE,aAAAF,CAAa,IAAM,CACjDA,EAAa,QAASa,GAAgB,CAChCA,EAAY,oBACdE,EAAuB,KAAKF,CAAW,CAE3C,CAAC,CACH,CAAC,EAEME,CACT,EAEaC,EAA6B,CAAC,CACzC,aAAcd,CAChB,IAAiB,CACf,IAAMe,EAA8C,CAAC,EAErD,cAAO,OAAOf,CAAK,EAAE,QAAQ,CAAC,CAAE,aAAAF,CAAa,IAAM,CACjDA,EAAa,QAASa,GAAgB,CAElCA,EAAY,QACZ,wCAKA,EAAE,SAASA,EAAY,MAAM,GAE7BI,EAAmB,KAAKJ,CAAW,CAEvC,CAAC,CACH,CAAC,EAEMI,CACT,EAEaC,EAA+B,CAAC,CAC3C,aAAchB,CAChB,IAAiB,CACf,IAAMiB,EAAgD,CAAC,EAEvD,cAAO,OAAOjB,CAAK,EAAE,QAAQ,CAAC,CAAE,aAAAF,CAAa,IAAM,CACjDA,EAAa,QAASa,GAAgB,CAChCA,EAAY,qBACdM,EAAqB,KAAKN,CAAW,CAEzC,CAAC,CACH,CAAC,EAEMM,CACT",
|
|
6
|
-
"names": ["transactionsSliceSelector", "transactions", "pendingTransactionsSessionsSelector", "state", "pendingSessions", "sessionId", "data", "status", "successfulTransactionsSessionsSelector", "successfulSessions", "failedTransactionsSessionsSelector", "failedSessions", "pendingTransactionsSelector", "pendingTransactions", "transaction", "successfulTransactionsSelector", "successfulTransactions", "failedTransactionsSelector", "failedTransactions", "timedOutTransactionsSelector", "timedOutTransactions"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={devnet:{id:"devnet",chainId:"D",name:"Devnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletAddress:"https://devnet-wallet.multiversx.com",iframeWalletAddress:"https://devnet-iframe-wallet.multiversx.com",xAliasAddress:"https://devnet.xalias.com",apiAddress:"https://devnet-api.multiversx.com",explorerAddress:"http://devnet-explorer.multiversx.com",apiTimeout:"4000",roundDuration:6e3},testnet:{id:"testnet",chainId:"T",name:"Testnet",egldLabel:"xEGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletAddress:"https://testnet-wallet.multiversx.com",iframeWalletAddress:"https://testnet-iframe-wallet.multiversx.com",xAliasAddress:"https://testnet.xalias.com",apiAddress:"https://testnet-api.multiversx.com",explorerAddress:"http://testnet-explorer.multiversx.com",apiTimeout:"4000",roundDuration:6e3},mainnet:{id:"mainnet",chainId:"1",name:"Mainnet",egldLabel:"EGLD",decimals:"18",digits:"4",gasPerDataByte:"1500",walletAddress:"https://wallet.multiversx.com",iframeWalletAddress:"https://iframe-wallet.multiversx.com",xAliasAddress:"https://xalias.com",apiAddress:"https://api.multiversx.com",explorerAddress:"https://explorer.multiversx.com",apiTimeout:"4000",roundDuration:6e3}},{chainId:t,egldLabel:a}=e.devnet,{chainId:s,egldLabel:d}=e.testnet,{chainId:n,egldLabel:l}=e.mainnet;var o={devnet:t,testnet:s,mainnet:n},m={[t]:"devnet",[s]:"testnet",[n]:"mainnet"},p="multiversx://",c=6e3;export{e as a,t as b,a as c,s as d,d as e,n as f,l as g,o as h,m as i,p as j,c as k};
|
|
2
|
-
//# sourceMappingURL=chunk-ULUZWP2P.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/constants/network.constants.ts"],
|
|
4
|
-
"sourcesContent": ["import { EnvironmentsEnum } from 'types/enums.types';\nimport { NetworkType } from 'types/network.types';\n\nexport const fallbackNetworkConfigurations: Record<\n keyof typeof EnvironmentsEnum,\n NetworkType\n> = {\n devnet: {\n id: 'devnet',\n chainId: 'D',\n name: 'Devnet',\n egldLabel: 'xEGLD',\n decimals: '18',\n digits: '4',\n gasPerDataByte: '1500',\n walletAddress: 'https://devnet-wallet.multiversx.com',\n iframeWalletAddress: 'https://devnet-iframe-wallet.multiversx.com',\n xAliasAddress: 'https://devnet.xalias.com',\n apiAddress: 'https://devnet-api.multiversx.com',\n explorerAddress: 'http://devnet-explorer.multiversx.com',\n apiTimeout: '4000',\n roundDuration: 6000\n },\n testnet: {\n id: 'testnet',\n chainId: 'T',\n name: 'Testnet',\n egldLabel: 'xEGLD',\n decimals: '18',\n digits: '4',\n gasPerDataByte: '1500',\n walletAddress: 'https://testnet-wallet.multiversx.com',\n iframeWalletAddress: 'https://testnet-iframe-wallet.multiversx.com',\n xAliasAddress: 'https://testnet.xalias.com',\n apiAddress: 'https://testnet-api.multiversx.com',\n explorerAddress: 'http://testnet-explorer.multiversx.com',\n apiTimeout: '4000',\n roundDuration: 6000\n },\n mainnet: {\n id: 'mainnet',\n chainId: '1',\n name: 'Mainnet',\n egldLabel: 'EGLD',\n decimals: '18',\n digits: '4',\n gasPerDataByte: '1500',\n walletAddress: 'https://wallet.multiversx.com',\n iframeWalletAddress: 'https://iframe-wallet.multiversx.com',\n xAliasAddress: 'https://xalias.com',\n apiAddress: 'https://api.multiversx.com',\n explorerAddress: 'https://explorer.multiversx.com',\n apiTimeout: '4000',\n roundDuration: 6000\n }\n};\n\nconst { chainId: DEVNET_CHAIN_ID, egldLabel: DEVNET_EGLD_LABEL } =\n fallbackNetworkConfigurations[EnvironmentsEnum.devnet];\nconst { chainId: TESTNET_CHAIN_ID, egldLabel: TESTNET_EGLD_LABEL } =\n fallbackNetworkConfigurations[EnvironmentsEnum.testnet];\nconst { chainId: MAINNET_CHAIN_ID, egldLabel: MAINNET_EGLD_LABEL } =\n fallbackNetworkConfigurations[EnvironmentsEnum.mainnet];\n\nexport {\n DEVNET_CHAIN_ID,\n DEVNET_EGLD_LABEL,\n MAINNET_CHAIN_ID,\n MAINNET_EGLD_LABEL,\n TESTNET_CHAIN_ID,\n TESTNET_EGLD_LABEL\n};\n\nexport const chainIdByEnvironment: Record<EnvironmentsEnum, string> = {\n [EnvironmentsEnum.devnet]: DEVNET_CHAIN_ID,\n [EnvironmentsEnum.testnet]: TESTNET_CHAIN_ID,\n [EnvironmentsEnum.mainnet]: MAINNET_CHAIN_ID\n};\n\nexport const chainIdToEnvironment: Record<string, EnvironmentsEnum> = {\n [DEVNET_CHAIN_ID]: EnvironmentsEnum.devnet,\n [TESTNET_CHAIN_ID]: EnvironmentsEnum.testnet,\n [MAINNET_CHAIN_ID]: EnvironmentsEnum.mainnet\n};\n\nexport const MULTIVERSX_ORIGIN = 'multiversx://';\nexport const TIMEOUT = 6000;\n"],
|
|
5
|
-
"mappings": "AAGO,IAAMA,EAGT,CACF,OAAQ,CACN,GAAI,SACJ,QAAS,IACT,KAAM,SACN,UAAW,QACX,SAAU,KACV,OAAQ,IACR,eAAgB,OAChB,cAAe,uCACf,oBAAqB,8CACrB,cAAe,4BACf,WAAY,oCACZ,gBAAiB,wCACjB,WAAY,OACZ,cAAe,GACjB,EACA,QAAS,CACP,GAAI,UACJ,QAAS,IACT,KAAM,UACN,UAAW,QACX,SAAU,KACV,OAAQ,IACR,eAAgB,OAChB,cAAe,wCACf,oBAAqB,+CACrB,cAAe,6BACf,WAAY,qCACZ,gBAAiB,yCACjB,WAAY,OACZ,cAAe,GACjB,EACA,QAAS,CACP,GAAI,UACJ,QAAS,IACT,KAAM,UACN,UAAW,OACX,SAAU,KACV,OAAQ,IACR,eAAgB,OAChB,cAAe,gCACf,oBAAqB,uCACrB,cAAe,qBACf,WAAY,6BACZ,gBAAiB,kCACjB,WAAY,OACZ,cAAe,GACjB,CACF,EAEM,CAAE,QAASC,EAAiB,UAAWC,CAAkB,EAC7DF,EAA8B,OAC1B,CAAE,QAASG,EAAkB,UAAWC,CAAmB,EAC/DJ,EAA8B,QAC1B,CAAE,QAASK,EAAkB,UAAWC,CAAmB,EAC/DN,EAA8B,QAWzB,IAAMO,EAAyD,CACnE,OAA0BC,EAC1B,QAA2BC,EAC3B,QAA2BC,CAC9B,EAEaC,EAAyD,CACpE,CAACH,CAAe,WAChB,CAACC,CAAgB,YACjB,CAACC,CAAgB,WACnB,EAEaE,EAAoB,gBACpBC,EAAU",
|
|
6
|
-
"names": ["fallbackNetworkConfigurations", "DEVNET_CHAIN_ID", "DEVNET_EGLD_LABEL", "TESTNET_CHAIN_ID", "TESTNET_EGLD_LABEL", "MAINNET_CHAIN_ID", "MAINNET_EGLD_LABEL", "chainIdByEnvironment", "DEVNET_CHAIN_ID", "TESTNET_CHAIN_ID", "MAINNET_CHAIN_ID", "chainIdToEnvironment", "MULTIVERSX_ORIGIN", "TIMEOUT"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-BHAHZQVO.mjs";import{a as i}from"./chunk-OOVV574D.mjs";var m=({data:o,decodeMethod:e,delimiter:r,identifier:c})=>{let t=o.split("@"),n=t.map(g=>i({data:g,decodeMethod:e}));return d({parts:t,initialDecodedParts:n,identifier:c,decodeMethod:e}).join(r)};export{m as a};
|
|
2
|
-
//# sourceMappingURL=chunk-WJQVMI33.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as c}from"./chunk-FROSOADM.mjs";import{a as d}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as g}from"./chunk-PSJI2G34.mjs";import{a as i}from"./chunk-2CG6PNPJ.mjs";import{a as p,b as e}from"./chunk-HDRB2QL6.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(c)),t.get(`${e.apiAddress}/network/config`,s(i)),t.get(`https://${o.url}/socket.io/`,s(g)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(d))],P=u(...k);export{t as a,s as b,P as c};
|
|
2
|
-
//# sourceMappingURL=chunk-XU34NXIS.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Et}from"./chunk-7AAHDJYY.mjs";import{a as gt}from"./chunk-ZMTIF2D2.mjs";import{a as It}from"./chunk-6UZHM5LW.mjs";import{a as k}from"./chunk-O5IYHOPF.mjs";import{a as xt}from"./chunk-UPBPNO3G.mjs";import{a as wt}from"./chunk-AWHIX3FQ.mjs";import{a as At}from"./chunk-34D6F2ZD.mjs";import{a as Lt}from"./chunk-QFYMQSDX.mjs";import{a as y}from"./chunk-KDWLSBQB.mjs";import{a as Ct}from"./chunk-MFUQ5NBC.mjs";import{a as Rt}from"./chunk-4ODPAHHA.mjs";import{a as Ot}from"./chunk-NTTKKJIS.mjs";import{b as F}from"./chunk-RBSHB26S.mjs";import{a as kt}from"./chunk-5Z3MOBIC.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ft}from"./chunk-PRIEU2AB.mjs";import{a as S}from"./chunk-V6VNRFXC.mjs";import{a as ut}from"./chunk-ALXGPWX7.mjs";import{a as yt}from"./chunk-RS5NVDUR.mjs";import{a as x}from"./chunk-5UBTVBPC.mjs";import{a as O,f as bt}from"./chunk-DDCSKHZU.mjs";import{b as f,c as q,d as vt}from"./chunk-344SJWHZ.mjs";import{k as ft,l as N,n as ht}from"./chunk-65L5EBBL.mjs";import{b as Nt}from"./chunk-6FKT2TIN.mjs";import{a as P}from"./chunk-HORSXVIV.mjs";import{a as Mt}from"./chunk-7NJ4ME6K.mjs";import{a as ct}from"./chunk-ULL2LOGL.mjs";import{a as L}from"./chunk-QTKK6OSJ.mjs";import{a as rt}from"./chunk-6ACLOUQ3.mjs";import{a as A}from"./chunk-NZYB675D.mjs";import{a as at}from"./chunk-YSCND2MX.mjs";import{a as Dt}from"./chunk-NJN53MJV.mjs";import{a as lt,b as pt,g as Tt,l as dt}from"./chunk-2IUBMLF4.mjs";import{b as mt}from"./chunk-TQA3JDNV.mjs";import{a as nt,b as it,q as u,s as E}from"./chunk-D6TVFZA6.mjs";import{c as Q,d as X,f as tt}from"./chunk-UERJ6AKK.mjs";import{b as v}from"./chunk-VNLGNNIL.mjs";import{b}from"./chunk-6JM4DPOH.mjs";import{b as st,c as et,f as ot}from"./chunk-NTEMINYA.mjs";import{b as Bt}from"./chunk-S6NHNEQK.mjs";import{a as St}from"./chunk-PGGS4CPP.mjs";import{c as w}from"./chunk-TZDM7KH7.mjs";import{b as z}from"./chunk-GGBMHKR4.mjs";import{a as C}from"./chunk-ZONHCECO.mjs";import Vt from"lodash.isequal";import J from"lodash.isequal";import V from"bignumber.js";var M=class o{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=v(t),{isExpired:e}=L(s?.nativeAuthToken);e?I().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=v(t),e=tt(t);return!!(s?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=I(),s=Q(this.store.getState()),e=t.getType()===C.webview;if(!s||e)return;this.addLogoutWarning();let n=v(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=L(n?.nativeAuthToken),c=new V(String(i)),a=`${s}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let T=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},T.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},T.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=b(this.store.getState()),s=v(this.store.getState()),{secondsUntilExpires:e}=L(s?.nativeAuthToken),n=new V(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new V(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=It(i.toNumber()),l=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};var R={};async function Zt({serverTransaction:o,sessionId:t,isSequential:s}){let{hash:e,status:n,results:i,invalidTransaction:r,hasStatusChanged:c}=o;try{if(R[e]>30){f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"});return}if(r&&!s||n==="sent"){R[e]=R[e]?R[e]+1:1;return}if(s&&!n){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m});return}if(c){let m=q({sessionId:t,transaction:o});await y({sessionId:t,status:m})}N(n)&&await Lt({sessionId:t,hash:e,results:i})}catch(a){console.error(a),f({sessionId:t,status:"timedOut"}),await y({sessionId:t,status:"timedOut"})}}async function Ut({sessionId:o,transactionBatch:t,isSequential:s}){try{if(t==null)return;let e=wt(),n=Ct(t),i=await Et(n);for(let p of i)await Zt({serverTransaction:p,sessionId:o,isSequential:s});if(!i.every(p=>p.status!=="pending"))return;e&&await B();let{transactions:c}=u().getState(),a=c[o];if(a.transactions.every(p=>p.status==="success"))return f({sessionId:o,status:"success"});if(a.transactions.some(p=>p.status==="fail"))return f({sessionId:o,status:"fail"});if(a.transactions.every(p=>p.status==="not executed"))return f({sessionId:o,status:"invalid"})}catch(e){console.error(e)}}async function _t(){let o=mt(E());if(Object.keys(o).length>0)for(let[t,{transactions:s}]of Object.entries(o))await Ut({sessionId:t,transactionBatch:s})}async function D(){let o=u(),t=At(),s=null,e=null,n=X(o.getState())?.timestamp,i=()=>{_t()},r=()=>{s??=setInterval(i,t)},c=()=>{s&&(clearInterval(s),s=null)},a=()=>{c();let p=o.subscribe(({account:{websocketEvent:g}})=>{g?.message&&n!==g.timestamp&&(n=g.timestamp,i())});w.set("websocketEventReceived",p)},m=()=>{z.status!=="not_initialized"||e||(e=setInterval(()=>{z.status==="completed"&&(clearInterval(e),e=null,a())},1e3))};i();let l=()=>{c(),e&&(clearInterval(e),e=null)},T=o.subscribe(({account:{address:p},config:{websocketStatus:g}},jt)=>{if(jt.config.websocketStatus!==g)switch(g){case"completed":a();break;case"pending":r(),m();break;default:p?r():l();break}});return w.set("websocketStatusChanged",T),w.set("websocketEventReceived",l),{stopTransactionsTracking:l}}async function j({address:o,provider:t,apiAddress:s}){let e=await A({address:o,baseURL:s});if(!e)throw new Error("Account not found");Nt({address:o,providerType:t.getType()});let n={...e,username:P(e.username),nonce:x(e)};O(n),await F(o),D(),e.shard!=null&&await xt({shard:Number(e.shard),apiAddress:s})}async function Jt(o){let{network:{apiAddress:t}}=S();await o.login();let s=await o.getAddress();if(!s)throw new Error("Address not found");return await j({address:s,provider:o,apiAddress:t}),{address:s}}async function Qt({provider:o,nativeAuthConfig:t,token:s}){let{network:{apiAddress:e}}=S(),n=ct(t),i=s;i||(i=await n.initialize({noCache:!0}));let{address:r,signature:c,...a}=await o.login({token:i});if(!r)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let l=rt(a?.accessToken)?a.accessToken:n.getToken({address:r,token:i,signature:c});it({loginToken:i,signature:c,nativeAuthToken:l});let T=await kt({loginToken:i,extraInfoData:{multisig:a?.multisig,impersonate:a?.impersonate},address:r});return await j({address:T,provider:o,apiAddress:e}),{address:T,signature:c}}async function Wt(o,t){let s=b(E());if(s)return await Qt({provider:o,nativeAuthConfig:s,token:t?.token});let{address:e}=await Jt(o);return await F(e),D(),{address:e,signature:""}}var Y={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${pt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${lt}-${Date.now()}`}},Xt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},ts=o=>{for(let[t,s]of Object.entries(Xt))if(o.includes(t))return s;return"Error when signing"};function Z(o,t="error"){let s=o?.message,e=ts(s),i=e!=="Error when signing"?"warning":t,r=Object.keys(Y).includes(i)?Y[i]:Y.error,{toastId:c,iconClassName:a,title:m}=r;return U({toastId:c,duration:1e4,icon:"times",iconClassName:a,message:e,title:m}),e}async function Ht({provider:o,transactions:t,options:s={}}){await B();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Mt(),r=o.getType()===C.ledger,c=Rt({latestNonce:i,transactions:t}),a=n&&e&&!s.skipGuardian?c?.map(l=>(l.version=st.withTxOptions().valueOf(),l.options=ot.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),l.guardian=et.newFromBech32(n),l)):c,m=await o.signTransactions(a)??[];return bt(i+m.length),m}var _=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await Wt(this.provider,t);return nt(this.provider.getType()),Gt(this),M.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await Ot({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ht({provider:this.provider,transactions:t,options:s})}catch(e){let n=Z(e);throw new Error(n)}}async signMessage(t,s){try{return await Ft({provider:this.provider,message:t,options:s})}catch(e){let n=Z(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var $t=null;function Gt(o){$t=o}function I(){return $t||new _(Bt)}var ss=async()=>{try{let o=ut(),{network:t}=S();try{let s=await A({address:o,baseURL:t.apiAddress});if(s!=null){let e={...s,username:P(s.username),nonce:x(s)};return O(e),e}}catch(s){console.error("Failed getting account ",s)}}catch(o){console.error("Failed getting address ",o)}return null};async function B(){let o=I();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await ss():void 0}catch(t){console.error("Failed initializing provider ",t)}}var W={},h={},es=(o,t)=>{u().setState(({toasts:s})=>{let e=s.customToasts.length>0?Math.max(...s.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=s.customToasts.findIndex(a=>a.toastId===n),r={...o,toastId:n};if(i!==-1){s.customToasts[i]=r;return}s.customToasts.push({...r,toastId:n})},!1,"addCustomToast")},H=o=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==o)},!1,"removeCustomToast")},Kt=()=>{u().setState(({toasts:o})=>{o.customToasts=[]},!1,"removeAllCustomToasts")},No=()=>{u().setState(({toasts:o})=>{o.transactionToasts=[]})},zt=({toastId:o,totalDuration:t})=>{let s="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;s=o??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:at(),endTime:Dt(t),toastId:s})},!1,"addTransactionToast"),s},G=o=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==o)},!1,"removeTransactionToast"),delete h[o],delete W[o]},U=o=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=o.toastId||`custom-toast-${s+1}`;return o.onClose&&(h[e]=o.onClose),o.instantiateToastElement?(W[e]=o.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...o,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(es(o,e),e)};var qt=1e4,$=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=qt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{G(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let e=setTimeout(()=>{H(t);let n=h[t];n?.()},s);this.timeoutIntervals.set(t,e)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||qt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var d=class o{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new $,this.notificationsFeedManager=K.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:e},{toasts:n,transactions:i})=>{let r=!J(n.transactionToasts,s.transactionToasts),c=!J(i,e);(r||c)&&await this.updateTransactionToastsList({skipFetchingTransactions:c}),!J(n.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return o.instance||(o.instance=new o),o.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),e=s[t];if(!e)return!1;let{status:n}=e,i=ht(n),r=N(n),c=ft(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,s){let e=zt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}createCustomToast(t){let s=U(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(t){let{toasts:s,transactions:e,account:n}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:r}=await k({toastList:s,transactionsSessions:e,account:n,skipFetchingTransactions:t?.skipFetchingTransactions});this.transactionToasts=[...i,...r];for(let c of s.transactionToasts)this.handleCompletedTransaction(c.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let n="message"in s?{...s}:{...s,instantiateToastElement:W[s.toastId]};this.customToasts.push(n),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await St.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&G(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.closeToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.closeToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=h[t];e?.(),H(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),Kt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};var ns="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",K=class o extends yt{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.data={...this.initialData}}static getInstance(){return o.instance||(o.instance=new o),o.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Vt(r.transactionToasts,n.transactionToasts)||!Vt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(ns,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=d.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:e,toasts:n,network:i}=this.store.getState(),{pendingTransactionToasts:r}=await k({toastList:n,transactionsSessions:s,account:e});this.data.pendingTransactions=r,this.data.historicTransactions=await gt.getTransactionsHistory({transactionsSessions:s,address:e.address,explorerAddress:i.network.explorerAddress,egldLabel:i.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){vt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{K as a,W as b,h as c,es as d,H as e,Kt as f,No as g,zt as h,G as i,U as j,$ as k,d as l,M as m,Ut as n,_t as o,D as p,j as q,Wt as r,Z as s,Ht as t,_ as u,Gt as v,I as w,B as x};
|
|
2
|
-
//# sourceMappingURL=chunk-YAONXG5V.mjs.map
|