@multiversx/sdk-dapp 5.0.0 → 5.0.2
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 +5 -1
- package/out/__chunks__/{chunk-BQ2I655N.mjs → chunk-36VCBI2F.mjs} +2 -2
- package/out/__chunks__/chunk-4X3GF5DF.mjs +2 -0
- package/out/__chunks__/{chunk-SLH6IQJJ.mjs → chunk-54I7T2PP.mjs} +2 -2
- package/out/__chunks__/{chunk-B7ZKW5ML.mjs → chunk-5ECETGF7.mjs} +2 -2
- package/out/__chunks__/chunk-62EX26PE.mjs +2 -0
- package/out/__chunks__/{chunk-HXXZKQRJ.mjs → chunk-673M5M6E.mjs} +2 -2
- package/out/__chunks__/{chunk-CJQAA4EP.mjs → chunk-6EBIYJLF.mjs} +2 -2
- package/out/__chunks__/{chunk-IXUYZYD2.mjs → chunk-6IACSXVX.mjs} +2 -2
- package/out/__chunks__/chunk-6JEPIISC.mjs +2 -0
- package/out/__chunks__/{chunk-U34BNBOX.mjs → chunk-6RAMYSEC.mjs} +2 -2
- package/out/__chunks__/{chunk-QSYQIJEO.mjs → chunk-6RJQVLIY.mjs} +2 -2
- package/out/__chunks__/{chunk-JZ7434LN.mjs → chunk-6TJVNG7O.mjs} +2 -2
- package/out/__chunks__/{chunk-42LFLNPA.mjs → chunk-6W67LK22.mjs} +2 -2
- package/out/__chunks__/{chunk-4YU2DWHA.mjs → chunk-7D7CRUIW.mjs} +2 -2
- package/out/__chunks__/{chunk-ISPOZQQO.mjs → chunk-A4RNPJJW.mjs} +2 -2
- package/out/__chunks__/{chunk-GFTTAANM.mjs → chunk-A6IG4DO6.mjs} +2 -2
- package/out/__chunks__/{chunk-HUITKXBO.mjs → chunk-AZMKY66I.mjs} +2 -2
- package/out/__chunks__/{chunk-RBUHL65H.mjs → chunk-BVKUZJNB.mjs} +2 -2
- package/out/__chunks__/chunk-C5X7N2AN.mjs +2 -0
- package/out/__chunks__/chunk-C6NGX4MC.mjs +2 -0
- package/out/__chunks__/{chunk-NPZ5PO2W.mjs → chunk-COZTBWPH.mjs} +2 -2
- package/out/__chunks__/{chunk-INWUHEQN.mjs → chunk-CQ5GZXM5.mjs} +2 -2
- package/out/__chunks__/chunk-D5IP4ZG2.mjs +2 -0
- package/out/__chunks__/{chunk-VFAKQ7NM.mjs → chunk-DIV6ZH5K.mjs} +2 -2
- package/out/__chunks__/{chunk-6D2RBTVV.mjs → chunk-DPUWJW5E.mjs} +2 -2
- package/out/__chunks__/{chunk-6P7EXGAB.mjs → chunk-EVTERXBU.mjs} +2 -2
- package/out/__chunks__/chunk-FZS7JL2U.mjs +2 -0
- package/out/__chunks__/{chunk-YO3ATAA6.mjs → chunk-HCAXI2LY.mjs} +2 -2
- package/out/__chunks__/{chunk-PHNC5JMP.mjs → chunk-HVEI4BFC.mjs} +2 -2
- package/out/__chunks__/chunk-HVEI4BFC.mjs.map +7 -0
- package/out/__chunks__/{chunk-RFKBUN7S.mjs → chunk-I6BAZCYU.mjs} +2 -2
- package/out/__chunks__/chunk-I7NIOE4D.mjs +2 -0
- package/out/__chunks__/{chunk-ZWVYAOKB.mjs → chunk-ICZ6YALG.mjs} +2 -2
- package/out/__chunks__/{chunk-BHAZ2W52.mjs → chunk-IHKF4UNO.mjs} +2 -2
- package/out/__chunks__/{chunk-ID7WYMJZ.mjs → chunk-IP3MMHXY.mjs} +2 -2
- package/out/__chunks__/{chunk-745QCLQC.mjs → chunk-JESUVU73.mjs} +2 -2
- package/out/__chunks__/{chunk-GT2HLNE7.mjs → chunk-JQ47IJOB.mjs} +2 -2
- package/out/__chunks__/{chunk-O2DO3WJJ.mjs → chunk-JQTCROGW.mjs} +2 -2
- package/out/__chunks__/{chunk-KSMSBTTQ.mjs → chunk-KDCMWWIT.mjs} +2 -2
- package/out/__chunks__/{chunk-P32DZ2CO.mjs → chunk-KGXIPD5I.mjs} +2 -2
- package/out/__chunks__/{chunk-CVPP4HQE.mjs → chunk-KIQBMB2Y.mjs} +2 -2
- package/out/__chunks__/{chunk-254WMLVS.mjs → chunk-KO5KDKZ7.mjs} +2 -2
- package/out/__chunks__/{chunk-V2C7APME.mjs → chunk-KU74A6T3.mjs} +2 -2
- package/out/__chunks__/chunk-KZC44J42.mjs +2 -0
- package/out/__chunks__/{chunk-FAOCLLIW.mjs → chunk-LTHGO7JM.mjs} +2 -2
- package/out/__chunks__/{chunk-NJPTQNCT.mjs → chunk-M7EUMCPG.mjs} +2 -2
- package/out/__chunks__/{chunk-2EFXW7IG.mjs → chunk-MD7CSIXL.mjs} +2 -2
- package/out/__chunks__/{chunk-4XP7BVJD.mjs → chunk-MELQLFCR.mjs} +2 -2
- package/out/__chunks__/{chunk-VXLJWKLG.mjs → chunk-MFK6BEXF.mjs} +2 -2
- package/out/__chunks__/{chunk-6G7ATMU7.mjs → chunk-MOOY3SNQ.mjs} +2 -2
- package/out/__chunks__/{chunk-I6BXGQLQ.mjs → chunk-MYSCFOXV.mjs} +2 -2
- package/out/__chunks__/{chunk-XPYJSDNF.mjs → chunk-O4DQ3TWG.mjs} +2 -2
- package/out/__chunks__/{chunk-2S5FRZJR.mjs → chunk-OZCEAS6L.mjs} +2 -2
- package/out/__chunks__/{chunk-TNXSVX5O.mjs → chunk-PFXB2A66.mjs} +2 -2
- package/out/__chunks__/chunk-PO27JYMA.mjs +2 -0
- package/out/__chunks__/chunk-PQY2A63Y.mjs +2 -0
- package/out/__chunks__/chunk-PWEOLD6L.mjs +2 -0
- package/out/__chunks__/{chunk-L4QPPHVR.mjs.map → chunk-PWEOLD6L.mjs.map} +1 -1
- package/out/__chunks__/{chunk-4TZC3NF3.mjs → chunk-QZGJ5DCM.mjs} +2 -2
- package/out/__chunks__/{chunk-YKRSCVRE.mjs → chunk-R5SGFTE7.mjs} +2 -2
- package/out/__chunks__/{chunk-FSCOQWQN.mjs → chunk-ROYSFSCI.mjs} +2 -2
- package/out/__chunks__/{chunk-H7BJSM6C.mjs → chunk-RT44V62F.mjs} +2 -2
- package/out/__chunks__/{chunk-S4WKQEYF.mjs → chunk-RU7LAHKK.mjs} +2 -2
- package/out/__chunks__/{chunk-VQAKIVIO.mjs → chunk-RVEEVVOA.mjs} +2 -2
- package/out/__chunks__/{chunk-AF2QSDSV.mjs → chunk-SRX2EMTG.mjs} +2 -2
- package/out/__chunks__/{chunk-4QDHGYT4.mjs → chunk-SXECAH2A.mjs} +2 -2
- package/out/__chunks__/{chunk-NQ6SJRHZ.mjs → chunk-T2BUXSZ5.mjs} +2 -2
- package/out/__chunks__/{chunk-BVLXVOIC.mjs → chunk-T4BJTXVW.mjs} +2 -2
- package/out/__chunks__/{chunk-D5SD7UPB.mjs → chunk-U22MXHMS.mjs} +2 -2
- package/out/__chunks__/chunk-U7R4JK6U.mjs +2 -0
- package/out/__chunks__/{chunk-6RGWVDNQ.mjs → chunk-V4Z4FQJO.mjs} +2 -2
- package/out/__chunks__/{chunk-3NFKZZ7W.mjs → chunk-VTJUZ3TY.mjs} +2 -2
- package/out/__chunks__/{chunk-MRV6OG7P.mjs → chunk-VWYDJFJH.mjs} +2 -2
- package/out/__chunks__/{chunk-BG6QTPZ4.mjs → chunk-XALHL7VA.mjs} +2 -2
- package/out/__chunks__/chunk-XLVZQDL3.mjs +2 -0
- package/out/__chunks__/chunk-XTJQ2D6K.mjs +2 -0
- package/out/__chunks__/{chunk-2SIHYJET.mjs → chunk-XVAA5JSP.mjs} +2 -2
- package/out/__chunks__/{chunk-BOAJJ4FX.mjs → chunk-XVFVG64Y.mjs} +2 -2
- package/out/__chunks__/chunk-YMNKYTXZ.mjs +2 -0
- package/out/__chunks__/chunk-YNEVRTJM.mjs +2 -0
- package/out/__chunks__/chunk-YRCMHPYS.mjs +2 -0
- package/out/__chunks__/{chunk-WPXNKIUP.mjs.map → chunk-YRCMHPYS.mjs.map} +3 -3
- package/out/__chunks__/{chunk-FZFKEGPM.mjs → chunk-YUIJMELA.mjs} +2 -2
- package/out/__chunks__/chunk-ZU7V2CMU.mjs +2 -0
- 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.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/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.js +15 -5
- package/out/managers/TransactionManager/TransactionManager.js.map +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/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/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/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/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.js +1 -5
- package/out/providers/ProviderFactory.js.map +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/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-4AKPP7B3.mjs +0 -2
- package/out/__chunks__/chunk-4YZQBDUE.mjs +0 -2
- package/out/__chunks__/chunk-4ZZJX7E7.mjs +0 -2
- package/out/__chunks__/chunk-5LB2KNTP.mjs +0 -2
- package/out/__chunks__/chunk-5OM6KD5S.mjs +0 -2
- package/out/__chunks__/chunk-6GNNYFMN.mjs +0 -2
- package/out/__chunks__/chunk-6ZL2QC74.mjs +0 -2
- package/out/__chunks__/chunk-CBF72LQF.mjs +0 -2
- package/out/__chunks__/chunk-CIY7IH2N.mjs +0 -2
- package/out/__chunks__/chunk-DGYPNF4O.mjs +0 -2
- package/out/__chunks__/chunk-E7BYYSVM.mjs +0 -2
- package/out/__chunks__/chunk-I37JLMZH.mjs +0 -2
- package/out/__chunks__/chunk-IBSC2B7Q.mjs +0 -2
- package/out/__chunks__/chunk-L4QPPHVR.mjs +0 -2
- package/out/__chunks__/chunk-N2RYRHHL.mjs +0 -2
- package/out/__chunks__/chunk-PHNC5JMP.mjs.map +0 -7
- package/out/__chunks__/chunk-RSUHZ7IH.mjs +0 -2
- package/out/__chunks__/chunk-WPXNKIUP.mjs +0 -2
- package/out/__chunks__/chunk-YA5U6YEL.mjs +0 -2
- package/out/__chunks__/chunk-Z4OHB36I.mjs +0 -2
- /package/out/__chunks__/{chunk-BQ2I655N.mjs.map → chunk-36VCBI2F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YA5U6YEL.mjs.map → chunk-4X3GF5DF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SLH6IQJJ.mjs.map → chunk-54I7T2PP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B7ZKW5ML.mjs.map → chunk-5ECETGF7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4YZQBDUE.mjs.map → chunk-62EX26PE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HXXZKQRJ.mjs.map → chunk-673M5M6E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CJQAA4EP.mjs.map → chunk-6EBIYJLF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IXUYZYD2.mjs.map → chunk-6IACSXVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IBSC2B7Q.mjs.map → chunk-6JEPIISC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U34BNBOX.mjs.map → chunk-6RAMYSEC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QSYQIJEO.mjs.map → chunk-6RJQVLIY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JZ7434LN.mjs.map → chunk-6TJVNG7O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-42LFLNPA.mjs.map → chunk-6W67LK22.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4YU2DWHA.mjs.map → chunk-7D7CRUIW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ISPOZQQO.mjs.map → chunk-A4RNPJJW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GFTTAANM.mjs.map → chunk-A6IG4DO6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HUITKXBO.mjs.map → chunk-AZMKY66I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RBUHL65H.mjs.map → chunk-BVKUZJNB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ZL2QC74.mjs.map → chunk-C5X7N2AN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4ZZJX7E7.mjs.map → chunk-C6NGX4MC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NPZ5PO2W.mjs.map → chunk-COZTBWPH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-INWUHEQN.mjs.map → chunk-CQ5GZXM5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CBF72LQF.mjs.map → chunk-D5IP4ZG2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VFAKQ7NM.mjs.map → chunk-DIV6ZH5K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6D2RBTVV.mjs.map → chunk-DPUWJW5E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6P7EXGAB.mjs.map → chunk-EVTERXBU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5OM6KD5S.mjs.map → chunk-FZS7JL2U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YO3ATAA6.mjs.map → chunk-HCAXI2LY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RFKBUN7S.mjs.map → chunk-I6BAZCYU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5LB2KNTP.mjs.map → chunk-I7NIOE4D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZWVYAOKB.mjs.map → chunk-ICZ6YALG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BHAZ2W52.mjs.map → chunk-IHKF4UNO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ID7WYMJZ.mjs.map → chunk-IP3MMHXY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-745QCLQC.mjs.map → chunk-JESUVU73.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GT2HLNE7.mjs.map → chunk-JQ47IJOB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O2DO3WJJ.mjs.map → chunk-JQTCROGW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KSMSBTTQ.mjs.map → chunk-KDCMWWIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P32DZ2CO.mjs.map → chunk-KGXIPD5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CVPP4HQE.mjs.map → chunk-KIQBMB2Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-254WMLVS.mjs.map → chunk-KO5KDKZ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V2C7APME.mjs.map → chunk-KU74A6T3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I37JLMZH.mjs.map → chunk-KZC44J42.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FAOCLLIW.mjs.map → chunk-LTHGO7JM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NJPTQNCT.mjs.map → chunk-M7EUMCPG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2EFXW7IG.mjs.map → chunk-MD7CSIXL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4XP7BVJD.mjs.map → chunk-MELQLFCR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VXLJWKLG.mjs.map → chunk-MFK6BEXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6G7ATMU7.mjs.map → chunk-MOOY3SNQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I6BXGQLQ.mjs.map → chunk-MYSCFOXV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XPYJSDNF.mjs.map → chunk-O4DQ3TWG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2S5FRZJR.mjs.map → chunk-OZCEAS6L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TNXSVX5O.mjs.map → chunk-PFXB2A66.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CIY7IH2N.mjs.map → chunk-PO27JYMA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E7BYYSVM.mjs.map → chunk-PQY2A63Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4TZC3NF3.mjs.map → chunk-QZGJ5DCM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YKRSCVRE.mjs.map → chunk-R5SGFTE7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FSCOQWQN.mjs.map → chunk-ROYSFSCI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H7BJSM6C.mjs.map → chunk-RT44V62F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S4WKQEYF.mjs.map → chunk-RU7LAHKK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VQAKIVIO.mjs.map → chunk-RVEEVVOA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AF2QSDSV.mjs.map → chunk-SRX2EMTG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4QDHGYT4.mjs.map → chunk-SXECAH2A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NQ6SJRHZ.mjs.map → chunk-T2BUXSZ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BVLXVOIC.mjs.map → chunk-T4BJTXVW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D5SD7UPB.mjs.map → chunk-U22MXHMS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DGYPNF4O.mjs.map → chunk-U7R4JK6U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6RGWVDNQ.mjs.map → chunk-V4Z4FQJO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3NFKZZ7W.mjs.map → chunk-VTJUZ3TY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MRV6OG7P.mjs.map → chunk-VWYDJFJH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BG6QTPZ4.mjs.map → chunk-XALHL7VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z4OHB36I.mjs.map → chunk-XLVZQDL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N2RYRHHL.mjs.map → chunk-XTJQ2D6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2SIHYJET.mjs.map → chunk-XVAA5JSP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BOAJJ4FX.mjs.map → chunk-XVFVG64Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4AKPP7B3.mjs.map → chunk-YMNKYTXZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RSUHZ7IH.mjs.map → chunk-YNEVRTJM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FZFKEGPM.mjs.map → chunk-YUIJMELA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6GNNYFMN.mjs.map → chunk-ZU7V2CMU.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-LTHGO7JM.mjs";import{a as c}from"./chunk-PO27JYMA.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-KO5KDKZ7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-MD7CSIXL.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-KU74A6T3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-PO27JYMA.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-MYSCFOXV.mjs";import{u as n}from"./chunk-SXECAH2A.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LTHGO7JM.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-O4DQ3TWG.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-M7EUMCPG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-IP3MMHXY.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MD7CSIXL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-XVFVG64Y.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-MELQLFCR.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-SXECAH2A.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-MFK6BEXF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-SXECAH2A.mjs";import{a as n}from"./chunk-QJSB5NX4.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-MOOY3SNQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ot}from"./chunk-6GNNYFMN.mjs";import{a as ut}from"./chunk-6UZHM5LW.mjs";import{a as L}from"./chunk-NQ6SJRHZ.mjs";import{a as lt}from"./chunk-B7ZKW5ML.mjs";import{a as S}from"./chunk-QSYQIJEO.mjs";import{a as X,b as Z,g as tt,l as st}from"./chunk-CAA4VJRH.mjs";import{a as dt}from"./chunk-RBUHL65H.mjs";import{b as C}from"./chunk-IXUYZYD2.mjs";import{a as Tt}from"./chunk-4ZZJX7E7.mjs";import{a as vt}from"./chunk-4ODPAHHA.mjs";import{a as ft}from"./chunk-Z5CDCI3Y.mjs";import{a as gt}from"./chunk-YO3ATAA6.mjs";import{a as g}from"./chunk-YA5U6YEL.mjs";import{a as Q}from"./chunk-6ZL2QC74.mjs";import{a as ct}from"./chunk-ID7WYMJZ.mjs";import{a as y}from"./chunk-INWUHEQN.mjs";import{a as b,f as mt}from"./chunk-ISPOZQQO.mjs";import{b as pt}from"./chunk-VXLJWKLG.mjs";import{d as at}from"./chunk-O2DO3WJJ.mjs";import{k as et,l as it,n as nt}from"./chunk-65L5EBBL.mjs";import{a as w}from"./chunk-HORSXVIV.mjs";import{a as ht}from"./chunk-E7BYYSVM.mjs";import{a as J}from"./chunk-P32DZ2CO.mjs";import{a as I}from"./chunk-QTKK6OSJ.mjs";import{a as E}from"./chunk-6FXEHNGW.mjs";import{a as Et}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,s as u,u as Y}from"./chunk-4QDHGYT4.mjs";import{c as H,f as $}from"./chunk-QJSB5NX4.mjs";import{b as d}from"./chunk-VNLGNNIL.mjs";import{b as h}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-R53MCZI6.mjs";import{b as It}from"./chunk-QWV25ZSJ.mjs";import{a as rt}from"./chunk-4YU2DWHA.mjs";import{a as v}from"./chunk-S2FQWSUO.mjs";import _ from"lodash.isequal";import yt from"lodash.isequal";var Ot="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",A=class e extends ct{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!yt(a.transactionToasts,i.transactionToasts)||!yt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ot,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await L({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await ot.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){at(),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))}};import R from"bignumber.js";var x=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=d(t),{isExpired:o}=I(s?.nativeAuthToken);o?f().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=d(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=f(),s=H(this.store.getState()),o=t.getType()===v.webview;if(!s||o)return;this.addLogoutWarning();let i=d(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=I(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let W=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},W.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},W.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=h(this.store.getState()),s=d(this.store.getState()),{secondsUntilExpires:o}=I(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=ut(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await E({address:e,baseURL:s});if(!o)throw new Error("Account not found");pt({address:e,providerType:t.getType()});let i={...o,username:w(o.username),nonce:y(o)};b(i),await C(e),S(),o.shard!=null&&await lt({shard:Number(o.shard),apiAddress:s})}async function Pt(e){let{network:{apiAddress:t}}=g();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=g(),i=J(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let m=i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:m});let l=await Tt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:l,provider:e,apiAddress:o}),{address:l,signature:c}}async function Lt(e,t){let s=h(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await Pt(e);return await C(o),S(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${Z}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${X}-${Date.now()}`}},Rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function k(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return N({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function bt({provider:e,transactions:t,options:s={}}){await Ct();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=ht(),a=e.getType()===v.ledger,c=vt({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return mt(n+m.length),m}var M=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await Lt(this.provider,t);return V(this.provider.getType()),St(this),x.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await dt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await bt({provider:this.provider,transactions:t,options:s})}catch(o){let i=k(o);throw new Error(i)}}async signMessage(t,s){try{return await gt({provider:this.provider,message:t,options:s})}catch(o){let i=k(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ft(t)}cancelLogin(){this.provider.cancelLogin?.()}};var wt=null;function St(e){wt=e}function f(){return wt||new M(It)}var Ut=async()=>{try{let e=Q(),{network:t}=g();try{let s=await E({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:w(s.username),nonce:y(s)};return b(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function Ct(){let e=f();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var O={},T={},kt=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},F=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},At=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},xt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:Et(t),toastId:s})},!1,"addTransactionToast"),s},P=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete O[e]},N=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(O[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(kt(e,o),o)};var Nt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Nt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{P(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{F(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Nt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=A.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!_(i.transactionToasts,s.transactionToasts)||!_(n,o))&&await this.updateTransactionToastsList(),_(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=nt(i),a=it(i),c=et(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=xt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=N(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await L({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:O[s.toastId]};this.customToasts.push(i),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 rt.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&P(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))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),F(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),At(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{A as a,O as b,T as c,kt as d,F as e,At as f,Go as g,xt as h,P as i,N as j,D as k,p as l,x as m,B as n,Lt as o,k as p,bt as q,M as r,St as s,f as t,Ct as u};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as ot}from"./chunk-ZU7V2CMU.mjs";import{a as ut}from"./chunk-6UZHM5LW.mjs";import{a as L}from"./chunk-T2BUXSZ5.mjs";import{a as lt}from"./chunk-5ECETGF7.mjs";import{a as S}from"./chunk-6RJQVLIY.mjs";import{a as X,b as Z,g as tt,l as st}from"./chunk-CAA4VJRH.mjs";import{a as dt}from"./chunk-BVKUZJNB.mjs";import{b as C}from"./chunk-6IACSXVX.mjs";import{a as Tt}from"./chunk-C6NGX4MC.mjs";import{a as vt}from"./chunk-4ODPAHHA.mjs";import{a as ft}from"./chunk-Z5CDCI3Y.mjs";import{a as gt}from"./chunk-HCAXI2LY.mjs";import{a as g}from"./chunk-4X3GF5DF.mjs";import{a as Q}from"./chunk-C5X7N2AN.mjs";import{a as ct}from"./chunk-IP3MMHXY.mjs";import{a as y}from"./chunk-CQ5GZXM5.mjs";import{a as b,f as mt}from"./chunk-A4RNPJJW.mjs";import{b as pt}from"./chunk-MFK6BEXF.mjs";import{d as at}from"./chunk-JQTCROGW.mjs";import{k as et,l as it,n as nt}from"./chunk-65L5EBBL.mjs";import{a as w}from"./chunk-HORSXVIV.mjs";import{a as ht}from"./chunk-PQY2A63Y.mjs";import{a as J}from"./chunk-KGXIPD5I.mjs";import{a as I}from"./chunk-QTKK6OSJ.mjs";import{a as E}from"./chunk-6FXEHNGW.mjs";import{a as Et}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,s as u,u as Y}from"./chunk-SXECAH2A.mjs";import{c as H,f as $}from"./chunk-QJSB5NX4.mjs";import{b as d}from"./chunk-VNLGNNIL.mjs";import{b as h}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-R53MCZI6.mjs";import{b as It}from"./chunk-QWV25ZSJ.mjs";import{a as rt}from"./chunk-7D7CRUIW.mjs";import{a as v}from"./chunk-S2FQWSUO.mjs";import _ from"lodash.isequal";import yt from"lodash.isequal";var Ot="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",A=class e extends ct{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){p.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!yt(a.transactionToasts,i.transactionToasts)||!yt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ot,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=p.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await L({toastList:i,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await ot.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){at(),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))}};import R from"bignumber.js";var x=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=d(t),{isExpired:o}=I(s?.nativeAuthToken);o?f().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=d(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=f(),s=H(this.store.getState()),o=t.getType()===v.webview;if(!s||o)return;this.addLogoutWarning();let i=d(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=I(i?.nativeAuthToken),c=new R(String(n)),r=`${s}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let W=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},W.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},W.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=h(this.store.getState()),s=d(this.store.getState()),{secondsUntilExpires:o}=I(s?.nativeAuthToken),i=new R(String(o)),n=i.times(1e3);if(!o||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=ut(n.toNumber()),l=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{p.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},l)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await E({address:e,baseURL:s});if(!o)throw new Error("Account not found");pt({address:e,providerType:t.getType()});let i={...o,username:w(o.username),nonce:y(o)};b(i),await C(e),S(),o.shard!=null&&await lt({shard:Number(o.shard),apiAddress:s})}async function Pt(e){let{network:{apiAddress:t}}=g();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=g(),i=J(t),n=s;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let m=i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:m});let l=await Tt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:l,provider:e,apiAddress:o}),{address:l,signature:c}}async function Lt(e,t){let s=h(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await Pt(e);return await C(o),S(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${Z}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${X}-${Date.now()}`}},Rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function k(e,t="error"){let s=e?.message,o=Bt(s),n=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return N({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:m}),o}async function bt({provider:e,transactions:t,options:s={}}){await Ct();let{isGuarded:o,activeGuardianAddress:i,nonce:n}=ht(),a=e.getType()===v.ledger,c=vt({latestNonce:n,transactions:t}),r=i&&o&&!s.skipGuardian?c?.map(l=>(l.version=G.withTxOptions().valueOf(),l.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),l.guardian=K.newFromBech32(i),l)):c,m=await e.signTransactions(r)??[];return mt(n+m.length),m}var M=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let s=await Lt(this.provider,t);return V(this.provider.getType()),St(this),x.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let s=await dt({provider:this.provider,options:t});return this._isLoggingOut=!1,s}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await bt({provider:this.provider,transactions:t,options:s})}catch(o){let i=k(o);throw new Error(i)}}async signMessage(t,s){try{return await gt({provider:this.provider,message:t,options:s})}catch(o){let i=k(o,"warning");throw new Error(i)}}async verifyMessage(t){return await ft(t)}cancelLogin(){this.provider.cancelLogin?.()}};var wt=null;function St(e){wt=e}function f(){return wt||new M(It)}var Ut=async()=>{try{let e=Q(),{network:t}=g();try{let s=await E({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:w(s.username),nonce:y(s)};return b(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function Ct(){let e=f();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var O={},T={},kt=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${o+1}`,n=s.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){s.customToasts[n]=a;return}s.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},F=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},At=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},xt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let i=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${i+1}`,o.transactionToasts.push({startTime:j(),endTime:Et(t),toastId:s})},!1,"addTransactionToast"),s},P=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete O[e]},N=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(O[o]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),o):(kt(e,o),o)};var Nt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Nt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{P(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{F(t);let i=T[t];i?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Nt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var p=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=A.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:i,transactions:n})=>{(!_(i.transactionToasts,s.transactionToasts)||!_(n,o))&&await this.updateTransactionToastsList(),_(i.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:i}=o,n=nt(i),a=it(i),c=et(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=xt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=N(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await L({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let i="message"in s?{...s}:{...s,instantiateToastElement:O[s.toastId]};this.customToasts.push(i),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 rt.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&P(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))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),F(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),At(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{A as a,O as b,T as c,kt as d,F as e,At as f,Go as g,xt as h,P as i,N as j,D as k,p as l,x as m,B as n,Lt as o,k as p,bt as q,M as r,St as s,f as t,Ct as u};
|
|
2
|
+
//# sourceMappingURL=chunk-MYSCFOXV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-RT44V62F.mjs";import{a as p}from"./chunk-6TJVNG7O.mjs";import{a as d}from"./chunk-YNEVRTJM.mjs";import{a as T}from"./chunk-LUDF7ZUR.mjs";var f=a=>a.sort((i,o)=>o.timestamp-i.timestamp),H=async({transactions:a,address:i,explorerAddress:o,egldLabel:g})=>{let e=[],r=[];if(a.forEach(s=>{let t=d(s.hash);t?e.push(t):r.push(s.hash)}),r.length===0)return f(e);let c=await h(r),I=c.map(s=>s.txHash),m=r.filter(s=>!I.includes(s));if(m.length>0){let t=a.filter(n=>m.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...t)}return c.forEach(s=>{let t=T({transaction:s,address:i,explorerAddress:o,egldLabel:g});t.status!=="pending"&&p({key:`transaction-${s.txHash}`,value:t}),e.push(t)}),f(e)};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O4DQ3TWG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-KU74A6T3.mjs";import{a as e}from"./chunk-C5X7N2AN.mjs";import{a as i}from"./chunk-TI73UXGG.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-OZCEAS6L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as f}from"./chunk-HVEI4BFC.mjs";import{s as n}from"./chunk-MYSCFOXV.mjs";import{u as t}from"./chunk-SXECAH2A.mjs";import{d as i}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-S2FQWSUO.mjs";import{a as m}from"./chunk-R5SGFTE7.mjs";async function I(){let o=m()?e.webview:i(t());if(!o)return;let r=await f.create({type:o});if(!r)throw new Error("Provider not found");o===e.webview&&r.isInitialized()&&await r.login(),n(r)}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PFXB2A66.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.2'; // will be replaced at build time\n"],
|
|
5
5
|
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
6
|
"names": ["safeWindow", "version"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-PWEOLD6L.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QZGJ5DCM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-QZGJ5DCM.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-R5SGFTE7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-KIQBMB2Y.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-ROYSFSCI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{u as e}from"./chunk-SXECAH2A.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RT44V62F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-KDCMWWIT.mjs";import{a as T}from"./chunk-P3BXXGQA.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-EQEYL6AE.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-RU7LAHKK.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{t as g}from"./chunk-MYSCFOXV.mjs";import{s as u}from"./chunk-SXECAH2A.mjs";import{a as p}from"./chunk-QJSB5NX4.mjs";import{a as h,c as l,g as c}from"./chunk-R53MCZI6.mjs";import{a as y}from"./chunk-PWEOLD6L.mjs";var M=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=u();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){y.addEventListener("message",this.handleMessage)}stopListening(){y.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=p(this.store.getState()),r=g(),n=new c({address:new l(t),data:new Uint8Array(Buffer.from(a))}),d=(await r.signMessage(n))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(d).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=p(this.store.getState()),{message:t}=s;try{let r=new c({address:new l(a),data:new Uint8Array(Buffer.from(t))}),d=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(d).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(n=>h.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RVEEVVOA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-V4Z4FQJO.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-SRX2EMTG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{f as a}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s,f as l}from"./chunk-QJSB5NX4.mjs";import{f as a}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-YMNKYTXZ.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as g,b as c}from"./chunk-7BP53CXF.mjs";import{a as f,b as m}from"./chunk-X4XULIVT.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as p}from"./chunk-R53MCZI6.mjs";import{createJSONStorage as h,devtools as O,persist as V}from"zustand/middleware";import{immer as H}from"zustand/middleware/immer";import{createStore as N}from"zustand/vanilla";var A=e=>{e.account=g,e.loginInfo=f,e.transactions=d,e.toasts=S};function R(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),n=a(e),{address:i,publicKey:M}=s(e);if(i&&M!==new p(i).hex()&&A(e),!t)return;if(n==null){w(R());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=N(O(V(H((...n)=>({network:x(...n),account:c(...n),loginInfo:m(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:h(e)})));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new v)),r),ae=(e=k)=>D(z(e)),pe=()=>o().getState();var fe=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),me=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletLogin=e},!1,"setWalletLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),Te=e=>o().setState(({loginInfo:t})=>{t.logoutRoute=e},!1,"setLogoutRoute"),ye=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{fe as a,me as b,Se as c,ue as d,de as e,Le as f,xe as g,Te as h,ye as i,E as j,b as k,A as l,R as m,w as n,C as o,W as p,z as q,D as r,o as s,ae as t,pe as u};
|
|
2
|
+
//# sourceMappingURL=chunk-SXECAH2A.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I}from"./chunk-PJDJEPY2.mjs";import{a as l}from"./chunk-6JEPIISC.mjs";import{a as f}from"./chunk-XLVZQDL3.mjs";import{j as m,k as d,l as p,n as u}from"./chunk-65L5EBBL.mjs";import{a as T}from"./chunk-O4DQ3TWG.mjs";var q=async({toastList:S,transactionsSessions:g,account:o,existingCompletedTransactions:y=[]})=>{let n=[],a=[...y],r=l(),F=f();for(let t of S.transactionToasts){let e=g[t.toastId];if(!e?.status)continue;let{status:s,transactions:C,transactionsDisplayInfo:P}=e,x=await T({transactions:C,address:o.address,explorerAddress:r,egldLabel:F}),A=u(s),E=p(s),L=d(s),i=A||E||L,v=m(s),{startTime:R,endTime:b}=t;if(i&&a.some(h=>h.toastId===t.toastId))continue;let c=I({toastId:t.toastId,address:o.address,status:s,transactions:x,transactionsDisplayInfo:P,explorerAddress:r,startTime:R,endTime:b});i&&a.push(c),v&&n.push(c)}return{pendingTransactionToasts:n,completedTransactionToasts:a}};export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-T2BUXSZ5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-BETSOJFK.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
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-BETSOJFK.mjs";import{a as w}from"./chunk-YTFYVPZO.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-JQ47IJOB.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-MYSCFOXV.mjs";import{a as L}from"./chunk-6JEPIISC.mjs";import{a as h}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-PWEOLD6L.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-T4BJTXVW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-OZCEAS6L.mjs";import{a as o}from"./chunk-S2FQWSUO.mjs";import{a as e,b as t}from"./chunk-PWEOLD6L.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-U22MXHMS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{u as r}from"./chunk-SXECAH2A.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-V4Z4FQJO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-FKBLKOLI.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as o}from"./chunk-PQY2A63Y.mjs";import{u as n}from"./chunk-SXECAH2A.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var w=async r=>{let{isGuarded:s}=o();if(!i({isGuarded:s,transactions:r}))return r;let a=r[0].getSender().bech32().toString(),{walletAddress:d}=e(n());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VTJUZ3TY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-IP3MMHXY.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-VWYDJFJH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-FZS7JL2U.mjs";import{a as b}from"./chunk-COZTBWPH.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-T4BJTXVW.mjs";import{a as I}from"./chunk-AV4HSXYZ.mjs";import{a as j}from"./chunk-YTFYVPZO.mjs";import{a as _}from"./chunk-VTJUZ3TY.mjs";import{a as A}from"./chunk-VWYDJFJH.mjs";import{a as O}from"./chunk-XLVZQDL3.mjs";import{u as x}from"./chunk-SXECAH2A.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-J4CPYFK6.mjs";import{a as w}from"./chunk-R53MCZI6.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:E,username:h}}=B(),g=v(x()),C=O(),{allTransactions:e,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(e.map(t=>t.transaction));let l=Y?.price,a=0,T=async()=>{let c=e[a]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:r,tokenTransaction:o,fungibleTransaction:s}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:h,shard:E,signedIndexes:p,parsedTransactionsByDataField:L});o&&n.updateTokenTransaction(o),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(r)}catch(r){console.error(`Error fetching common data for transaction at index ${a}:`,r)}finally{n.updateIsLoading(!1)}},$=()=>{a>0&&(a--,T())},q=(t=0)=>{let i=e[a].transaction,r=Number(i.nonce);n.updateGasPriceMap({nonce:r,ppu:t}),n.updateCommonData({ppu:t});let o=i.toPlainObject(),s=I({transaction:o,gasPriceData:n.ppuMap[r]}),P=w.newFromPlainObject({...o,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:t})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{a<n.transactionsCount-1&&(a++,T())},Q=async()=>{let c=e[a].transaction,i=Number(c.nonce),{commonData:r}=await D({allTransactions:e,currentScreenIndex:a,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:h,shard:E,signedIndexes:p,parsedTransactionsByDataField:L});if(!r.needsSigning)return p.push(a),f();let o=c.toPlainObject(),s=o.nonce,P=I({transaction:o,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...o,gasPrice:P});try{let m=await H([u]);m&&(p.push(a),d.push(m[0]));let nn=a===e.length-1,an=e.filter(S=>S.needsSigning),tn=d.length===an.length;if(nn&&tn){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[t,c]of V)n.subscribeToEventBus(t,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XALHL7VA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-PQY2A63Y.mjs";import{a as f}from"./chunk-KGXIPD5I.mjs";import{a as g}from"./chunk-KIQBMB2Y.mjs";import{b as a}from"./chunk-SXECAH2A.mjs";import{c as s,g as r}from"./chunk-R53MCZI6.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XVAA5JSP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-7D7CRUIW.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-XVFVG64Y.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as w}from"./chunk-MOOY3SNQ.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as y}from"./chunk-MYSCFOXV.mjs";import{h as l}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as f}from"./chunk-JQTCROGW.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-PQY2A63Y.mjs";import{u as d}from"./chunk-SXECAH2A.mjs";import{b as p}from"./chunk-SAAOQW7P.mjs";import{e as T}from"./chunk-R53MCZI6.mjs";import A from"axios";var o=class o{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(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=g(n),s=f({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:e??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let c=w(a);return y({toastId:s,totalDuration:c}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=p(d()),e=a.map(r=>A.post(`${t}/transactions`,r.toPlainObject(),{timeout:Number(n)})),s=await Promise.all(e),c=new T;return s.map(({data:r})=>({...a.find(x=>c.computeTransactionHash(x)===r.txHash)?.toPlainObject(),...r,status:"pending",hash:r.txHash}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:e}=p(d());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),i={transactions:a.map(m=>m.map(u=>this.parseSignedTransaction(u))),id:s},{data:r}=await A.post(`${n}/batch`,i,{timeout:Number(e)});return{data:r}};this.buildBatchId=a=>`${Date.now().toString()}${l}${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 T,n={...a.toPlainObject(),hash:t.computeTransactionHash(a),status:"pending"};return b({data:n.data})&&(delete n.senderUsername,delete n.receiverUsername),n}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};o.instance=null;var v=o;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YRCMHPYS.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/managers/TransactionManager/TransactionManager.ts"],
|
|
4
|
-
"sourcesContent": ["import axios, { AxiosError } from 'axios';\nimport { BATCH_TRANSACTIONS_ID_SEPARATOR } from 'constants/transactions.constants';\nimport { Transaction, TransactionComputer } from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport { TransactionTrackingConfigType } from 'methods/initApp/initApp.types';\nimport { addTransactionToast } from 'store/actions/toasts/toastsActions';\nimport { createTransactionsSession } from 'store/actions/transactions/transactionsActions';\nimport { networkSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { BatchTransactionsResponseType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { isGuardianTx } from 'utils/transactions/isGuardianTx';\nimport { getToastDuration } from './helpers/getToastDuration';\nimport { getTransactionsSessionStatus } from './helpers/getTransactionsStatus';\nimport { isBatchTransaction } from './helpers/isBatchTransaction';\nimport { registerSessionCallbacks } from './helpers/sessionCallbacks';\nimport { TransactionManagerTrackOptionsType } from './TransactionManager.types';\n\nexport class TransactionManager {\n private static instance: TransactionManager | null = null;\n\n public static getInstance(): TransactionManager {\n if (!TransactionManager.instance) {\n TransactionManager.instance = new TransactionManager();\n }\n return TransactionManager.instance;\n }\n\n /**\n * Set callbacks to be executed when the transaction session is successful or fails.\n * @param onSuccess - The callback to run when the transaction session is successful.\n * @param onFail - The callback to run when the transaction session fails.\n * @example\n * ```ts\n * TransactionManager.setCallbacks({\n * onSuccess: (sessionId) => {\n * console.log('Transaction session successful', sessionId);\n * },\n * });\n */\n public setCallbacks = ({\n onSuccess,\n onFail\n }: TransactionTrackingConfigType) => {\n registerSessionCallbacks({ onSuccess, onFail });\n };\n\n public send = async (\n signedTransactions: Transaction[] | Transaction[][]\n ): Promise<SignedTransactionType[] | SignedTransactionType[][]> => {\n if (signedTransactions.length === 0) {\n throw new Error('No transactions to send');\n }\n\n try {\n if (!isBatchTransaction(signedTransactions)) {\n const flatTransactions =\n await this.sendSignedTransactions(signedTransactions);\n\n return flatTransactions;\n }\n\n const sentTransactions =\n await this.sendSignedBatchTransactions(signedTransactions);\n\n if (!sentTransactions.data || sentTransactions.data.error) {\n throw new Error(\n sentTransactions.data?.error ?? 'Failed to send transactions'\n );\n }\n\n const groupedTransactions = sentTransactions.data.transactions;\n\n return groupedTransactions;\n } catch (error) {\n const responseData = <{ message: string }>(\n (error as AxiosError).response?.data\n );\n throw responseData?.message ?? (error as any).message;\n }\n };\n\n public track = async (\n sentTransactions: SignedTransactionType[] | SignedTransactionType[][],\n options: TransactionManagerTrackOptionsType = { disableToasts: false }\n ): Promise<string> => {\n const flatTransactions = this.sequentialToFlatArray(sentTransactions).map(\n (transaction) => ({\n ...transaction,\n status: transaction.status ?? TransactionServerStatusesEnum.pending\n })\n );\n\n const status = getTransactionsSessionStatus(flatTransactions);\n\n const sessionId = createTransactionsSession({\n transactions: flatTransactions,\n transactionsDisplayInfo: options.transactionsDisplayInfo,\n status: status ?? TransactionBatchStatusesEnum.sent,\n sessionInformation: options.sessionInformation\n });\n\n if (options.disableToasts === true) {\n return sessionId;\n }\n\n const totalDuration = getToastDuration(sentTransactions);\n addTransactionToast({\n toastId: sessionId,\n totalDuration\n });\n\n return sessionId;\n };\n\n private readonly sendSignedTransactions = async (\n signedTransactions: Transaction[]\n ): Promise<SignedTransactionType[]> => {\n const { apiAddress, apiTimeout } = networkSelector(getState());\n\n const promises = signedTransactions.map((transaction) =>\n axios.post(`${apiAddress}/transactions`, transaction.toPlainObject(), {\n timeout: Number(apiTimeout)\n })\n );\n\n const response = await Promise.all(promises);\n\n
|
|
5
|
-
"mappings": "4eAAA,OAAOA,MAA2B,QAsB3B,IAAMC,EAAN,MAAMA,CAAmB,CAAzB,cAsBL,KAAO,aAAe,CAAC,CACrB,UAAAC,EACA,OAAAC,CACF,IAAqC,CACnCC,EAAyB,CAAE,UAAAF,EAAW,OAAAC,CAAO,CAAC,CAChD,EAEA,KAAO,KAAO,MACZE,GACiE,CACjE,GAAIA,EAAmB,SAAW,EAChC,MAAM,IAAI,MAAM,yBAAyB,EAG3C,GAAI,CACF,GAAI,CAACC,EAAmBD,CAAkB,EAIxC,OAFE,MAAM,KAAK,uBAAuBA,CAAkB,EAKxD,IAAME,EACJ,MAAM,KAAK,4BAA4BF,CAAkB,EAE3D,GAAI,CAACE,EAAiB,MAAQA,EAAiB,KAAK,MAClD,MAAM,IAAI,MACRA,EAAiB,MAAM,OAAS,6BAClC,EAKF,OAF4BA,EAAiB,KAAK,YAGpD,OAASC,EAAO,CAId,MAFGA,EAAqB,UAAU,MAEd,SAAYA,EAAc,OAChD,CACF,EAEA,KAAO,MAAQ,MACbD,EACAE,EAA8C,CAAE,cAAe,EAAM,IACjD,CACpB,IAAMC,EAAmB,KAAK,sBAAsBH,CAAgB,EAAE,IACnEI,IAAiB,CAChB,GAAGA,EACH,OAAQA,EAAY,iBACtB,EACF,EAEMC,EAASC,EAA6BH,CAAgB,EAEtDI,EAAYC,EAA0B,CAC1C,aAAcL,EACd,wBAAyBD,EAAQ,wBACjC,OAAQG,UACR,mBAAoBH,EAAQ,kBAC9B,CAAC,EAED,GAAIA,EAAQ,gBAAkB,GAC5B,OAAOK,EAGT,IAAME,EAAgBC,EAAiBV,CAAgB,EACvD,OAAAW,EAAoB,CAClB,QAASJ,EACT,cAAAE,CACF,CAAC,EAEMF,CACT,EAEA,KAAiB,uBAAyB,MACxCT,GACqC,CACrC,GAAM,CAAE,WAAAc,EAAY,WAAAC,CAAW,EAAIC,EAAgBC,EAAS,CAAC,EAEvDC,EAAWlB,EAAmB,IAAKM,GACvCa,EAAM,KAAK,GAAGL,CAAU,gBAAiBR,EAAY,cAAc,EAAG,CACpE,QAAS,OAAOS,CAAU,CAC5B,CAAC,CACH,
|
|
6
|
-
"names": ["axios", "_TransactionManager", "onSuccess", "onFail", "registerSessionCallbacks", "signedTransactions", "isBatchTransaction", "sentTransactions", "error", "options", "flatTransactions", "transaction", "status", "getTransactionsSessionStatus", "sessionId", "createTransactionsSession", "totalDuration", "getToastDuration", "addTransactionToast", "apiAddress", "apiTimeout", "networkSelector", "getState", "promises", "axios", "data", "address", "getAccount", "batchId", "payload", "transactions", "BATCH_TRANSACTIONS_ID_SEPARATOR", "signedTransaction", "
|
|
4
|
+
"sourcesContent": ["import axios, { AxiosError } from 'axios';\nimport { BATCH_TRANSACTIONS_ID_SEPARATOR } from 'constants/transactions.constants';\nimport { Transaction, TransactionComputer } from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport { TransactionTrackingConfigType } from 'methods/initApp/initApp.types';\nimport { addTransactionToast } from 'store/actions/toasts/toastsActions';\nimport { createTransactionsSession } from 'store/actions/transactions/transactionsActions';\nimport { networkSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { BatchTransactionsResponseType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { isGuardianTx } from 'utils/transactions/isGuardianTx';\nimport { getToastDuration } from './helpers/getToastDuration';\nimport { getTransactionsSessionStatus } from './helpers/getTransactionsStatus';\nimport { isBatchTransaction } from './helpers/isBatchTransaction';\nimport { registerSessionCallbacks } from './helpers/sessionCallbacks';\nimport { TransactionManagerTrackOptionsType } from './TransactionManager.types';\n\nexport class TransactionManager {\n private static instance: TransactionManager | null = null;\n\n public static getInstance(): TransactionManager {\n if (!TransactionManager.instance) {\n TransactionManager.instance = new TransactionManager();\n }\n return TransactionManager.instance;\n }\n\n /**\n * Set callbacks to be executed when the transaction session is successful or fails.\n * @param onSuccess - The callback to run when the transaction session is successful.\n * @param onFail - The callback to run when the transaction session fails.\n * @example\n * ```ts\n * TransactionManager.setCallbacks({\n * onSuccess: (sessionId) => {\n * console.log('Transaction session successful', sessionId);\n * },\n * });\n */\n public setCallbacks = ({\n onSuccess,\n onFail\n }: TransactionTrackingConfigType) => {\n registerSessionCallbacks({ onSuccess, onFail });\n };\n\n public send = async (\n signedTransactions: Transaction[] | Transaction[][]\n ): Promise<SignedTransactionType[] | SignedTransactionType[][]> => {\n if (signedTransactions.length === 0) {\n throw new Error('No transactions to send');\n }\n\n try {\n if (!isBatchTransaction(signedTransactions)) {\n const flatTransactions =\n await this.sendSignedTransactions(signedTransactions);\n\n return flatTransactions;\n }\n\n const sentTransactions =\n await this.sendSignedBatchTransactions(signedTransactions);\n\n if (!sentTransactions.data || sentTransactions.data.error) {\n throw new Error(\n sentTransactions.data?.error ?? 'Failed to send transactions'\n );\n }\n\n const groupedTransactions = sentTransactions.data.transactions;\n\n return groupedTransactions;\n } catch (error) {\n const responseData = <{ message: string }>(\n (error as AxiosError).response?.data\n );\n throw responseData?.message ?? (error as any).message;\n }\n };\n\n public track = async (\n sentTransactions: SignedTransactionType[] | SignedTransactionType[][],\n options: TransactionManagerTrackOptionsType = { disableToasts: false }\n ): Promise<string> => {\n const flatTransactions = this.sequentialToFlatArray(sentTransactions).map(\n (transaction) => ({\n ...transaction,\n status: transaction.status ?? TransactionServerStatusesEnum.pending\n })\n );\n\n const status = getTransactionsSessionStatus(flatTransactions);\n\n const sessionId = createTransactionsSession({\n transactions: flatTransactions,\n transactionsDisplayInfo: options.transactionsDisplayInfo,\n status: status ?? TransactionBatchStatusesEnum.sent,\n sessionInformation: options.sessionInformation\n });\n\n if (options.disableToasts === true) {\n return sessionId;\n }\n\n const totalDuration = getToastDuration(sentTransactions);\n addTransactionToast({\n toastId: sessionId,\n totalDuration\n });\n\n return sessionId;\n };\n\n private readonly sendSignedTransactions = async (\n signedTransactions: Transaction[]\n ): Promise<SignedTransactionType[]> => {\n const { apiAddress, apiTimeout } = networkSelector(getState());\n\n const promises = signedTransactions.map((transaction) =>\n axios.post(`${apiAddress}/transactions`, transaction.toPlainObject(), {\n timeout: Number(apiTimeout)\n })\n );\n\n const response = await Promise.all(promises);\n const transactionComputer = new TransactionComputer();\n\n const mergedTransactions = response.map(({ data }) => {\n const foundTransaction = signedTransactions.find((tx) => {\n const txHash = transactionComputer.computeTransactionHash(tx);\n return txHash === data.txHash;\n });\n\n const currentTransaction = {\n ...foundTransaction?.toPlainObject(),\n ...data,\n status: TransactionServerStatusesEnum.pending,\n hash: data.txHash\n };\n\n return currentTransaction;\n });\n\n return mergedTransactions;\n };\n\n private readonly sendSignedBatchTransactions = async (\n signedTransactions: Transaction[][]\n ) => {\n const { address } = getAccount();\n const { apiAddress, apiTimeout } = networkSelector(getState());\n\n if (!address) {\n return {\n error:\n 'Invalid address provided. You need to be logged in to send transactions'\n };\n }\n\n const batchId = this.buildBatchId(address);\n const parsedTransactions = signedTransactions.map((transactions) =>\n transactions.map((transaction) =>\n this.parseSignedTransaction(transaction)\n )\n );\n\n const payload = {\n transactions: parsedTransactions,\n id: batchId\n };\n\n const { data } = await axios.post<BatchTransactionsResponseType>(\n `${apiAddress}/batch`,\n payload,\n {\n timeout: Number(apiTimeout)\n }\n );\n\n return { data };\n };\n\n private readonly buildBatchId = (address: string) => {\n const sessionId = Date.now().toString();\n return `${sessionId}${BATCH_TRANSACTIONS_ID_SEPARATOR}${address}`;\n };\n private readonly sequentialToFlatArray = (\n transactions: SignedTransactionType[] | SignedTransactionType[][] = []\n ) =>\n this.getIsSequential(transactions)\n ? transactions.flat()\n : (transactions as SignedTransactionType[]);\n\n private readonly getIsSequential = (\n transactions?: SignedTransactionType[] | SignedTransactionType[][]\n ) => transactions?.every((transaction) => Array.isArray(transaction));\n\n private readonly parseSignedTransaction = (\n signedTransaction: Transaction\n ): SignedTransactionType => {\n const transactionComputer = new TransactionComputer();\n\n const parsedTransaction = {\n ...signedTransaction.toPlainObject(),\n hash: transactionComputer.computeTransactionHash(signedTransaction),\n status: TransactionServerStatusesEnum.pending\n };\n\n // Remove when the protocol supports usernames for guardian transactions\n if (isGuardianTx({ data: parsedTransaction.data })) {\n delete parsedTransaction.senderUsername;\n delete parsedTransaction.receiverUsername;\n }\n\n return parsedTransaction;\n };\n}\n"],
|
|
5
|
+
"mappings": "4eAAA,OAAOA,MAA2B,QAsB3B,IAAMC,EAAN,MAAMA,CAAmB,CAAzB,cAsBL,KAAO,aAAe,CAAC,CACrB,UAAAC,EACA,OAAAC,CACF,IAAqC,CACnCC,EAAyB,CAAE,UAAAF,EAAW,OAAAC,CAAO,CAAC,CAChD,EAEA,KAAO,KAAO,MACZE,GACiE,CACjE,GAAIA,EAAmB,SAAW,EAChC,MAAM,IAAI,MAAM,yBAAyB,EAG3C,GAAI,CACF,GAAI,CAACC,EAAmBD,CAAkB,EAIxC,OAFE,MAAM,KAAK,uBAAuBA,CAAkB,EAKxD,IAAME,EACJ,MAAM,KAAK,4BAA4BF,CAAkB,EAE3D,GAAI,CAACE,EAAiB,MAAQA,EAAiB,KAAK,MAClD,MAAM,IAAI,MACRA,EAAiB,MAAM,OAAS,6BAClC,EAKF,OAF4BA,EAAiB,KAAK,YAGpD,OAASC,EAAO,CAId,MAFGA,EAAqB,UAAU,MAEd,SAAYA,EAAc,OAChD,CACF,EAEA,KAAO,MAAQ,MACbD,EACAE,EAA8C,CAAE,cAAe,EAAM,IACjD,CACpB,IAAMC,EAAmB,KAAK,sBAAsBH,CAAgB,EAAE,IACnEI,IAAiB,CAChB,GAAGA,EACH,OAAQA,EAAY,iBACtB,EACF,EAEMC,EAASC,EAA6BH,CAAgB,EAEtDI,EAAYC,EAA0B,CAC1C,aAAcL,EACd,wBAAyBD,EAAQ,wBACjC,OAAQG,UACR,mBAAoBH,EAAQ,kBAC9B,CAAC,EAED,GAAIA,EAAQ,gBAAkB,GAC5B,OAAOK,EAGT,IAAME,EAAgBC,EAAiBV,CAAgB,EACvD,OAAAW,EAAoB,CAClB,QAASJ,EACT,cAAAE,CACF,CAAC,EAEMF,CACT,EAEA,KAAiB,uBAAyB,MACxCT,GACqC,CACrC,GAAM,CAAE,WAAAc,EAAY,WAAAC,CAAW,EAAIC,EAAgBC,EAAS,CAAC,EAEvDC,EAAWlB,EAAmB,IAAKM,GACvCa,EAAM,KAAK,GAAGL,CAAU,gBAAiBR,EAAY,cAAc,EAAG,CACpE,QAAS,OAAOS,CAAU,CAC5B,CAAC,CACH,EAEMK,EAAW,MAAM,QAAQ,IAAIF,CAAQ,EACrCG,EAAsB,IAAIC,EAkBhC,OAhB2BF,EAAS,IAAI,CAAC,CAAE,KAAAG,CAAK,KAMnB,CACzB,GANuBvB,EAAmB,KAAMwB,GACjCH,EAAoB,uBAAuBG,CAAE,IAC1CD,EAAK,MACxB,GAGsB,cAAc,EACnC,GAAGA,EACH,iBACA,KAAMA,EAAK,MACb,EAGD,CAGH,EAEA,KAAiB,4BAA8B,MAC7CvB,GACG,CACH,GAAM,CAAE,QAAAyB,CAAQ,EAAIC,EAAW,EACzB,CAAE,WAAAZ,EAAY,WAAAC,CAAW,EAAIC,EAAgBC,EAAS,CAAC,EAE7D,GAAI,CAACQ,EACH,MAAO,CACL,MACE,yEACJ,EAGF,IAAME,EAAU,KAAK,aAAaF,CAAO,EAOnCG,EAAU,CACd,aAPyB5B,EAAmB,IAAK6B,GACjDA,EAAa,IAAKvB,GAChB,KAAK,uBAAuBA,CAAW,CACzC,CACF,EAIE,GAAIqB,CACN,EAEM,CAAE,KAAAJ,CAAK,EAAI,MAAMJ,EAAM,KAC3B,GAAGL,CAAU,SACbc,EACA,CACE,QAAS,OAAOb,CAAU,CAC5B,CACF,EAEA,MAAO,CAAE,KAAAQ,CAAK,CAChB,EAEA,KAAiB,aAAgBE,GAExB,GADW,KAAK,IAAI,EAAE,SAAS,CACnB,GAAGK,CAA+B,GAAGL,CAAO,GAEjE,KAAiB,sBAAwB,CACvCI,EAAoE,CAAC,IAErE,KAAK,gBAAgBA,CAAY,EAC7BA,EAAa,KAAK,EACjBA,EAEP,KAAiB,gBACfA,GACGA,GAAc,MAAOvB,GAAgB,MAAM,QAAQA,CAAW,CAAC,EAEpE,KAAiB,uBACfyB,GAC0B,CAC1B,IAAMV,EAAsB,IAAIC,EAE1BU,EAAoB,CACxB,GAAGD,EAAkB,cAAc,EACnC,KAAMV,EAAoB,uBAAuBU,CAAiB,EAClE,gBACF,EAGA,OAAIE,EAAa,CAAE,KAAMD,EAAkB,IAAK,CAAC,IAC/C,OAAOA,EAAkB,eACzB,OAAOA,EAAkB,kBAGpBA,CACT,EApMA,OAAc,aAAkC,CAC9C,OAAKpC,EAAmB,WACtBA,EAAmB,SAAW,IAAIA,GAE7BA,EAAmB,QAC5B,CAgMF,EAxMaA,EACI,SAAsC,KADhD,IAAMsC,EAANtC",
|
|
6
|
+
"names": ["axios", "_TransactionManager", "onSuccess", "onFail", "registerSessionCallbacks", "signedTransactions", "isBatchTransaction", "sentTransactions", "error", "options", "flatTransactions", "transaction", "status", "getTransactionsSessionStatus", "sessionId", "createTransactionsSession", "totalDuration", "getToastDuration", "addTransactionToast", "apiAddress", "apiTimeout", "networkSelector", "getState", "promises", "axios", "response", "transactionComputer", "TransactionComputer", "data", "tx", "address", "getAccount", "batchId", "payload", "transactions", "BATCH_TRANSACTIONS_ID_SEPARATOR", "signedTransaction", "parsedTransaction", "isGuardianTx", "TransactionManager"]
|
|
7
7
|
}
|
|
@@ -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-SXECAH2A.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-YUIJMELA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-LSKZWWBZ.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-X6MN67NW.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-TI73UXGG.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-AXUYY4T7.mjs";import"../../__chunks__/chunk-6ET5BDZH.mjs";import"../../__chunks__/chunk-LSKZWWBZ.mjs";import"../../__chunks__/chunk-3GGBXXXJ.mjs";import"../../__chunks__/chunk-X6MN67NW.mjs";import"../../__chunks__/chunk-KD2IQ32V.mjs";import"../../__chunks__/chunk-5Y2ZDPP6.mjs";import"../../__chunks__/chunk-TI73UXGG.mjs";import"../../__chunks__/chunk-LHEH7L4L.mjs";import"../../__chunks__/chunk-IHKF4UNO.mjs";import"../../__chunks__/chunk-EJV4VNJG.mjs";import"../../__chunks__/chunk-DIV6ZH5K.mjs";import"../../__chunks__/chunk-FI444OX3.mjs";import"../../__chunks__/chunk-ULUZWP2P.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-GLXG5BES.mjs";import"../../__chunks__/chunk-S2FQWSUO.mjs";import"../../__chunks__/chunk-PWEOLD6L.mjs";export{a as getScamAddressData};
|
|
2
2
|
//# sourceMappingURL=getScamAddressData.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../__chunks__/chunk-
|
|
1
|
+
import{a}from"../../__chunks__/chunk-V4Z4FQJO.mjs";import"../../__chunks__/chunk-SXECAH2A.mjs";import"../../__chunks__/chunk-T4FRQ4JG.mjs";import"../../__chunks__/chunk-QJSB5NX4.mjs";import"../../__chunks__/chunk-KPK72MOE.mjs";import"../../__chunks__/chunk-SAAOQW7P.mjs";import"../../__chunks__/chunk-VNLGNNIL.mjs";import"../../__chunks__/chunk-6JM4DPOH.mjs";import"../../__chunks__/chunk-UTWIKUIK.mjs";import"../../__chunks__/chunk-ZODTYAYF.mjs";import"../../__chunks__/chunk-NLRDRI7Q.mjs";import"../../__chunks__/chunk-DKX6JUT6.mjs";import"../../__chunks__/chunk-YMNKYTXZ.mjs";import"../../__chunks__/chunk-KRWR77QE.mjs";import"../../__chunks__/chunk-B7YCKWDU.mjs";import"../../__chunks__/chunk-HDJOER66.mjs";import"../../__chunks__/chunk-A7FTKX2A.mjs";import"../../__chunks__/chunk-XKU5QBXG.mjs";import"../../__chunks__/chunk-7BP53CXF.mjs";import"../../__chunks__/chunk-BRBIUWAW.mjs";import"../../__chunks__/chunk-S2B2ZKIJ.mjs";import"../../__chunks__/chunk-T2YPFNVM.mjs";import"../../__chunks__/chunk-X4XULIVT.mjs";import"../../__chunks__/chunk-5N4F5T5L.mjs";import"../../__chunks__/chunk-CYCS3K6Q.mjs";import"../../__chunks__/chunk-YMPZDHKF.mjs";import"../../__chunks__/chunk-VKEESSBI.mjs";import"../../__chunks__/chunk-2DNGCNYM.mjs";import"../../__chunks__/chunk-SQVKVA7X.mjs";import"../../__chunks__/chunk-I24YBVHK.mjs";import"../../__chunks__/chunk-NB7A4C7L.mjs";import"../../__chunks__/chunk-J4CPYFK6.mjs";import"../../__chunks__/chunk-R53MCZI6.mjs";import"../../__chunks__/chunk-MGFIOCA4.mjs";import"../../__chunks__/chunk-GGBMHKR4.mjs";import"../../__chunks__/chunk-PWEOLD6L.mjs";export{a as getCleanApiAddress};
|
|
2
2
|
//# sourceMappingURL=getCleanApiAddress.mjs.map
|