@multiversx/sdk-dapp 5.2.11 → 5.2.12-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/{chunk-FL33O3CM.mjs → chunk-256UVPBB.mjs} +2 -2
- package/out/__chunks__/{chunk-D52CJHAM.mjs → chunk-2IEPFE4D.mjs} +2 -2
- package/out/__chunks__/chunk-2M3OATOJ.mjs +2 -0
- package/out/__chunks__/chunk-2POJ7MH5.mjs +2 -0
- package/out/__chunks__/chunk-2YEAP742.mjs +2 -0
- package/out/__chunks__/{chunk-QAAOGNH4.mjs → chunk-3AIY3TW7.mjs} +2 -2
- package/out/__chunks__/chunk-3GLS46GV.mjs +2 -0
- package/out/__chunks__/{chunk-EZOGRX23.mjs → chunk-43ZS3ORV.mjs} +2 -2
- package/out/__chunks__/{chunk-2GWRGSHX.mjs → chunk-4HVKYSYB.mjs} +2 -2
- package/out/__chunks__/chunk-5ERDAMIE.mjs +2 -0
- package/out/__chunks__/{chunk-VFY6KWJ2.mjs → chunk-5L36FGFX.mjs} +2 -2
- package/out/__chunks__/chunk-5VJEMKRJ.mjs +2 -0
- package/out/__chunks__/chunk-667KBMOX.mjs +2 -0
- package/out/__chunks__/chunk-667KBMOX.mjs.map +7 -0
- package/out/__chunks__/chunk-6QDSNTK4.mjs +2 -0
- package/out/__chunks__/{chunk-QG4NGBHS.mjs → chunk-76AWPVM4.mjs} +2 -2
- package/out/__chunks__/{chunk-XVPO7ZMT.mjs → chunk-A2DCRR56.mjs} +2 -2
- package/out/__chunks__/{chunk-G7FYMZJO.mjs → chunk-AJA2CGU3.mjs} +2 -2
- package/out/__chunks__/{chunk-UWUJKOLU.mjs → chunk-APPNCPKI.mjs} +2 -2
- package/out/__chunks__/{chunk-SINQBCBO.mjs → chunk-ARLGL5IH.mjs} +2 -2
- package/out/__chunks__/{chunk-OHK76MFX.mjs → chunk-AUIQ4KU5.mjs} +2 -2
- package/out/__chunks__/{chunk-HD6AKORP.mjs → chunk-BOXGW3SR.mjs} +2 -2
- package/out/__chunks__/chunk-BT423XM3.mjs +2 -0
- package/out/__chunks__/chunk-BWBRRDTJ.mjs +2 -0
- package/out/__chunks__/{chunk-JUX7RQED.mjs → chunk-CRTAVEFT.mjs} +2 -2
- package/out/__chunks__/{chunk-BHLMFKLS.mjs → chunk-CY733W4L.mjs} +2 -2
- package/out/__chunks__/{chunk-QOP5T5R4.mjs → chunk-DDETOX7N.mjs} +2 -2
- package/out/__chunks__/{chunk-W3L462S3.mjs → chunk-DGFYEV3J.mjs} +2 -2
- package/out/__chunks__/{chunk-6F3EV2Y4.mjs → chunk-DLCBNWYZ.mjs} +2 -2
- package/out/__chunks__/{chunk-R6UWDERK.mjs → chunk-E2QSDBTZ.mjs} +2 -2
- package/out/__chunks__/{chunk-QN2SFLFO.mjs → chunk-EGEQQSOM.mjs} +2 -2
- package/out/__chunks__/{chunk-CG2SW6XW.mjs → chunk-EH5ZLMLQ.mjs} +2 -2
- package/out/__chunks__/chunk-EX3G2KOJ.mjs +2 -0
- package/out/__chunks__/chunk-G6BDMW4E.mjs +2 -0
- package/out/__chunks__/chunk-GOFUMUQT.mjs +2 -0
- package/out/__chunks__/{chunk-UXPWG7TI.mjs.map → chunk-GOFUMUQT.mjs.map} +1 -1
- package/out/__chunks__/{chunk-EEZK3T5O.mjs → chunk-H3COTSYJ.mjs} +2 -2
- package/out/__chunks__/{chunk-DJOKOGGV.mjs → chunk-HEK7IPGE.mjs} +2 -2
- package/out/__chunks__/{chunk-7CT7RHSK.mjs → chunk-HRRO627B.mjs} +2 -2
- package/out/__chunks__/chunk-HTUNEXJ6.mjs +2 -0
- package/out/__chunks__/{chunk-XGW74YF7.mjs → chunk-ITI5ANFI.mjs} +2 -2
- package/out/__chunks__/{chunk-LBFTX44W.mjs → chunk-J3PAP5L7.mjs} +2 -2
- package/out/__chunks__/{chunk-3Z2CWDRX.mjs → chunk-J7UVIFYD.mjs} +2 -2
- package/out/__chunks__/{chunk-5UEYQ2KL.mjs → chunk-JV5L4B73.mjs} +2 -2
- package/out/__chunks__/{chunk-G26FRQE7.mjs → chunk-K2CYC6YQ.mjs} +2 -2
- package/out/__chunks__/{chunk-BDZ33IMP.mjs → chunk-K2Z5JQB6.mjs} +2 -2
- package/out/__chunks__/{chunk-73NTM43N.mjs → chunk-KDBMGECR.mjs} +2 -2
- package/out/__chunks__/{chunk-Q7TZ6C22.mjs → chunk-KWPLSEMY.mjs} +2 -2
- package/out/__chunks__/chunk-LFIRLUYG.mjs +2 -0
- package/out/__chunks__/{chunk-J4GRXGQI.mjs → chunk-LVGH7JBF.mjs} +2 -2
- package/out/__chunks__/{chunk-ZQEBGI5N.mjs → chunk-MLPNNQ52.mjs} +2 -2
- package/out/__chunks__/{chunk-RDTT74OC.mjs → chunk-MRMPIS2Z.mjs} +2 -2
- package/out/__chunks__/{chunk-5STPHU5I.mjs → chunk-NLEPTN7T.mjs} +2 -2
- package/out/__chunks__/{chunk-BWBYU7R4.mjs → chunk-NY3PLUBB.mjs} +2 -2
- package/out/__chunks__/{chunk-BWBYU7R4.mjs.map → chunk-NY3PLUBB.mjs.map} +2 -2
- package/out/__chunks__/{chunk-JFWHJ7VA.mjs → chunk-PDHQOTBR.mjs} +2 -2
- package/out/__chunks__/{chunk-BXQLGIN7.mjs → chunk-PEET56XV.mjs} +2 -2
- package/out/__chunks__/{chunk-WPNLIPMJ.mjs → chunk-QBV3NGRD.mjs} +2 -2
- package/out/__chunks__/{chunk-IJTXME3Q.mjs → chunk-QVQOCBO6.mjs} +2 -2
- package/out/__chunks__/{chunk-FEYKZZ67.mjs → chunk-R3JJ2K6E.mjs} +2 -2
- package/out/__chunks__/{chunk-6NWGAFI5.mjs → chunk-RCAOCVBC.mjs} +2 -2
- package/out/__chunks__/{chunk-7Z26MA4H.mjs → chunk-RFR7PHXZ.mjs} +2 -2
- package/out/__chunks__/chunk-RS457CD4.mjs +2 -0
- package/out/__chunks__/{chunk-FJAJCSAI.mjs → chunk-SQDP4UCG.mjs} +2 -2
- package/out/__chunks__/{chunk-CMFJB4UN.mjs → chunk-SWW3XXSG.mjs} +2 -2
- package/out/__chunks__/{chunk-U6FDF6V4.mjs → chunk-TI2TATUO.mjs} +2 -2
- package/out/__chunks__/chunk-TKIMRAZN.mjs +2 -0
- package/out/__chunks__/{chunk-H5OF5YQF.mjs → chunk-TUMBWNGY.mjs} +2 -2
- package/out/__chunks__/chunk-UGRA4C4Z.mjs +2 -0
- package/out/__chunks__/chunk-UGRA4C4Z.mjs.map +7 -0
- package/out/__chunks__/{chunk-J5MXSFGF.mjs → chunk-UOLQAHFF.mjs} +2 -2
- package/out/__chunks__/{chunk-BQS32EX5.mjs → chunk-USQUPGRC.mjs} +2 -2
- package/out/__chunks__/{chunk-OR3D6ZH4.mjs → chunk-UU3MJKEM.mjs} +2 -2
- package/out/__chunks__/{chunk-BOJYDCZ5.mjs → chunk-VLDGQL7B.mjs} +2 -2
- package/out/__chunks__/{chunk-ZRN5QF4U.mjs → chunk-VLWMD34B.mjs} +2 -2
- package/out/__chunks__/{chunk-GC3EGW65.mjs → chunk-VXBGAYMV.mjs} +2 -2
- package/out/__chunks__/{chunk-HWI2QO32.mjs → chunk-VXZLPVLU.mjs} +2 -2
- package/out/__chunks__/{chunk-F5JYH2GE.mjs → chunk-WIPFIC6A.mjs} +2 -2
- package/out/__chunks__/{chunk-LQ3UGB46.mjs → chunk-WZMOKJRU.mjs} +2 -2
- package/out/__chunks__/chunk-XUNR4H62.mjs +2 -0
- package/out/__chunks__/{chunk-ENBZNLXA.mjs → chunk-Y33JH2RH.mjs} +2 -2
- package/out/__chunks__/{chunk-O4PUBLYW.mjs → chunk-Y3HLH5WI.mjs} +2 -2
- package/out/__chunks__/chunk-YGEY6NOV.mjs +2 -0
- package/out/__chunks__/{chunk-YGMSU5HA.mjs → chunk-YJ4UF7WR.mjs} +2 -2
- package/out/__chunks__/{chunk-WNJKPQDV.mjs → chunk-ZNXVHDZB.mjs} +2 -2
- package/out/__chunks__/{chunk-AU76TGKZ.mjs → chunk-ZOQVPZWZ.mjs} +2 -2
- package/out/__chunks__/{chunk-ZVF3CROB.mjs → chunk-ZPELMVTN.mjs} +2 -2
- package/out/__chunks__/{chunk-STNUKKSC.mjs → chunk-ZQLEJXPX.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.cjs.map +3 -3
- package/out/managers/UnlockPanelManager/UnlockPanelManager.d.ts +0 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/helpers/getProviderList.cjs +2 -0
- package/out/managers/UnlockPanelManager/helpers/getProviderList.cjs.map +7 -0
- package/out/managers/UnlockPanelManager/helpers/getProviderList.d.ts +2 -0
- package/out/managers/UnlockPanelManager/helpers/getProviderList.mjs +2 -0
- package/out/managers/UnlockPanelManager/helpers/getProviderList.mjs.map +7 -0
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/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/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.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/helpers/getMultisigLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs.map +2 -2
- 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-C2LXUREL.mjs +0 -2
- package/out/__chunks__/chunk-C2LXUREL.mjs.map +0 -7
- package/out/__chunks__/chunk-C7S2TI5Y.mjs +0 -2
- package/out/__chunks__/chunk-CP36QS3V.mjs +0 -2
- package/out/__chunks__/chunk-D5UNIS2B.mjs +0 -2
- package/out/__chunks__/chunk-DSC7OKM6.mjs +0 -2
- package/out/__chunks__/chunk-FCIYC4FM.mjs +0 -2
- package/out/__chunks__/chunk-FEP3SR47.mjs +0 -2
- package/out/__chunks__/chunk-GO33UPCG.mjs +0 -2
- package/out/__chunks__/chunk-I6JLRP5Y.mjs +0 -2
- package/out/__chunks__/chunk-IECHAN5Y.mjs +0 -2
- package/out/__chunks__/chunk-JOXEQBHW.mjs +0 -2
- package/out/__chunks__/chunk-LAOAFA7S.mjs +0 -2
- package/out/__chunks__/chunk-NKZX4KJF.mjs +0 -2
- package/out/__chunks__/chunk-Q7KYVZUM.mjs +0 -2
- package/out/__chunks__/chunk-SERW2VL6.mjs +0 -2
- package/out/__chunks__/chunk-UXPWG7TI.mjs +0 -2
- package/out/__chunks__/chunk-XJ4DOOWN.mjs +0 -2
- package/out/__chunks__/chunk-XUUR76YU.mjs +0 -2
- package/out/__chunks__/chunk-ZD74AW3C.mjs +0 -2
- /package/out/__chunks__/{chunk-FL33O3CM.mjs.map → chunk-256UVPBB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D52CJHAM.mjs.map → chunk-2IEPFE4D.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XJ4DOOWN.mjs.map → chunk-2M3OATOJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IECHAN5Y.mjs.map → chunk-2POJ7MH5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GO33UPCG.mjs.map → chunk-2YEAP742.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QAAOGNH4.mjs.map → chunk-3AIY3TW7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q7KYVZUM.mjs.map → chunk-3GLS46GV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EZOGRX23.mjs.map → chunk-43ZS3ORV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2GWRGSHX.mjs.map → chunk-4HVKYSYB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FEP3SR47.mjs.map → chunk-5ERDAMIE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VFY6KWJ2.mjs.map → chunk-5L36FGFX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NKZX4KJF.mjs.map → chunk-5VJEMKRJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JOXEQBHW.mjs.map → chunk-6QDSNTK4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QG4NGBHS.mjs.map → chunk-76AWPVM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XVPO7ZMT.mjs.map → chunk-A2DCRR56.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G7FYMZJO.mjs.map → chunk-AJA2CGU3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UWUJKOLU.mjs.map → chunk-APPNCPKI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SINQBCBO.mjs.map → chunk-ARLGL5IH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OHK76MFX.mjs.map → chunk-AUIQ4KU5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HD6AKORP.mjs.map → chunk-BOXGW3SR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D5UNIS2B.mjs.map → chunk-BT423XM3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C7S2TI5Y.mjs.map → chunk-BWBRRDTJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JUX7RQED.mjs.map → chunk-CRTAVEFT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BHLMFKLS.mjs.map → chunk-CY733W4L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QOP5T5R4.mjs.map → chunk-DDETOX7N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W3L462S3.mjs.map → chunk-DGFYEV3J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6F3EV2Y4.mjs.map → chunk-DLCBNWYZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R6UWDERK.mjs.map → chunk-E2QSDBTZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QN2SFLFO.mjs.map → chunk-EGEQQSOM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CG2SW6XW.mjs.map → chunk-EH5ZLMLQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZD74AW3C.mjs.map → chunk-EX3G2KOJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DSC7OKM6.mjs.map → chunk-G6BDMW4E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EEZK3T5O.mjs.map → chunk-H3COTSYJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DJOKOGGV.mjs.map → chunk-HEK7IPGE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7CT7RHSK.mjs.map → chunk-HRRO627B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SERW2VL6.mjs.map → chunk-HTUNEXJ6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XGW74YF7.mjs.map → chunk-ITI5ANFI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LBFTX44W.mjs.map → chunk-J3PAP5L7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3Z2CWDRX.mjs.map → chunk-J7UVIFYD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5UEYQ2KL.mjs.map → chunk-JV5L4B73.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G26FRQE7.mjs.map → chunk-K2CYC6YQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BDZ33IMP.mjs.map → chunk-K2Z5JQB6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-73NTM43N.mjs.map → chunk-KDBMGECR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q7TZ6C22.mjs.map → chunk-KWPLSEMY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LAOAFA7S.mjs.map → chunk-LFIRLUYG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J4GRXGQI.mjs.map → chunk-LVGH7JBF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZQEBGI5N.mjs.map → chunk-MLPNNQ52.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RDTT74OC.mjs.map → chunk-MRMPIS2Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5STPHU5I.mjs.map → chunk-NLEPTN7T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JFWHJ7VA.mjs.map → chunk-PDHQOTBR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BXQLGIN7.mjs.map → chunk-PEET56XV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WPNLIPMJ.mjs.map → chunk-QBV3NGRD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IJTXME3Q.mjs.map → chunk-QVQOCBO6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FEYKZZ67.mjs.map → chunk-R3JJ2K6E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6NWGAFI5.mjs.map → chunk-RCAOCVBC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7Z26MA4H.mjs.map → chunk-RFR7PHXZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FCIYC4FM.mjs.map → chunk-RS457CD4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FJAJCSAI.mjs.map → chunk-SQDP4UCG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CMFJB4UN.mjs.map → chunk-SWW3XXSG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U6FDF6V4.mjs.map → chunk-TI2TATUO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CP36QS3V.mjs.map → chunk-TKIMRAZN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H5OF5YQF.mjs.map → chunk-TUMBWNGY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J5MXSFGF.mjs.map → chunk-UOLQAHFF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BQS32EX5.mjs.map → chunk-USQUPGRC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OR3D6ZH4.mjs.map → chunk-UU3MJKEM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BOJYDCZ5.mjs.map → chunk-VLDGQL7B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZRN5QF4U.mjs.map → chunk-VLWMD34B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GC3EGW65.mjs.map → chunk-VXBGAYMV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HWI2QO32.mjs.map → chunk-VXZLPVLU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F5JYH2GE.mjs.map → chunk-WIPFIC6A.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LQ3UGB46.mjs.map → chunk-WZMOKJRU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XUUR76YU.mjs.map → chunk-XUNR4H62.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ENBZNLXA.mjs.map → chunk-Y33JH2RH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O4PUBLYW.mjs.map → chunk-Y3HLH5WI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I6JLRP5Y.mjs.map → chunk-YGEY6NOV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YGMSU5HA.mjs.map → chunk-YJ4UF7WR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WNJKPQDV.mjs.map → chunk-ZNXVHDZB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AU76TGKZ.mjs.map → chunk-ZOQVPZWZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZVF3CROB.mjs.map → chunk-ZPELMVTN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-STNUKKSC.mjs.map → chunk-ZQLEJXPX.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-ZATPIKZ2.mjs";import{j as p,k as d,l as f,n as u}from"./chunk-E2GGD7D4.mjs";import{a as I}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-ZATPIKZ2.mjs";import{j as p,k as d,l as f,n as u}from"./chunk-E2GGD7D4.mjs";import{a as I}from"./chunk-XXV6KGR4.mjs";import{a as m}from"./chunk-NGM3AVCY.mjs";import{a as l}from"./chunk-R3JJ2K6E.mjs";import{s as T}from"./chunk-DGFYEV3J.mjs";import{c}from"./chunk-UERJ6AKK.mjs";async function G(g){let s=g?.store??T(),n=[],a=[],y=I(s),F=m(s),C=c(s);for(let o of y.transactionToasts){let r=F[o.toastId];if(!r?.status)continue;let{status:t,transactions:P,transactionsDisplayInfo:h}=r,L=await l({transactions:P,store:s}),O=u(t),R=f(t),v=d(t),e=O||R||v,w=p(t),{startTime:x,endTime:D}=o;if(e&&a.some(b=>b.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:C,status:t,transactions:L,transactionsDisplayInfo:h,startTime:x,endTime:D});e&&a.push(i),w&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}}export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-256UVPBB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-H3COTSYJ.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-RS457CD4.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-2IEPFE4D.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-NY3PLUBB.mjs";import{w as a}from"./chunk-HRRO627B.mjs";import{s as n}from"./chunk-DGFYEV3J.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as d}from"./chunk-EH5ZLMLQ.mjs";async function S(){let t=c(),m=d(),e=s(n()),o=m||t?i.webview:e,p=Object.values(i).includes(e);if(e&&!p&&(o=e),!o)return;let r=await v.create({type:o});if(!r)throw new Error("Provider not found");if(t||o===i.webview&&r.isInitialized())try{await r.login()}catch(f){console.warn("Failed to login with provider",r.getType(),f)}a(r)}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3AIY3TW7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-5L36FGFX.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-43ZS3ORV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-2POJ7MH5.mjs";import{s as e}from"./chunk-DGFYEV3J.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4HVKYSYB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-Y3HLH5WI.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5L36FGFX.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-43ZS3ORV.mjs";import{c as n}from"./chunk-DGFYEV3J.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5VJEMKRJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as v}from"./chunk-6R2WFQ7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";function f(i,s){let d=[...Object.values(o).filter(e=>![o.none,o.webview].includes(e)),...i.map(e=>e.type)],n=i.reduce((e,r)=>(e[r.type]=r.name,e),{}),t={...v,...n};return(s?s.filter(e=>d.includes(e)):d).map(e=>{let r=i.find(l=>l.type===e);return r||{name:e in t?t[e]:e,type:e}})}export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-667KBMOX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/managers/UnlockPanelManager/helpers/getProviderList.ts"],
|
|
4
|
+
"sourcesContent": ["import { providerLabels } from 'constants/providerFactory.constants';\nimport {\n ICustomProvider,\n IProviderBase,\n ProviderType,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\n\nexport function getProvidersList(\n addedCustomProviders: ICustomProvider[],\n allowedProviders?: ProviderType[] | null\n): IProviderBase[] {\n const defaultProviderTypes = (\n Object.values(ProviderTypeEnum) as ProviderType[]\n ).filter((type) => {\n const excludedProviders: ProviderType[] = [\n ProviderTypeEnum.none,\n ProviderTypeEnum.webview\n ];\n return !excludedProviders.includes(type);\n });\n\n const allAvailableProviderTypes: ProviderType[] = [\n ...defaultProviderTypes,\n ...addedCustomProviders.map((p) => p.type as ProviderType)\n ];\n\n const customProviderLabels = addedCustomProviders.reduce(\n (acc, provider) => {\n acc[provider.type as ProviderType] = provider.name;\n return acc;\n },\n {} as Record<ProviderType, string>\n );\n\n const allAvailableLabels = {\n ...providerLabels,\n ...customProviderLabels\n };\n\n const allowedProviderTypes: ProviderType[] = allowedProviders\n ? allowedProviders.filter((type) =>\n allAvailableProviderTypes.includes(type)\n )\n : allAvailableProviderTypes;\n\n const providerList: IProviderBase[] = allowedProviderTypes.map((type) => {\n const custom = addedCustomProviders.find(\n (customProvider) => customProvider.type === type\n );\n if (custom) {\n return custom;\n }\n\n return {\n name: type in allAvailableLabels ? allAvailableLabels[type] : type,\n type\n };\n });\n\n return providerList;\n}\n"],
|
|
5
|
+
"mappings": "kFAQO,SAASA,EACdC,EACAC,EACiB,CAWjB,IAAMC,EAA4C,CAChD,GAVA,OAAO,OAAOC,CAAgB,EAC9B,OAAQC,GAKD,CAJmC,CACxCD,EAAiB,KACjBA,EAAiB,OACnB,EAC0B,SAASC,CAAI,CACxC,EAIC,GAAGJ,EAAqB,IAAKK,GAAMA,EAAE,IAAoB,CAC3D,EAEMC,EAAuBN,EAAqB,OAChD,CAACO,EAAKC,KACJD,EAAIC,EAAS,IAAoB,EAAIA,EAAS,KACvCD,GAET,CAAC,CACH,EAEME,EAAqB,CACzB,GAAGC,EACH,GAAGJ,CACL,EAsBA,OApB6CL,EACzCA,EAAiB,OAAQG,GACvBF,EAA0B,SAASE,CAAI,CACzC,EACAF,GAEuD,IAAKE,GAAS,CACvE,IAAMO,EAASX,EAAqB,KACjCY,GAAmBA,EAAe,OAASR,CAC9C,EACA,OAAIO,GAIG,CACL,KAAMP,KAAQK,EAAqBA,EAAmBL,CAAI,EAAIA,EAC9D,KAAAA,CACF,CACF,CAAC,CAGH",
|
|
6
|
+
"names": ["getProvidersList", "addedCustomProviders", "allowedProviders", "allAvailableProviderTypes", "ProviderTypeEnum", "type", "p", "customProviderLabels", "acc", "provider", "allAvailableLabels", "providerLabels", "custom", "customProvider"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-TI2TATUO.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-76AWPVM4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-J3PAP5L7.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-A2DCRR56.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-DGFYEV3J.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},s=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},h=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-AJA2CGU3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-RCAOCVBC.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-APPNCPKI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-DGFYEV3J.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ARLGL5IH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-PDHQOTBR.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-AUIQ4KU5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-E2QSDBTZ.mjs";import{a as c}from"./chunk-I3MK6KZJ.mjs";var l=async({receiver:n,sender:s,tokenId:i})=>{let t=null,r=null;if(!i)return{senderLockedAccount:t,receiverLockedAccount:r};try{let o=(await u({tokenId:i}))?.assets?.lockedAccounts;if(!o)return{senderLockedAccount:t,receiverLockedAccount:r};for(let e in o)if(c(e)&&(s===e&&(t=e),n===e&&(r=e)),c(o[e])&&(s===o[e]&&(t=o[e]),n===o[e]&&(r=o[e])),t&&r)return{senderLockedAccount:t,receiverLockedAccount:r}}catch(a){console.error("Error getting token details",a)}return{senderLockedAccount:t,receiverLockedAccount:r}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BOXGW3SR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-ZNXVHDZB.mjs";import{a as e}from"./chunk-2YEAP742.mjs";import{a as i}from"./chunk-6R2WFQ7U.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-CRTAVEFT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-2POJ7MH5.mjs";import{a as f}from"./chunk-Y3HLH5WI.mjs";import{a as g}from"./chunk-PDHQOTBR.mjs";import{b as a}from"./chunk-DGFYEV3J.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.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-CY733W4L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-LFIRLUYG.mjs";import{a as u}from"./chunk-QVQOCBO6.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{b as o}from"./chunk-ZPELMVTN.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DDETOX7N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a,f as p}from"./chunk-UERJ6AKK.mjs";import{f as l}from"./chunk-VNLGNNIL.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as a,f as p}from"./chunk-UERJ6AKK.mjs";import{f as l}from"./chunk-VNLGNNIL.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as I}from"./chunk-3GLS46GV.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{b as T}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as L}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 v}from"./chunk-NB7A4C7L.mjs";import{c as s}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=p(e),n=l(e),{address:i,publicKey:M}=a(e);if(i&&M!==new s(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:L(...n),transactions:y(...n),toasts:u(...n),cache:T(...n),ui:v(...n)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new k)),r),le=(e=I)=>{let t=z(e);return D(t),t},se=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),ye=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{me as a,fe as b,Se as c,ue as d,de as e,ye as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,W as n,z as o,D as p,o as q,le as r,se as s};
|
|
2
|
+
//# sourceMappingURL=chunk-DGFYEV3J.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-FROSOADM.mjs";import{a as g}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as c}from"./chunk-PSJI2G34.mjs";import{a as d}from"./chunk-2CG6PNPJ.mjs";import{a as p,b as e}from"./chunk-4VUMAG4J.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(i)),t.get(`${e.apiAddress}/network/config`,s(d)),t.get(`https://${o.url}/socket.io/`,s(c)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(g))],P=u(...k);export{t as a,s as b,P as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DLCBNWYZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-DGFYEV3J.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E2QSDBTZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as n,q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as n,q as o}from"./chunk-DGFYEV3J.mjs";import{c as p}from"./chunk-NTEMINYA.mjs";var s=()=>o().setState(n),l=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{s as a,l as b};
|
|
2
|
+
//# sourceMappingURL=chunk-EGEQQSOM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-Y33JH2RH.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-EH5ZLMLQ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-SQ3EODA7.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-DGFYEV3J.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-G6BDMW4E.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.2.
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.2.12-alpha.1'; // 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 f}from"./chunk-FRDR4A7Z.mjs";import{x as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{x as g}from"./chunk-HRRO627B.mjs";import{a as c}from"./chunk-RS457CD4.mjs";import{s as n}from"./chunk-DGFYEV3J.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),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-H3COTSYJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-GOFUMUQT.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HEK7IPGE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as St}from"./chunk-QG4NGBHS.mjs";import{a as dt}from"./chunk-ZD74AW3C.mjs";import{a as vt}from"./chunk-6UZHM5LW.mjs";import{a as w}from"./chunk-FL33O3CM.mjs";import{a as wt}from"./chunk-HWI2QO32.mjs";import{a as bt}from"./chunk-FCIYC4FM.mjs";import{a as It}from"./chunk-QOP5T5R4.mjs";import{a as Et}from"./chunk-CP36QS3V.mjs";import{a as Ct}from"./chunk-ABBDCZHP.mjs";import{a as Mt}from"./chunk-4ODPAHHA.mjs";import{a as Nt}from"./chunk-H5OF5YQF.mjs";import{b as x}from"./chunk-ZRN5QF4U.mjs";import{a as xt}from"./chunk-BQS32EX5.mjs";import{a as At}from"./chunk-NKZX4KJF.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ot}from"./chunk-G26FRQE7.mjs";import{a as v}from"./chunk-D5UNIS2B.mjs";import{a as it}from"./chunk-GO33UPCG.mjs";import{a as ht}from"./chunk-AU76TGKZ.mjs";import{a as E}from"./chunk-BXQLGIN7.mjs";import{a as A,f as yt}from"./chunk-YGMSU5HA.mjs";import{b as L,d as gt}from"./chunk-ZVF3CROB.mjs";import{k as pt,l as lt,n as Tt}from"./chunk-E2GGD7D4.mjs";import{b as Lt}from"./chunk-QN2SFLFO.mjs";import{a as N}from"./chunk-HORSXVIV.mjs";import{a as Ft}from"./chunk-IECHAN5Y.mjs";import{a as nt}from"./chunk-O4PUBLYW.mjs";import{a as C}from"./chunk-QTKK6OSJ.mjs";import{a as et}from"./chunk-6ACLOUQ3.mjs";import{a as I}from"./chunk-G7GU37XI.mjs";import{a as st}from"./chunk-YSCND2MX.mjs";import{a as Rt}from"./chunk-NJN53MJV.mjs";import{a as rt,b as ct,g as ut,l as mt}from"./chunk-M6MN4RXG.mjs";import{b as at}from"./chunk-NGM3AVCY.mjs";import{a as tt,b as ot,q as u,s as g}from"./chunk-W3L462S3.mjs";import{c as V,d as Y,f as J}from"./chunk-UERJ6AKK.mjs";import{b as h}from"./chunk-VNLGNNIL.mjs";import{b as S}from"./chunk-6JM4DPOH.mjs";import{b as Q,c as X,f as Z}from"./chunk-NTEMINYA.mjs";import{b as kt}from"./chunk-UCRVRBTA.mjs";import{a as ft}from"./chunk-J5MXSFGF.mjs";import{c as $}from"./chunk-WPNLIPMJ.mjs";import{a as b}from"./chunk-LJX4MW7B.mjs";import K from"bignumber.js";import G from"lodash.isequal";var Bt=1e4,O=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Bt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{F(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let e=setTimeout(()=>{P(t);let n=f[t];n?.()},o);this.timeoutIntervals.set(t,e)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??Bt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};import Dt from"lodash.isequal";var Yt="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",M=class s extends ht{constructor(o){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=o||u(),this.data={...this.initialData}}static getInstance(){return s.instance||(s.instance=new s),s.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Dt(r.transactionToasts,n.transactionToasts)||!Dt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Yt,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=d.getInstance();this.closeUI(),await o.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:o}=this.store.getState(),{pendingTransactionToasts:e}=await w();this.data.pendingTransactions=e;let n=Object.keys(o).reduce((i,r)=>(["sent","pending"].includes(String(o[r].status))||(i[r]=o[r]),i),{});this.data.historicTransactions=await dt.getTransactionsHistory({transactionsSessions:n}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){gt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};var k=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||u(),this.notificationsFeedManager=t.notificationsFeedManager||M.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let o=await this.createToastListElement();if(!o)return;this.eventBus=await o.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ft.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}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.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var d=class s{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||u(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new k({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:o,transactions:e},{toasts:n,transactions:i})=>{let r=!G(n.transactionToasts,o.transactionToasts),c=!G(i,e);(r||c)&&await this.updateTransactionToastsList(),!G(n.customToasts,o.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return s.instance||(s.instance=new s),s.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),e=o[t];if(!e)return!1;let{status:n}=e,i=Tt(n),r=lt(n),c=pt(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,o){let e=_t({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}async createCustomToast(t){let o=B(t);return await this.updateCustomToastList(),o}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:o}=t,{pendingTransactionToasts:e,completedTransactionToasts:n}=await w({store:t});this.transactionToasts=[...e,...n];for(let i of o.transactionToasts)this.handleCompletedTransaction(i.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let n="message"in o?{...o}:{...o,instantiateToastElement:R[o.toastId]};this.customToasts.push(n),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(F(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=f[t];return e?.(),P(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),Ut()}};var D=class s{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(),o=h(t),{isExpired:e}=C(o?.nativeAuthToken);e?y().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(),o=h(t),e=J(t);return!!(o?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=y(),o=V(this.store.getState()),e=t.getType()===b.webview;if(!o||e)return;this.addLogoutWarning();let n=h(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=C(n?.nativeAuthToken),c=new K(String(i)),a=`${o}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let l=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},l.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},l.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=S(this.store.getState()),o=h(this.store.getState()),{secondsUntilExpires:e}=C(o?.nativeAuthToken),n=new K(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new K(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=vt(i.toNumber()),p=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return s.instance||(s.instance=new s),s.instance}};async function Wt({sessionId:s,transactionBatch:t,isSequential:o}){try{if(t==null)return;let e=bt(),n=Ct(t),i=await St(n);for(let T of i)await It({serverTransaction:T,sessionId:s,isSequential:o});if(!i.every(T=>T.status!=="pending"))return;e&&await U();let{transactions:c}=g(),a=c?.[s];if(a.transactions.every(T=>T.status==="success"))return L({sessionId:s,status:"success"});if(a.transactions.some(T=>T.status==="fail"))return L({sessionId:s,status:"fail"});if(a.transactions.every(T=>T.status==="not executed"))return L({sessionId:s,status:"invalid"})}catch(e){console.error(e)}}async function Ht(){let s=at(g()),t=Object.entries(s);t.length!==0&&await Promise.all(t.map(([o,{transactions:e}])=>Wt({sessionId:o,transactionBatch:e})))}async function _(){let s=u(),t=Et(),o=null,e=Y(s.getState())?.timestamp??null,n=async()=>{try{await Ht()}catch(p){console.error("[trackTransactions] Error checking transaction status:",p)}},i=()=>{o||(o=setInterval(n,t))},r=()=>{o&&(clearInterval(o),o=null)},c=()=>{r();let p=s.subscribe(({account:{websocketEvent:l}})=>{l?.message&&l.timestamp!=null&&e!==l.timestamp&&(e=l.timestamp,n())});$.set("websocketEventReceived",p)};n();let a=()=>{r()},m=s.subscribe(({account:{address:p},config:{websocketStatus:l}},T)=>{if(T.config.websocketStatus!==l)switch(l){case"completed":c();break;case"pending":i();break;default:p?i():a();break}});return $.set("websocketStatusChanged",m),{stopTransactionsTracking:a}}async function j({address:s,provider:t,apiAddress:o}){let e=await I({address:s,baseURL:o});if(!e)throw new Error("Account not found");Lt({address:s,providerType:t.getType()});let n={...e,username:N(e.username),nonce:E(e)};A(n),await x(s),_(),e.shard!=null&&await wt({shard:Number(e.shard),apiAddress:o})}async function Qt(s){let{network:{apiAddress:t}}=v();await s.login();let o=await s.getAddress();if(!o)throw new Error("Address not found");return await j({address:o,provider:s,apiAddress:t}),{address:o}}async function Xt({provider:s,nativeAuthConfig:t,token:o}){let{network:{apiAddress:e}}=v(),n=nt(t),i=o;i||(i=await n.initialize({noCache:!0}));let r=await s.login({token:i}),{address:c,signature:a,...m}=r;if(!c)return console.warn("Login cancelled."),null;if(!a)return console.error("Failed to sign login token"),null;let p=et(m?.accessToken),l=await xt({loginData:r,nativeAuthConfig:t,loginToken:i}),T=p?m.accessToken:n.getToken({address:c,token:l,signature:a});ot({loginToken:i,signature:a,nativeAuthToken:T});let H=await At({loginToken:i,extraInfoData:{multisig:m?.multisig,impersonate:m?.impersonate},address:c});return await j({address:H,provider:s,apiAddress:e}),{address:H,signature:a}}async function $t(s,t){let o=S(g());if(o)return await Xt({provider:s,nativeAuthConfig:o,token:t?.token});let{address:e}=await Qt(s);return await x(e),_(),{address:e,signature:""}}var z={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${ct}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${rt}-${Date.now()}`}},Zt={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"},to=s=>{for(let[t,o]of Object.entries(Zt))if(s.includes(t))return o;return"Error when signing"};function q(s,t="error"){let o=s?.message,e=to(o),i=e!=="Error when signing"?"warning":t,r=Object.keys(z).includes(i)?z[i]:z.error,{toastId:c,iconClassName:a,title:m}=r;return B({toastId:c,duration:1e4,icon:"close",iconClassName:a,message:e,title:m}),e}async function Gt({provider:s,transactions:t,options:o={}}){await U();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Ft(),r=s.getType()===b.ledger,c=Mt({latestNonce:i,transactions:t}),a=n&&e&&!o.skipGuardian?c?.map(p=>(p.version=Q.withTxOptions().valueOf(),p.options=Z.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),p.guardian=X.newFromBech32(n),p)):c,m=await s.signTransactions(a)??[];return yt(i+m.length),m}var W=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await $t(this.provider,t);return tt(this.provider.getType()),Kt(this),D.getInstance().init(),o}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 o=await Nt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await Gt({provider:this.provider,transactions:t,options:o})}catch(e){let n=q(e);throw new Error(n)}}async signMessage(t,o){try{return await Ot({provider:this.provider,message:t,options:o})}catch(e){let n=q(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var jt=null;function Kt(s){jt=s}function y(){return jt||new W(kt)}var oo=async()=>{try{let s=it(),{network:t}=v();try{let o=await I({address:s,baseURL:t.apiAddress});if(o!=null){let e={...o,username:N(o.username),nonce:E(o)};return A(e),e}}catch(o){console.error("Failed getting account ",o)}}catch(s){console.error("Failed getting address ",s)}return null};async function U(){let s=y();if(s==null)throw"Provider not initialized";try{if(!s.init)throw"Current provider does not have init() function";return await s.init()?await oo():void 0}catch(t){console.error("Failed initializing provider ",t)}}var R={},f={},so=(s,t)=>{u().setState(({toasts:o})=>{let e=o.customToasts.length>0?Math.max(...o.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=o.customToasts.findIndex(a=>a.toastId===n),r={...s,toastId:n};if(i!==-1){o.customToasts[i]=r;return}o.customToasts.push({...r,toastId:n})},!1,{type:"addCustomToast",payload:{value:{customToast:s,currentToastId:t}}})},P=s=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==s)},!1,{type:"removeCustomToast",payload:{value:s}})},Ut=()=>{u().setState(({toasts:s})=>{s.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},an=()=>{u().setState(({toasts:s})=>{s.transactionToasts=[]})},_t=({toastId:s,totalDuration:t})=>{let o="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;o=s??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:st(),endTime:Rt(t),toastId:o})},!1,"addTransactionToast"),o},F=s=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==s)},!1,"removeTransactionToast"),delete f[s],delete R[s]},B=s=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=s.toastId||`custom-toast-${o+1}`;return s.onClose&&(f[e]=s.onClose),s.instantiateToastElement?(R[e]=s.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...s,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(so(s,e),e)};export{R as a,f as b,so as c,P as d,Ut as e,an as f,_t as g,F as h,B as i,O as j,M as k,k as l,d as m,D as n,Wt as o,Ht as p,_ as q,j as r,$t as s,q as t,Gt as u,W as v,Kt as w,y as x,U as y};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as St}from"./chunk-76AWPVM4.mjs";import{a as dt}from"./chunk-EX3G2KOJ.mjs";import{a as vt}from"./chunk-6UZHM5LW.mjs";import{a as w}from"./chunk-256UVPBB.mjs";import{a as wt}from"./chunk-VXZLPVLU.mjs";import{a as bt}from"./chunk-RS457CD4.mjs";import{a as It}from"./chunk-DDETOX7N.mjs";import{a as Et}from"./chunk-TKIMRAZN.mjs";import{a as Ct}from"./chunk-ABBDCZHP.mjs";import{a as Mt}from"./chunk-4ODPAHHA.mjs";import{a as Nt}from"./chunk-TUMBWNGY.mjs";import{b as x}from"./chunk-VLWMD34B.mjs";import{a as xt}from"./chunk-USQUPGRC.mjs";import{a as At}from"./chunk-5VJEMKRJ.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ot}from"./chunk-K2CYC6YQ.mjs";import{a as v}from"./chunk-BT423XM3.mjs";import{a as it}from"./chunk-2YEAP742.mjs";import{a as ht}from"./chunk-ZOQVPZWZ.mjs";import{a as E}from"./chunk-PEET56XV.mjs";import{a as A,f as yt}from"./chunk-YJ4UF7WR.mjs";import{b as L,d as gt}from"./chunk-ZPELMVTN.mjs";import{k as pt,l as lt,n as Tt}from"./chunk-E2GGD7D4.mjs";import{b as Lt}from"./chunk-EGEQQSOM.mjs";import{a as N}from"./chunk-HORSXVIV.mjs";import{a as Ft}from"./chunk-2POJ7MH5.mjs";import{a as nt}from"./chunk-Y3HLH5WI.mjs";import{a as C}from"./chunk-QTKK6OSJ.mjs";import{a as et}from"./chunk-6ACLOUQ3.mjs";import{a as I}from"./chunk-G7GU37XI.mjs";import{a as st}from"./chunk-YSCND2MX.mjs";import{a as Rt}from"./chunk-NJN53MJV.mjs";import{a as rt,b as ct,g as ut,l as mt}from"./chunk-M6MN4RXG.mjs";import{b as at}from"./chunk-NGM3AVCY.mjs";import{a as tt,b as ot,q as u,s as g}from"./chunk-DGFYEV3J.mjs";import{c as V,d as Y,f as J}from"./chunk-UERJ6AKK.mjs";import{b as h}from"./chunk-VNLGNNIL.mjs";import{b as S}from"./chunk-6JM4DPOH.mjs";import{b as Q,c as X,f as Z}from"./chunk-NTEMINYA.mjs";import{b as kt}from"./chunk-UCRVRBTA.mjs";import{a as ft}from"./chunk-UOLQAHFF.mjs";import{c as $}from"./chunk-QBV3NGRD.mjs";import{a as b}from"./chunk-LJX4MW7B.mjs";import K from"bignumber.js";import G from"lodash.isequal";var Bt=1e4,O=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Bt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{F(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let e=setTimeout(()=>{P(t);let n=f[t];n?.()},o);this.timeoutIntervals.set(t,e)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??Bt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};import Dt from"lodash.isequal";var Yt="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",M=class s extends ht{constructor(o){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=o||u(),this.data={...this.initialData}}static getInstance(){return s.instance||(s.instance=new s),s.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Dt(r.transactionToasts,n.transactionToasts)||!Dt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Yt,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=d.getInstance();this.closeUI(),await o.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:o}=this.store.getState(),{pendingTransactionToasts:e}=await w();this.data.pendingTransactions=e;let n=Object.keys(o).reduce((i,r)=>(["sent","pending"].includes(String(o[r].status))||(i[r]=o[r]),i),{});this.data.historicTransactions=await dt.getTransactionsHistory({transactionsSessions:n}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){gt(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};var k=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||u(),this.notificationsFeedManager=t.notificationsFeedManager||M.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let o=await this.createToastListElement();if(!o)return;this.eventBus=await o.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ft.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}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.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var d=class s{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||u(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new k({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:o,transactions:e},{toasts:n,transactions:i})=>{let r=!G(n.transactionToasts,o.transactionToasts),c=!G(i,e);(r||c)&&await this.updateTransactionToastsList(),!G(n.customToasts,o.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return s.instance||(s.instance=new s),s.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),e=o[t];if(!e)return!1;let{status:n}=e,i=Tt(n),r=lt(n),c=pt(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,o){let e=_t({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}async createCustomToast(t){let o=B(t);return await this.updateCustomToastList(),o}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:o}=t,{pendingTransactionToasts:e,completedTransactionToasts:n}=await w({store:t});this.transactionToasts=[...e,...n];for(let i of o.transactionToasts)this.handleCompletedTransaction(i.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let n="message"in o?{...o}:{...o,instantiateToastElement:R[o.toastId]};this.customToasts.push(n),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(F(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=f[t];return e?.(),P(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),Ut()}};var D=class s{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(),o=h(t),{isExpired:e}=C(o?.nativeAuthToken);e?y().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(),o=h(t),e=J(t);return!!(o?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=y(),o=V(this.store.getState()),e=t.getType()===b.webview;if(!o||e)return;this.addLogoutWarning();let n=h(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=C(n?.nativeAuthToken),c=new K(String(i)),a=`${o}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let l=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},l.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},l.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=S(this.store.getState()),o=h(this.store.getState()),{secondsUntilExpires:e}=C(o?.nativeAuthToken),n=new K(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new K(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=vt(i.toNumber()),p=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return s.instance||(s.instance=new s),s.instance}};async function Wt({sessionId:s,transactionBatch:t,isSequential:o}){try{if(t==null)return;let e=bt(),n=Ct(t),i=await St(n);for(let T of i)await It({serverTransaction:T,sessionId:s,isSequential:o});if(!i.every(T=>T.status!=="pending"))return;e&&await U();let{transactions:c}=g(),a=c?.[s];if(a.transactions.every(T=>T.status==="success"))return L({sessionId:s,status:"success"});if(a.transactions.some(T=>T.status==="fail"))return L({sessionId:s,status:"fail"});if(a.transactions.every(T=>T.status==="not executed"))return L({sessionId:s,status:"invalid"})}catch(e){console.error(e)}}async function Ht(){let s=at(g()),t=Object.entries(s);t.length!==0&&await Promise.all(t.map(([o,{transactions:e}])=>Wt({sessionId:o,transactionBatch:e})))}async function _(){let s=u(),t=Et(),o=null,e=Y(s.getState())?.timestamp??null,n=async()=>{try{await Ht()}catch(p){console.error("[trackTransactions] Error checking transaction status:",p)}},i=()=>{o||(o=setInterval(n,t))},r=()=>{o&&(clearInterval(o),o=null)},c=()=>{r();let p=s.subscribe(({account:{websocketEvent:l}})=>{l?.message&&l.timestamp!=null&&e!==l.timestamp&&(e=l.timestamp,n())});$.set("websocketEventReceived",p)};n();let a=()=>{r()},m=s.subscribe(({account:{address:p},config:{websocketStatus:l}},T)=>{if(T.config.websocketStatus!==l)switch(l){case"completed":c();break;case"pending":i();break;default:p?i():a();break}});return $.set("websocketStatusChanged",m),{stopTransactionsTracking:a}}async function j({address:s,provider:t,apiAddress:o}){let e=await I({address:s,baseURL:o});if(!e)throw new Error("Account not found");Lt({address:s,providerType:t.getType()});let n={...e,username:N(e.username),nonce:E(e)};A(n),await x(s),_(),e.shard!=null&&await wt({shard:Number(e.shard),apiAddress:o})}async function Qt(s){let{network:{apiAddress:t}}=v();await s.login();let o=await s.getAddress();if(!o)throw new Error("Address not found");return await j({address:o,provider:s,apiAddress:t}),{address:o}}async function Xt({provider:s,nativeAuthConfig:t,token:o}){let{network:{apiAddress:e}}=v(),n=nt(t),i=o;i||(i=await n.initialize({noCache:!0}));let r=await s.login({token:i}),{address:c,signature:a,...m}=r;if(!c)return console.warn("Login cancelled."),null;if(!a)return console.error("Failed to sign login token"),null;let p=et(m?.accessToken),l=await xt({loginData:r,nativeAuthConfig:t,loginToken:i}),T=p?m.accessToken:n.getToken({address:c,token:l,signature:a});ot({loginToken:i,signature:a,nativeAuthToken:T});let H=await At({loginToken:i,extraInfoData:{multisig:m?.multisig,impersonate:m?.impersonate},address:c});return await j({address:H,provider:s,apiAddress:e}),{address:H,signature:a}}async function $t(s,t){let o=S(g());if(o)return await Xt({provider:s,nativeAuthConfig:o,token:t?.token});let{address:e}=await Qt(s);return await x(e),_(),{address:e,signature:""}}var z={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${ct}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${rt}-${Date.now()}`}},Zt={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"},to=s=>{for(let[t,o]of Object.entries(Zt))if(s.includes(t))return o;return"Error when signing"};function q(s,t="error"){let o=s?.message,e=to(o),i=e!=="Error when signing"?"warning":t,r=Object.keys(z).includes(i)?z[i]:z.error,{toastId:c,iconClassName:a,title:m}=r;return B({toastId:c,duration:1e4,icon:"close",iconClassName:a,message:e,title:m}),e}async function Gt({provider:s,transactions:t,options:o={}}){await U();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Ft(),r=s.getType()===b.ledger,c=Mt({latestNonce:i,transactions:t}),a=n&&e&&!o.skipGuardian?c?.map(p=>(p.version=Q.withTxOptions().valueOf(),p.options=Z.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),p.guardian=X.newFromBech32(n),p)):c,m=await s.signTransactions(a)??[];return yt(i+m.length),m}var W=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await $t(this.provider,t);return tt(this.provider.getType()),Kt(this),D.getInstance().init(),o}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 o=await Nt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await Gt({provider:this.provider,transactions:t,options:o})}catch(e){let n=q(e);throw new Error(n)}}async signMessage(t,o){try{return await Ot({provider:this.provider,message:t,options:o})}catch(e){let n=q(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var jt=null;function Kt(s){jt=s}function y(){return jt||new W(kt)}var oo=async()=>{try{let s=it(),{network:t}=v();try{let o=await I({address:s,baseURL:t.apiAddress});if(o!=null){let e={...o,username:N(o.username),nonce:E(o)};return A(e),e}}catch(o){console.error("Failed getting account ",o)}}catch(s){console.error("Failed getting address ",s)}return null};async function U(){let s=y();if(s==null)throw"Provider not initialized";try{if(!s.init)throw"Current provider does not have init() function";return await s.init()?await oo():void 0}catch(t){console.error("Failed initializing provider ",t)}}var R={},f={},so=(s,t)=>{u().setState(({toasts:o})=>{let e=o.customToasts.length>0?Math.max(...o.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=o.customToasts.findIndex(a=>a.toastId===n),r={...s,toastId:n};if(i!==-1){o.customToasts[i]=r;return}o.customToasts.push({...r,toastId:n})},!1,{type:"addCustomToast",payload:{value:{customToast:s,currentToastId:t}}})},P=s=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==s)},!1,{type:"removeCustomToast",payload:{value:s}})},Ut=()=>{u().setState(({toasts:s})=>{s.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},an=()=>{u().setState(({toasts:s})=>{s.transactionToasts=[]})},_t=({toastId:s,totalDuration:t})=>{let o="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;o=s??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:st(),endTime:Rt(t),toastId:o})},!1,"addTransactionToast"),o},F=s=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==s)},!1,"removeTransactionToast"),delete f[s],delete R[s]},B=s=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=s.toastId||`custom-toast-${o+1}`;return s.onClose&&(f[e]=s.onClose),s.instantiateToastElement?(R[e]=s.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...s,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(so(s,e),e)};export{R as a,f as b,so as c,P as d,Ut as e,an as f,_t as g,F as h,B as i,O as j,M as k,k as l,d as m,D as n,Wt as o,Ht as p,_ as q,j as r,$t as s,q as t,Gt as u,W as v,Kt as w,y as x,U as y};
|
|
2
|
+
//# sourceMappingURL=chunk-HRRO627B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-BOXGW3SR.mjs";import{a as u}from"./chunk-REYJ4EFS.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as T}from"./chunk-HMAL7GVA.mjs";import{a as m}from"./chunk-U3UMCTU6.mjs";import{a as k}from"./chunk-YJCTRUJT.mjs";import{c as l}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-KSC3RFHN.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:h}){let f=h.map(e=>T({address:v,explorerAddress:a,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await p({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=u({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=m.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??l,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:k({explorerAddress:a,to: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:d.valueDecimal,valueInteger:d.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:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ITI5ANFI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-DGFYEV3J.mjs";import{b as e}from"./chunk-7VHTZYM2.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-J3PAP5L7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-ZOQVPZWZ.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-J7UVIFYD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-YK7T6MBD.mjs";import{a as u}from"./chunk-KMJMQEXI.mjs";import{q as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-YK7T6MBD.mjs";import{a as u}from"./chunk-KMJMQEXI.mjs";import{q as c}from"./chunk-DGFYEV3J.mjs";import{a as w}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";var e=o=>c().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...w,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await l(a),f=r.roundDuration?null:await u(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-JV5L4B73.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-2YEAP742.mjs";import{c as e,g as s}from"./chunk-NTEMINYA.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-K2CYC6YQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-DGFYEV3J.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-K2Z5JQB6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-DGFYEV3J.mjs";var C=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,{type:"setNativeAuthConfig",payload:{value:t}}),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,{type:"setWebsocketStatus",payload:{value:t}}),f=t=>o().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,l=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:l,walletConnectV2RelayAddress:a}},!1,{type:"setWalletConnectConfig",payload:{value:t}});export{C as a,c as b,f as c};
|
|
2
|
+
//# sourceMappingURL=chunk-KDBMGECR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-2M3OATOJ.mjs";import{a as O}from"./chunk-J7UVIFYD.mjs";import{a as B}from"./chunk-HTUNEXJ6.mjs";import{a as b}from"./chunk-ZQLEJXPX.mjs";import{a as A}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-VXBGAYMV.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-4HVKYSYB.mjs";import{a as R}from"./chunk-K373M2BG.mjs";import{a as j}from"./chunk-5KCP7UJT.mjs";import{s as x}from"./chunk-DGFYEV3J.mjs";import{b as v}from"./chunk-7VHTZYM2.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=k(),g=v(x()),C=B(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=O.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 A({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KWPLSEMY.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-QVQOCBO6.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{b as i}from"./chunk-ZPELMVTN.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{s as n}from"./chunk-DGFYEV3J.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LFIRLUYG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-VLDGQL7B.mjs";import{a as s}from"./chunk-WIPFIC6A.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-XUNR4H62.mjs";import{b as L}from"./chunk-YJ4UF7WR.mjs";import{a as I}from"./chunk-YJCTRUJT.mjs";import{f as p}from"./chunk-DGFYEV3J.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-LJX4MW7B.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=A.getInstance(),T=k(),b=h({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),L({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LVGH7JBF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-CRTAVEFT.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";import{a as e,b as t}from"./chunk-GOFUMUQT.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-MLPNNQ52.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{x as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{x as g}from"./chunk-HRRO627B.mjs";import{q as M}from"./chunk-DGFYEV3J.mjs";import{a as d}from"./chunk-UERJ6AKK.mjs";import{a as u,c as p,g as l}from"./chunk-NTEMINYA.mjs";import{a as c}from"./chunk-GOFUMUQT.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){c.addEventListener("message",this.handleMessage)}stopListening(){c.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 r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.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}=d(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=d(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).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(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MRMPIS2Z.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-GOFUMUQT.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NLEPTN7T.mjs.map
|