@multiversx/sdk-dapp 5.2.5 → 5.2.7
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-22IJ3QB4.mjs +2 -0
- package/out/__chunks__/{chunk-7ZUH3TQ2.mjs → chunk-2Y66XRQK.mjs} +2 -2
- package/out/__chunks__/chunk-34PFLOIB.mjs +2 -0
- package/out/__chunks__/{chunk-S22V4GGF.mjs → chunk-37O2ROE4.mjs} +2 -2
- package/out/__chunks__/{chunk-E5RLJTLP.mjs → chunk-3Q5IOJ67.mjs} +2 -2
- package/out/__chunks__/{chunk-UPHBWFSY.mjs → chunk-3WS7UAIF.mjs} +2 -2
- package/out/__chunks__/{chunk-LYNRBQNO.mjs → chunk-4JCZWUDH.mjs} +2 -2
- package/out/__chunks__/chunk-4L2AXB2K.mjs +2 -0
- package/out/__chunks__/chunk-4MWQKLVG.mjs +2 -0
- package/out/__chunks__/chunk-4MWQKLVG.mjs.map +7 -0
- package/out/__chunks__/{chunk-ZXNJFXKB.mjs → chunk-4PQ3E6VH.mjs} +2 -2
- package/out/__chunks__/{chunk-OOVV574D.mjs → chunk-4VA2SULD.mjs} +2 -2
- package/out/__chunks__/{chunk-DSVSX4ZT.mjs → chunk-5DILKRFV.mjs} +2 -2
- package/out/__chunks__/{chunk-GR362QNP.mjs → chunk-5FZ5WUYZ.mjs} +2 -2
- package/out/__chunks__/{chunk-6DWUEZO7.mjs → chunk-5KVNYLOM.mjs} +2 -2
- package/out/__chunks__/chunk-5MKXCLBG.mjs +2 -0
- package/out/__chunks__/{chunk-52PGMMOM.mjs → chunk-5OMQOYP7.mjs} +2 -2
- package/out/__chunks__/{chunk-3WHS4QZZ.mjs → chunk-5TNG3JR3.mjs} +2 -2
- package/out/__chunks__/chunk-5WVYRVED.mjs +2 -0
- package/out/__chunks__/chunk-5WVYRVED.mjs.map +7 -0
- package/out/__chunks__/chunk-63MIE6JF.mjs +2 -0
- package/out/__chunks__/chunk-63MIE6JF.mjs.map +7 -0
- package/out/__chunks__/chunk-6L7YQWGX.mjs +2 -0
- package/out/__chunks__/chunk-6LOIZTC6.mjs +2 -0
- package/out/__chunks__/chunk-6LOIZTC6.mjs.map +7 -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-7VHTZYM2.mjs +2 -0
- package/out/__chunks__/chunk-7VHTZYM2.mjs.map +7 -0
- package/out/__chunks__/chunk-A3D3GW7R.mjs +2 -0
- package/out/__chunks__/{chunk-SK2W4LXI.mjs → chunk-A4KEELZM.mjs} +2 -2
- package/out/__chunks__/chunk-AORVRKD7.mjs +2 -0
- package/out/__chunks__/chunk-B4QT6VK6.mjs +2 -0
- package/out/__chunks__/chunk-B5ETDLE6.mjs +2 -0
- package/out/__chunks__/chunk-B5ETDLE6.mjs.map +7 -0
- package/out/__chunks__/chunk-BAWWEDTL.mjs +2 -0
- package/out/__chunks__/{chunk-3BVKYYHT.mjs → chunk-C6D4JSK4.mjs} +2 -2
- package/out/__chunks__/{chunk-GB2K574L.mjs → chunk-CLUVDWX6.mjs} +2 -2
- package/out/__chunks__/chunk-CLUVDWX6.mjs.map +7 -0
- package/out/__chunks__/{chunk-SMFNVU6B.mjs → chunk-CO23VS2O.mjs} +2 -2
- package/out/__chunks__/{chunk-GZL6GF6Z.mjs → chunk-CT235ZUB.mjs} +2 -2
- package/out/__chunks__/chunk-DLCBEPEX.mjs +2 -0
- package/out/__chunks__/chunk-DLCBEPEX.mjs.map +7 -0
- package/out/__chunks__/{chunk-FRIE2JPN.mjs → chunk-DP53BNR6.mjs} +2 -2
- 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-EETNNBUP.mjs +2 -0
- package/out/__chunks__/chunk-EETNNBUP.mjs.map +7 -0
- package/out/__chunks__/{chunk-X74ZW4SP.mjs → chunk-EEVAKQEF.mjs} +2 -2
- package/out/__chunks__/chunk-EYGPOZGS.mjs +2 -0
- package/out/__chunks__/{chunk-OF4WULEW.mjs → chunk-EYNHHGCH.mjs} +2 -2
- package/out/__chunks__/chunk-EZKCZPIE.mjs +2 -0
- package/out/__chunks__/chunk-EZKCZPIE.mjs.map +7 -0
- package/out/__chunks__/{chunk-C3LAZHGD.mjs → chunk-FNMAWOLC.mjs} +2 -2
- package/out/__chunks__/{chunk-EFD2PMLA.mjs → chunk-FUFPNXYS.mjs} +2 -2
- package/out/__chunks__/{chunk-CECXI5ZJ.mjs → chunk-G5VTJTDE.mjs} +2 -2
- package/out/__chunks__/{chunk-XADBXKX5.mjs → chunk-GFEDWIDV.mjs} +2 -2
- package/out/__chunks__/{chunk-EAH7XGM3.mjs → chunk-GUAXMODN.mjs} +2 -2
- package/out/__chunks__/{chunk-I4QHHCK6.mjs → chunk-HGQYSGTG.mjs} +2 -2
- package/out/__chunks__/chunk-HZGRS7HG.mjs +2 -0
- package/out/__chunks__/{chunk-CFJZFKIS.mjs → chunk-I47BE6ON.mjs} +2 -2
- package/out/__chunks__/{chunk-QEE4T6UM.mjs → chunk-ICTG3GLU.mjs} +2 -2
- package/out/__chunks__/{chunk-RB6NB2UN.mjs → chunk-IF3IASJC.mjs} +2 -2
- package/out/__chunks__/{chunk-LWCNB4VP.mjs → chunk-IGN5F3GN.mjs} +2 -2
- package/out/__chunks__/{chunk-ZBJRLPCR.mjs → chunk-J6WJ6ULQ.mjs} +2 -2
- package/out/__chunks__/{chunk-LZPMMMJZ.mjs → chunk-JIIULTH3.mjs} +2 -2
- package/out/__chunks__/{chunk-6ST4KZLT.mjs → chunk-JQ57YAGP.mjs} +2 -2
- package/out/__chunks__/chunk-JRRBXKOK.mjs +2 -0
- package/out/__chunks__/{chunk-UNBTFF6K.mjs → chunk-JSSRK6RP.mjs} +2 -2
- package/out/__chunks__/{chunk-BZQSEPTC.mjs → chunk-JTIXXP4J.mjs} +2 -2
- package/out/__chunks__/chunk-JTV664SG.mjs +2 -0
- package/out/__chunks__/chunk-JTV664SG.mjs.map +7 -0
- package/out/__chunks__/{chunk-GY6MHIOO.mjs → chunk-JVRKUYW6.mjs} +2 -2
- package/out/__chunks__/{chunk-PZHQ37I6.mjs → chunk-K373M2BG.mjs} +2 -2
- package/out/__chunks__/{chunk-2JGSMQ3T.mjs → chunk-K3VNFEPP.mjs} +2 -2
- package/out/__chunks__/chunk-K7X3YFJU.mjs +2 -0
- package/out/__chunks__/{chunk-NBQ7F24V.mjs.map → chunk-K7X3YFJU.mjs.map} +3 -3
- package/out/__chunks__/{chunk-JVI373HI.mjs → chunk-KLDTJCML.mjs} +2 -2
- package/out/__chunks__/chunk-KOLL3XGD.mjs +2 -0
- package/out/__chunks__/{chunk-HKKKOC5V.mjs → chunk-LFBY6WV3.mjs} +2 -2
- package/out/__chunks__/chunk-LJX4MW7B.mjs +2 -0
- package/out/__chunks__/chunk-LJX4MW7B.mjs.map +7 -0
- package/out/__chunks__/{chunk-F6QODHDC.mjs → chunk-LUCBMBG7.mjs} +2 -2
- 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-MSF6QQXH.mjs +2 -0
- 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-BUAVB6CL.mjs → chunk-NOIBKBS3.mjs} +2 -2
- package/out/__chunks__/{chunk-BHAHZQVO.mjs → chunk-NTPPBM7T.mjs} +2 -2
- package/out/__chunks__/{chunk-CANC2FCH.mjs → chunk-NUJ4VCBC.mjs} +2 -2
- package/out/__chunks__/chunk-O4I2ENO6.mjs +2 -0
- package/out/__chunks__/chunk-OLPFN3HZ.mjs +2 -0
- package/out/__chunks__/chunk-OPHTJKDE.mjs +2 -0
- package/out/__chunks__/{chunk-ARY5QEDY.mjs → chunk-PBTBNQ25.mjs} +2 -2
- package/out/__chunks__/chunk-PCTCQEFY.mjs +2 -0
- package/out/__chunks__/{chunk-JIBYUZL4.mjs → chunk-PI3A4HAK.mjs} +2 -2
- package/out/__chunks__/{chunk-ZXHMD677.mjs → chunk-Q6RQNGJC.mjs} +2 -2
- package/out/__chunks__/chunk-QAOBZWSF.mjs +2 -0
- package/out/__chunks__/{chunk-ZZNPJF24.mjs.map → chunk-QAOBZWSF.mjs.map} +1 -1
- package/out/__chunks__/chunk-QSXHUZLS.mjs +2 -0
- package/out/__chunks__/chunk-QSXHUZLS.mjs.map +7 -0
- package/out/__chunks__/{chunk-X6SYH5RO.mjs → chunk-QUPXSKV4.mjs} +2 -2
- package/out/__chunks__/{chunk-YNHWN4KZ.mjs → chunk-RIB3PJIR.mjs} +2 -2
- package/out/__chunks__/{chunk-3D7VMEVL.mjs → chunk-RXX3GSOM.mjs} +2 -2
- package/out/__chunks__/{chunk-UWGZQ6WZ.mjs → chunk-SGNJ44D2.mjs} +2 -2
- package/out/__chunks__/chunk-TBCYELRO.mjs +2 -0
- package/out/__chunks__/chunk-TBCYELRO.mjs.map +7 -0
- 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-EYUQF6VD.mjs → chunk-THWK4TAG.mjs} +2 -2
- package/out/__chunks__/{chunk-WOZIHP5Q.mjs → chunk-TLW7RSAO.mjs} +2 -2
- package/out/__chunks__/{chunk-AJC3F2YT.mjs → chunk-U3MIDVR7.mjs} +2 -2
- package/out/__chunks__/{chunk-S6NHNEQK.mjs → chunk-UCRVRBTA.mjs} +2 -2
- package/out/__chunks__/chunk-UY57JRX7.mjs +2 -0
- package/out/__chunks__/chunk-UY57JRX7.mjs.map +7 -0
- package/out/__chunks__/chunk-UZTMRUVT.mjs +2 -0
- package/out/__chunks__/chunk-UZTMRUVT.mjs.map +7 -0
- package/out/__chunks__/{chunk-LDTECGMM.mjs → chunk-V7P525KM.mjs} +2 -2
- package/out/__chunks__/{chunk-PNVMS2VO.mjs → chunk-VOJLXYJ3.mjs} +2 -2
- package/out/__chunks__/chunk-VRLS225Q.mjs +2 -0
- package/out/__chunks__/{chunk-JSKOWAZU.mjs → chunk-VW2RKDMX.mjs} +2 -2
- package/out/__chunks__/chunk-WGKDCYB7.mjs +2 -0
- package/out/__chunks__/chunk-WGKDCYB7.mjs.map +7 -0
- package/out/__chunks__/chunk-XFBUY46Y.mjs +2 -0
- package/out/__chunks__/{chunk-5YDUSQUN.mjs → chunk-XH2ZG7PU.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-JSTWLAYX.mjs → chunk-XYPOYVRU.mjs} +2 -2
- package/out/__chunks__/{chunk-HJGZQFKX.mjs → chunk-Y3OGRXWT.mjs} +2 -2
- package/out/__chunks__/{chunk-2FU37PY5.mjs → chunk-Y5BESSJK.mjs} +2 -2
- package/out/__chunks__/{chunk-6IDZ52FJ.mjs → chunk-Z3NZ36LQ.mjs} +2 -2
- package/out/__chunks__/{chunk-KD2K7HNK.mjs → chunk-Z64FHGQ2.mjs} +2 -2
- package/out/__chunks__/{chunk-3TJTXI66.mjs → chunk-ZC6ENJP4.mjs} +2 -2
- package/out/__chunks__/chunk-ZRMZYVMR.mjs +2 -0
- package/out/__chunks__/{chunk-NIP6EFXI.mjs.map → chunk-ZRMZYVMR.mjs.map} +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/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/configuration/index.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.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/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/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 +3 -5
- 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-62XXIXTE.mjs +0 -2
- package/out/__chunks__/chunk-65L5EBBL.mjs +0 -2
- package/out/__chunks__/chunk-65L5EBBL.mjs.map +0 -7
- package/out/__chunks__/chunk-7YKKU6UM.mjs +0 -2
- package/out/__chunks__/chunk-B6KBOAFE.mjs +0 -2
- package/out/__chunks__/chunk-BJEPGGTR.mjs +0 -2
- package/out/__chunks__/chunk-CUTW32BD.mjs +0 -2
- package/out/__chunks__/chunk-GB2K574L.mjs.map +0 -7
- package/out/__chunks__/chunk-GV2STE7J.mjs +0 -2
- package/out/__chunks__/chunk-GV2STE7J.mjs.map +0 -7
- package/out/__chunks__/chunk-GWUYYSBN.mjs +0 -2
- package/out/__chunks__/chunk-HMHP5DPL.mjs.map +0 -7
- package/out/__chunks__/chunk-I6WKWOAM.mjs +0 -2
- package/out/__chunks__/chunk-I7L5LOHR.mjs +0 -2
- package/out/__chunks__/chunk-IDJ7NXCI.mjs +0 -2
- package/out/__chunks__/chunk-IQ6JB5QS.mjs +0 -2
- package/out/__chunks__/chunk-IQ6JB5QS.mjs.map +0 -7
- package/out/__chunks__/chunk-IR4Y2GE5.mjs +0 -2
- package/out/__chunks__/chunk-K7FDXJZD.mjs +0 -2
- package/out/__chunks__/chunk-KRJLYFVI.mjs +0 -2
- package/out/__chunks__/chunk-MFUQ5NBC.mjs +0 -2
- package/out/__chunks__/chunk-N4XWVRRE.mjs +0 -2
- package/out/__chunks__/chunk-N4XWVRRE.mjs.map +0 -7
- package/out/__chunks__/chunk-NBQ7F24V.mjs +0 -2
- package/out/__chunks__/chunk-NIP6EFXI.mjs +0 -2
- package/out/__chunks__/chunk-NWQY6WSD.mjs +0 -2
- package/out/__chunks__/chunk-OTJAWUCX.mjs +0 -2
- package/out/__chunks__/chunk-OTJAWUCX.mjs.map +0 -7
- package/out/__chunks__/chunk-OXMMRCSH.mjs +0 -2
- package/out/__chunks__/chunk-P72TQUGN.mjs +0 -2
- package/out/__chunks__/chunk-P72TQUGN.mjs.map +0 -7
- package/out/__chunks__/chunk-PBFDXHTQ.mjs +0 -2
- package/out/__chunks__/chunk-PBFDXHTQ.mjs.map +0 -7
- package/out/__chunks__/chunk-PLMCHSS6.mjs +0 -2
- package/out/__chunks__/chunk-SAAOQW7P.mjs +0 -2
- package/out/__chunks__/chunk-SAAOQW7P.mjs.map +0 -7
- package/out/__chunks__/chunk-SJN2CPGB.mjs +0 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs +0 -2
- package/out/__chunks__/chunk-TQA3JDNV.mjs.map +0 -7
- package/out/__chunks__/chunk-WJQVMI33.mjs +0 -2
- package/out/__chunks__/chunk-WKPW72IW.mjs +0 -2
- package/out/__chunks__/chunk-X5QIDX7Z.mjs +0 -2
- package/out/__chunks__/chunk-YFUI3MRL.mjs +0 -2
- package/out/__chunks__/chunk-ZEUNADU7.mjs +0 -2
- package/out/__chunks__/chunk-ZNSKART2.mjs +0 -2
- package/out/__chunks__/chunk-ZNSKART2.mjs.map +0 -7
- 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-ZZNPJF24.mjs +0 -2
- /package/out/__chunks__/{chunk-WKPW72IW.mjs.map → chunk-22IJ3QB4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ZUH3TQ2.mjs.map → chunk-2Y66XRQK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CUTW32BD.mjs.map → chunk-34PFLOIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S22V4GGF.mjs.map → chunk-37O2ROE4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E5RLJTLP.mjs.map → chunk-3Q5IOJ67.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UPHBWFSY.mjs.map → chunk-3WS7UAIF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LYNRBQNO.mjs.map → chunk-4JCZWUDH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I7L5LOHR.mjs.map → chunk-4L2AXB2K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZXNJFXKB.mjs.map → chunk-4PQ3E6VH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OOVV574D.mjs.map → chunk-4VA2SULD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DSVSX4ZT.mjs.map → chunk-5DILKRFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GR362QNP.mjs.map → chunk-5FZ5WUYZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6DWUEZO7.mjs.map → chunk-5KVNYLOM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BJEPGGTR.mjs.map → chunk-5MKXCLBG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-52PGMMOM.mjs.map → chunk-5OMQOYP7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3WHS4QZZ.mjs.map → chunk-5TNG3JR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I6WKWOAM.mjs.map → chunk-6L7YQWGX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GWUYYSBN.mjs.map → chunk-A3D3GW7R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SK2W4LXI.mjs.map → chunk-A4KEELZM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IR4Y2GE5.mjs.map → chunk-AORVRKD7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KRJLYFVI.mjs.map → chunk-B4QT6VK6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SJN2CPGB.mjs.map → chunk-BAWWEDTL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3BVKYYHT.mjs.map → chunk-C6D4JSK4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SMFNVU6B.mjs.map → chunk-CO23VS2O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GZL6GF6Z.mjs.map → chunk-CT235ZUB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FRIE2JPN.mjs.map → chunk-DP53BNR6.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-X74ZW4SP.mjs.map → chunk-EEVAKQEF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-62XXIXTE.mjs.map → chunk-EYGPOZGS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OF4WULEW.mjs.map → chunk-EYNHHGCH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C3LAZHGD.mjs.map → chunk-FNMAWOLC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EFD2PMLA.mjs.map → chunk-FUFPNXYS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CECXI5ZJ.mjs.map → chunk-G5VTJTDE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XADBXKX5.mjs.map → chunk-GFEDWIDV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EAH7XGM3.mjs.map → chunk-GUAXMODN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I4QHHCK6.mjs.map → chunk-HGQYSGTG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJQVMI33.mjs.map → chunk-HZGRS7HG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CFJZFKIS.mjs.map → chunk-I47BE6ON.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QEE4T6UM.mjs.map → chunk-ICTG3GLU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RB6NB2UN.mjs.map → chunk-IF3IASJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LWCNB4VP.mjs.map → chunk-IGN5F3GN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZBJRLPCR.mjs.map → chunk-J6WJ6ULQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LZPMMMJZ.mjs.map → chunk-JIIULTH3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ST4KZLT.mjs.map → chunk-JQ57YAGP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OXMMRCSH.mjs.map → chunk-JRRBXKOK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UNBTFF6K.mjs.map → chunk-JSSRK6RP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BZQSEPTC.mjs.map → chunk-JTIXXP4J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GY6MHIOO.mjs.map → chunk-JVRKUYW6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PZHQ37I6.mjs.map → chunk-K373M2BG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2JGSMQ3T.mjs.map → chunk-K3VNFEPP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JVI373HI.mjs.map → chunk-KLDTJCML.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7YKKU6UM.mjs.map → chunk-KOLL3XGD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HKKKOC5V.mjs.map → chunk-LFBY6WV3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F6QODHDC.mjs.map → chunk-LUCBMBG7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NWQY6WSD.mjs.map → chunk-MSF6QQXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L3MWDI6J.mjs.map → chunk-N55JEIM6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BUAVB6CL.mjs.map → chunk-NOIBKBS3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BHAHZQVO.mjs.map → chunk-NTPPBM7T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CANC2FCH.mjs.map → chunk-NUJ4VCBC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IDJ7NXCI.mjs.map → chunk-O4I2ENO6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PLMCHSS6.mjs.map → chunk-OLPFN3HZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X5QIDX7Z.mjs.map → chunk-OPHTJKDE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ARY5QEDY.mjs.map → chunk-PBTBNQ25.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K7FDXJZD.mjs.map → chunk-PCTCQEFY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIBYUZL4.mjs.map → chunk-PI3A4HAK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZXHMD677.mjs.map → chunk-Q6RQNGJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X6SYH5RO.mjs.map → chunk-QUPXSKV4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YNHWN4KZ.mjs.map → chunk-RIB3PJIR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3D7VMEVL.mjs.map → chunk-RXX3GSOM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UWGZQ6WZ.mjs.map → chunk-SGNJ44D2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YFUI3MRL.mjs.map → chunk-TFCXKUX5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EYUQF6VD.mjs.map → chunk-THWK4TAG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WOZIHP5Q.mjs.map → chunk-TLW7RSAO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AJC3F2YT.mjs.map → chunk-U3MIDVR7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S6NHNEQK.mjs.map → chunk-UCRVRBTA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LDTECGMM.mjs.map → chunk-V7P525KM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PNVMS2VO.mjs.map → chunk-VOJLXYJ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MFUQ5NBC.mjs.map → chunk-VRLS225Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JSKOWAZU.mjs.map → chunk-VW2RKDMX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B6KBOAFE.mjs.map → chunk-XFBUY46Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5YDUSQUN.mjs.map → chunk-XH2ZG7PU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEUNADU7.mjs.map → chunk-XJPXTYIE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JSTWLAYX.mjs.map → chunk-XYPOYVRU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HJGZQFKX.mjs.map → chunk-Y3OGRXWT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2FU37PY5.mjs.map → chunk-Y5BESSJK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6IDZ52FJ.mjs.map → chunk-Z3NZ36LQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KD2K7HNK.mjs.map → chunk-Z64FHGQ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3TJTXI66.mjs.map → chunk-ZC6ENJP4.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
|
@@ -30,10 +30,10 @@ var import_getTransactionAsset = require("./getTransactionAsset");
|
|
|
30
30
|
var import_getTransactionAssets = require("./getTransactionAssets");
|
|
31
31
|
const mapTransactionToListItem = ({
|
|
32
32
|
transaction,
|
|
33
|
+
isPending = false,
|
|
33
34
|
address,
|
|
34
35
|
explorerAddress,
|
|
35
|
-
egldLabel
|
|
36
|
-
isPending = false
|
|
36
|
+
egldLabel
|
|
37
37
|
}) => {
|
|
38
38
|
const { receiver, receiverAssets } = (0, import_getReceiverData.getReceiverData)(transaction);
|
|
39
39
|
const isIncomingTransaction = address === receiver;
|
package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.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 {\n transaction: ServerTransactionType;\n isPending?: boolean;\n profileImages?: Record<string, string>;\n address: string;\n explorerAddress: string;\n egldLabel: string;\n}\n\nexport const mapTransactionToListItem = ({\n transaction,\n isPending = false,\n address,\n explorerAddress,\n egldLabel\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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,gCAAmC;AACnC,6BAAgC;AAChC,6BAAgC;AAChC,kCAAqC;AACrC,kCAAqC;AACrC,iCAAoC;AACpC,kCAAqC;AAW9B,MAAM,2BAA2B,CAAC;AAAA,EACvC;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AACF,MAAiE;AAC/D,QAAM,EAAE,UAAU,eAAe,QAAI,wCAAgB,WAAW;AAChE,QAAM,wBAAwB,YAAY;AAE1C,QAAM,aAAS,kDAAqB;AAAA,IAClC;AAAA,IACA,oBAAoB;AAAA,IACpB;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,wBAAoB,kDAAqB;AAAA,IAC7C,gBAAgB,aAAa;AAAA,IAC7B;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,OAAO,YAAY,kBAAkB,YAAY;AAEvD,QAAM,sBAA4C;AAAA,IAChD,WAAO,gDAAoB;AAAA,MACzB,GAAG;AAAA,MACH;AAAA,MACA,kBAAkB;AAAA,MAClB,QAAQ,YAAY;AAAA,IACtB,CAAC;AAAA,IACD,YAAY,wBAAwB,YAAY,SAAS;AAAA,IACzD,iBAAiB,wBACb,YAAY,cAAc,WAAW,YAAY,cAAc,UAC/D,gBAAgB,WAAW,gBAAgB;AAAA,IAC/C,gBAAgB,wBAAwB,SAAS;AAAA,IACjD;AAAA,IACA,YAAQ,kDAAqB;AAAA,MAC3B;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD;AAAA,IACA,QAAQ,YAAY;AAAA,IACpB,WAAW,YAAY;AAAA,IACvB,UAAM,wCAAgB;AAAA,MACpB;AAAA,MACA,IAAI,6CAAmB,mBAAmB,IAAI;AAAA,IAChD,CAAC;AAAA,EACH;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ITransactionListItem } from '../../../../lib/sdkDappUi';
|
|
2
2
|
import { ServerTransactionType } from '../../../../types/serverTransactions.types';
|
|
3
|
-
|
|
4
|
-
interface IMapTransactionToListItemParamsType extends IBaseTransactionParams {
|
|
3
|
+
interface IMapTransactionToListItemParamsType {
|
|
5
4
|
transaction: ServerTransactionType;
|
|
6
5
|
isPending?: boolean;
|
|
7
6
|
profileImages?: Record<string, string>;
|
|
7
|
+
address: string;
|
|
8
|
+
explorerAddress: string;
|
|
9
|
+
egldLabel: string;
|
|
8
10
|
}
|
|
9
|
-
export declare const mapTransactionToListItem: ({ transaction, address, explorerAddress, egldLabel
|
|
11
|
+
export declare const mapTransactionToListItem: ({ transaction, isPending, address, explorerAddress, egldLabel }: IMapTransactionToListItemParamsType) => ITransactionListItem;
|
|
10
12
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../../../__chunks__/chunk-4MWQKLVG.mjs";import"../../../../__chunks__/chunk-5OMQOYP7.mjs";import"../../../../__chunks__/chunk-UCNS6KD5.mjs";import"../../../../__chunks__/chunk-35MNP3LA.mjs";import"../../../../__chunks__/chunk-TX7PTLVP.mjs";import"../../../../__chunks__/chunk-WZ2DNB3R.mjs";import"../../../../__chunks__/chunk-DFSBS3PX.mjs";import"../../../../__chunks__/chunk-GFR6K4DR.mjs";import"../../../../__chunks__/chunk-6D53LH5J.mjs";import"../../../../__chunks__/chunk-H33OUO77.mjs";import"../../../../__chunks__/chunk-HQQMSHTW.mjs";import"../../../../__chunks__/chunk-UQU2VWPJ.mjs";import"../../../../__chunks__/chunk-NK5Y3RLY.mjs";import"../../../../__chunks__/chunk-6UMOECOW.mjs";import"../../../../__chunks__/chunk-54B3EIZC.mjs";import"../../../../__chunks__/chunk-QJ7MRSGB.mjs";import"../../../../__chunks__/chunk-VDDXFGB2.mjs";import"../../../../__chunks__/chunk-BRJNX4JF.mjs";import"../../../../__chunks__/chunk-PJWJZHIS.mjs";import"../../../../__chunks__/chunk-DBIIY2TX.mjs";import"../../../../__chunks__/chunk-KD2IQ32V.mjs";import"../../../../__chunks__/chunk-7CELSV4S.mjs";import"../../../../__chunks__/chunk-YUITECZ5.mjs";import"../../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../../__chunks__/chunk-2BSPSW6X.mjs";import"../../../../__chunks__/chunk-OVXVICF7.mjs";import"../../../../__chunks__/chunk-BTJWNUM6.mjs";import"../../../../__chunks__/chunk-TRMQFQOQ.mjs";import"../../../../__chunks__/chunk-WZI2I6NX.mjs";import"../../../../__chunks__/chunk-TI37DKBT.mjs";import"../../../../__chunks__/chunk-NTEMINYA.mjs";import"../../../../__chunks__/chunk-WRLZ5ICK.mjs";import"../../../../__chunks__/chunk-I3MK6KZJ.mjs";import"../../../../__chunks__/chunk-GLXG5BES.mjs";export{a as mapTransactionToListItem};
|
|
2
2
|
//# sourceMappingURL=mapTransactionToListItem.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../../__chunks__/chunk-IXBWD6BF.mjs";import{a as i}from"../../../__chunks__/chunk-
|
|
1
|
+
import"../../../__chunks__/chunk-IXBWD6BF.mjs";import{a as i}from"../../../__chunks__/chunk-B5ETDLE6.mjs";import"../../../__chunks__/chunk-VCAWVAO5.mjs";import{a as g}from"../../../__chunks__/chunk-55W25Q35.mjs";import{a as h}from"../../../__chunks__/chunk-UY57JRX7.mjs";import"../../../__chunks__/chunk-WGKDCYB7.mjs";import"../../../__chunks__/chunk-GFEDWIDV.mjs";import"../../../__chunks__/chunk-63MIE6JF.mjs";import{a as f}from"../../../__chunks__/chunk-4MWQKLVG.mjs";import{b}from"../../../__chunks__/chunk-5OMQOYP7.mjs";import"../../../__chunks__/chunk-UCNS6KD5.mjs";import"../../../__chunks__/chunk-35MNP3LA.mjs";import"../../../__chunks__/chunk-TX7PTLVP.mjs";import{a}from"../../../__chunks__/chunk-WZ2DNB3R.mjs";import{a as e}from"../../../__chunks__/chunk-DFSBS3PX.mjs";import"../../../__chunks__/chunk-GFR6K4DR.mjs";import"../../../__chunks__/chunk-6D53LH5J.mjs";import"../../../__chunks__/chunk-H33OUO77.mjs";import"../../../__chunks__/chunk-HQQMSHTW.mjs";import"../../../__chunks__/chunk-UQU2VWPJ.mjs";import{a as d}from"../../../__chunks__/chunk-NK5Y3RLY.mjs";import"../../../__chunks__/chunk-6UMOECOW.mjs";import"../../../__chunks__/chunk-54B3EIZC.mjs";import"../../../__chunks__/chunk-QJ7MRSGB.mjs";import{a as c}from"../../../__chunks__/chunk-VDDXFGB2.mjs";import"../../../__chunks__/chunk-BRJNX4JF.mjs";import"../../../__chunks__/chunk-ICTG3GLU.mjs";import"../../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../../__chunks__/chunk-UTWIKUIK.mjs";import"../../../__chunks__/chunk-UERJ6AKK.mjs";import"../../../__chunks__/chunk-KPK72MOE.mjs";import"../../../__chunks__/chunk-7VHTZYM2.mjs";import"../../../__chunks__/chunk-VNLGNNIL.mjs";import"../../../__chunks__/chunk-6JM4DPOH.mjs";import"../../../__chunks__/chunk-ZODTYAYF.mjs";import"../../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../../__chunks__/chunk-DKX6JUT6.mjs";import"../../../__chunks__/chunk-5MKXCLBG.mjs";import"../../../__chunks__/chunk-KRWR77QE.mjs";import"../../../__chunks__/chunk-B7YCKWDU.mjs";import"../../../__chunks__/chunk-HDJOER66.mjs";import"../../../__chunks__/chunk-A7FTKX2A.mjs";import"../../../__chunks__/chunk-XKU5QBXG.mjs";import"../../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../../__chunks__/chunk-JMC7CMTU.mjs";import"../../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../../__chunks__/chunk-T2YPFNVM.mjs";import"../../../__chunks__/chunk-M7BM6QPB.mjs";import"../../../__chunks__/chunk-5N4F5T5L.mjs";import"../../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../../__chunks__/chunk-YMPZDHKF.mjs";import"../../../__chunks__/chunk-VKEESSBI.mjs";import"../../../__chunks__/chunk-2DNGCNYM.mjs";import"../../../__chunks__/chunk-SQVKVA7X.mjs";import"../../../__chunks__/chunk-I24YBVHK.mjs";import"../../../__chunks__/chunk-NB7A4C7L.mjs";import"../../../__chunks__/chunk-PJWJZHIS.mjs";import"../../../__chunks__/chunk-DBIIY2TX.mjs";import"../../../__chunks__/chunk-KD2IQ32V.mjs";import"../../../__chunks__/chunk-7CELSV4S.mjs";import"../../../__chunks__/chunk-YUITECZ5.mjs";import"../../../__chunks__/chunk-TVELGQIH.mjs";import"../../../__chunks__/chunk-2BSPSW6X.mjs";import"../../../__chunks__/chunk-OVXVICF7.mjs";import"../../../__chunks__/chunk-BTJWNUM6.mjs";import"../../../__chunks__/chunk-TRMQFQOQ.mjs";import"../../../__chunks__/chunk-WZI2I6NX.mjs";import"../../../__chunks__/chunk-TI37DKBT.mjs";import"../../../__chunks__/chunk-NTEMINYA.mjs";import"../../../__chunks__/chunk-WRLZ5ICK.mjs";import"../../../__chunks__/chunk-I3MK6KZJ.mjs";import"../../../__chunks__/chunk-MGFIOCA4.mjs";import"../../../__chunks__/chunk-GGBMHKR4.mjs";import"../../../__chunks__/chunk-GLXG5BES.mjs";import"../../../__chunks__/chunk-QAOBZWSF.mjs";export{g as createTransactionsHistoryFromSessions,a as getReceiverData,c as getTransactionAmount,d as getTransactionAsset,i as getTransactionsHistory,h as mapServerTransactionsToListItems,f as mapTransactionToListItem,b as processTransactionAction,e as processTransactionAssets};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-TFZ46GCB.mjs";import"../../__chunks__/chunk-OL6LWUIJ.mjs";import{a as
|
|
1
|
+
import"../../__chunks__/chunk-TFZ46GCB.mjs";import"../../__chunks__/chunk-OL6LWUIJ.mjs";import{a as q}from"../../__chunks__/chunk-ZRSYQ3MT.mjs";import"../../__chunks__/chunk-M6MN4RXG.mjs";import"../../__chunks__/chunk-KIOUFP5Q.mjs";import{a as p}from"../../__chunks__/chunk-5DILKRFV.mjs";import{a as o}from"../../__chunks__/chunk-DZ2BIDRW.mjs";import{a as n}from"../../__chunks__/chunk-HZGRS7HG.mjs";import{a as m}from"../../__chunks__/chunk-NTPPBM7T.mjs";import{a as l}from"../../__chunks__/chunk-GUAXMODN.mjs";import{a as k}from"../../__chunks__/chunk-4VA2SULD.mjs";import"../../__chunks__/chunk-ZAPRDHIW.mjs";import"../../__chunks__/chunk-GIZSIYH4.mjs";import"../../__chunks__/chunk-WVAP3V3E.mjs";import"../../__chunks__/chunk-XVX7N3JK.mjs";import"../../__chunks__/chunk-HH5SA7BX.mjs";import"../../__chunks__/chunk-TCDMXBPB.mjs";import{a as r}from"../../__chunks__/chunk-B3IKUIRK.mjs";import{a as j}from"../../__chunks__/chunk-QUPXSKV4.mjs";import"../../__chunks__/chunk-NGM3AVCY.mjs";import"../../__chunks__/chunk-IXBWD6BF.mjs";import{a as s}from"../../__chunks__/chunk-B5ETDLE6.mjs";import"../../__chunks__/chunk-VCAWVAO5.mjs";import{a as h}from"../../__chunks__/chunk-55W25Q35.mjs";import{a as i}from"../../__chunks__/chunk-UY57JRX7.mjs";import"../../__chunks__/chunk-WGKDCYB7.mjs";import"../../__chunks__/chunk-GFEDWIDV.mjs";import"../../__chunks__/chunk-63MIE6JF.mjs";import{a as g}from"../../__chunks__/chunk-4MWQKLVG.mjs";import{b as c}from"../../__chunks__/chunk-5OMQOYP7.mjs";import"../../__chunks__/chunk-UCNS6KD5.mjs";import"../../__chunks__/chunk-35MNP3LA.mjs";import"../../__chunks__/chunk-TX7PTLVP.mjs";import{a as b}from"../../__chunks__/chunk-WZ2DNB3R.mjs";import{a as f}from"../../__chunks__/chunk-DFSBS3PX.mjs";import"../../__chunks__/chunk-GFR6K4DR.mjs";import"../../__chunks__/chunk-6D53LH5J.mjs";import"../../__chunks__/chunk-H33OUO77.mjs";import"../../__chunks__/chunk-HQQMSHTW.mjs";import"../../__chunks__/chunk-UQU2VWPJ.mjs";import{a as e}from"../../__chunks__/chunk-NK5Y3RLY.mjs";import"../../__chunks__/chunk-6UMOECOW.mjs";import"../../__chunks__/chunk-54B3EIZC.mjs";import"../../__chunks__/chunk-QJ7MRSGB.mjs";import{a as d}from"../../__chunks__/chunk-VDDXFGB2.mjs";import"../../__chunks__/chunk-BRJNX4JF.mjs";import"../../__chunks__/chunk-ICTG3GLU.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-UERJ6AKK.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-7VHTZYM2.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-5MKXCLBG.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-WZGG2YKQ.mjs";import"../../__chunks__/chunk-JMC7CMTU.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-M7BM6QPB.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-PJWJZHIS.mjs";import{a}from"../../__chunks__/chunk-DBIIY2TX.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-7CELSV4S.mjs";import"../../__chunks__/chunk-YUITECZ5.mjs";import"../../__chunks__/chunk-TVELGQIH.mjs";import"../../__chunks__/chunk-2BSPSW6X.mjs";import"../../__chunks__/chunk-OVXVICF7.mjs";import"../../__chunks__/chunk-BTJWNUM6.mjs";import"../../__chunks__/chunk-TRMQFQOQ.mjs";import"../../__chunks__/chunk-WZI2I6NX.mjs";import"../../__chunks__/chunk-TI37DKBT.mjs";import"../../__chunks__/chunk-NTEMINYA.mjs";import"../../__chunks__/chunk-WRLZ5ICK.mjs";import"../../__chunks__/chunk-I3MK6KZJ.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";export{h as createTransactionsHistoryFromSessions,k as decodeByMethod,n as decodeHighlight,a as explorerUrlBuilder,j as getActiveTransactionsStatus,q as getDecodedDataField,m as getDecodedParts,p as getDisplayValueAndValidationWarnings,o as getHexValidationWarnings,r as getHumanReadableTimeFormat,b as getReceiverData,l as getSmartDecodedParts,d as getTransactionAmount,e as getTransactionAsset,s as getTransactionsHistory,i as mapServerTransactionsToListItems,g as mapTransactionToListItem,c as processTransactionAction,f as processTransactionAssets};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-WHEXX3BD.mjs";import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-WHEXX3BD.mjs";import{a}from"../../__chunks__/chunk-SGNJ44D2.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";export{a as switchTheme};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-SGNJ44D2.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";export{a as switchTheme};
|
|
2
2
|
//# sourceMappingURL=switchTheme.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-37O2ROE4.mjs";import"../../__chunks__/chunk-Z64FHGQ2.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";import"../../__chunks__/chunk-B2UIPHJ3.mjs";export{a as getIsInIframe};
|
|
2
2
|
//# sourceMappingURL=getIsInIframe.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-Z64FHGQ2.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";export{a as getWindowParentOrigin};
|
|
2
2
|
//# sourceMappingURL=getWindowParentOrigin.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../__chunks__/chunk-DTQL3IDP.mjs";import{a as b}from"../../__chunks__/chunk-CKTFPRJS.mjs";import{a as f}from"../../__chunks__/chunk-
|
|
1
|
+
import"../../__chunks__/chunk-DTQL3IDP.mjs";import{a as b}from"../../__chunks__/chunk-CKTFPRJS.mjs";import{a as f}from"../../__chunks__/chunk-37O2ROE4.mjs";import"../../__chunks__/chunk-Z64FHGQ2.mjs";import{a as e}from"../../__chunks__/chunk-EHDGJUEU.mjs";import{a as d}from"../../__chunks__/chunk-HOCSCRJF.mjs";import"../../__chunks__/chunk-QAOBZWSF.mjs";import{a as c}from"../../__chunks__/chunk-UE3IBKCO.mjs";import"../../__chunks__/chunk-H6IZMTJK.mjs";import{a}from"../../__chunks__/chunk-B2UIPHJ3.mjs";export{d as buildUrlParams,e as getIsAuthRoute,f as getIsInIframe,b as getWindowLocation,a as isWindowAvailable,c as sanitizeCallbackUrl};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiversx/sdk-dapp",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.7",
|
|
4
4
|
"main": "out/index.cjs",
|
|
5
5
|
"module": "out/index.mjs",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -63,14 +63,12 @@
|
|
|
63
63
|
"@lifeomic/axios-fetch": "3.0.1",
|
|
64
64
|
"@multiversx/sdk-extension-provider": "5.1.1",
|
|
65
65
|
"@multiversx/sdk-hw-provider": "8.1.1",
|
|
66
|
-
"@multiversx/sdk-metamask-provider": "3.0.0",
|
|
67
66
|
"@multiversx/sdk-native-auth-client": "2.0.1",
|
|
68
|
-
"@multiversx/sdk-wallet": "4.6.0",
|
|
69
67
|
"@multiversx/sdk-wallet-connect-provider": "6.1.2",
|
|
70
68
|
"@multiversx/sdk-web-wallet-cross-window-provider": "3.2.1",
|
|
71
69
|
"@multiversx/sdk-web-wallet-iframe-provider": "4.0.0",
|
|
72
70
|
"@multiversx/sdk-web-wallet-provider": "5.1.1",
|
|
73
|
-
"@multiversx/sdk-webview-provider": "3.2.
|
|
71
|
+
"@multiversx/sdk-webview-provider": "3.2.2",
|
|
74
72
|
"immer": "10.1.1",
|
|
75
73
|
"linkifyjs": "4.3.2",
|
|
76
74
|
"lodash.isempty": "4.4.0",
|
|
@@ -90,7 +88,7 @@
|
|
|
90
88
|
"protobufjs": "^7.2.6"
|
|
91
89
|
},
|
|
92
90
|
"optionalDependencies": {
|
|
93
|
-
"@multiversx/sdk-dapp-ui": ">=0.0.
|
|
91
|
+
"@multiversx/sdk-dapp-ui": ">=0.0.35"
|
|
94
92
|
},
|
|
95
93
|
"resolutions": {
|
|
96
94
|
"strip-ansi": "6.0.1",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as I}from"./chunk-52PGMMOM.mjs";import{a as p}from"./chunk-WZ2DNB3R.mjs";import{a as g}from"./chunk-DFSBS3PX.mjs";import{a as f}from"./chunk-NK5Y3RLY.mjs";import{a as u}from"./chunk-VDDXFGB2.mjs";import{a as T}from"./chunk-BRJNX4JF.mjs";import{a as c}from"./chunk-DBIIY2TX.mjs";var E=({transaction:t,address:e,explorerAddress:v,egldLabel:o,isPending:a=!1})=>{let{receiver:r,receiverAssets:n}=p(t),s=e===r,S=I({transaction:t,currentUserAddress:e,egldLabel:o,isPending:a}),i=g({userIsReceiver:r===e,transaction:t,egldLabel:o}),m=t.originalTxHash??t.txHash;return{asset:f({...t,transactionAssets:i,showDefaultState:a,status:t.status}),interactor:s?t.sender:r,interactorAsset:s?t.senderAssets?.iconSvg??t.senderAssets?.iconPng:n?.iconSvg??n?.iconPng,directionLabel:s?"From":"To",action:S,amount:u({transactionAssets:i,isIncomingTransaction:s}),hash:m,status:t.status,timestamp:t.timestamp,link:T({explorerAddress:v,to:c.transactionDetails(m)})}};export{E as a};
|
|
2
|
-
//# sourceMappingURL=chunk-3L7HZ2SO.mjs.map
|
|
@@ -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
|
-
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,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-BZQSEPTC.mjs";import{c as n}from"./chunk-QEE4T6UM.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-7YKKU6UM.mjs.map
|
|
@@ -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,2 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-QEE4T6UM.mjs";import{current as p}from"immer";var h=({transactions:s,transactionsDisplayInfo:r,status:e,sessionInformation:t})=>{let a=Date.now().toString();return i().setState(({transactions:n})=>{n[a]={transactions:s,status:e,transactionsDisplayInfo:r,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),a},T=({sessionId:s,status:r,errorMessage:e})=>{i().setState(({transactions:t})=>{if(!t[s])return;let a=p(t[s]).transactionsDisplayInfo,n=e||a?.errorMessage;t[s].status=r,t[s].errorMessage=n,t[s].transactionsDisplayInfo={...a,errorMessage:n}},!1,"updateTransactionsSession")},E=({sessionId:s,transaction:r})=>{let e=null;return i().setState(({transactions:t})=>{let a=t[s]?.transactions;if(a!=null){t[s].transactions=a.map(o=>o.hash===r.hash?{...o,...r??{}}:o);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},D=()=>{i().setState(({transactions:s,toasts:r})=>{let t=Object.keys(s).filter(n=>{let o=s[n];if(!o)return!1;let{status:c}=o;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let a=r.transactionToasts.filter(n=>!t.includes(n.toastId));r.transactionToasts=a},!1,"clearCompletedTransactions")};export{h as a,T as b,E as c,D as d};
|
|
2
|
-
//# sourceMappingURL=chunk-GV2STE7J.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/actions/transactions/transactionsActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { current } from 'immer';\nimport { getTransactionsSessionStatus } from 'managers/TransactionManager/helpers/getTransactionsStatus';\nimport { getStore } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n TransactionsDisplayInfoType,\n SignedTransactionType\n} from 'types/transactions.types';\n\nexport type CreateTransactionsSessionType = {\n transactions: SignedTransactionType[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n status: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n sessionInformation?: any;\n};\n\nexport const createTransactionsSession = ({\n transactions,\n transactionsDisplayInfo,\n status,\n sessionInformation\n}: CreateTransactionsSessionType) => {\n const sessionId = Date.now().toString();\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId] = {\n transactions,\n status,\n transactionsDisplayInfo,\n interpretedTransactions: {},\n sessionInformation\n };\n },\n false,\n 'createTransactionsSession'\n );\n return sessionId;\n};\n\nexport const updateSessionStatus = ({\n sessionId,\n status,\n errorMessage\n}: {\n sessionId: string;\n status: TransactionBatchStatusesEnum;\n errorMessage?: string;\n}) => {\n getStore().setState(\n ({ transactions: state }) => {\n if (!state[sessionId]) {\n return;\n }\n const transactionsDisplayInfo = current(\n state[sessionId]\n ).transactionsDisplayInfo;\n\n const newErrorMessage =\n errorMessage || transactionsDisplayInfo?.errorMessage;\n\n state[sessionId].status = status;\n state[sessionId].errorMessage = newErrorMessage;\n state[sessionId].transactionsDisplayInfo = {\n ...transactionsDisplayInfo,\n errorMessage: newErrorMessage\n };\n },\n false,\n 'updateTransactionsSession'\n );\n};\n\nexport const updateTransactionStatus = ({\n sessionId,\n transaction: updatedTransaction\n}: {\n sessionId: string;\n transaction: SignedTransactionType;\n}): TransactionBatchStatusesEnum | null => {\n let newStatus: TransactionBatchStatusesEnum | null = null;\n getStore().setState(\n ({ transactions: state }) => {\n const transactions = state[sessionId]?.transactions;\n if (transactions != null) {\n state[sessionId].transactions = transactions.map((transaction) => {\n if (transaction.hash === updatedTransaction.hash) {\n return {\n ...transaction,\n ...(updatedTransaction ?? {})\n };\n }\n return transaction;\n });\n\n const status = getTransactionsSessionStatus([\n ...state[sessionId].transactions // Create a copy of the transactions array to avoid Proxy issues\n ]);\n\n if (status) {\n updateSessionStatus({\n sessionId,\n status\n });\n newStatus = status;\n }\n }\n },\n false,\n 'updateTransactionStatus'\n );\n\n return newStatus;\n};\n\nexport const clearCompletedTransactions = () => {\n getStore().setState(\n ({ transactions: state, toasts: toastsState }) => {\n const sessionIds = Object.keys(state);\n\n const completedSessionIds = sessionIds.filter((sessionId) => {\n const session = state[sessionId];\n if (!session) {\n return false;\n }\n\n const { status } = session;\n\n const isPending =\n status === TransactionServerStatusesEnum.pending ||\n status === TransactionBatchStatusesEnum.signed ||\n status === TransactionBatchStatusesEnum.sent;\n\n return !isPending;\n });\n\n completedSessionIds.forEach((sessionId) => {\n delete state[sessionId];\n });\n\n const filteredTransactionToasts = toastsState.transactionToasts.filter(\n (toast) => !completedSessionIds.includes(toast.toastId)\n );\n\n toastsState.transactionToasts = filteredTransactionToasts;\n },\n false,\n 'clearCompletedTransactions'\n );\n};\n"],
|
|
5
|
-
"mappings": "kFAAA,OAAS,WAAAA,MAAe,QAmBjB,IAAMC,EAA4B,CAAC,CACxC,aAAAC,EACA,wBAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,IAAqC,CACnC,IAAMC,EAAY,KAAK,IAAI,EAAE,SAAS,EACtC,OAAAC,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAI,CACjB,aAAAJ,EACA,OAAAE,EACA,wBAAAD,EACA,wBAAyB,CAAC,EAC1B,mBAAAE,CACF,CACF,EACA,GACA,2BACF,EACOC,CACT,EAEaG,EAAsB,CAAC,CAClC,UAAAH,EACA,OAAAF,EACA,aAAAM,CACF,IAIM,CACJH,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,GAAI,CAACA,EAAMF,CAAS,EAClB,OAEF,IAAMH,EAA0BQ,EAC9BH,EAAMF,CAAS,CACjB,EAAE,wBAEIM,EACJF,GAAgBP,GAAyB,aAE3CK,EAAMF,CAAS,EAAE,OAASF,EAC1BI,EAAMF,CAAS,EAAE,aAAeM,EAChCJ,EAAMF,CAAS,EAAE,wBAA0B,CACzC,GAAGH,EACH,aAAcS,CAChB,CACF,EACA,GACA,2BACF,CACF,EAEaC,EAA0B,CAAC,CACtC,UAAAP,EACA,YAAaQ,CACf,IAG2C,CACzC,IAAIC,EAAiD,KACrD,OAAAR,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,IAAMN,EAAeM,EAAMF,CAAS,GAAG,aACvC,GAAIJ,GAAgB,KAAM,CACxBM,EAAMF,CAAS,EAAE,aAAeJ,EAAa,IAAKc,GAC5CA,EAAY,OAASF,EAAmB,KACnC,CACL,GAAGE,EACH,GAAIF,GAAsB,CAAC,CAC7B,EAEKE,CACR,EAED,IAAMZ,EAASa,EAA6B,CAC1C,GAAGT,EAAMF,CAAS,EAAE,YACtB,CAAC,EAEGF,IACFK,EAAoB,CAClB,UAAAH,EACA,OAAAF,CACF,CAAC,EACDW,EAAYX,EAEhB,CACF,EACA,GACA,yBACF,EAEOW,CACT,EAEaG,EAA6B,IAAM,CAC9CX,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,EAAO,OAAQW,CAAY,IAAM,CAGhD,IAAMC,EAFa,OAAO,KAAKZ,CAAK,EAEG,OAAQF,GAAc,CAC3D,IAAMe,EAAUb,EAAMF,CAAS,EAC/B,GAAI,CAACe,EACH,MAAO,GAGT,GAAM,CAAE,OAAAjB,CAAO,EAAIiB,EAOnB,MAAO,EAJLjB,eACAA,cACAA,WAGJ,CAAC,EAEDgB,EAAoB,QAASd,GAAc,CACzC,OAAOE,EAAMF,CAAS,CACxB,CAAC,EAED,IAAMgB,EAA4BH,EAAY,kBAAkB,OAC7DI,GAAU,CAACH,EAAoB,SAASG,EAAM,OAAO,CACxD,EAEAJ,EAAY,kBAAoBG,CAClC,EACA,GACA,4BACF,CACF",
|
|
6
|
-
"names": ["current", "createTransactionsSession", "transactions", "transactionsDisplayInfo", "status", "sessionInformation", "sessionId", "getStore", "state", "updateSessionStatus", "errorMessage", "current", "newErrorMessage", "updateTransactionStatus", "updatedTransaction", "newStatus", "transaction", "getTransactionsSessionStatus", "clearCompletedTransactions", "toastsState", "completedSessionIds", "session", "filteredTransactionToasts", "toast"]
|
|
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 as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-P72TQUGN.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-IQ6JB5QS.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 I}from"./chunk-3MW2H273.mjs";import{a as l}from"./chunk-I7L5LOHR.mjs";import{a as u}from"./chunk-WKPW72IW.mjs";import{j as m,k as p,l as d,n as f}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-P72TQUGN.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-N4XWVRRE.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 de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-JIBYUZL4.mjs";import{a as se}from"./chunk-7ZUH3TQ2.mjs";import{a as ie}from"./chunk-ZXHMD677.mjs";import{a as R}from"./chunk-GR362QNP.mjs";import{a as oe}from"./chunk-UPHBWFSY.mjs";import{a as te}from"./chunk-FRIE2JPN.mjs";import{a as re}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-WOZIHP5Q.mjs";import{a as p}from"./chunk-JSTWLAYX.mjs";import{a as ee}from"./chunk-CECXI5ZJ.mjs";import{a as b}from"./chunk-YNHWN4KZ.mjs";import{a as ne}from"./chunk-PNVMS2VO.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-OTJAWUCX.mjs";import{a as P}from"./chunk-X5QIDX7Z.mjs";import{a as $}from"./chunk-CUTW32BD.mjs";import{a as N}from"./chunk-4TBVQD27.mjs";import{a as J}from"./chunk-3BVKYYHT.mjs";import{g as X}from"./chunk-2IUBMLF4.mjs";import{a as F,q as K,s as l}from"./chunk-QEE4T6UM.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-NBQ7F24V.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-ELQR4QMU.mjs";import{a as R}from"./chunk-URJQWHBM.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as w}from"./chunk-E5RLJTLP.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{w as v}from"./chunk-OTJAWUCX.mjs";import{a as x}from"./chunk-I7L5LOHR.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-ZZNPJF24.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-NIP6EFXI.mjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Et}from"./chunk-C3LAZHGD.mjs";import{a as gt}from"./chunk-I6WKWOAM.mjs";import{a as It}from"./chunk-6UZHM5LW.mjs";import{a as k}from"./chunk-N4XWVRRE.mjs";import{a as xt}from"./chunk-X74ZW4SP.mjs";import{a as wt}from"./chunk-X5QIDX7Z.mjs";import{a as At}from"./chunk-62XXIXTE.mjs";import{a as Lt}from"./chunk-JSKOWAZU.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-HJGZQFKX.mjs";import{b as F}from"./chunk-LYNRBQNO.mjs";import{a as kt}from"./chunk-7YKKU6UM.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ft}from"./chunk-OF4WULEW.mjs";import{a as S}from"./chunk-NWQY6WSD.mjs";import{a as ut}from"./chunk-CUTW32BD.mjs";import{a as yt}from"./chunk-ZBJRLPCR.mjs";import{a as x}from"./chunk-LWCNB4VP.mjs";import{a as O,f as bt}from"./chunk-JVI373HI.mjs";import{b as f,c as q,d as vt}from"./chunk-GV2STE7J.mjs";import{k as ft,l as N,n as ht}from"./chunk-65L5EBBL.mjs";import{b as Nt}from"./chunk-3BVKYYHT.mjs";import{a as P}from"./chunk-HORSXVIV.mjs";import{a as Mt}from"./chunk-KRJLYFVI.mjs";import{a as ct}from"./chunk-BUAVB6CL.mjs";import{a as L}from"./chunk-QTKK6OSJ.mjs";import{a as rt}from"./chunk-6ACLOUQ3.mjs";import{a as A}from"./chunk-G7GU37XI.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-QEE4T6UM.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-SK2W4LXI.mjs";import{c as w}from"./chunk-I4QHHCK6.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-OTJAWUCX.mjs.map
|