@multiversx/sdk-dapp 5.0.0-alpha.10 → 5.0.0-alpha.11
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-QAVA2C6Y.mjs → chunk-2AB2KTYM.mjs} +2 -2
- package/out/__chunks__/{chunk-66JBXP4O.mjs → chunk-2I7FJNXZ.mjs} +2 -2
- package/out/__chunks__/{chunk-HEKAFHIA.mjs → chunk-2X62ALFS.mjs} +2 -2
- package/out/__chunks__/chunk-2ZNQYHNX.mjs +2 -0
- package/out/__chunks__/{chunk-IWB45745.mjs → chunk-3BXYTP4Q.mjs} +2 -2
- package/out/__chunks__/{chunk-XLHFU7XR.mjs → chunk-3EI6B7OU.mjs} +2 -2
- package/out/__chunks__/chunk-3GXUTDCB.mjs +2 -0
- package/out/__chunks__/{chunk-YEXBSKXL.mjs → chunk-3LBQYLDY.mjs} +2 -2
- package/out/__chunks__/{chunk-B2RDSGON.mjs → chunk-3OKWBJFM.mjs} +2 -2
- package/out/__chunks__/{chunk-IEJARRBP.mjs → chunk-3U6H4VPO.mjs} +2 -2
- package/out/__chunks__/chunk-3YK6SW7E.mjs +2 -0
- package/out/__chunks__/chunk-3ZEUVYQF.mjs +2 -0
- package/out/__chunks__/chunk-3ZEUVYQF.mjs.map +7 -0
- package/out/__chunks__/chunk-3ZHPM667.mjs +2 -0
- package/out/__chunks__/chunk-3ZHPM667.mjs.map +7 -0
- package/out/__chunks__/{chunk-INBKWOKQ.mjs → chunk-4RGFBPII.mjs} +2 -2
- package/out/__chunks__/{chunk-ZEIGMAXW.mjs → chunk-4RJ23OT7.mjs} +2 -2
- package/out/__chunks__/chunk-535PAVZN.mjs +2 -0
- package/out/__chunks__/chunk-5OQ6KHGF.mjs +2 -0
- package/out/__chunks__/chunk-62PJZCUP.mjs +2 -0
- package/out/__chunks__/{chunk-DEMKQ3CQ.mjs → chunk-6LY7ZRDT.mjs} +2 -2
- package/out/__chunks__/chunk-7B2IRMVK.mjs +2 -0
- package/out/__chunks__/{chunk-VCGAO6HH.mjs → chunk-7D2BEFUJ.mjs} +2 -2
- package/out/__chunks__/{chunk-PRULMJH7.mjs → chunk-AAMNTAXA.mjs} +2 -2
- package/out/__chunks__/{chunk-RHFDU5Y4.mjs → chunk-ABHYXD3U.mjs} +2 -2
- package/out/__chunks__/chunk-AFEGGHNM.mjs +2 -0
- package/out/__chunks__/{chunk-CEDRWVRS.mjs → chunk-AHHTRI3Y.mjs} +2 -2
- package/out/__chunks__/chunk-ASRYY6T3.mjs +2 -0
- package/out/__chunks__/chunk-AV6BSOLO.mjs +2 -0
- package/out/__chunks__/{chunk-S5FDHOXH.mjs → chunk-B5AW5LX5.mjs} +2 -2
- package/out/__chunks__/chunk-BMXLSDJM.mjs +2 -0
- package/out/__chunks__/{chunk-KPDCSGZD.mjs → chunk-BNWGWGXY.mjs} +2 -2
- package/out/__chunks__/{chunk-IOE5AG2R.mjs → chunk-C37IYZAK.mjs} +2 -2
- package/out/__chunks__/chunk-C6JD2OFD.mjs +2 -0
- package/out/__chunks__/chunk-C6JD2OFD.mjs.map +7 -0
- package/out/__chunks__/chunk-CAA4VJRH.mjs +2 -0
- package/out/__chunks__/{chunk-QD3CFFVT.mjs.map → chunk-CAA4VJRH.mjs.map} +3 -3
- package/out/__chunks__/chunk-DICSPHT2.mjs +2 -0
- package/out/__chunks__/{chunk-MQ5V5AJU.mjs → chunk-DKE2ONRB.mjs} +2 -2
- package/out/__chunks__/{chunk-TMP3REGQ.mjs → chunk-DPSC4NIK.mjs} +2 -2
- package/out/__chunks__/{chunk-SH5S4RA4.mjs → chunk-DVY6YKH6.mjs} +2 -2
- package/out/__chunks__/chunk-EQMLAAI2.mjs +2 -0
- package/out/__chunks__/chunk-EQMLAAI2.mjs.map +7 -0
- package/out/__chunks__/chunk-ESLVKRXK.mjs +2 -0
- package/out/__chunks__/{chunk-J3YO25EK.mjs → chunk-EUVZQRU5.mjs} +2 -2
- package/out/__chunks__/{chunk-QKHHW26T.mjs → chunk-FELZAGW5.mjs} +2 -2
- package/out/__chunks__/{chunk-A5EXECZV.mjs → chunk-FIVH6RKU.mjs} +2 -2
- package/out/__chunks__/{chunk-CCDTUFFG.mjs → chunk-FIXSEPFX.mjs} +2 -2
- package/out/__chunks__/chunk-FMQYLMTU.mjs +2 -0
- package/out/__chunks__/chunk-FMQYLMTU.mjs.map +7 -0
- package/out/__chunks__/{chunk-QP2EL7IE.mjs → chunk-FS2F24A7.mjs} +2 -2
- package/out/__chunks__/{chunk-ZK5BKLTG.mjs → chunk-HCDOXUDA.mjs} +2 -2
- package/out/__chunks__/{chunk-2FD2AMKA.mjs → chunk-HN244QVP.mjs} +2 -2
- package/out/__chunks__/{chunk-7WTWD4TL.mjs → chunk-HTVULYKB.mjs} +2 -2
- package/out/__chunks__/{chunk-ZU4LTEAC.mjs → chunk-IAK3KHJ7.mjs} +2 -2
- package/out/__chunks__/chunk-J75OEBAP.mjs +2 -0
- package/out/__chunks__/chunk-JAUTVROS.mjs +2 -0
- package/out/__chunks__/chunk-JAUTVROS.mjs.map +7 -0
- package/out/__chunks__/{chunk-DOUNJCQ4.mjs → chunk-JOB7ALAF.mjs} +2 -2
- package/out/__chunks__/chunk-JR23TXKP.mjs +2 -0
- package/out/__chunks__/chunk-JR23TXKP.mjs.map +7 -0
- package/out/__chunks__/{chunk-72PZKSKF.mjs → chunk-KEAFX54V.mjs} +2 -2
- package/out/__chunks__/{chunk-EOX35D4L.mjs → chunk-LIPGE2RA.mjs} +2 -2
- package/out/__chunks__/{chunk-7LUZJPO5.mjs → chunk-LKXBH3I3.mjs} +2 -2
- package/out/__chunks__/{chunk-YPCJBYUY.mjs → chunk-LUDF7ZUR.mjs} +2 -2
- package/out/__chunks__/{chunk-EDSX3LFL.mjs → chunk-LYTZPES3.mjs} +2 -2
- package/out/__chunks__/{chunk-LM5SF2NG.mjs → chunk-MJEZGI7G.mjs} +2 -2
- package/out/__chunks__/{chunk-445MWKMT.mjs → chunk-MRJ7P7KU.mjs} +2 -2
- package/out/__chunks__/{chunk-NBDECUQ3.mjs → chunk-N6SD2OVU.mjs} +2 -2
- package/out/__chunks__/{chunk-SYQ7SILM.mjs → chunk-NKJ7OVPV.mjs} +2 -2
- package/out/__chunks__/{chunk-5W4JJSFM.mjs → chunk-NXV7YLV6.mjs} +2 -2
- package/out/__chunks__/chunk-O2SZII5H.mjs +2 -0
- package/out/__chunks__/chunk-OEYIF65Y.mjs +2 -0
- package/out/__chunks__/chunk-OEYIF65Y.mjs.map +7 -0
- package/out/__chunks__/{chunk-NHXPNROG.mjs → chunk-OJV6XRG5.mjs} +1 -1
- package/out/__chunks__/{chunk-NHXPNROG.mjs.map → chunk-OJV6XRG5.mjs.map} +1 -1
- package/out/__chunks__/{chunk-45WVS4H5.mjs → chunk-ORHJGVU5.mjs} +2 -2
- package/out/__chunks__/{chunk-4OEPT2V4.mjs → chunk-P3BXXGQA.mjs} +2 -2
- package/out/__chunks__/{chunk-K3WBBSXJ.mjs → chunk-PCY7ULK2.mjs} +2 -2
- package/out/__chunks__/chunk-Q7L5T72K.mjs +2 -0
- package/out/__chunks__/{chunk-YN5ARP6C.mjs → chunk-QWIXKUDO.mjs} +2 -2
- package/out/__chunks__/{chunk-JQEKTKZR.mjs → chunk-QWNJJXNH.mjs} +2 -2
- package/out/__chunks__/{chunk-TR6FQZGE.mjs → chunk-RA4VU3NM.mjs} +2 -2
- package/out/__chunks__/{chunk-I7ODJJY3.mjs → chunk-REI3WYXH.mjs} +2 -2
- package/out/__chunks__/{chunk-CNWR7SER.mjs → chunk-RIFXW4D3.mjs} +2 -2
- package/out/__chunks__/{chunk-YQ3LRPGM.mjs → chunk-S75GQPJQ.mjs} +2 -2
- package/out/__chunks__/{chunk-BVYTCDU6.mjs → chunk-SHDTJ5GB.mjs} +2 -2
- package/out/__chunks__/{chunk-FUYWIC54.mjs → chunk-SNBLSIKQ.mjs} +2 -2
- package/out/__chunks__/{chunk-JSUJOYYB.mjs → chunk-TAQN5HUK.mjs} +2 -2
- package/out/__chunks__/chunk-U6KSTPE7.mjs +2 -0
- package/out/__chunks__/{chunk-KRBUXJ6B.mjs.map → chunk-U6KSTPE7.mjs.map} +1 -1
- package/out/__chunks__/chunk-UAW7SD6P.mjs +2 -0
- package/out/__chunks__/chunk-WHEXX3BD.mjs +1 -0
- package/out/__chunks__/{chunk-C5TNEYN6.mjs → chunk-WMY46KJS.mjs} +2 -2
- package/out/__chunks__/{chunk-7ECP7Y7M.mjs → chunk-X4ZYTNNA.mjs} +2 -2
- package/out/__chunks__/{chunk-XOJHIJKX.mjs → chunk-XGV7BGBC.mjs} +2 -2
- package/out/__chunks__/{chunk-LOEJYVD2.mjs → chunk-XOWM53LI.mjs} +2 -2
- package/out/__chunks__/chunk-XXKSDA5P.mjs +2 -0
- package/out/__chunks__/{chunk-QATM2UUN.mjs → chunk-XZVYUFVM.mjs} +2 -2
- package/out/__chunks__/{chunk-QM67ZEC5.mjs → chunk-Y53MWKLT.mjs} +2 -2
- package/out/__chunks__/chunk-YEAVK4T2.mjs +2 -0
- package/out/__chunks__/chunk-YEAVK4T2.mjs.map +7 -0
- package/out/__chunks__/chunk-YK4XGF57.mjs +2 -0
- package/out/__chunks__/chunk-YLN3OBBP.mjs +2 -0
- package/out/__chunks__/chunk-YUITECZ5.mjs +1 -0
- package/out/__chunks__/chunk-YUITECZ5.mjs.map +7 -0
- package/out/__chunks__/{chunk-ZHIYA3M7.mjs → chunk-YV2TRFYW.mjs} +2 -2
- package/out/__chunks__/{chunk-TEPQ5G4B.mjs → chunk-YZE4ECSF.mjs} +2 -2
- package/out/__chunks__/{chunk-IJB6XDNR.mjs → chunk-ZSVNTZ3Q.mjs} +2 -2
- package/out/__chunks__/{chunk-SJYCKFH4.mjs → chunk-ZXIBFH6X.mjs} +2 -2
- package/out/__chunks__/{chunk-XHIIMAIQ.mjs → chunk-ZZ53RJBO.mjs} +2 -2
- package/out/__chunks__/{chunk-P2C5G6H6.mjs → chunk-ZZDN5HHJ.mjs} +2 -2
- package/out/__mocks__/accountConfig.mjs +1 -1
- package/out/__mocks__/data/index.mjs +1 -1
- package/out/__mocks__/index.mjs +1 -1
- package/out/__mocks__/server.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/providerFactory.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/transactions.constants.d.ts +1 -0
- package/out/constants/transactions.constants.js +2 -1
- package/out/constants/transactions.constants.js.map +1 -1
- package/out/constants/transactions.constants.mjs +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/core/providers/DappProvider/helpers/login/helpers/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.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/helpers/sessionCallbacks.d.ts +7 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.js +14 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.js.map +1 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs +2 -0
- package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs.map +7 -0
- 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/ToastManager/ToastManager.js +2 -1
- package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.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.js +10 -1
- package/out/methods/initApp/initApp.js.map +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -3
- package/out/methods/initApp/initApp.types.d.ts +34 -3
- 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.js +27 -10
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.js.map +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.d.ts +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js +7 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.js.map +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.d.ts +7 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js +24 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.js.map +1 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +2 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs.map +7 -0
- 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.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/WebviewProviderStrategy.js +9 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.js.map +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.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.d.ts +1 -1
- 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 copy.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/helpers/index.mjs +1 -1
- package/out/services/nativeAuth/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/transactionsActions.d.ts +2 -2
- package/out/store/actions/transactions/transactionsActions.js +13 -5
- package/out/store/actions/transactions/transactionsActions.js.map +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/selectors/index.mjs +1 -1
- package/out/store/slices/index.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/index.d.ts +1 -0
- package/out/types/index.js +1 -0
- package/out/types/index.js.map +1 -1
- package/out/types/index.mjs +1 -1
- package/out/types/theme.types.d.ts +4 -0
- package/out/types/theme.types.js +9 -0
- package/out/types/theme.types.js.map +1 -0
- package/out/types/theme.types.mjs +2 -0
- package/out/types/theme.types.mjs.map +7 -0
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/createUIElement.mjs +1 -1
- package/out/utils/decoders/index.mjs +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.js +1 -0
- package/out/utils/index.js.map +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getTitleText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromDataField.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAction.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.mjs +1 -1
- package/out/utils/visual/index.d.ts +1 -0
- package/out/utils/visual/index.js +18 -0
- package/out/utils/visual/index.js.map +1 -0
- package/out/utils/visual/index.mjs +2 -0
- package/out/utils/visual/index.mjs.map +7 -0
- package/out/utils/visual/switchTheme.d.ts +2 -0
- package/out/utils/visual/switchTheme.js +12 -0
- package/out/utils/visual/switchTheme.js.map +1 -0
- package/out/utils/visual/switchTheme.mjs +2 -0
- package/out/utils/visual/switchTheme.mjs.map +7 -0
- package/out/utils/walletconnect/__mocks__/sdkWalletconnectProvider.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +3 -3
- package/out/__chunks__/chunk-26XVDGTO.mjs +0 -2
- package/out/__chunks__/chunk-26XVDGTO.mjs.map +0 -7
- package/out/__chunks__/chunk-2ONA7QPD.mjs +0 -2
- package/out/__chunks__/chunk-35XMV5ZL.mjs +0 -2
- package/out/__chunks__/chunk-6DNPTAY5.mjs +0 -2
- package/out/__chunks__/chunk-6F2QKI7Q.mjs +0 -2
- package/out/__chunks__/chunk-6WF4B5EG.mjs +0 -2
- package/out/__chunks__/chunk-76NGDJLC.mjs +0 -2
- package/out/__chunks__/chunk-ASWTHX52.mjs +0 -2
- package/out/__chunks__/chunk-BTRCRGTK.mjs +0 -2
- package/out/__chunks__/chunk-C6E6XICI.mjs +0 -2
- package/out/__chunks__/chunk-CNUQX7FI.mjs +0 -2
- package/out/__chunks__/chunk-CO3V5DOG.mjs +0 -1
- package/out/__chunks__/chunk-D7NHU6UF.mjs +0 -2
- package/out/__chunks__/chunk-D7NHU6UF.mjs.map +0 -7
- package/out/__chunks__/chunk-DFNESXSW.mjs +0 -2
- package/out/__chunks__/chunk-FPHLXGAT.mjs +0 -2
- package/out/__chunks__/chunk-FPHLXGAT.mjs.map +0 -7
- package/out/__chunks__/chunk-JKSF2U3C.mjs +0 -2
- package/out/__chunks__/chunk-JQU6F2FL.mjs +0 -2
- package/out/__chunks__/chunk-JZWEJ7SP.mjs +0 -2
- package/out/__chunks__/chunk-KRBUXJ6B.mjs +0 -2
- package/out/__chunks__/chunk-N5FYAXCA.mjs +0 -2
- package/out/__chunks__/chunk-OUNMWRYD.mjs +0 -2
- package/out/__chunks__/chunk-P5RR3CVM.mjs +0 -2
- package/out/__chunks__/chunk-QD3CFFVT.mjs +0 -2
- package/out/__chunks__/chunk-UZWRIJVB.mjs +0 -2
- package/out/__chunks__/chunk-VSUCRJYB.mjs +0 -2
- package/out/__chunks__/chunk-X7NCYKWT.mjs +0 -2
- package/out/__chunks__/chunk-X7NCYKWT.mjs.map +0 -7
- package/out/__chunks__/chunk-XFZOOFY5.mjs +0 -2
- package/out/__chunks__/chunk-XFZOOFY5.mjs.map +0 -7
- package/out/__chunks__/chunk-Z6R3RDWW.mjs +0 -2
- /package/out/__chunks__/{chunk-QAVA2C6Y.mjs.map → chunk-2AB2KTYM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-66JBXP4O.mjs.map → chunk-2I7FJNXZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HEKAFHIA.mjs.map → chunk-2X62ALFS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JZWEJ7SP.mjs.map → chunk-2ZNQYHNX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IWB45745.mjs.map → chunk-3BXYTP4Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XLHFU7XR.mjs.map → chunk-3EI6B7OU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6WF4B5EG.mjs.map → chunk-3GXUTDCB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YEXBSKXL.mjs.map → chunk-3LBQYLDY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B2RDSGON.mjs.map → chunk-3OKWBJFM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IEJARRBP.mjs.map → chunk-3U6H4VPO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P5RR3CVM.mjs.map → chunk-3YK6SW7E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-INBKWOKQ.mjs.map → chunk-4RGFBPII.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZEIGMAXW.mjs.map → chunk-4RJ23OT7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C6E6XICI.mjs.map → chunk-535PAVZN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BTRCRGTK.mjs.map → chunk-5OQ6KHGF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2ONA7QPD.mjs.map → chunk-62PJZCUP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DEMKQ3CQ.mjs.map → chunk-6LY7ZRDT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DFNESXSW.mjs.map → chunk-7B2IRMVK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VCGAO6HH.mjs.map → chunk-7D2BEFUJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PRULMJH7.mjs.map → chunk-AAMNTAXA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RHFDU5Y4.mjs.map → chunk-ABHYXD3U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-35XMV5ZL.mjs.map → chunk-AFEGGHNM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CEDRWVRS.mjs.map → chunk-AHHTRI3Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VSUCRJYB.mjs.map → chunk-ASRYY6T3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UZWRIJVB.mjs.map → chunk-AV6BSOLO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S5FDHOXH.mjs.map → chunk-B5AW5LX5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-76NGDJLC.mjs.map → chunk-BMXLSDJM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KPDCSGZD.mjs.map → chunk-BNWGWGXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IOE5AG2R.mjs.map → chunk-C37IYZAK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OUNMWRYD.mjs.map → chunk-DICSPHT2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MQ5V5AJU.mjs.map → chunk-DKE2ONRB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TMP3REGQ.mjs.map → chunk-DPSC4NIK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SH5S4RA4.mjs.map → chunk-DVY6YKH6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N5FYAXCA.mjs.map → chunk-ESLVKRXK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J3YO25EK.mjs.map → chunk-EUVZQRU5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QKHHW26T.mjs.map → chunk-FELZAGW5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A5EXECZV.mjs.map → chunk-FIVH6RKU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CCDTUFFG.mjs.map → chunk-FIXSEPFX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QP2EL7IE.mjs.map → chunk-FS2F24A7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZK5BKLTG.mjs.map → chunk-HCDOXUDA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2FD2AMKA.mjs.map → chunk-HN244QVP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7WTWD4TL.mjs.map → chunk-HTVULYKB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZU4LTEAC.mjs.map → chunk-IAK3KHJ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6F2QKI7Q.mjs.map → chunk-J75OEBAP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DOUNJCQ4.mjs.map → chunk-JOB7ALAF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-72PZKSKF.mjs.map → chunk-KEAFX54V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EOX35D4L.mjs.map → chunk-LIPGE2RA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7LUZJPO5.mjs.map → chunk-LKXBH3I3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YPCJBYUY.mjs.map → chunk-LUDF7ZUR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EDSX3LFL.mjs.map → chunk-LYTZPES3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LM5SF2NG.mjs.map → chunk-MJEZGI7G.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-445MWKMT.mjs.map → chunk-MRJ7P7KU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NBDECUQ3.mjs.map → chunk-N6SD2OVU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SYQ7SILM.mjs.map → chunk-NKJ7OVPV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5W4JJSFM.mjs.map → chunk-NXV7YLV6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CNUQX7FI.mjs.map → chunk-O2SZII5H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-45WVS4H5.mjs.map → chunk-ORHJGVU5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4OEPT2V4.mjs.map → chunk-P3BXXGQA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K3WBBSXJ.mjs.map → chunk-PCY7ULK2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z6R3RDWW.mjs.map → chunk-Q7L5T72K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YN5ARP6C.mjs.map → chunk-QWIXKUDO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JQEKTKZR.mjs.map → chunk-QWNJJXNH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TR6FQZGE.mjs.map → chunk-RA4VU3NM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I7ODJJY3.mjs.map → chunk-REI3WYXH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CNWR7SER.mjs.map → chunk-RIFXW4D3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YQ3LRPGM.mjs.map → chunk-S75GQPJQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BVYTCDU6.mjs.map → chunk-SHDTJ5GB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FUYWIC54.mjs.map → chunk-SNBLSIKQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JSUJOYYB.mjs.map → chunk-TAQN5HUK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASWTHX52.mjs.map → chunk-UAW7SD6P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CO3V5DOG.mjs.map → chunk-WHEXX3BD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C5TNEYN6.mjs.map → chunk-WMY46KJS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ECP7Y7M.mjs.map → chunk-X4ZYTNNA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XOJHIJKX.mjs.map → chunk-XGV7BGBC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LOEJYVD2.mjs.map → chunk-XOWM53LI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JKSF2U3C.mjs.map → chunk-XXKSDA5P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QATM2UUN.mjs.map → chunk-XZVYUFVM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QM67ZEC5.mjs.map → chunk-Y53MWKLT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6DNPTAY5.mjs.map → chunk-YK4XGF57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JQU6F2FL.mjs.map → chunk-YLN3OBBP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZHIYA3M7.mjs.map → chunk-YV2TRFYW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TEPQ5G4B.mjs.map → chunk-YZE4ECSF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IJB6XDNR.mjs.map → chunk-ZSVNTZ3Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SJYCKFH4.mjs.map → chunk-ZXIBFH6X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHIIMAIQ.mjs.map → chunk-ZZ53RJBO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P2C5G6H6.mjs.map → chunk-ZZDN5HHJ.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-ABHYXD3U.mjs";import{b as m}from"./chunk-XW2GCCBZ.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-BSWV5MEC.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2AB2KTYM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-ZZ53RJBO.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2I7FJNXZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-RA4VU3NM.mjs";import{a as f}from"./chunk-EAJBSX6Y.mjs";import{a as y}from"./chunk-Y3BNMQFP.mjs";import{g as l}from"./chunk-ZZDN5HHJ.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{a as g}from"./chunk-535PAVZN.mjs";import{a as m}from"./chunk-YEAVK4T2.mjs";import{a as T}from"./chunk-L3MWDI6J.mjs";import{u as p}from"./chunk-JOB7ALAF.mjs";import{b as c}from"./chunk-SAAOQW7P.mjs";import{e as d}from"./chunk-R53MCZI6.mjs";import h from"axios";var r=class r{constructor(){this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!f(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(i=>({...i,status:i.status??"pending"})),e=T(n),o=m({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:e??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return o;let s=S(a);return l({toastId:o,totalDuration:s}),o};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=c(p()),e=a.map(s=>h.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}));return(await Promise.all(e)).map(({data:s})=>({...s,status:"pending",hash:s.txHash}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=g(),{apiAddress:n,apiTimeout:e}=c(p());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let o=this.buildBatchId(t),i={transactions:a.map(A=>A.map(w=>this.parseSignedTransaction(w))),id:o},{data:b}=await h.post(`${n}/batch`,i,{timeout:Number(e)});return{data:b}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t));this.parseSignedTransaction=a=>{let t=new d,n={...a.toPlainObject(),hash:t.computeTransactionHash(a),status:"pending"};return y({data:n.data})&&(delete n.senderUsername,delete n.receiverUsername),n}}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var I=r;export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2X62ALFS.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as p}from"./chunk-XGV7BGBC.mjs";import{a as f}from"./chunk-O2SZII5H.mjs";import{o as n}from"./chunk-ZZDN5HHJ.mjs";import{u as i}from"./chunk-JOB7ALAF.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-OJV6XRG5.mjs";import{a as m}from"./chunk-2I7FJNXZ.mjs";async function y(){let c=m(),s=f(),r=c?e.webview:t(i());if(!r)return;let o=await p.create({type:r});if(!o)throw new Error("Provider not found");!s&&r===e.webview&&await o.login(),n(o)}export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2ZNQYHNX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-JOB7ALAF.mjs";import{e as a}from"./chunk-QJSB5NX4.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t||n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3BXYTP4Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-S75GQPJQ.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-3EI6B7OU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-OJV6XRG5.mjs";var o=s=>`Unable to perform ${s}, Provider not initialized`,e=class{init(){return Promise.resolve(!1)}login(n){throw new Error(o(`login with options: ${n}`))}logout(n){throw new Error(o(`logout with options: ${n}`))}getAccount(){throw new Error(o("unable to get account"))}setAccount(n){throw new Error(o(`unable to set account with: ${n}`))}isInitialized(){return!1}isConnected(){return!1}sendTransaction(n,r){throw new Error(o(`sendTransaction with transactions: ${n} options: ${r}`))}signTransaction(n,r){throw new Error(o(`signTransaction with transactions: ${JSON.stringify(n)} options: ${r}`))}signTransactions(n){throw new Error(o(`signTransactions with transactions: ${JSON.stringify(n)}`))}signMessage(n,r){throw new Error(o(`signMessage with ${n} and options ${r}`))}sendCustomMessage({method:n,params:r}){throw new Error(o(`sendCustomMessage with method: ${n} params: ${r}`))}sendCustomRequest(n){throw new Error(o(`sendSessionEvent with options: ${n}`))}async getAddress(){throw new Error(o("getAddress"))}getType(){return t.none}},c=new e;export{e as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-3LBQYLDY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-6UIF2KFV.mjs";import{a as d}from"./chunk-OA5BWGGO.mjs";import{a as i}from"./chunk-WE7YOBO7.mjs";var a=({loginToken:t,version:r})=>{if(!t||!r)return null;let{ledgerWithUsernames:u}=s(r),e=i(t);if(e==null)return null;let n="Confirm Ledger Address",o="Authorise Authentication Token";if(u){let m=d(e.ttl);return{data:`${e.origin} for ${m}.`,confirmAddressText:n,authText:o}}return{data:t,confirmAddressText:n,authText:o}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-3OKWBJFM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-FFNSZC37.mjs";import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-FFNSZC37.mjs";import{a as i}from"./chunk-OJV6XRG5.mjs";var p=t=>(Object.values(i).forEach(r=>{if(r!==t?.skipLoginMethod)switch(r){case i.crossWindow:{let e=o.getInstance();e.isInitialized()&&e.dispose();break}case i.metamask:case i.passkey:{let e=s.getInstance();e.isInitialized()&&e.dispose();break}default:break}}),null);export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3U6H4VPO.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-JAUTVROS.mjs";import{b as s}from"./chunk-TQA3JDNV.mjs";import{u as n}from"./chunk-JOB7ALAF.mjs";async function f(){let t=s(n());if(Object.keys(t).length>0)for(let[e,{transactions:c}]of Object.entries(t))await o({sessionId:e,transactionBatch:c})}export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3YK6SW7E.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/TransactionManager/helpers/sessionCallbacks.ts"],
|
|
4
|
+
"sourcesContent": ["export const sessionCallbacksMap: SessionCallbacksType = {};\n\ntype SessionCallbacksType = {\n onSuccess?: (sessionId: string) => Promise<void>;\n onFail?: (sessionId: string) => Promise<void>;\n};\n\nexport const registerSessionCallbacks = ({\n onSuccess,\n onFail\n}: SessionCallbacksType) => {\n if (onSuccess != null) {\n sessionCallbacksMap.onSuccess = onSuccess;\n }\n if (onFail != null) {\n sessionCallbacksMap.onFail = onFail;\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAA4C,CAAC,EAO7CC,EAA2B,CAAC,CACvC,UAAAC,EACA,OAAAC,CACF,IAA4B,CACtBD,GAAa,OACfF,EAAoB,UAAYE,GAE9BC,GAAU,OACZH,EAAoB,OAASG,EAEjC",
|
|
6
|
+
"names": ["sessionCallbacksMap", "registerSessionCallbacks", "onSuccess", "onFail"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-YEAVK4T2.mjs";async function l({results:e,hash:i,sessionId:t}){let a=e?.find(o=>o?.returnMessage!=="");r({sessionId:t,transaction:{...a,hash:i,status:"fail",inTransit:!1}}),s({sessionId:t,status:"fail",errorMessage:a?.returnMessage}),await n({sessionId:t,status:"fail"})}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3ZHPM667.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n updateTransactionStatus,\n updateSessionStatus\n} from 'store/actions/transactions/transactionsActions';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { ResultType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { runSessionCallbacks } from './runSessionCallbacks';\n\nexport async function manageFailedTransactions({\n results,\n hash,\n sessionId\n}: {\n results: ResultType[];\n hash: string;\n sessionId: string;\n}) {\n const resultWithError = results?.find(\n (scResult) => scResult?.returnMessage !== ''\n );\n\n updateTransactionStatus({\n sessionId,\n transaction: {\n ...(resultWithError as unknown as SignedTransactionType),\n hash,\n status: TransactionServerStatusesEnum.fail,\n inTransit: false\n }\n });\n\n updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail,\n errorMessage: resultWithError?.returnMessage\n });\n\n await runSessionCallbacks({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n}\n"],
|
|
5
|
+
"mappings": "yFAYA,eAAsBA,EAAyB,CAC7C,QAAAC,EACA,KAAAC,EACA,UAAAC,CACF,EAIG,CACD,IAAMC,EAAkBH,GAAS,KAC9BI,GAAaA,GAAU,gBAAkB,EAC5C,EAEAC,EAAwB,CACtB,UAAAH,EACA,YAAa,CACX,GAAIC,EACJ,KAAAF,EACA,cACA,UAAW,EACb,CACF,CAAC,EAEDK,EAAoB,CAClB,UAAAJ,EACA,cACA,aAAcC,GAAiB,aACjC,CAAC,EAED,MAAMI,EAAoB,CACxB,UAAAL,EACA,aACF,CAAC,CACH",
|
|
6
|
+
"names": ["manageFailedTransactions", "results", "hash", "sessionId", "resultWithError", "scResult", "updateTransactionStatus", "updateSessionStatus", "runSessionCallbacks"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-VMFJUT3G.mjs";import{a as e}from"./chunk-U6KSTPE7.mjs";var E=async({name:t,anchor:o})=>{if(await m(e),!e.document)return{};let n=e.document.createElement(t);return(o||e.document.body).appendChild(n),await customElements.whenDefined(t),n};export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4RGFBPII.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-EUVZQRU5.mjs";import{b as r}from"./chunk-C37IYZAK.mjs";import{u as i}from"./chunk-JOB7ALAF.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4RJ23OT7.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as g}from"./chunk-PSJI2G34.mjs";import{a as i}from"./chunk-2CG6PNPJ.mjs";import{a as c}from"./chunk-FROSOADM.mjs";import{a as d}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as p,b as e}from"./chunk-HDRB2QL6.mjs";import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(c)),t.get(`${e.apiAddress}/network/config`,s(i)),t.get(`https://${o.url}/socket.io/`,s(g)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(d))],P=u(...k);export{t as a,s as b,P as c};
|
|
2
|
+
//# sourceMappingURL=chunk-62PJZCUP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-MJEZGI7G.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6LY7ZRDT.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-PCY7ULK2.mjs";import{c as n}from"./chunk-JOB7ALAF.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-7B2IRMVK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SPSO2A53.mjs";import{a}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-535PAVZN.mjs";import{u as n}from"./chunk-JOB7ALAF.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var S=async r=>{let{isGuarded:i}=t();if(!a({isGuarded:i,transactions:r}))return r;let d=r[0].getSender().bech32().toString(),{walletAddress:c}=e(n()),o=await s({address:d,walletUrl:c});return o?.setShouldShowConsentPopup(!1),await o?.guardTransactions(r)||[]};export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7D2BEFUJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-ORHJGVU5.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AAMNTAXA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-UAW7SD6P.mjs";import{a}from"./chunk-HWJQUOPL.mjs";var u=t=>{let r=i(t),{failed:e,invalid:s,pending:c}=a(t),o="";e?o="faTimes":s?o="faBan":c&&(o="faHourglass");let f=(e||s)&&r.length>0?r.join(","):"",T=`${n(t.status)} ${f}`;return{icon:o,tooltip:T}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ABHYXD3U.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as p,s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as p,s as e}from"./chunk-JOB7ALAF.mjs";import{c as i}from"./chunk-R53MCZI6.mjs";var T=()=>e().setState(p),m=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).hex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,m as b};
|
|
2
|
+
//# sourceMappingURL=chunk-AHHTRI3Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-QWIXKUDO.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B5AW5LX5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-ZSVNTZ3Q.mjs";import{a as c}from"./chunk-O2SZII5H.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BNWGWGXY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-JOB7ALAF.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-C37IYZAK.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as M}from"./chunk-ESLVKRXK.mjs";import{a as T}from"./chunk-WMY46KJS.mjs";import{a as O}from"./chunk-RIFXW4D3.mjs";import{a as A}from"./chunk-N6SD2OVU.mjs";import{a as v,b,d as C,e as I,g as S,h as N}from"./chunk-ZZDN5HHJ.mjs";import{l as g}from"./chunk-CAA4VJRH.mjs";import{d as E}from"./chunk-YEAVK4T2.mjs";import{k as l,l as d,n as f}from"./chunk-65L5EBBL.mjs";import{s as c}from"./chunk-JOB7ALAF.mjs";import{a as F}from"./chunk-4RGFBPII.mjs";import p from"lodash.isequal";import B from"lodash.isequal";var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",u=class n extends A{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=c();this.initialData={pendingTransactions:[],historicTransactions:[]};this.data={...this.initialData}}static getInstance(){return n.instance||(n.instance=new n),n.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){r.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:a,transactions:e},{toasts:o,transactions:h})=>{(!B(o.transactionToasts,a.transactionToasts)||!B(h,e))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}handleCloseUI(){let s=r.getInstance();this.closeUI(),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:i,toasts:a,network:e}=this.store.getState(),{pendingTransactionToasts:o}=await T({toastList:a,transactionsSessions:s,account:i});this.data.pendingTransactions=o,this.data.historicTransactions=await M.getTransactionsHistory({transactionsSessions:s,address:i.address,explorerAddress:e.network.explorerAddress,egldLabel:e.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){E(),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))}};var r=class n{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=c();this.destroy(),this.lifetimeManager=new O,this.notificationsFeedManager=u.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),this.updateTransactionToastsList(),this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(({toasts:s,transactions:i},{toasts:a,transactions:e})=>{(!p(a.transactionToasts,s.transactionToasts)||!p(e,i))&&this.updateTransactionToastsList(),p(a.customToasts,s.customToasts)||this.updateCustomToastList()})}static getInstance(){return n.instance||(n.instance=new n),n.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:a}=i,e=f(a),o=d(a),h=l(a),m=o||h||e;return m?(this.successfulToastLifetime&&this.lifetimeManager.start(t),m):(this.lifetimeManager.stop(t),m)}createTransactionToast(t,s){S({toastId:t,totalDuration:s}),this.handleCompletedTransaction(t),this.updateTransactionToastsList()}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:i}=this.store.getState(),{pendingTransactionToasts:a,completedTransactionToasts:e}=await T({toastList:t,transactionsSessions:s,account:i});this.transactionToasts=[...a,...e];for(let o of t.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let a="message"in s?{...s}:{...s,instantiateToastElement:v[s.toastId]};this.customToasts.push(a),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 F({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&N(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.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.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))})}}showToasts(){this.updateCustomToastList(),this.updateTransactionToastsList()}hideToasts(){this.transactionToasts=[],this.customToasts=[],this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=b[t];i?.(),C(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(!this.notificationsFeedManager.isNotificationsFeedOpen()){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(),I(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{u as a,r as b};
|
|
2
|
+
//# sourceMappingURL=chunk-C6JD2OFD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/internal/ToastManager/ToastManager.ts", "../../src/managers/NotificationsFeedManager/NotificationsFeedManager.ts"],
|
|
4
|
+
"sourcesContent": ["import isEqual from 'lodash.isequal';\nimport { DEFAULT_TOAST_LIEFTIME } from 'constants/transactions.constants';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxToastList } from 'lib/sdkDappUi';\nimport { NotificationsFeedManager } from 'managers/NotificationsFeedManager/NotificationsFeedManager';\nimport {\n customToastCloseHandlersDictionary,\n customToastComponentDictionary,\n removeAllCustomToasts,\n removeCustomToast,\n removeTransactionToast,\n addTransactionToast\n} from 'store/actions/toasts/toastsActions';\nimport {\n getIsTransactionFailed,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\n\nimport { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { IEventBus } from 'types/manager.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { createUIElement } from 'utils/createUIElement';\nimport { createToastsFromTransactions } from './helpers/createToastsFromTransactions';\nimport { LifetimeManager } from './helpers/LifetimeManager';\nimport { ITransactionToast, ToastEventsEnum } from './types';\n\ninterface IToastManager {\n successfulToastLifetime?: number;\n}\n\nexport class ToastManager {\n private lifetimeManager: LifetimeManager;\n private isCreatingElement = false;\n private static instance: ToastManager;\n private toastsElement: MvxToastList | null = null;\n private transactionToasts: ITransactionToast[] = [];\n private customToasts: CustomToastType[] = [];\n private successfulToastLifetime?: number;\n private storeToastsSubscription: () => void = () => null;\n private notificationsFeedManager: NotificationsFeedManager;\n private eventBusUnsubscribeFunctions: (() => void)[] = [];\n private eventBus: IEventBus<ITransactionToast[] | CustomToastType[]> | null =\n null;\n\n store = getStore();\n\n constructor() {\n this.destroy();\n this.lifetimeManager = new LifetimeManager();\n\n this.notificationsFeedManager = NotificationsFeedManager.getInstance();\n }\n\n public async init({\n successfulToastLifetime = DEFAULT_TOAST_LIEFTIME\n }: IToastManager = {}) {\n this.successfulToastLifetime = successfulToastLifetime;\n\n this.lifetimeManager.init({ successfulToastLifetime });\n\n this.updateTransactionToastsList();\n this.updateCustomToastList();\n await this.subscribeToEventBusNotifications();\n\n this.storeToastsSubscription = this.store.subscribe(\n (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n this.updateTransactionToastsList();\n }\n\n if (!isEqual(prevToasts.customToasts, toasts.customToasts)) {\n this.updateCustomToastList();\n }\n }\n );\n }\n\n public static getInstance(): ToastManager {\n if (!ToastManager.instance) {\n ToastManager.instance = new ToastManager();\n }\n return ToastManager.instance;\n }\n\n private handleCompletedTransaction(toastId: string): boolean {\n const { transactions } = this.store.getState();\n const transaction = transactions[toastId];\n\n if (!transaction) {\n return false;\n }\n\n const { status } = transaction;\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isFailed || isSuccessful || isTimedOut;\n\n if (isCompleted) {\n if (this.successfulToastLifetime) {\n this.lifetimeManager.start(toastId);\n }\n return isCompleted;\n }\n\n this.lifetimeManager.stop(toastId);\n return isCompleted;\n }\n\n public createTransactionToast(toastId: string, totalDuration: number) {\n addTransactionToast({\n toastId,\n totalDuration\n });\n\n this.handleCompletedTransaction(toastId);\n this.updateTransactionToastsList();\n }\n\n private async updateTransactionToastsList() {\n const {\n toasts: toastList,\n transactions: transactionsSessions,\n account\n } = this.store.getState();\n\n const { pendingTransactionToasts, completedTransactionToasts } =\n await createToastsFromTransactions({\n toastList,\n transactionsSessions,\n account\n });\n\n this.transactionToasts = [\n ...pendingTransactionToasts,\n ...completedTransactionToasts\n ];\n\n for (const toast of toastList.transactionToasts) {\n this.handleCompletedTransaction(toast.toastId);\n }\n\n await this.publishTransactionToasts();\n }\n\n private async updateCustomToastList() {\n const { toasts: toastList } = this.store.getState();\n this.customToasts = [];\n\n for (const toast of toastList.customToasts) {\n const isSimpleToast = 'message' in toast;\n\n const newToast: CustomToastType = isSimpleToast\n ? { ...toast }\n : {\n ...toast,\n instantiateToastElement:\n customToastComponentDictionary[toast.toastId]\n };\n this.customToasts.push(newToast);\n\n if (toast.duration) {\n this.lifetimeManager.startWithCustomDuration(\n toast.toastId,\n toast.duration\n );\n }\n }\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n this.customToasts\n );\n }\n\n private async createToastListElement(): Promise<MvxToastList | null> {\n if (this.toastsElement) {\n return this.toastsElement;\n }\n\n if (!this.isCreatingElement) {\n this.isCreatingElement = true;\n\n this.toastsElement = await createUIElement<MvxToastList>({\n name: UITagsEnum.TOAST_LIST\n });\n\n this.isCreatingElement = false;\n }\n\n return this.toastsElement;\n }\n\n private handleTransactionToastClose(toastId: string) {\n const isCompleted = this.handleCompletedTransaction(toastId);\n\n if (isCompleted) {\n removeTransactionToast(toastId);\n }\n }\n\n private async subscribeToEventBusNotifications() {\n const toastsElement = await this.createToastListElement();\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n this.eventBus.subscribe(\n ToastEventsEnum.CLOSE,\n this.handleCloseToast.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.CLOSE,\n this.handleCloseToast.bind(this)\n );\n });\n\n this.eventBus.subscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n });\n }\n\n public showToasts() {\n this.updateCustomToastList();\n this.updateTransactionToastsList();\n }\n\n public hideToasts() {\n this.transactionToasts = [];\n this.customToasts = [];\n this.eventBus?.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n this.transactionToasts\n );\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n this.customToasts\n );\n }\n\n private async handleOpenNotificationsFeed() {\n this.notificationsFeedManager.openNotificationsFeed();\n }\n\n private handleCloseToast(toastId: string) {\n const customToast = this.customToasts.find(\n (toast) => toast.toastId === toastId\n );\n\n if (customToast) {\n this.lifetimeManager.stop(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n removeCustomToast(toastId);\n return;\n }\n\n this.handleTransactionToastClose(toastId);\n }\n\n private async publishTransactionToasts() {\n if (this.notificationsFeedManager.isNotificationsFeedOpen()) {\n return;\n }\n\n if (!this.eventBus) {\n const toastsElement = await this.createToastListElement();\n\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n }\n\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n this.transactionToasts\n );\n }\n\n public destroy() {\n this.storeToastsSubscription();\n this.lifetimeManager?.destroy();\n this.notificationsFeedManager?.destroy();\n removeAllCustomToasts();\n this.eventBusUnsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n this.eventBusUnsubscribeFunctions = [];\n }\n}\n", "import isEqual from 'lodash.isequal';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { TransactionsHistoryController } from 'controllers/TransactionsHistoryController';\nimport { ITransactionListItem, MvxNotificationsFeed } from 'lib/sdkDappUi';\nimport { clearCompletedTransactions } from 'store/actions/transactions/transactionsActions';\nimport { getStore } from 'store/store';\nimport { NotificationsFeedEventsEnum } from './types';\nimport { ToastManager } from '../internal';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager/SidePanelBaseManager';\nimport { createToastsFromTransactions } from '../internal/ToastManager/helpers/createToastsFromTransactions';\nimport { ITransactionToast } from '../internal/ToastManager/types';\n\ninterface INotificationsFeedManagerData {\n pendingTransactions: ITransactionToast[];\n historicTransactions: ITransactionListItem[];\n}\n\nconst NOTIFICATIONS_FEED_STORE_SUBSCRIBE = 'NOTIFICATIONS_FEED_STORE_SUBSCRIBE';\n\nexport class NotificationsFeedManager extends SidePanelBaseManager<\n MvxNotificationsFeed,\n INotificationsFeedManagerData,\n NotificationsFeedEventsEnum | typeof NOTIFICATIONS_FEED_STORE_SUBSCRIBE\n> {\n private static instance: NotificationsFeedManager;\n private readonly store = getStore();\n\n protected initialData: INotificationsFeedManagerData = {\n pendingTransactions: [],\n historicTransactions: []\n };\n\n public static getInstance(): NotificationsFeedManager {\n if (!NotificationsFeedManager.instance) {\n NotificationsFeedManager.instance = new NotificationsFeedManager();\n }\n return NotificationsFeedManager.instance;\n }\n\n constructor() {\n super({\n uiDataUpdateEvent: NotificationsFeedEventsEnum.OPEN,\n uiTag: UITagsEnum.NOTIFICATIONS_FEED\n });\n this.data = { ...this.initialData };\n }\n\n public isNotificationsFeedOpen(): boolean {\n return this.isOpen;\n }\n\n /**\n * Open the notifications feed and toggle off the toast manager.\n */\n public async openNotificationsFeed(): Promise<void> {\n const toastManager = ToastManager.getInstance();\n toastManager.hideToasts();\n await this.openUI();\n await this.updateDataAndNotifications();\n\n const storeToastsUnsubscribe = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n await this.updateDataAndNotifications();\n }\n }\n );\n this.unsubscribeFunctions.set(NOTIFICATIONS_FEED_STORE_SUBSCRIBE, [\n storeToastsUnsubscribe\n ]);\n\n this.eventBus?.publish(NotificationsFeedEventsEnum.OPEN);\n await this.updateDataAndNotifications();\n }\n\n /**\n * Close the notifications feed and toggle on the toast manager.\n */\n protected handleCloseUI() {\n const toastManager = ToastManager.getInstance();\n this.closeUI();\n toastManager.showToasts();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLOSE,\n this.handleCloseUI.bind(this)\n );\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLEAR,\n this.handleClearNotificationsFeedHistory.bind(this)\n );\n }\n\n protected async updateDataAndNotifications() {\n const { transactions, account, toasts, network } = this.store.getState();\n\n const { pendingTransactionToasts } = await createToastsFromTransactions({\n toastList: toasts,\n transactionsSessions: transactions,\n account\n });\n\n this.data.pendingTransactions = pendingTransactionToasts;\n\n this.data.historicTransactions =\n await TransactionsHistoryController.getTransactionsHistory({\n transactionsSessions: transactions,\n address: account.address,\n explorerAddress: network.network.explorerAddress,\n egldLabel: network.network.egldLabel\n });\n\n await this.updateNotificationsFeed();\n }\n\n private handleClearNotificationsFeedHistory() {\n clearCompletedTransactions();\n this.resetData();\n this.updateNotificationsFeed();\n }\n\n private async updateNotificationsFeed() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.PENDING_TRANSACTIONS_UPDATE,\n this.data.pendingTransactions\n );\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.TRANSACTIONS_HISTORY_UPDATE,\n this.data.historicTransactions\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "scAAA,OAAOA,MAAa,iBCApB,OAAOC,MAAa,iBAiBpB,IAAMC,EAAqC,qCAE9BC,EAAN,MAAMC,UAAiCC,CAI5C,CAgBA,aAAc,CACZ,MAAM,CACJ,4CACA,8BACF,CAAC,EAlBH,KAAiB,MAAQC,EAAS,EAElC,KAAU,YAA6C,CACrD,oBAAqB,CAAC,EACtB,qBAAsB,CAAC,CACzB,EAcE,KAAK,KAAO,CAAE,GAAG,KAAK,WAAY,CACpC,CAbA,OAAc,aAAwC,CACpD,OAAKF,EAAyB,WAC5BA,EAAyB,SAAW,IAAIA,GAEnCA,EAAyB,QAClC,CAUO,yBAAmC,CACxC,OAAO,KAAK,MACd,CAKA,MAAa,uBAAuC,CAC7BG,EAAa,YAAY,EACjC,WAAW,EACxB,MAAM,KAAK,OAAO,EAClB,MAAM,KAAK,2BAA2B,EAEtC,IAAMC,EAAyB,KAAK,MAAM,UACxC,MACE,CAAE,OAAAC,EAAQ,aAAAC,CAAa,EACvB,CAAE,OAAQC,EAAY,aAAcC,CAAiB,IAClD,EAED,CAACC,EAAQF,EAAW,kBAAmBF,EAAO,iBAAiB,GAC/D,CAACI,EAAQD,EAAkBF,CAAY,IAEvC,MAAM,KAAK,2BAA2B,CAE1C,CACF,EACA,KAAK,qBAAqB,IAAIR,EAAoC,CAChEM,CACF,CAAC,EAED,KAAK,UAAU,iCAAwC,EACvD,MAAM,KAAK,2BAA2B,CACxC,CAKU,eAAgB,CACxB,IAAMM,EAAeP,EAAa,YAAY,EAC9C,KAAK,QAAQ,EACbO,EAAa,WAAW,CAC1B,CAEA,MAAgB,qBAAsB,CAC/B,KAAK,WAIV,KAAK,+CAEH,KAAK,cAAc,KAAK,IAAI,CAC9B,EAEA,KAAK,uDAEH,KAAK,oCAAoC,KAAK,IAAI,CACpD,EACF,CAEA,MAAgB,4BAA6B,CAC3C,GAAM,CAAE,aAAAJ,EAAc,QAAAK,EAAS,OAAAN,EAAQ,QAAAO,CAAQ,EAAI,KAAK,MAAM,SAAS,EAEjE,CAAE,yBAAAC,CAAyB,EAAI,MAAMC,EAA6B,CACtE,UAAWT,EACX,qBAAsBC,EACtB,QAAAK,CACF,CAAC,EAED,KAAK,KAAK,oBAAsBE,EAEhC,KAAK,KAAK,qBACR,MAAME,EAA8B,uBAAuB,CACzD,qBAAsBT,EACtB,QAASK,EAAQ,QACjB,gBAAiBC,EAAQ,QAAQ,gBACjC,UAAWA,EAAQ,QAAQ,SAC7B,CAAC,EAEH,MAAM,KAAK,wBAAwB,CACrC,CAEQ,qCAAsC,CAC5CI,EAA2B,EAC3B,KAAK,UAAU,EACf,KAAK,wBAAwB,CAC/B,CAEA,MAAc,yBAA0B,CACjC,KAAK,WAIV,KAAK,SAAS,sCAEZ,KAAK,KAAK,mBACZ,EAEA,KAAK,SAAS,sCAEZ,KAAK,KAAK,oBACZ,EACF,CACF,EDrHO,IAAMC,EAAN,MAAMC,CAAa,CAgBxB,aAAc,CAdd,KAAQ,kBAAoB,GAE5B,KAAQ,cAAqC,KAC7C,KAAQ,kBAAyC,CAAC,EAClD,KAAQ,aAAkC,CAAC,EAE3C,KAAQ,wBAAsC,IAAM,KAEpD,KAAQ,6BAA+C,CAAC,EACxD,KAAQ,SACN,KAEF,WAAQC,EAAS,EAGf,KAAK,QAAQ,EACb,KAAK,gBAAkB,IAAIC,EAE3B,KAAK,yBAA2BC,EAAyB,YAAY,CACvE,CAEA,MAAa,KAAK,CAChB,wBAAAC,EAA0B,GAC5B,EAAmB,CAAC,EAAG,CACrB,KAAK,wBAA0BA,EAE/B,KAAK,gBAAgB,KAAK,CAAE,wBAAAA,CAAwB,CAAC,EAErD,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,MAAM,KAAK,iCAAiC,EAE5C,KAAK,wBAA0B,KAAK,MAAM,UACxC,CACE,CAAE,OAAAC,EAAQ,aAAAC,CAAa,EACvB,CAAE,OAAQC,EAAY,aAAcC,CAAiB,IAClD,EAED,CAACC,EAAQF,EAAW,kBAAmBF,EAAO,iBAAiB,GAC/D,CAACI,EAAQD,EAAkBF,CAAY,IAEvC,KAAK,4BAA4B,EAG9BG,EAAQF,EAAW,aAAcF,EAAO,YAAY,GACvD,KAAK,sBAAsB,CAE/B,CACF,CACF,CAEA,OAAc,aAA4B,CACxC,OAAKL,EAAa,WAChBA,EAAa,SAAW,IAAIA,GAEvBA,EAAa,QACtB,CAEQ,2BAA2BU,EAA0B,CAC3D,GAAM,CAAE,aAAAJ,CAAa,EAAI,KAAK,MAAM,SAAS,EACvCK,EAAcL,EAAaI,CAAO,EAExC,GAAI,CAACC,EACH,MAAO,GAGT,GAAM,CAAE,OAAAC,CAAO,EAAID,EACbE,EAAaC,EAAyBF,CAAM,EAC5CG,EAAWC,EAAuBJ,CAAM,EACxCK,EAAeC,EAA2BN,CAAM,EAChDO,EAAcJ,GAAYE,GAAgBJ,EAEhD,OAAIM,GACE,KAAK,yBACP,KAAK,gBAAgB,MAAMT,CAAO,EAE7BS,IAGT,KAAK,gBAAgB,KAAKT,CAAO,EAC1BS,EACT,CAEO,uBAAuBT,EAAiBU,EAAuB,CACpEC,EAAoB,CAClB,QAAAX,EACA,cAAAU,CACF,CAAC,EAED,KAAK,2BAA2BV,CAAO,EACvC,KAAK,4BAA4B,CACnC,CAEA,MAAc,6BAA8B,CAC1C,GAAM,CACJ,OAAQY,EACR,aAAcC,EACd,QAAAC,CACF,EAAI,KAAK,MAAM,SAAS,EAElB,CAAE,yBAAAC,EAA0B,2BAAAC,CAA2B,EAC3D,MAAMC,EAA6B,CACjC,UAAAL,EACA,qBAAAC,EACA,QAAAC,CACF,CAAC,EAEH,KAAK,kBAAoB,CACvB,GAAGC,EACH,GAAGC,CACL,EAEA,QAAWE,KAASN,EAAU,kBAC5B,KAAK,2BAA2BM,EAAM,OAAO,EAG/C,MAAM,KAAK,yBAAyB,CACtC,CAEA,MAAc,uBAAwB,CACpC,GAAM,CAAE,OAAQN,CAAU,EAAI,KAAK,MAAM,SAAS,EAClD,KAAK,aAAe,CAAC,EAErB,QAAWM,KAASN,EAAU,aAAc,CAG1C,IAAMO,EAFgB,YAAaD,EAG/B,CAAE,GAAGA,CAAM,EACX,CACE,GAAGA,EACH,wBACEE,EAA+BF,EAAM,OAAO,CAChD,EACJ,KAAK,aAAa,KAAKC,CAAQ,EAE3BD,EAAM,UACR,KAAK,gBAAgB,wBACnBA,EAAM,QACNA,EAAM,QACR,CAEJ,CACA,KAAK,UAAU,mCAEb,KAAK,YACP,CACF,CAEA,MAAc,wBAAuD,CACnE,OAAI,KAAK,cACA,KAAK,eAGT,KAAK,oBACR,KAAK,kBAAoB,GAEzB,KAAK,cAAgB,MAAMG,EAA8B,CACvD,qBACF,CAAC,EAED,KAAK,kBAAoB,IAGpB,KAAK,cACd,CAEQ,4BAA4BrB,EAAiB,CAC/B,KAAK,2BAA2BA,CAAO,GAGzDsB,EAAuBtB,CAAO,CAElC,CAEA,MAAc,kCAAmC,CAC/C,IAAMuB,EAAgB,MAAM,KAAK,uBAAuB,EACxD,GAAKA,EAKL,IADA,KAAK,SAAW,MAAMA,EAAc,YAAY,EAC5C,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,KAAK,SAAS,wBAEZ,KAAK,iBAAiB,KAAK,IAAI,CACjC,EAEA,KAAK,6BAA6B,KAAK,IAAM,CAC3C,KAAK,UAAU,0BAEb,KAAK,iBAAiB,KAAK,IAAI,CACjC,CACF,CAAC,EAED,KAAK,SAAS,oCAEZ,KAAK,4BAA4B,KAAK,IAAI,CAC5C,EAEA,KAAK,6BAA6B,KAAK,IAAM,CAC3C,KAAK,UAAU,sCAEb,KAAK,4BAA4B,KAAK,IAAI,CAC5C,CACF,CAAC,EACH,CAEO,YAAa,CAClB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,CACnC,CAEO,YAAa,CAClB,KAAK,kBAAoB,CAAC,EAC1B,KAAK,aAAe,CAAC,EACrB,KAAK,UAAU,wCAEb,KAAK,iBACP,EACA,KAAK,UAAU,mCAEb,KAAK,YACP,CACF,CAEA,MAAc,6BAA8B,CAC1C,KAAK,yBAAyB,sBAAsB,CACtD,CAEQ,iBAAiBvB,EAAiB,CAKxC,GAJoB,KAAK,aAAa,KACnCkB,GAAUA,EAAM,UAAYlB,CAC/B,EAEiB,CACf,KAAK,gBAAgB,KAAKA,CAAO,EACjC,IAAMwB,EAAcC,EAAmCzB,CAAO,EAC9DwB,IAAc,EACdE,EAAkB1B,CAAO,EACzB,MACF,CAEA,KAAK,4BAA4BA,CAAO,CAC1C,CAEA,MAAc,0BAA2B,CACvC,GAAI,MAAK,yBAAyB,wBAAwB,EAI1D,IAAI,CAAC,KAAK,SAAU,CAClB,IAAMuB,EAAgB,MAAM,KAAK,uBAAuB,EAExD,GAAI,CAACA,EACH,OAGF,KAAK,SAAW,MAAMA,EAAc,YAAY,CAClD,CAEA,KAAK,SAAS,wCAEZ,KAAK,iBACP,EACF,CAEO,SAAU,CACf,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,QAAQ,EAC9B,KAAK,0BAA0B,QAAQ,EACvCI,EAAsB,EACtB,KAAK,6BAA6B,QAASC,GAAgBA,EAAY,CAAC,EACxE,KAAK,6BAA+B,CAAC,CACvC,CACF",
|
|
6
|
+
"names": ["isEqual", "isEqual", "NOTIFICATIONS_FEED_STORE_SUBSCRIBE", "NotificationsFeedManager", "_NotificationsFeedManager", "SidePanelBaseManager", "getStore", "ToastManager", "storeToastsUnsubscribe", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastManager", "account", "network", "pendingTransactionToasts", "createToastsFromTransactions", "TransactionsHistoryController", "clearCompletedTransactions", "ToastManager", "_ToastManager", "getStore", "LifetimeManager", "NotificationsFeedManager", "successfulToastLifetime", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastId", "transaction", "status", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "totalDuration", "addTransactionToast", "toastList", "transactionsSessions", "account", "pendingTransactionToasts", "completedTransactionToasts", "createToastsFromTransactions", "toast", "newToast", "customToastComponentDictionary", "createUIElement", "removeTransactionToast", "toastsElement", "handleClose", "customToastCloseHandlersDictionary", "removeCustomToast", "removeAllCustomToasts", "unsubscribe"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/transactions.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const CANCEL_TRANSACTION_TOAST_ID = 'cancel-transaction-toast';\nexport const ERROR_SIGNING_TOAST_ID = 'error-signing-toast';\nexport const AVERAGE_TX_DURATION_MS = 6000;\nexport const CROSS_SHARD_ROUNDS = 5;\nexport const TRANSACTIONS_STATUS_POLLING_INTERVAL_MS = 90 * 1000; // 90sec\nexport const TRANSACTIONS_STATUS_DROP_INTERVAL_MS = 10 * 60 * 1000; // 10min\nexport const CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION = 10000;\nexport const BATCH_TRANSACTIONS_ID_SEPARATOR = '-';\nexport const SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 75;\nexport const CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 25;\nexport const PROGRESS_INTERVAL_DURATION_MS = 100;\n"],
|
|
5
|
-
"mappings": "AAAO,IAAMA,EAA8B,2BAC9BC,EAAyB,sBACzBC,EAAyB,IACzBC,EAAqB,EACrBC,EAA0C,IAC1CC,EAAuC,IACvCC,EAA4C,IAC5CC,EAAkC,IAClCC,EAA8C,GAC9CC,EAA+C,GAC/CC,EAAgC",
|
|
6
|
-
"names": ["CANCEL_TRANSACTION_TOAST_ID", "ERROR_SIGNING_TOAST_ID", "AVERAGE_TX_DURATION_MS", "CROSS_SHARD_ROUNDS", "TRANSACTIONS_STATUS_POLLING_INTERVAL_MS", "TRANSACTIONS_STATUS_DROP_INTERVAL_MS", "CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION", "BATCH_TRANSACTIONS_ID_SEPARATOR", "SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "PROGRESS_INTERVAL_DURATION_MS"]
|
|
4
|
+
"sourcesContent": ["export const CANCEL_TRANSACTION_TOAST_ID = 'cancel-transaction-toast';\nexport const ERROR_SIGNING_TOAST_ID = 'error-signing-toast';\nexport const AVERAGE_TX_DURATION_MS = 6000;\nexport const CROSS_SHARD_ROUNDS = 5;\nexport const TRANSACTIONS_STATUS_POLLING_INTERVAL_MS = 90 * 1000; // 90sec\nexport const TRANSACTIONS_STATUS_DROP_INTERVAL_MS = 10 * 60 * 1000; // 10min\nexport const CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION = 10000;\nexport const BATCH_TRANSACTIONS_ID_SEPARATOR = '-';\nexport const SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 75;\nexport const CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE = 25;\nexport const PROGRESS_INTERVAL_DURATION_MS = 100;\nexport const DEFAULT_TOAST_LIEFTIME = 5000;\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAA8B,2BAC9BC,EAAyB,sBACzBC,EAAyB,IACzBC,EAAqB,EACrBC,EAA0C,IAC1CC,EAAuC,IACvCC,EAA4C,IAC5CC,EAAkC,IAClCC,EAA8C,GAC9CC,EAA+C,GAC/CC,EAAgC,IAChCC,EAAyB",
|
|
6
|
+
"names": ["CANCEL_TRANSACTION_TOAST_ID", "ERROR_SIGNING_TOAST_ID", "AVERAGE_TX_DURATION_MS", "CROSS_SHARD_ROUNDS", "TRANSACTIONS_STATUS_POLLING_INTERVAL_MS", "TRANSACTIONS_STATUS_DROP_INTERVAL_MS", "CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION", "BATCH_TRANSACTIONS_ID_SEPARATOR", "SAME_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "CROSS_SHARD_MAX_TOAST_WIDTH_PERCENT_DECREASE", "PROGRESS_INTERVAL_DURATION_MS", "DEFAULT_TOAST_LIEFTIME"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-Y53MWKLT.mjs";import{a as T}from"./chunk-P3BXXGQA.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-2AB2KTYM.mjs";import{a as l}from"./chunk-VJ2DAL5M.mjs";import{c as d}from"./chunk-J4CPYFK6.mjs";import{a as o}from"./chunk-BSWV5MEC.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link:n?.tokenExplorerLink??r?.tokenExplorerLink,linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:c.valueDecimal,valueInteger:c.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DKE2ONRB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-N6SD2OVU.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DPSC4NIK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as a}from"./chunk-JOB7ALAF.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DVY6YKH6.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as s}from"./chunk-MRJ7P7KU.mjs";import{a as o}from"./chunk-OJV6XRG5.mjs";import{a as e,b as t}from"./chunk-U6KSTPE7.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EQMLAAI2.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.ts"],
|
|
4
|
+
"sourcesContent": ["import { WebviewProvider } from '@multiversx/sdk-webview-provider/out/WebviewProvider';\nimport { safeWindow, version } from 'constants/window.constants';\nimport { Message, Transaction } from 'lib/sdkCore';\nimport { IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport {\n ProviderTypeEnum,\n ProviderType\n} from 'providers/types/providerFactory.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { BaseProviderStrategy } from '../BaseProviderStrategy/BaseProviderStrategy';\n\ntype WebviewProviderProps = {\n address?: string;\n};\n\nexport class WebviewProviderStrategy extends BaseProviderStrategy {\n private readonly provider: WebviewProvider;\n\n constructor(config?: WebviewProviderProps) {\n super(config?.address);\n this.provider = WebviewProvider.getInstance({\n resetStateCallback: () => {\n /* \n Used in Hub to clear storage when logging out via the hub header.\n */\n safeWindow.localStorage?.clear?.();\n safeWindow.sessionStorage?.clear?.();\n }\n });\n\n this._login = this.provider.login.bind(this.provider);\n }\n\n async init(): Promise<boolean> {\n this.initializeAddress();\n return this.initializeProvider();\n }\n\n logout(): Promise<boolean> {\n return this.provider.logout();\n }\n\n getType(): ProviderType {\n return ProviderTypeEnum.webview;\n }\n\n getAddress(): Promise<string | undefined> {\n throw new Error('Method not implemented.');\n }\n\n setAccount(account: IDAppProviderAccount): void {\n return this.provider.setAccount(account);\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n private async initializeProvider() {\n const isInitialized = await this.provider.init(version);\n\n if (this.address) {\n this.setAccount({ address: this.address });\n }\n\n return isInitialized;\n }\n\n cancelAction = async () => {\n this.provider.cancelAction();\n };\n\n signTransactions = async (transactions: Transaction[]) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedTransactions =\n await this.provider.signTransactions(transactions);\n return signedTransactions || [];\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n\n signMessage = async (message: Message) => {\n if (!this.provider) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n try {\n const signedMessage = await this.provider.signMessage(message);\n return signedMessage;\n } catch (error) {\n this.cancelAction();\n throw error;\n }\n };\n}\n"],
|
|
5
|
+
"mappings": "kIAAA,OAAS,mBAAAA,MAAuB,uDAezB,IAAMC,EAAN,cAAsCC,CAAqB,CAGhE,YAAYC,EAA+B,CACzC,MAAMA,GAAQ,OAAO,EAiDvB,kBAAe,SAAY,CACzB,KAAK,SAAS,aAAa,CAC7B,EAEA,sBAAmB,MAAOC,GAAgC,CACxD,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAGF,OADE,MAAM,KAAK,SAAS,iBAAiBA,CAAY,GACtB,CAAC,CAChC,OAASC,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EAEA,iBAAc,MAAOC,GAAqB,CACxC,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,oCAAuC,EAGnD,GAAI,CAEF,OADsB,MAAM,KAAK,SAAS,YAAYA,CAAO,CAE/D,OAASD,EAAO,CACd,WAAK,aAAa,EACZA,CACR,CACF,EA/EE,KAAK,SAAWE,EAAgB,YAAY,CAC1C,mBAAoB,IAAM,CAIxBC,EAAW,cAAc,QAAQ,EACjCA,EAAW,gBAAgB,QAAQ,CACrC,CACF,CAAC,EAED,KAAK,OAAS,KAAK,SAAS,MAAM,KAAK,KAAK,QAAQ,CACtD,CAEA,MAAM,MAAyB,CAC7B,YAAK,kBAAkB,EAChB,KAAK,mBAAmB,CACjC,CAEA,QAA2B,CACzB,OAAO,KAAK,SAAS,OAAO,CAC9B,CAEA,SAAwB,CACtB,OAAOC,EAAiB,OAC1B,CAEA,YAA0C,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,WAAWC,EAAqC,CAC9C,OAAO,KAAK,SAAS,WAAWA,CAAO,CACzC,CAEA,eAAyB,CACvB,OAAO,KAAK,SAAS,cAAc,CACrC,CAEA,MAAc,oBAAqB,CACjC,IAAMC,EAAgB,MAAM,KAAK,SAAS,KAAKC,CAAO,EAEtD,OAAI,KAAK,SACP,KAAK,WAAW,CAAE,QAAS,KAAK,OAAQ,CAAC,EAGpCD,CACT,CAkCF",
|
|
6
|
+
"names": ["WebviewProvider", "WebviewProviderStrategy", "BaseProviderStrategy", "config", "transactions", "error", "message", "WebviewProvider", "safeWindow", "ProviderTypeEnum", "account", "isInitialized", "version"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KEAFX54V.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EUVZQRU5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-YV2TRFYW.mjs";import{d as C,e as I}from"./chunk-FS2F24A7.mjs";import{s as p}from"./chunk-JOB7ALAF.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FELZAGW5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-JIJSBQEU.mjs";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-JIJSBQEU.mjs";import{c as a,f as o}from"./chunk-J4CPYFK6.mjs";import{a as n}from"./chunk-3FXHIV6O.mjs";var k=u=>{let i=u.map(e=>{let{isNft:l}=n(e.type);if(l){let{badgeText:t,tokenFormattedAmount:p,tokenLinkText:T}=r({token:e});return`${t!=null?`(${t}) `:""}${p} ${T}`}let m=e.value?o({input:e.value,decimals:e.decimals??a,digits:2,addCommas:!0}):null,d=e.collection?e.identifier:e.token;return`${m} ${e.ticker} (${d})`});return decodeURI(i.join("%0A"))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FIVH6RKU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-FELZAGW5.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-FIXSEPFX.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-3ZEUVYQF.mjs";async function l({sessionId:s,status:a}){let{onSuccess:n,onFail:c}=e;if(!(!n||!c||a==null))switch(a){case"success":await n?.(s);break;case"fail":case"cancelled":case"timedOut":case"invalid":await c?.(s);break}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FMQYLMTU.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.ts"],
|
|
4
|
+
"sourcesContent": ["import { sessionCallbacksMap } from 'managers/TransactionManager/helpers/sessionCallbacks';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\n\ninterface runSessionCallbacksPropsType {\n sessionId: string;\n status?: TransactionBatchStatusesEnum | null;\n}\n\nexport async function runSessionCallbacks({\n sessionId,\n status\n}: runSessionCallbacksPropsType) {\n const { onSuccess, onFail } = sessionCallbacksMap;\n\n if (!onSuccess || !onFail || status == null) {\n return;\n }\n\n switch (status) {\n case TransactionBatchStatusesEnum.success:\n await onSuccess?.(sessionId);\n break;\n case TransactionBatchStatusesEnum.fail:\n case TransactionBatchStatusesEnum.cancelled:\n case TransactionBatchStatusesEnum.timedOut:\n case TransactionBatchStatusesEnum.invalid:\n await onFail?.(sessionId);\n break;\n }\n}\n"],
|
|
5
|
+
"mappings": "yCAQA,eAAsBA,EAAoB,CACxC,UAAAC,EACA,OAAAC,CACF,EAAiC,CAC/B,GAAM,CAAE,UAAAC,EAAW,OAAAC,CAAO,EAAIC,EAE9B,GAAI,GAACF,GAAa,CAACC,GAAUF,GAAU,MAIvC,OAAQA,EAAQ,CACd,cACE,MAAMC,IAAYF,CAAS,EAC3B,MACF,WACA,gBACA,eACA,cACE,MAAMG,IAASH,CAAS,EACxB,KACJ,CACF",
|
|
6
|
+
"names": ["runSessionCallbacks", "sessionId", "status", "onSuccess", "onFail", "sessionCallbacksMap"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as c}from"./chunk-JOB7ALAF.mjs";import{a as o}from"./chunk-BRBIUWAW.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
|
|
2
|
+
//# sourceMappingURL=chunk-FS2F24A7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-HBQQS6GA.mjs";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-JOB7ALAF.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HCDOXUDA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-X6MN67NW.mjs";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-X6MN67NW.mjs";import{u as m}from"./chunk-JOB7ALAF.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HN244QVP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-U6KSTPE7.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-HTVULYKB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as O}from"./chunk-J75OEBAP.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-O3V4TGXK.mjs";import{a as _}from"./chunk-AV4HSXYZ.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-FMUDQBZE.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as x}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-HCDOXUDA.mjs";import{a as G}from"./chunk-RYIJWGFA.mjs";import{p as h}from"./chunk-ZZDN5HHJ.mjs";import{a as L}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-J4CPYFK6.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-U6KSTPE7.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await v({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=x({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=h().getType(),at=G(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=O(),pt=L({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IAK3KHJ7.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l}from"./chunk-B5AW5LX5.mjs";import{a as S}from"./chunk-3ZHPM667.mjs";import{a as o}from"./chunk-FMQYLMTU.mjs";import{a as y}from"./chunk-MFUQ5NBC.mjs";import{b as i,c as f}from"./chunk-YEAVK4T2.mjs";import{l as h}from"./chunk-65L5EBBL.mjs";var u={};async function d({serverTransaction:e,sessionId:t,isSequential:c}){let{hash:a,status:r,results:m,invalidTransaction:n,hasStatusChanged:p}=e;try{if(u[a]>30){i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"});return}if(n&&!c||r==="sent"){u[a]=u[a]?u[a]+1:1;return}if(c&&!r){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s});return}if(p){let s=f({sessionId:t,transaction:e});await o({sessionId:t,status:s})}h(r)&&await S({sessionId:t,hash:a,results:m})}catch(T){console.error(T),i({sessionId:t,status:"timedOut"}),await o({sessionId:t,status:"timedOut"})}}async function R({sessionId:e,transactionBatch:t,isSequential:c}){try{if(t==null)return;let a=y(t),r=await l(a);for(let n of r)await d({serverTransaction:n,sessionId:e,isSequential:c});if(r.every(n=>n.status!=="pending")){if(r.every(s=>s.status==="success"))return i({sessionId:e,status:"success"});if(r.some(s=>s.status==="fail"))return i({sessionId:e,status:"fail"});if(r.every(s=>s.invalidTransaction))return i({sessionId:e,status:"invalid"})}}catch(a){console.error(a)}}export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JAUTVROS.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.ts"],
|
|
4
|
+
"sourcesContent": ["import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport {\n updateTransactionStatus,\n updateSessionStatus\n} from 'store/actions/transactions/transactionsActions';\nimport { getIsTransactionFailed } from 'store/actions/transactions/transactionStateByStatus';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n TrackedTransactionResultType,\n SignedTransactionType\n} from 'types/transactions.types';\n\nimport { getPendingTransactions } from './getPendingTransactions';\nimport { manageFailedTransactions } from './manageFailedTransactions';\nimport { runSessionCallbacks } from './runSessionCallbacks';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\ninterface RetriesType {\n [hash: string]: number;\n}\n\nconst retries: RetriesType = {};\n\ninterface ManageTransactionType {\n serverTransaction: TrackedTransactionResultType;\n sessionId: string;\n isSequential?: boolean;\n}\n\nasync function manageTransaction({\n serverTransaction: transaction,\n sessionId,\n isSequential\n}: ManageTransactionType) {\n const { hash, status, results, invalidTransaction, hasStatusChanged } =\n transaction;\n try {\n const retriesForThisHash = retries[hash];\n if (retriesForThisHash > 30) {\n // consider transaction as stuck after 1 minute\n updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.timedOut\n });\n\n await runSessionCallbacks({\n sessionId,\n status: TransactionBatchStatusesEnum.timedOut\n });\n\n return;\n }\n\n if (\n (invalidTransaction && !isSequential) ||\n status === TransactionBatchStatusesEnum.sent\n ) {\n retries[hash] = retries[hash] ? retries[hash] + 1 : 1;\n return;\n }\n\n // The tx is from a sequential batch.\n // If the transactions before this are not successful then it means that no other tx will be processed\n if (isSequential && !status) {\n const newStatus = updateTransactionStatus({\n sessionId,\n transaction\n });\n await runSessionCallbacks({\n sessionId,\n status: newStatus\n });\n return;\n }\n\n if (hasStatusChanged) {\n const newStatus = updateTransactionStatus({\n sessionId,\n transaction\n });\n\n await runSessionCallbacks({\n sessionId,\n status: newStatus\n });\n }\n\n if (getIsTransactionFailed(status)) {\n await manageFailedTransactions({ sessionId, hash, results });\n }\n } catch (error) {\n console.error(error);\n updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.timedOut\n });\n await runSessionCallbacks({\n sessionId,\n status: TransactionBatchStatusesEnum.timedOut\n });\n }\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await manageTransaction({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n if (hasCompleted) {\n const isSuccessful = serverTransactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = serverTransactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = serverTransactions.every((tx) => tx.invalidTransaction);\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n }\n } catch (error) {\n console.error(error);\n }\n}\n"],
|
|
5
|
+
"mappings": "6PA6BA,IAAMA,EAAuB,CAAC,EAQ9B,eAAeC,EAAkB,CAC/B,kBAAmBC,EACnB,UAAAC,EACA,aAAAC,CACF,EAA0B,CACxB,GAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,mBAAAC,EAAoB,iBAAAC,CAAiB,EAClEP,EACF,GAAI,CAEF,GAD2BF,EAAQK,CAAI,EACd,GAAI,CAE3BK,EAAoB,CAClB,UAAAP,EACA,iBACF,CAAC,EAED,MAAMQ,EAAoB,CACxB,UAAAR,EACA,iBACF,CAAC,EAED,MACF,CAEA,GACGK,GAAsB,CAACJ,GACxBE,WACA,CACAN,EAAQK,CAAI,EAAIL,EAAQK,CAAI,EAAIL,EAAQK,CAAI,EAAI,EAAI,EACpD,MACF,CAIA,GAAID,GAAgB,CAACE,EAAQ,CAC3B,IAAMM,EAAYC,EAAwB,CACxC,UAAAV,EACA,YAAAD,CACF,CAAC,EACD,MAAMS,EAAoB,CACxB,UAAAR,EACA,OAAQS,CACV,CAAC,EACD,MACF,CAEA,GAAIH,EAAkB,CACpB,IAAMG,EAAYC,EAAwB,CACxC,UAAAV,EACA,YAAAD,CACF,CAAC,EAED,MAAMS,EAAoB,CACxB,UAAAR,EACA,OAAQS,CACV,CAAC,CACH,CAEIE,EAAuBR,CAAM,GAC/B,MAAMS,EAAyB,CAAE,UAAAZ,EAAW,KAAAE,EAAM,QAAAE,CAAQ,CAAC,CAE/D,OAASS,EAAO,CACd,QAAQ,MAAMA,CAAK,EACnBN,EAAoB,CAClB,UAAAP,EACA,iBACF,CAAC,EACD,MAAMQ,EAAoB,CACxB,UAAAR,EACA,iBACF,CAAC,CACH,CACF,CAEA,eAAsBc,EAAW,CAC/B,UAAAd,EACA,iBAAkBe,EAClB,aAAAd,CACF,EAAsC,CACpC,GAAI,CACF,GAAIc,GAAgB,KAClB,OAGF,IAAMC,EAAsBC,EAAuBF,CAAY,EAEzDG,EACJ,MAAMC,EAAwBH,CAAmB,EAEnD,QAAWI,KAAqBF,EAC9B,MAAMpB,EAAkB,CACtB,kBAAAsB,EACA,UAAApB,EACA,aAAAC,CACF,CAAC,EAUH,GAPqBiB,EAAmB,MACrCG,GAAOA,EAAG,kBACb,EAKkB,CAKhB,GAJqBH,EAAmB,MACrCG,GAAOA,EAAG,kBACb,EAGE,OAAOd,EAAoB,CACzB,UAAAP,EACA,gBACF,CAAC,EAOH,GAJiBkB,EAAmB,KACjCG,GAAOA,EAAG,eACb,EAGE,OAAOd,EAAoB,CACzB,UAAAP,EACA,aACF,CAAC,EAKH,GAFkBkB,EAAmB,MAAOG,GAAOA,EAAG,kBAAkB,EAGtE,OAAOd,EAAoB,CACzB,UAAAP,EACA,gBACF,CAAC,CAEL,CACF,OAASa,EAAO,CACd,QAAQ,MAAMA,CAAK,CACrB,CACF",
|
|
6
|
+
"names": ["retries", "manageTransaction", "transaction", "sessionId", "isSequential", "hash", "status", "results", "invalidTransaction", "hasStatusChanged", "updateSessionStatus", "runSessionCallbacks", "newStatus", "updateTransactionStatus", "getIsTransactionFailed", "manageFailedTransactions", "error", "checkBatch", "transactions", "pendingTransactions", "getPendingTransactions", "serverTransactions", "getTransactionsByHashes", "serverTransaction", "tx"]
|
|
7
|
+
}
|