@multiversx/sdk-dapp 5.1.8 → 5.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/out/__chunks__/chunk-2NXPS7R3.mjs +2 -0
- package/out/__chunks__/chunk-2VG3V3VD.mjs +2 -0
- package/out/__chunks__/chunk-2VG3V3VD.mjs.map +7 -0
- package/out/__chunks__/chunk-32WMC3HQ.mjs +2 -0
- package/out/__chunks__/chunk-33ZUFX42.mjs +2 -0
- package/out/__chunks__/{chunk-GRU4NOFI.mjs → chunk-3AQIQDPA.mjs} +2 -2
- package/out/__chunks__/{chunk-J6CFAYIO.mjs → chunk-3T75EERX.mjs} +2 -2
- package/out/__chunks__/{chunk-Y57ROHMV.mjs → chunk-43DVKBLZ.mjs} +2 -2
- package/out/__chunks__/{chunk-B7VN77JG.mjs → chunk-44FB23KP.mjs} +2 -2
- package/out/__chunks__/chunk-4HEYQZNL.mjs +2 -0
- package/out/__chunks__/chunk-4Z7G5RCK.mjs +2 -0
- package/out/__chunks__/chunk-5G5ETZM4.mjs +2 -0
- package/out/__chunks__/chunk-5G5ETZM4.mjs.map +7 -0
- package/out/__chunks__/{chunk-OPVHND3O.mjs → chunk-5MMHERWI.mjs} +2 -2
- package/out/__chunks__/{chunk-LMG7PLUI.mjs → chunk-667PINAR.mjs} +2 -2
- package/out/__chunks__/chunk-6CY7XXBE.mjs +2 -0
- package/out/__chunks__/{chunk-IYYCFUH4.mjs → chunk-6YCGOXOL.mjs} +2 -2
- package/out/__chunks__/{chunk-I6DCGYFE.mjs → chunk-7YHUOWFV.mjs} +2 -2
- package/out/__chunks__/{chunk-ICDR3HC5.mjs → chunk-A6TCEIG4.mjs} +2 -2
- package/out/__chunks__/{chunk-IMXMFXER.mjs → chunk-AI7UKECA.mjs} +2 -2
- package/out/__chunks__/{chunk-5LDRZKQG.mjs → chunk-ALPIQGXL.mjs} +2 -2
- package/out/__chunks__/{chunk-A4WTVE3V.mjs → chunk-AVWNBQDX.mjs} +2 -2
- package/out/__chunks__/{chunk-CFCHCCTH.mjs → chunk-BPIDBLI4.mjs} +2 -2
- package/out/__chunks__/{chunk-KJIGI7AM.mjs → chunk-BPVF6WD4.mjs} +2 -2
- package/out/__chunks__/{chunk-66D2TGF6.mjs → chunk-C53VPXWP.mjs} +2 -2
- package/out/__chunks__/{chunk-OD7MJ7CA.mjs → chunk-C7IGU65A.mjs} +2 -2
- package/out/__chunks__/{chunk-NOAPU5US.mjs → chunk-CD7RYHHQ.mjs} +2 -2
- package/out/__chunks__/{chunk-CQXLKX4W.mjs → chunk-CRMKEEKH.mjs} +2 -2
- package/out/__chunks__/{chunk-PM2CIPJB.mjs → chunk-DMBZGJ6Q.mjs} +2 -2
- package/out/__chunks__/{chunk-4PIR4ESS.mjs → chunk-DOLG56CN.mjs} +2 -2
- package/out/__chunks__/{chunk-OQOS52S7.mjs → chunk-DTSAE3IB.mjs} +2 -2
- package/out/__chunks__/{chunk-5Q2JDZD3.mjs → chunk-DXTUMMVX.mjs} +2 -2
- package/out/__chunks__/{chunk-J65JH3Q2.mjs → chunk-E6WW5OHD.mjs} +2 -2
- package/out/__chunks__/{chunk-V5VIOBBE.mjs → chunk-EPG3L2S3.mjs} +2 -2
- package/out/__chunks__/{chunk-P5EDEM26.mjs → chunk-FPBY3DHR.mjs} +2 -2
- package/out/__chunks__/{chunk-SJDGXLII.mjs → chunk-FT5G3VJ5.mjs} +2 -2
- package/out/__chunks__/{chunk-6OBHBOL7.mjs → chunk-FY7XZQRH.mjs} +2 -2
- package/out/__chunks__/{chunk-KLZC6NYC.mjs → chunk-GIZJB7FR.mjs} +2 -2
- package/out/__chunks__/{chunk-QUVHL3QF.mjs → chunk-HESE5NRU.mjs} +2 -2
- package/out/__chunks__/{chunk-NPF3MLTJ.mjs → chunk-IPYKRZ2A.mjs} +2 -2
- package/out/__chunks__/{chunk-6KB3FBQO.mjs → chunk-IYMSWFCP.mjs} +2 -2
- package/out/__chunks__/{chunk-L5WRBBHH.mjs → chunk-J6R2XFXZ.mjs} +2 -2
- package/out/__chunks__/{chunk-JGEBMC2K.mjs → chunk-JB3LG75C.mjs} +2 -2
- package/out/__chunks__/chunk-JD3WTXPU.mjs +2 -0
- package/out/__chunks__/{chunk-HBYQEHJE.mjs → chunk-JFOYQVDZ.mjs} +2 -2
- package/out/__chunks__/chunk-JFX27ZGH.mjs +2 -0
- package/out/__chunks__/{chunk-AUZPUAD4.mjs → chunk-JNEQJC3B.mjs} +2 -2
- package/out/__chunks__/{chunk-JTWAEL7D.mjs → chunk-K4TMKMCO.mjs} +2 -2
- package/out/__chunks__/chunk-KDWLSBQB.mjs +2 -0
- package/out/__chunks__/chunk-KDWLSBQB.mjs.map +7 -0
- package/out/__chunks__/chunk-KKBWOSVH.mjs +2 -0
- package/out/__chunks__/chunk-KYBNCMQL.mjs +2 -0
- package/out/__chunks__/{chunk-XONPIJ3Y.mjs → chunk-MXEJ6NB4.mjs} +2 -2
- package/out/__chunks__/{chunk-YEQDJ3AV.mjs → chunk-NL5FA7NT.mjs} +2 -2
- package/out/__chunks__/{chunk-LS5QVDML.mjs → chunk-NMISWSIO.mjs} +2 -2
- package/out/__chunks__/{chunk-NN2ODLFY.mjs → chunk-NQTTC42T.mjs} +2 -2
- package/out/__chunks__/{chunk-LIQTTAAS.mjs → chunk-NWSFXZMR.mjs} +2 -2
- package/out/__chunks__/{chunk-6KIQJGRP.mjs → chunk-NX6LPULJ.mjs} +2 -2
- package/out/__chunks__/{chunk-Q3AAD4PW.mjs → chunk-OLMTXXEH.mjs} +2 -2
- package/out/__chunks__/{chunk-BYMTQKPA.mjs → chunk-OXHTDT7J.mjs} +2 -2
- package/out/__chunks__/{chunk-YMBVUA56.mjs → chunk-PJNZSN57.mjs} +2 -2
- package/out/__chunks__/{chunk-DQUL7SM3.mjs → chunk-PYHZTCM4.mjs} +2 -2
- package/out/__chunks__/chunk-QDT3NABZ.mjs +2 -0
- package/out/__chunks__/chunk-QDT3NABZ.mjs.map +7 -0
- package/out/__chunks__/{chunk-LH5IBSC3.mjs → chunk-QJW6PYFV.mjs} +2 -2
- package/out/__chunks__/{chunk-LX2TO34O.mjs → chunk-QMY5RUJ3.mjs} +2 -2
- package/out/__chunks__/{chunk-MSFYVSIA.mjs → chunk-R6GH7DA7.mjs} +2 -2
- package/out/__chunks__/chunk-RF5IAADG.mjs +2 -0
- package/out/__chunks__/{chunk-ETED4JB5.mjs.map → chunk-RF5IAADG.mjs.map} +1 -1
- package/out/__chunks__/chunk-RPNTVD3R.mjs +2 -0
- package/out/__chunks__/chunk-RRKJBSXY.mjs +2 -0
- package/out/__chunks__/{chunk-FODR6WTG.mjs → chunk-S4VD34VQ.mjs} +2 -2
- package/out/__chunks__/{chunk-6OVM3ZX6.mjs → chunk-SAV2LFBH.mjs} +2 -2
- package/out/__chunks__/{chunk-GDKW3NI7.mjs → chunk-TPJ7WT4J.mjs} +2 -2
- package/out/__chunks__/{chunk-4FD6QSAE.mjs → chunk-TT5VL5H4.mjs} +2 -2
- package/out/__chunks__/{chunk-MFMWGMLN.mjs → chunk-TX4NQXZO.mjs} +2 -2
- package/out/__chunks__/{chunk-DSSANNT5.mjs → chunk-UAEUFVGE.mjs} +2 -2
- package/out/__chunks__/{chunk-ZVDPYIMB.mjs → chunk-UBZGPJ3E.mjs} +2 -2
- package/out/__chunks__/chunk-UHQDTMYM.mjs +2 -0
- package/out/__chunks__/{chunk-B6YF7H7U.mjs → chunk-VF75NE7S.mjs} +2 -2
- package/out/__chunks__/chunk-XBJKQBW3.mjs +2 -0
- package/out/__chunks__/{chunk-A7PB4MFL.mjs → chunk-XQWEAEGW.mjs} +2 -2
- package/out/__chunks__/{chunk-JBNKG6XC.mjs → chunk-Y4QDT6I2.mjs} +2 -2
- package/out/__chunks__/chunk-YRRWYFH3.mjs +2 -0
- package/out/__chunks__/{chunk-355TDGZM.mjs → chunk-YRXESD4B.mjs} +2 -2
- package/out/__chunks__/chunk-YUD55T7W.mjs +2 -0
- package/out/__chunks__/{chunk-7BTDFBMU.mjs → chunk-ZJ47ZJGM.mjs} +2 -2
- package/out/__chunks__/{chunk-3TKKCFM4.mjs → chunk-ZORPCBON.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/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/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.cjs +34 -1
- package/out/managers/TransactionManager/TransactionManager.cjs.map +2 -2
- package/out/managers/TransactionManager/TransactionManager.d.ts +27 -0
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.types.cjs.map +1 -1
- package/out/managers/TransactionManager/TransactionManager.types.d.ts +9 -0
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/helpers/sessionCallbacks.cjs +21 -8
- package/out/managers/TransactionManager/helpers/sessionCallbacks.cjs.map +2 -2
- package/out/managers/TransactionManager/helpers/sessionCallbacks.d.ts +5 -4
- package/out/managers/TransactionManager/helpers/sessionCallbacks.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/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.cjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.cjs.map +2 -2
- 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.cjs +1 -1
- package/out/methods/initApp/initApp.cjs.map +2 -2
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +3 -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.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.cjs +4 -4
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.cjs.map +2 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.d.ts +2 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.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/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/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/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.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/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +2 -2
- package/out/__chunks__/chunk-26I72KPF.mjs +0 -2
- package/out/__chunks__/chunk-2EJDUI4F.mjs +0 -2
- package/out/__chunks__/chunk-3462VWV2.mjs +0 -2
- package/out/__chunks__/chunk-3ZEUVYQF.mjs +0 -2
- package/out/__chunks__/chunk-3ZEUVYQF.mjs.map +0 -7
- package/out/__chunks__/chunk-5DKIUS4V.mjs +0 -2
- package/out/__chunks__/chunk-6VSANQCL.mjs +0 -2
- package/out/__chunks__/chunk-BIEPQOD5.mjs +0 -2
- package/out/__chunks__/chunk-DJCWPLIW.mjs +0 -2
- package/out/__chunks__/chunk-ENGIAAJA.mjs +0 -2
- package/out/__chunks__/chunk-ETED4JB5.mjs +0 -2
- package/out/__chunks__/chunk-FG6BP2H5.mjs +0 -2
- package/out/__chunks__/chunk-FMQYLMTU.mjs +0 -2
- package/out/__chunks__/chunk-FMQYLMTU.mjs.map +0 -7
- package/out/__chunks__/chunk-FQTEXMMN.mjs +0 -2
- package/out/__chunks__/chunk-NXTU644D.mjs +0 -2
- package/out/__chunks__/chunk-PLTUKRYU.mjs +0 -2
- package/out/__chunks__/chunk-PLTUKRYU.mjs.map +0 -7
- package/out/__chunks__/chunk-QN2BIRAC.mjs +0 -2
- package/out/__chunks__/chunk-RSJC4YBI.mjs +0 -2
- package/out/__chunks__/chunk-TF2JS3TY.mjs +0 -2
- package/out/__chunks__/chunk-URXO7GNH.mjs +0 -2
- package/out/__chunks__/chunk-VRU7SNQA.mjs +0 -2
- package/out/__chunks__/chunk-VRU7SNQA.mjs.map +0 -7
- package/out/__chunks__/chunk-WGESEEJ2.mjs +0 -2
- /package/out/__chunks__/{chunk-FQTEXMMN.mjs.map → chunk-2NXPS7R3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BIEPQOD5.mjs.map → chunk-32WMC3HQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-URXO7GNH.mjs.map → chunk-33ZUFX42.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GRU4NOFI.mjs.map → chunk-3AQIQDPA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6CFAYIO.mjs.map → chunk-3T75EERX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y57ROHMV.mjs.map → chunk-43DVKBLZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B7VN77JG.mjs.map → chunk-44FB23KP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FG6BP2H5.mjs.map → chunk-4HEYQZNL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DJCWPLIW.mjs.map → chunk-4Z7G5RCK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OPVHND3O.mjs.map → chunk-5MMHERWI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LMG7PLUI.mjs.map → chunk-667PINAR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RSJC4YBI.mjs.map → chunk-6CY7XXBE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IYYCFUH4.mjs.map → chunk-6YCGOXOL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I6DCGYFE.mjs.map → chunk-7YHUOWFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ICDR3HC5.mjs.map → chunk-A6TCEIG4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IMXMFXER.mjs.map → chunk-AI7UKECA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5LDRZKQG.mjs.map → chunk-ALPIQGXL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A4WTVE3V.mjs.map → chunk-AVWNBQDX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CFCHCCTH.mjs.map → chunk-BPIDBLI4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KJIGI7AM.mjs.map → chunk-BPVF6WD4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-66D2TGF6.mjs.map → chunk-C53VPXWP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OD7MJ7CA.mjs.map → chunk-C7IGU65A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NOAPU5US.mjs.map → chunk-CD7RYHHQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CQXLKX4W.mjs.map → chunk-CRMKEEKH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PM2CIPJB.mjs.map → chunk-DMBZGJ6Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PIR4ESS.mjs.map → chunk-DOLG56CN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OQOS52S7.mjs.map → chunk-DTSAE3IB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5Q2JDZD3.mjs.map → chunk-DXTUMMVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J65JH3Q2.mjs.map → chunk-E6WW5OHD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V5VIOBBE.mjs.map → chunk-EPG3L2S3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P5EDEM26.mjs.map → chunk-FPBY3DHR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SJDGXLII.mjs.map → chunk-FT5G3VJ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6OBHBOL7.mjs.map → chunk-FY7XZQRH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KLZC6NYC.mjs.map → chunk-GIZJB7FR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QUVHL3QF.mjs.map → chunk-HESE5NRU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NPF3MLTJ.mjs.map → chunk-IPYKRZ2A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6KB3FBQO.mjs.map → chunk-IYMSWFCP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L5WRBBHH.mjs.map → chunk-J6R2XFXZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JGEBMC2K.mjs.map → chunk-JB3LG75C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3462VWV2.mjs.map → chunk-JD3WTXPU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HBYQEHJE.mjs.map → chunk-JFOYQVDZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QN2BIRAC.mjs.map → chunk-JFX27ZGH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AUZPUAD4.mjs.map → chunk-JNEQJC3B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JTWAEL7D.mjs.map → chunk-K4TMKMCO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-26I72KPF.mjs.map → chunk-KKBWOSVH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TF2JS3TY.mjs.map → chunk-KYBNCMQL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XONPIJ3Y.mjs.map → chunk-MXEJ6NB4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YEQDJ3AV.mjs.map → chunk-NL5FA7NT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LS5QVDML.mjs.map → chunk-NMISWSIO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NN2ODLFY.mjs.map → chunk-NQTTC42T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LIQTTAAS.mjs.map → chunk-NWSFXZMR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6KIQJGRP.mjs.map → chunk-NX6LPULJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q3AAD4PW.mjs.map → chunk-OLMTXXEH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BYMTQKPA.mjs.map → chunk-OXHTDT7J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YMBVUA56.mjs.map → chunk-PJNZSN57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DQUL7SM3.mjs.map → chunk-PYHZTCM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LH5IBSC3.mjs.map → chunk-QJW6PYFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LX2TO34O.mjs.map → chunk-QMY5RUJ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MSFYVSIA.mjs.map → chunk-R6GH7DA7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WGESEEJ2.mjs.map → chunk-RPNTVD3R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ENGIAAJA.mjs.map → chunk-RRKJBSXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FODR6WTG.mjs.map → chunk-S4VD34VQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6OVM3ZX6.mjs.map → chunk-SAV2LFBH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GDKW3NI7.mjs.map → chunk-TPJ7WT4J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4FD6QSAE.mjs.map → chunk-TT5VL5H4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MFMWGMLN.mjs.map → chunk-TX4NQXZO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DSSANNT5.mjs.map → chunk-UAEUFVGE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZVDPYIMB.mjs.map → chunk-UBZGPJ3E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6VSANQCL.mjs.map → chunk-UHQDTMYM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B6YF7H7U.mjs.map → chunk-VF75NE7S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5DKIUS4V.mjs.map → chunk-XBJKQBW3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A7PB4MFL.mjs.map → chunk-XQWEAEGW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JBNKG6XC.mjs.map → chunk-Y4QDT6I2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NXTU644D.mjs.map → chunk-YRRWYFH3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-355TDGZM.mjs.map → chunk-YRXESD4B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2EJDUI4F.mjs.map → chunk-YUD55T7W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7BTDFBMU.mjs.map → chunk-ZJ47ZJGM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3TKKCFM4.mjs.map → chunk-ZORPCBON.mjs.map} +0 -0
package/README.md
CHANGED
|
@@ -586,15 +586,25 @@ import { TransactionManagerTrackOptionsType } from '@multiversx/sdk-dapp/out/man
|
|
|
586
586
|
|
|
587
587
|
const options: TransactionManagerTrackOptionsType = {
|
|
588
588
|
disableToasts: false, // `false` by default
|
|
589
|
-
transactionsDisplayInfo: {
|
|
590
|
-
// `undefined` by default
|
|
589
|
+
transactionsDisplayInfo: { // optional. If left `undefined`, it will use the default messages
|
|
591
590
|
errorMessage: 'Failed adding stake',
|
|
592
591
|
successMessage: 'Stake successfully added',
|
|
593
|
-
|
|
592
|
+
receivedMessage: 'Stake successfully added', // optional, add it in case of multiple transactions
|
|
593
|
+
processingMessage: 'Staking in progress',
|
|
594
|
+
// submittedMessage: 'Stake submitted',
|
|
595
|
+
// timedOutMessage: 'Transaction timed out',
|
|
596
|
+
// invalidMessage: 'Invalid transaction',
|
|
594
597
|
},
|
|
595
598
|
sessionInformation: {
|
|
596
599
|
// `undefined` by default. Use to perform additional actions based on the session information
|
|
597
600
|
stakeAmount: '1000000000000000000000000'
|
|
601
|
+
},
|
|
602
|
+
onSuccess: async(sessionId) => { // optional
|
|
603
|
+
// overrides the the global `onSuccess` callback set in the `initApp` method for the current session only
|
|
604
|
+
console.log('Session successful', sessionId);
|
|
605
|
+
},
|
|
606
|
+
onFail: async(sessionId) => { // optional
|
|
607
|
+
console.log('Session failed', sessionId);
|
|
598
608
|
}
|
|
599
609
|
};
|
|
600
610
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/TransactionManager/helpers/sessionCallbacks.ts"],
|
|
4
|
+
"sourcesContent": ["const sessionCallbacksMap: Record<string, SessionCallbacksType> = {};\n\nconst genericCallbacksMap: SessionCallbacksType = {};\n\nexport type SessionCallbacksType = {\n onSuccess?: (sessionId: string) => Promise<void>;\n onFail?: (sessionId: string) => Promise<void>;\n};\n\nexport const getCallbacks = (sessionId?: string): SessionCallbacksType => {\n if (sessionId != null && sessionId in sessionCallbacksMap) {\n return sessionCallbacksMap[sessionId];\n }\n return genericCallbacksMap;\n};\n\nexport const registerCallbacks = ({\n onSuccess,\n onFail,\n sessionId\n}: SessionCallbacksType & { sessionId?: string }) => {\n let map = genericCallbacksMap;\n\n if (sessionId != null) {\n sessionCallbacksMap[sessionId] = sessionCallbacksMap[sessionId] ?? {};\n map = sessionCallbacksMap[sessionId];\n }\n\n if (onSuccess != null) {\n map.onSuccess = onSuccess;\n }\n if (onFail != null) {\n map.onFail = onFail;\n }\n};\n"],
|
|
5
|
+
"mappings": "AAAA,IAAMA,EAA4D,CAAC,EAE7DC,EAA4C,CAAC,EAOtCC,EAAgBC,GACvBA,GAAa,MAAQA,KAAaH,EAC7BA,EAAoBG,CAAS,EAE/BF,EAGIG,EAAoB,CAAC,CAChC,UAAAC,EACA,OAAAC,EACA,UAAAH,CACF,IAAqD,CACnD,IAAII,EAAMN,EAENE,GAAa,OACfH,EAAoBG,CAAS,EAAIH,EAAoBG,CAAS,GAAK,CAAC,EACpEI,EAAMP,EAAoBG,CAAS,GAGjCE,GAAa,OACfE,EAAI,UAAYF,GAEdC,GAAU,OACZC,EAAI,OAASD,EAEjB",
|
|
6
|
+
"names": ["sessionCallbacksMap", "genericCallbacksMap", "getCallbacks", "sessionId", "registerCallbacks", "onSuccess", "onFail", "map"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-DTSAE3IB.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-R6GH7DA7.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3AQIQDPA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-IYMSWFCP.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{w as G}from"./chunk-NL5FA7NT.mjs";import{a as L}from"./chunk-33ZUFX42.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.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-RF5IAADG.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 x({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=O({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=G().getType(),at=v(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=L(),pt=h({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-3T75EERX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-R6GH7DA7.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-43DVKBLZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-R6GH7DA7.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-44FB23KP.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-MXEJ6NB4.mjs";import{v as m}from"./chunk-NL5FA7NT.mjs";import{s as n}from"./chunk-R6GH7DA7.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as p}from"./chunk-K4TMKMCO.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4HEYQZNL.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-QJW6PYFV.mjs";import{c as n}from"./chunk-R6GH7DA7.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-4Z7G5RCK.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var d=(e=>(e.check="check",e.hourglass="hourglass",e.times="times",e.ban="ban",e))(d||{}),B=({address:a,sender:c,status:o,toastId:s,transactionsDisplayInfo:e,txActionName:t})=>{let i={id:s,icon:"check",hasCloseButton:!0,title:e?.successMessage??t??"Transaction successful",iconClassName:"success"},n={id:s,icon:"check",hasCloseButton:!0,title:e?.receivedMessage??e?.successMessage??t??"Transaction received",iconClassName:"success"},u={id:s,icon:"hourglass",hasCloseButton:!1,title:e?.processingMessage??t??"Processing transaction",iconClassName:"warning"},r={id:s,icon:"times",title:e?.errorMessage??t??"Transaction failed",hasCloseButton:!0,iconClassName:"danger"},l={id:s,icon:"ban",title:e?.invalidMessage??t??"Transaction invalid",hasCloseButton:!0,iconClassName:"warning"},T={id:s,icon:"times",title:e?.timedOutMessage??t??"Transaction timed out",hasCloseButton:!0,iconClassName:"warning"};switch(o){case"success":return c!==a?n:i;case"cancelled":case"fail":return r;case"timedOut":return T;case"invalid":return l;case"signed":case"sent":default:return u}};export{d as a,B as b};
|
|
2
|
+
//# sourceMappingURL=chunk-5G5ETZM4.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/internal/ToastManager/helpers/getToastDataStateByStatus.ts"],
|
|
4
|
+
"sourcesContent": ["import { TransactionBatchStatusesEnum } from 'types';\nimport {\n GetToastsOptionsDataPropsType,\n IToastDataState,\n TransactionsDefaultTitles\n} from '../types';\n\nexport enum ToastIconsEnum {\n check = 'check',\n hourglass = 'hourglass',\n times = 'times',\n ban = 'ban'\n}\n\nexport const getToastDataStateByStatus = ({\n address,\n sender,\n status,\n toastId,\n transactionsDisplayInfo,\n txActionName\n}: GetToastsOptionsDataPropsType) => {\n const successToastData: IToastDataState = {\n id: toastId,\n icon: ToastIconsEnum.check,\n hasCloseButton: true,\n title:\n transactionsDisplayInfo?.successMessage ??\n txActionName ??\n TransactionsDefaultTitles.success,\n iconClassName: 'success'\n };\n\n const receivedToastData: IToastDataState = {\n id: toastId,\n icon: ToastIconsEnum.check,\n hasCloseButton: true,\n title:\n transactionsDisplayInfo?.receivedMessage ??\n transactionsDisplayInfo?.successMessage ??\n txActionName ??\n TransactionsDefaultTitles.received,\n iconClassName: 'success'\n };\n\n const pendingToastData: IToastDataState = {\n id: toastId,\n icon: ToastIconsEnum.hourglass,\n hasCloseButton: false,\n title:\n transactionsDisplayInfo?.processingMessage ??\n txActionName ??\n TransactionsDefaultTitles.pending,\n iconClassName: 'warning'\n };\n\n const failToastData: IToastDataState = {\n id: toastId,\n icon: ToastIconsEnum.times,\n title:\n transactionsDisplayInfo?.errorMessage ??\n txActionName ??\n TransactionsDefaultTitles.failed,\n hasCloseButton: true,\n iconClassName: 'danger'\n };\n\n const invalidToastData: IToastDataState = {\n id: toastId,\n icon: ToastIconsEnum.ban,\n title:\n transactionsDisplayInfo?.invalidMessage ??\n txActionName ??\n TransactionsDefaultTitles.invalid,\n hasCloseButton: true,\n iconClassName: 'warning'\n };\n\n const timedOutToastData = {\n id: toastId,\n icon: ToastIconsEnum.times,\n title:\n transactionsDisplayInfo?.timedOutMessage ??\n txActionName ??\n TransactionsDefaultTitles.timedOut,\n hasCloseButton: true,\n iconClassName: 'warning'\n };\n\n switch (status) {\n case TransactionBatchStatusesEnum.success:\n return sender !== address ? receivedToastData : successToastData;\n case TransactionBatchStatusesEnum.cancelled:\n case TransactionBatchStatusesEnum.fail:\n return failToastData;\n case TransactionBatchStatusesEnum.timedOut:\n return timedOutToastData;\n case TransactionBatchStatusesEnum.invalid:\n return invalidToastData;\n\n case TransactionBatchStatusesEnum.signed:\n case TransactionBatchStatusesEnum.sent:\n default:\n return pendingToastData;\n }\n};\n"],
|
|
5
|
+
"mappings": "AAOO,IAAKA,OACVA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,MAAQ,QACRA,EAAA,IAAM,MAJIA,OAAA,IAOCC,EAA4B,CAAC,CACxC,QAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,wBAAAC,EACA,aAAAC,CACF,IAAqC,CACnC,IAAMC,EAAoC,CACxC,GAAIH,EACJ,KAAM,QACN,eAAgB,GAChB,MACEC,GAAyB,gBACzBC,4BAEF,cAAe,SACjB,EAEME,EAAqC,CACzC,GAAIJ,EACJ,KAAM,QACN,eAAgB,GAChB,MACEC,GAAyB,iBACzBA,GAAyB,gBACzBC,0BAEF,cAAe,SACjB,EAEMG,EAAoC,CACxC,GAAIL,EACJ,KAAM,YACN,eAAgB,GAChB,MACEC,GAAyB,mBACzBC,4BAEF,cAAe,SACjB,EAEMI,EAAiC,CACrC,GAAIN,EACJ,KAAM,QACN,MACEC,GAAyB,cACzBC,wBAEF,eAAgB,GAChB,cAAe,QACjB,EAEMK,EAAoC,CACxC,GAAIP,EACJ,KAAM,MACN,MACEC,GAAyB,gBACzBC,yBAEF,eAAgB,GAChB,cAAe,SACjB,EAEMM,EAAoB,CACxB,GAAIR,EACJ,KAAM,QACN,MACEC,GAAyB,iBACzBC,2BAEF,eAAgB,GAChB,cAAe,SACjB,EAEA,OAAQH,EAAQ,CACd,cACE,OAAOD,IAAWD,EAAUO,EAAoBD,EAClD,gBACA,WACE,OAAOG,EACT,eACE,OAAOE,EACT,cACE,OAAOD,EAET,aACA,WACA,QACE,OAAOF,CACX,CACF",
|
|
6
|
+
"names": ["ToastIconsEnum", "getToastDataStateByStatus", "address", "sender", "status", "toastId", "transactionsDisplayInfo", "txActionName", "successToastData", "receivedToastData", "pendingToastData", "failToastData", "invalidToastData", "timedOutToastData"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-TT5VL5H4.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-UNBTFF6K.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.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-5MMHERWI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-A6TCEIG4.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};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-667PINAR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-XBJKQBW3.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6YCGOXOL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-MXEJ6NB4.mjs";import{a as u}from"./chunk-OXHTDT7J.mjs";import{s as c}from"./chunk-R6GH7DA7.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-6JSWL75O.mjs";import{a}from"./chunk-LJX4MW7B.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7YHUOWFV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-VF75NE7S.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-A6TCEIG4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-PYHZTCM4.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-2NXPS7R3.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-AI7UKECA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-R6GH7DA7.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ALPIQGXL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-ZORPCBON.mjs";import{d as m,e as l}from"./chunk-UBZGPJ3E.mjs";import{q as a}from"./chunk-R6GH7DA7.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AVWNBQDX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{w as n}from"./chunk-NL5FA7NT.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BPIDBLI4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-UHQDTMYM.mjs";import{a as b}from"./chunk-BPIDBLI4.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-3T75EERX.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-S4VD34VQ.mjs";import{a as R}from"./chunk-YY724VZR.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-C7IGU65A.mjs";import{a as O}from"./chunk-KKBWOSVH.mjs";import{s as x}from"./chunk-R6GH7DA7.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=O(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BPVF6WD4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-TX4NQXZO.mjs";import{a as d}from"./chunk-OLMTXXEH.mjs";import{a as f}from"./chunk-JFX27ZGH.mjs";import{a as h}from"./chunk-3L7HZ2SO.mjs";var g=t=>t.sort((n,i)=>i.timestamp-n.timestamp),k=async({transactions:t,address:n,explorerAddress:i,egldLabel:u,skipFetchingTransactions:I=!1})=>{let o=[],e=[];if(t.forEach(s=>{let a=f(s.hash);a?o.push(a):e.push(s.hash)}),e.length===0)return g(o);let c=I?t.map(s=>({...s,txHash:s.hash})):await p(e),l=c.map(s=>s.txHash),T=e.filter(s=>!l.includes(s));if(T.length>0){let a=t.filter(r=>T.includes(r.hash)).map(r=>({...r,txHash:r.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...a)}let m=new Map;return o.forEach(s=>{let a=s.hash;a&&m.set(String(a),s)}),c.forEach(s=>{let a=h({transaction:s,address:n,explorerAddress:i,egldLabel:u});a.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:a}),m.set(s.txHash,a)}),g(Array.from(m.values()))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-C53VPXWP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-OXHTDT7J.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-C7IGU65A.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-AVWNBQDX.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-CD7RYHHQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-EPG3L2S3.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CRMKEEKH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-RPNTVD3R.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DMBZGJ6Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-A6TCEIG4.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DOLG56CN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-R6GH7DA7.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-DTSAE3IB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-RF5IAADG.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
|
|
2
|
+
//# sourceMappingURL=chunk-DXTUMMVX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-GIZJB7FR.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";import{a as e,b as t}from"./chunk-RF5IAADG.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-E6WW5OHD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-R6GH7DA7.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EPG3L2S3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-TX4NQXZO.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-FPBY3DHR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-Y4QDT6I2.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FT5G3VJ5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-JB3LG75C.mjs";import{b as r}from"./chunk-JNEQJC3B.mjs";import{s as i}from"./chunk-R6GH7DA7.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-FY7XZQRH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-FT5G3VJ5.mjs";import{a as e}from"./chunk-RPNTVD3R.mjs";import{a as i}from"./chunk-6JSWL75O.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-GIZJB7FR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-RF5IAADG.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-HESE5NRU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-CD7RYHHQ.mjs";import{a}from"./chunk-RPNTVD3R.mjs";import{a as u}from"./chunk-XQWEAEGW.mjs";import{c as n}from"./chunk-DXTUMMVX.mjs";import{a as s}from"./chunk-RF5IAADG.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IPYKRZ2A.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-R6GH7DA7.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-IYMSWFCP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-RF5IAADG.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J6R2XFXZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-43DVKBLZ.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-JB3LG75C.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-C53VPXWP.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-JFOYQVDZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q 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{q as u}from"./chunk-R6GH7DA7.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-JNEQJC3B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-J6R2XFXZ.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-K4TMKMCO.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n}from"./chunk-2VG3V3VD.mjs";async function i({sessionId:a,status:s}){let c=n(a);if(s!=null)switch(s){case"success":await c?.onSuccess?.(a);break;case"fail":case"cancelled":case"timedOut":case"invalid":await c?.onFail?.(a);break}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KDWLSBQB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.ts"],
|
|
4
|
+
"sourcesContent": ["import { getCallbacks } 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 callbacks = getCallbacks(sessionId);\n\n if (status == null) {\n return;\n }\n\n switch (status) {\n case TransactionBatchStatusesEnum.success:\n await callbacks?.onSuccess?.(sessionId);\n break;\n case TransactionBatchStatusesEnum.fail:\n case TransactionBatchStatusesEnum.cancelled:\n case TransactionBatchStatusesEnum.timedOut:\n case TransactionBatchStatusesEnum.invalid:\n await callbacks?.onFail?.(sessionId);\n break;\n }\n}\n"],
|
|
5
|
+
"mappings": "yCAQA,eAAsBA,EAAoB,CACxC,UAAAC,EACA,OAAAC,CACF,EAAiC,CAC/B,IAAMC,EAAYC,EAAaH,CAAS,EAExC,GAAIC,GAAU,KAId,OAAQA,EAAQ,CACd,cACE,MAAMC,GAAW,YAAYF,CAAS,EACtC,MACF,WACA,gBACA,eACA,cACE,MAAME,GAAW,SAASF,CAAS,EACnC,KACJ,CACF",
|
|
6
|
+
"names": ["runSessionCallbacks", "sessionId", "status", "callbacks", "getCallbacks"]
|
|
7
|
+
}
|