@multiversx/sdk-dapp 5.2.10 → 5.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/{chunk-GX4KNYGP.mjs → chunk-2GWRGSHX.mjs} +2 -2
- package/out/__chunks__/{chunk-HPTXBXHJ.mjs → chunk-3Z2CWDRX.mjs} +2 -2
- package/out/__chunks__/{chunk-Y7ZCHIBP.mjs → chunk-5STPHU5I.mjs} +2 -2
- package/out/__chunks__/{chunk-4W7VD2PQ.mjs → chunk-5UEYQ2KL.mjs} +2 -2
- package/out/__chunks__/{chunk-HBVPPEMP.mjs → chunk-6F3EV2Y4.mjs} +2 -2
- package/out/__chunks__/{chunk-32ZP2NA6.mjs → chunk-6NWGAFI5.mjs} +2 -2
- package/out/__chunks__/{chunk-SQUXVDTO.mjs → chunk-73NTM43N.mjs} +2 -2
- package/out/__chunks__/chunk-7CT7RHSK.mjs +2 -0
- package/out/__chunks__/{chunk-FCAIW3C4.mjs.map → chunk-7CT7RHSK.mjs.map} +3 -3
- package/out/__chunks__/{chunk-X3RT7CXY.mjs → chunk-7Z26MA4H.mjs} +2 -2
- package/out/__chunks__/{chunk-IKZRDQXB.mjs → chunk-AU76TGKZ.mjs} +2 -2
- package/out/__chunks__/{chunk-BOKD6CTQ.mjs → chunk-BDZ33IMP.mjs} +2 -2
- package/out/__chunks__/{chunk-2IPQUVFZ.mjs → chunk-BHLMFKLS.mjs} +2 -2
- package/out/__chunks__/{chunk-DR2RQBDW.mjs → chunk-BOJYDCZ5.mjs} +2 -2
- package/out/__chunks__/chunk-BQS32EX5.mjs +2 -0
- package/out/__chunks__/chunk-BQS32EX5.mjs.map +7 -0
- package/out/__chunks__/{chunk-RMKDRVVK.mjs → chunk-BWBYU7R4.mjs} +2 -2
- package/out/__chunks__/{chunk-6J4ZOG53.mjs → chunk-BXQLGIN7.mjs} +2 -2
- package/out/__chunks__/{chunk-VAQUUZMV.mjs → chunk-C2LXUREL.mjs} +2 -2
- package/out/__chunks__/chunk-C7S2TI5Y.mjs +2 -0
- package/out/__chunks__/{chunk-53HH2AX6.mjs → chunk-CG2SW6XW.mjs} +2 -2
- package/out/__chunks__/{chunk-XYI6Z7HW.mjs → chunk-CMFJB4UN.mjs} +2 -2
- package/out/__chunks__/chunk-CP36QS3V.mjs +2 -0
- package/out/__chunks__/{chunk-AOEO2MCS.mjs → chunk-D52CJHAM.mjs} +2 -2
- package/out/__chunks__/chunk-D5UNIS2B.mjs +2 -0
- package/out/__chunks__/{chunk-BDOAKSWS.mjs → chunk-DJOKOGGV.mjs} +2 -2
- package/out/__chunks__/{chunk-EKETQ62A.mjs → chunk-DSC7OKM6.mjs} +2 -2
- package/out/__chunks__/{chunk-5B3IMNMM.mjs → chunk-EEZK3T5O.mjs} +2 -2
- package/out/__chunks__/{chunk-U5QF5Y2B.mjs → chunk-ENBZNLXA.mjs} +2 -2
- package/out/__chunks__/{chunk-T7BIXMLU.mjs → chunk-EZOGRX23.mjs} +2 -2
- package/out/__chunks__/{chunk-CIL2QDFE.mjs → chunk-F5JYH2GE.mjs} +2 -2
- package/out/__chunks__/chunk-FCIYC4FM.mjs +2 -0
- package/out/__chunks__/chunk-FEP3SR47.mjs +2 -0
- package/out/__chunks__/{chunk-KMBJLWMI.mjs → chunk-FEYKZZ67.mjs} +2 -2
- package/out/__chunks__/{chunk-KMBJLWMI.mjs.map → chunk-FEYKZZ67.mjs.map} +2 -2
- package/out/__chunks__/{chunk-WY6AKFN5.mjs → chunk-FJAJCSAI.mjs} +2 -2
- package/out/__chunks__/{chunk-2KIBXIRH.mjs → chunk-FL33O3CM.mjs} +2 -2
- package/out/__chunks__/{chunk-KWBVQ7SO.mjs → chunk-G26FRQE7.mjs} +2 -2
- package/out/__chunks__/{chunk-BIJ6JKRA.mjs → chunk-G7FYMZJO.mjs} +2 -2
- package/out/__chunks__/{chunk-27NRVV55.mjs → chunk-GC3EGW65.mjs} +2 -2
- package/out/__chunks__/chunk-GO33UPCG.mjs +2 -0
- package/out/__chunks__/chunk-H5OF5YQF.mjs +2 -0
- package/out/__chunks__/{chunk-YYZ3NO6N.mjs.map → chunk-H5OF5YQF.mjs.map} +2 -2
- package/out/__chunks__/chunk-HD6AKORP.mjs +2 -0
- package/out/__chunks__/{chunk-6GCLPDPY.mjs.map → chunk-HD6AKORP.mjs.map} +2 -2
- package/out/__chunks__/{chunk-QLK4G3MB.mjs → chunk-HWI2QO32.mjs} +2 -2
- package/out/__chunks__/chunk-I6JLRP5Y.mjs +2 -0
- package/out/__chunks__/chunk-IECHAN5Y.mjs +2 -0
- package/out/__chunks__/{chunk-GHYWHCEU.mjs → chunk-IJTXME3Q.mjs} +2 -2
- package/out/__chunks__/{chunk-DM7INZPL.mjs → chunk-J4GRXGQI.mjs} +2 -2
- package/out/__chunks__/{chunk-AXCZ6LN5.mjs → chunk-J5MXSFGF.mjs} +2 -2
- package/out/__chunks__/{chunk-UCYO4ETU.mjs → chunk-JFWHJ7VA.mjs} +2 -2
- package/out/__chunks__/chunk-JOXEQBHW.mjs +2 -0
- package/out/__chunks__/{chunk-ELMZZQ4D.mjs → chunk-JUX7RQED.mjs} +2 -2
- package/out/__chunks__/chunk-LAOAFA7S.mjs +2 -0
- package/out/__chunks__/{chunk-4LUDQ3EQ.mjs → chunk-LBFTX44W.mjs} +2 -2
- package/out/__chunks__/{chunk-VIAELTP4.mjs → chunk-LQ3UGB46.mjs} +2 -2
- package/out/__chunks__/chunk-NKZX4KJF.mjs +2 -0
- package/out/__chunks__/{chunk-TEY7ZFKW.mjs → chunk-O4PUBLYW.mjs} +2 -2
- package/out/__chunks__/{chunk-LQ2CV7ZR.mjs → chunk-OHK76MFX.mjs} +2 -2
- package/out/__chunks__/{chunk-4DWIKUKQ.mjs → chunk-OR3D6ZH4.mjs} +2 -2
- package/out/__chunks__/chunk-Q7KYVZUM.mjs +2 -0
- package/out/__chunks__/{chunk-SYU7YQKL.mjs → chunk-Q7TZ6C22.mjs} +2 -2
- package/out/__chunks__/{chunk-5AHEAMRS.mjs → chunk-QAAOGNH4.mjs} +2 -2
- package/out/__chunks__/{chunk-ITSOIUFJ.mjs → chunk-QG4NGBHS.mjs} +2 -2
- package/out/__chunks__/{chunk-TL4LQKTJ.mjs → chunk-QN2SFLFO.mjs} +2 -2
- package/out/__chunks__/{chunk-44MMZR2Y.mjs → chunk-QOP5T5R4.mjs} +2 -2
- package/out/__chunks__/{chunk-PHIMW3C4.mjs → chunk-R6UWDERK.mjs} +2 -2
- package/out/__chunks__/{chunk-QO2675JJ.mjs → chunk-RDTT74OC.mjs} +2 -2
- package/out/__chunks__/chunk-SERW2VL6.mjs +2 -0
- package/out/__chunks__/{chunk-7KQH4A7J.mjs → chunk-SINQBCBO.mjs} +2 -2
- package/out/__chunks__/{chunk-Z54TI7XZ.mjs → chunk-STNUKKSC.mjs} +2 -2
- package/out/__chunks__/{chunk-MPLWNVA3.mjs → chunk-U6FDF6V4.mjs} +2 -2
- package/out/__chunks__/{chunk-QLNOICTW.mjs → chunk-UWUJKOLU.mjs} +2 -2
- package/out/__chunks__/chunk-UXPWG7TI.mjs +2 -0
- package/out/__chunks__/{chunk-MZP7PTLY.mjs.map → chunk-UXPWG7TI.mjs.map} +1 -1
- package/out/__chunks__/{chunk-7UQ3RVF2.mjs → chunk-VFY6KWJ2.mjs} +2 -2
- package/out/__chunks__/{chunk-5EUVZR4Y.mjs → chunk-W3L462S3.mjs} +2 -2
- package/out/__chunks__/{chunk-BD47IK6A.mjs → chunk-WNJKPQDV.mjs} +2 -2
- package/out/__chunks__/{chunk-OPWW3Q7G.mjs → chunk-WPNLIPMJ.mjs} +2 -2
- package/out/__chunks__/{chunk-EYVJKOIC.mjs → chunk-XGW74YF7.mjs} +2 -2
- package/out/__chunks__/chunk-XJ4DOOWN.mjs +2 -0
- package/out/__chunks__/chunk-XUUR76YU.mjs +2 -0
- package/out/__chunks__/{chunk-YIWK24UR.mjs → chunk-XVPO7ZMT.mjs} +2 -2
- package/out/__chunks__/{chunk-Y6N7WJ2H.mjs → chunk-YGMSU5HA.mjs} +2 -2
- package/out/__chunks__/{chunk-Z6PALKZ5.mjs → chunk-ZATPIKZ2.mjs} +2 -2
- package/out/__chunks__/chunk-ZD74AW3C.mjs +2 -0
- package/out/__chunks__/{chunk-I5NREA3G.mjs → chunk-ZQEBGI5N.mjs} +2 -2
- package/out/__chunks__/{chunk-TZCNJURP.mjs → chunk-ZRN5QF4U.mjs} +2 -2
- package/out/__chunks__/{chunk-WTZJYGFF.mjs → chunk-ZVF3CROB.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/helpers/createTransactionToast.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.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/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.cjs +2 -0
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.cjs.map +7 -0
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.d.ts +7 -0
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +2 -0
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs.map +7 -0
- package/out/providers/DappProvider/helpers/login/login.cjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.cjs.map +3 -3
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.cjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.cjs.map +2 -2
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.cjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.cjs.map +2 -2
- 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.cjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.cjs.map +2 -2
- 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 +1 -1
- package/out/__chunks__/chunk-2POUIERX.mjs +0 -2
- package/out/__chunks__/chunk-52J37XY4.mjs +0 -2
- package/out/__chunks__/chunk-6GCLPDPY.mjs +0 -2
- package/out/__chunks__/chunk-FCAIW3C4.mjs +0 -2
- package/out/__chunks__/chunk-GFCATFXX.mjs +0 -2
- package/out/__chunks__/chunk-GZYKKRIS.mjs +0 -2
- package/out/__chunks__/chunk-HS54AKGS.mjs +0 -2
- package/out/__chunks__/chunk-HZNMVLJ7.mjs +0 -2
- package/out/__chunks__/chunk-LLSDJHEP.mjs +0 -2
- package/out/__chunks__/chunk-M3FTKLQZ.mjs +0 -2
- package/out/__chunks__/chunk-MZP7PTLY.mjs +0 -2
- package/out/__chunks__/chunk-PGM343MK.mjs +0 -2
- package/out/__chunks__/chunk-QJYSB7SV.mjs +0 -2
- package/out/__chunks__/chunk-R6G6DHC2.mjs +0 -2
- package/out/__chunks__/chunk-UQ2HW3W6.mjs +0 -2
- package/out/__chunks__/chunk-W47J6OJW.mjs +0 -2
- package/out/__chunks__/chunk-XT7FQUTK.mjs +0 -2
- package/out/__chunks__/chunk-YP47KPSN.mjs +0 -2
- package/out/__chunks__/chunk-YXPGYZJT.mjs +0 -2
- package/out/__chunks__/chunk-YYZ3NO6N.mjs +0 -2
- /package/out/__chunks__/{chunk-GX4KNYGP.mjs.map → chunk-2GWRGSHX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HPTXBXHJ.mjs.map → chunk-3Z2CWDRX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y7ZCHIBP.mjs.map → chunk-5STPHU5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4W7VD2PQ.mjs.map → chunk-5UEYQ2KL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HBVPPEMP.mjs.map → chunk-6F3EV2Y4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-32ZP2NA6.mjs.map → chunk-6NWGAFI5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SQUXVDTO.mjs.map → chunk-73NTM43N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-X3RT7CXY.mjs.map → chunk-7Z26MA4H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IKZRDQXB.mjs.map → chunk-AU76TGKZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BOKD6CTQ.mjs.map → chunk-BDZ33IMP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2IPQUVFZ.mjs.map → chunk-BHLMFKLS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DR2RQBDW.mjs.map → chunk-BOJYDCZ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RMKDRVVK.mjs.map → chunk-BWBYU7R4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6J4ZOG53.mjs.map → chunk-BXQLGIN7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VAQUUZMV.mjs.map → chunk-C2LXUREL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-M3FTKLQZ.mjs.map → chunk-C7S2TI5Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-53HH2AX6.mjs.map → chunk-CG2SW6XW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XYI6Z7HW.mjs.map → chunk-CMFJB4UN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YP47KPSN.mjs.map → chunk-CP36QS3V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AOEO2MCS.mjs.map → chunk-D52CJHAM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-W47J6OJW.mjs.map → chunk-D5UNIS2B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BDOAKSWS.mjs.map → chunk-DJOKOGGV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EKETQ62A.mjs.map → chunk-DSC7OKM6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5B3IMNMM.mjs.map → chunk-EEZK3T5O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-U5QF5Y2B.mjs.map → chunk-ENBZNLXA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-T7BIXMLU.mjs.map → chunk-EZOGRX23.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CIL2QDFE.mjs.map → chunk-F5JYH2GE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GFCATFXX.mjs.map → chunk-FCIYC4FM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UQ2HW3W6.mjs.map → chunk-FEP3SR47.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WY6AKFN5.mjs.map → chunk-FJAJCSAI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2KIBXIRH.mjs.map → chunk-FL33O3CM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KWBVQ7SO.mjs.map → chunk-G26FRQE7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BIJ6JKRA.mjs.map → chunk-G7FYMZJO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-27NRVV55.mjs.map → chunk-GC3EGW65.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QJYSB7SV.mjs.map → chunk-GO33UPCG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QLK4G3MB.mjs.map → chunk-HWI2QO32.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GZYKKRIS.mjs.map → chunk-I6JLRP5Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PGM343MK.mjs.map → chunk-IECHAN5Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GHYWHCEU.mjs.map → chunk-IJTXME3Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DM7INZPL.mjs.map → chunk-J4GRXGQI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AXCZ6LN5.mjs.map → chunk-J5MXSFGF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UCYO4ETU.mjs.map → chunk-JFWHJ7VA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2POUIERX.mjs.map → chunk-JOXEQBHW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ELMZZQ4D.mjs.map → chunk-JUX7RQED.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HZNMVLJ7.mjs.map → chunk-LAOAFA7S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4LUDQ3EQ.mjs.map → chunk-LBFTX44W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VIAELTP4.mjs.map → chunk-LQ3UGB46.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LLSDJHEP.mjs.map → chunk-NKZX4KJF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TEY7ZFKW.mjs.map → chunk-O4PUBLYW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LQ2CV7ZR.mjs.map → chunk-OHK76MFX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4DWIKUKQ.mjs.map → chunk-OR3D6ZH4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HS54AKGS.mjs.map → chunk-Q7KYVZUM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SYU7YQKL.mjs.map → chunk-Q7TZ6C22.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AHEAMRS.mjs.map → chunk-QAAOGNH4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ITSOIUFJ.mjs.map → chunk-QG4NGBHS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TL4LQKTJ.mjs.map → chunk-QN2SFLFO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-44MMZR2Y.mjs.map → chunk-QOP5T5R4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PHIMW3C4.mjs.map → chunk-R6UWDERK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QO2675JJ.mjs.map → chunk-RDTT74OC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YXPGYZJT.mjs.map → chunk-SERW2VL6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7KQH4A7J.mjs.map → chunk-SINQBCBO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z54TI7XZ.mjs.map → chunk-STNUKKSC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MPLWNVA3.mjs.map → chunk-U6FDF6V4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QLNOICTW.mjs.map → chunk-UWUJKOLU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7UQ3RVF2.mjs.map → chunk-VFY6KWJ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5EUVZR4Y.mjs.map → chunk-W3L462S3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BD47IK6A.mjs.map → chunk-WNJKPQDV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OPWW3Q7G.mjs.map → chunk-WPNLIPMJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EYVJKOIC.mjs.map → chunk-XGW74YF7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R6G6DHC2.mjs.map → chunk-XJ4DOOWN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XT7FQUTK.mjs.map → chunk-XUUR76YU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YIWK24UR.mjs.map → chunk-XVPO7ZMT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y6N7WJ2H.mjs.map → chunk-YGMSU5HA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z6PALKZ5.mjs.map → chunk-ZATPIKZ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-52J37XY4.mjs.map → chunk-ZD74AW3C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I5NREA3G.mjs.map → chunk-ZQEBGI5N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TZCNJURP.mjs.map → chunk-ZRN5QF4U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WTZJYGFF.mjs.map → chunk-ZVF3CROB.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ce}from"./chunk-M3YL36ZL.mjs";import{a as A}from"./chunk-QLNOICTW.mjs";import{a as ae}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-DM7INZPL.mjs";import{a as R}from"./chunk-DR2RQBDW.mjs";import{a as ne}from"./chunk-AOEO2MCS.mjs";import{a as ie}from"./chunk-5B3IMNMM.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-I5NREA3G.mjs";import{a as p}from"./chunk-ELMZZQ4D.mjs";import{a as re}from"./chunk-BD47IK6A.mjs";import{a as S}from"./chunk-SYU7YQKL.mjs";import{a as se}from"./chunk-GX4KNYGP.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as ee}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Z}from"./chunk-7B7XIPV2.mjs";import{i as J,m as N,v as M,w as C,x as L}from"./chunk-FCAIW3C4.mjs";import{a as y}from"./chunk-GFCATFXX.mjs";import{a as X}from"./chunk-QJYSB7SV.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Q}from"./chunk-TL4LQKTJ.mjs";import{g as Y}from"./chunk-M6MN4RXG.mjs";import{a as q,q as F,s as c}from"./chunk-5EUVZR4Y.mjs";import{f as H}from"./chunk-UERJ6AKK.mjs";import{b as f,c as B}from"./chunk-7VHTZYM2.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as $,c as j}from"./chunk-6JM4DPOH.mjs";import{a as l,b as K}from"./chunk-6R2WFQ7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await le({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((i,s)=>ne({manager:e,resolve:i,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,k=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let n=this.store.getState(),{providerType:e}=G(n),r=H(n);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let n=ee(c());if(!(!this.shouldCheckConnection()||n))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let n=new w({shouldInitProvider:!0});await n.init();let e=new M(n);n.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var T=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let i=await this.provider.signTransactions(e)??[];return await se(i)}catch(i){throw await r({shouldCancelAction:!0}),i}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!1}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var W=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(i){throw await t({shouldCancelAction:!0}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[o.metamask]})};this.walletUrl=r??"",this.provider=ce.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return o.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as we}from"@multiversx/sdk-wallet-connect-provider/out";var pe=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],x=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{i.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:I.CANCEL_ACTION,action:we.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:i}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=i,A.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=B(c());if($(c())&&pe.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,P=new Z(v,t,D,m,O);return await P.init(),{walletConnectProvider:P,dappMethods:pe}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=A.getInstance(),{uri:i="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:i,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(i)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:i="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!i}),{address:i,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var E=class{static set customProviders(n){this._customProviders=n}static get customProviders(){return this._customProviders}static async create({type:n,anchor:e}){let r=null;switch(n){case o.extension:{r=new _;break}case o.crossWindow:{r=new T;break}case o.ledger:{r=new w({anchor:e}),await k.getInstance().init();break}case o.metamask:{r=new W;break}case o.passkey:{let s=f(c());r=new T({walletAddress:`${s.walletAddress}?${K}=${o.passkey}`});break}case o.walletConnect:{let s=j(c());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=X();for(let d of this._customProviders)d.type===n&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let i="provider"in r&&r.provider instanceof b;return ae(i?{skipLoginMethod:o.crossWindow}:null),t}static async destroy(){L().cancelLogin(),C(null),q(o.none)}};E._customProviders=[];var Pe=(a,n)=>a.some(e=>e.type===n);async function g({message:a,handleSignMessage:n,cancelAction:e,providerType:r}){return await new Promise(async(i,s)=>{let{manager:d,onClose:h}=await re({cancelAction:e}),v=Object.values(E.customProviders),m=v.reduce((u,V)=>(u[V.type]=V.name,u),{}),O={...l,...m},D=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let P=Pe(v,r)?r:o.none;d.updateData({name:O[P],type:P});try{let u=await n(a);i(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function le({message:a,handleSignMessage:n}){try{return await g({message:a,handleSignMessage:n,providerType:l.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{le as a,w as b,k as c,E as d,g as e,T as f,_ as g,W as h,x as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as ce}from"./chunk-M3YL36ZL.mjs";import{a as A}from"./chunk-UWUJKOLU.mjs";import{a as ae}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-J4GRXGQI.mjs";import{a as R}from"./chunk-BOJYDCZ5.mjs";import{a as ne}from"./chunk-D52CJHAM.mjs";import{a as ie}from"./chunk-EEZK3T5O.mjs";import{a as te}from"./chunk-YUFPUG5O.mjs";import{a as de}from"./chunk-ZQEBGI5N.mjs";import{a as p}from"./chunk-JUX7RQED.mjs";import{a as re}from"./chunk-WNJKPQDV.mjs";import{a as S}from"./chunk-Q7TZ6C22.mjs";import{a as se}from"./chunk-2GWRGSHX.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as ee}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Z}from"./chunk-7B7XIPV2.mjs";import{i as J,m as N,v as M,w as C,x as L}from"./chunk-7CT7RHSK.mjs";import{a as y}from"./chunk-FCIYC4FM.mjs";import{a as X}from"./chunk-GO33UPCG.mjs";import{a as U}from"./chunk-4TBVQD27.mjs";import{a as Q}from"./chunk-QN2SFLFO.mjs";import{g as Y}from"./chunk-M6MN4RXG.mjs";import{a as q,q as F,s as c}from"./chunk-W3L462S3.mjs";import{f as H}from"./chunk-UERJ6AKK.mjs";import{b as f,c as B}from"./chunk-7VHTZYM2.mjs";import{a as G}from"./chunk-VNLGNNIL.mjs";import{b as $,c as j}from"./chunk-6JM4DPOH.mjs";import{a as l,b as K}from"./chunk-6R2WFQ7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";var w=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await R.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await le({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ie({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=R.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((i,s)=>ne({manager:e,resolve:i,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,k=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let n=this.store.getState(),{providerType:e}=G(n),r=H(n);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let n=ee(c());if(!(!this.shouldCheckConnection()||n))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let n=new w({shouldInitProvider:!0});await n.init();let e=new M(n);n.getType=()=>o.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var T=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let i=await this.provider.signTransactions(e)??[];return await se(i)}catch(i){throw await r({shouldCancelAction:!0}),i}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!1}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var W=class extends p{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await S({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})}catch(i){throw await t({shouldCancelAction:!0}),i}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[o.metamask]})};this.walletUrl=r??"",this.provider=ce.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return o.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as we}from"@multiversx/sdk-wallet-connect-provider/out";var pe=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],x=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{i.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:I.CANCEL_ACTION,action:we.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:i}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??U.walletConnectDeepLink;this._approval=i,A.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await A.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=B(c());if($(c())&&pe.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{Q()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:O={},walletConnectV2RelayAddress:D=""}=e,P=new Z(v,t,D,m,O);return await P.init(),{walletConnectProvider:P,dappMethods:pe}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=A.getInstance(),{uri:i="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??U.walletConnectDeepLink;t.updateData({wcURI:i,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(i)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:i="",signature:s=""}=t??{};return A.getInstance().handleClose({isLoginFinished:!!i}),{address:i,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var E=class{static set customProviders(n){this._customProviders=n}static get customProviders(){return this._customProviders}static async create({type:n,anchor:e}){let r=null;switch(n){case o.extension:{r=new _;break}case o.crossWindow:{r=new T;break}case o.ledger:{r=new w({anchor:e}),await k.getInstance().init();break}case o.metamask:{r=new W;break}case o.passkey:{let s=f(c());r=new T({walletAddress:`${s.walletAddress}?${K}=${o.passkey}`});break}case o.walletConnect:{let s=j(c());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...s});break}case o.webview:{r=new de;break}default:{let s=X();for(let d of this._customProviders)d.type===n&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let i="provider"in r&&r.provider instanceof b;return ae(i?{skipLoginMethod:o.crossWindow}:null),t}static async destroy(){L().cancelLogin(),C(null),q(o.none)}};E._customProviders=[];var Pe=(a,n)=>a.some(e=>e.type===n);async function g({message:a,handleSignMessage:n,cancelAction:e,providerType:r}){return await new Promise(async(i,s)=>{let{manager:d,onClose:h}=await re({cancelAction:e}),v=Object.values(E.customProviders),m=v.reduce((u,V)=>(u[V.type]=V.name,u),{}),O={...l,...m},D=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",D);let P=Pe(v,r)?r:o.none;d.updateData({name:O[P],type:P});try{let u=await n(a);i(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function le({message:a,handleSignMessage:n}){try{return await g({message:a,handleSignMessage:n,providerType:l.ledger})}catch(e){let{errorMessage:r}=te(e);throw r?{message:r}:e}}export{le as a,w as b,k as c,E as d,g as e,T as f,_ as g,W as h,x as i};
|
|
2
|
+
//# sourceMappingURL=chunk-BWBYU7R4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-W3L462S3.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BXQLGIN7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-BWBYU7R4.mjs";import{a as u}from"./chunk-AU76TGKZ.mjs";import{s as c}from"./chunk-W3L462S3.mjs";import{b as d}from"./chunk-7VHTZYM2.mjs";import{a as v}from"./chunk-6R2WFQ7U.mjs";import{a}from"./chunk-LJX4MW7B.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-C2LXUREL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-ENBZNLXA.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-CG2SW6XW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-DSC7OKM6.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-NI7XCWV5.mjs";import{g as f}from"./chunk-7CT7RHSK.mjs";import{a as S}from"./chunk-N55JEIM6.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as y}from"./chunk-ZVF3CROB.mjs";import{a as h}from"./chunk-IECHAN5Y.mjs";import{h as g}from"./chunk-M6MN4RXG.mjs";import{s as l}from"./chunk-W3L462S3.mjs";import{b as m}from"./chunk-7VHTZYM2.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=S(s),n=y({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return f({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=m(l());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=h(),{apiAddress:s,apiTimeout:o}=m(l());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${g}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CMFJB4UN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-EEZK3T5O.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-FCIYC4FM.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-D52CJHAM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-UXPWG7TI.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-DJOKOGGV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SQ3EODA7.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SQ3EODA7.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-W3L462S3.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-DSC7OKM6.mjs.map
|
|
@@ -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-7CT7RHSK.mjs";import{a as c}from"./chunk-FCIYC4FM.mjs";import{s as n}from"./chunk-W3L462S3.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-EEZK3T5O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-UXPWG7TI.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ENBZNLXA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-VFY6KWJ2.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-EZOGRX23.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-D5UNIS2B.mjs";import{a as m}from"./chunk-G7GU37XI.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-F5JYH2GE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-G7FYMZJO.mjs";import{a as u}from"./chunk-I6JLRP5Y.mjs";import{a as l}from"./chunk-WCEZVGFB.mjs";import{s as f}from"./chunk-W3L462S3.mjs";import{c as T}from"./chunk-UERJ6AKK.mjs";import{f as h,g as d}from"./chunk-7VHTZYM2.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??f(),o=[],i=[];if(r.forEach(s=>{let e=u(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=l({transaction:s,address:T(t),explorerAddress:d(t),egldLabel:h(t)});e.status!=="pending"&&S({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FEYKZZ67.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.ts"],
|
|
4
|
-
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { saveToCache } from 'store/actions/cache/cacheActions';\nimport { addressSelector } from 'store/selectors/accountSelectors';\nimport {\n egldLabelSelector,\n explorerAddressSelector\n} from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { StoreType } from 'store/store.types';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { getCachedTransactionListItem } from './getCachedTransactionListItem';\nimport { mapTransactionToListItem } from './mapTransactionToListItem';\n\ninterface IMapServerTransactionsToListItemsParams {\n transactions: SignedTransactionType[];\n store?: StoreType;\n}\n\nconst sortTransactionsByTimestamp = (transactions: ITransactionListItem[]) =>\n transactions.sort((a, b) => b.timestamp - a.timestamp);\n\nexport const mapServerTransactionsToListItems = async ({\n transactions,\n ...props\n}: IMapServerTransactionsToListItemsParams): Promise<\n ITransactionListItem[]\n> => {\n const store = props.store ?? getState();\n const cachedTransactions: ITransactionListItem[] = [];\n const hashesToFetch: string[] = [];\n\n transactions.forEach((transaction) => {\n const cachedTransaction = getCachedTransactionListItem(\n transaction.hash,\n store\n );\n if (cachedTransaction) {\n cachedTransactions.push(cachedTransaction);\n } else {\n hashesToFetch.push(transaction.hash);\n }\n });\n\n if (hashesToFetch.length === 0) {\n return sortTransactionsByTimestamp(cachedTransactions);\n }\n\n
|
|
5
|
-
"mappings": "6PAoBA,IAAMA,EAA+BC,GACnCA,EAAa,KAAK,CAACC,EAAGC,IAAMA,EAAE,UAAYD,EAAE,SAAS,EAE1CE,EAAmC,MAAO,CACrD,aAAAH,EACA,GAAGI,CACL,IAEK,CACH,IAAMC,EAAQD,EAAM,OAASE,EAAS,EAChCC,EAA6C,CAAC,EAC9CC,EAA0B,CAAC,EAcjC,GAZAR,EAAa,QAASS,GAAgB,CACpC,IAAMC,EAAoBC,EACxBF,EAAY,KACZJ,CACF,EACIK,EACFH,EAAmB,KAAKG,CAAiB,EAEzCF,EAAc,KAAKC,EAAY,IAAI,CAEvC,CAAC,EAEGD,EAAc,SAAW,EAC3B,OAAOT,EAA4BQ,CAAkB,EAGvD,
|
|
4
|
+
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport { saveToCache } from 'store/actions/cache/cacheActions';\nimport { addressSelector } from 'store/selectors/accountSelectors';\nimport {\n egldLabelSelector,\n explorerAddressSelector\n} from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { StoreType } from 'store/store.types';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { getCachedTransactionListItem } from './getCachedTransactionListItem';\nimport { mapTransactionToListItem } from './mapTransactionToListItem';\n\ninterface IMapServerTransactionsToListItemsParams {\n transactions: SignedTransactionType[];\n store?: StoreType;\n}\n\nconst sortTransactionsByTimestamp = (transactions: ITransactionListItem[]) =>\n transactions.sort((a, b) => b.timestamp - a.timestamp);\n\nexport const mapServerTransactionsToListItems = async ({\n transactions,\n ...props\n}: IMapServerTransactionsToListItemsParams): Promise<\n ITransactionListItem[]\n> => {\n const store = props.store ?? getState();\n const cachedTransactions: ITransactionListItem[] = [];\n const hashesToFetch: string[] = [];\n\n transactions.forEach((transaction) => {\n const cachedTransaction = getCachedTransactionListItem(\n transaction.hash,\n store\n );\n if (cachedTransaction) {\n cachedTransactions.push(cachedTransaction);\n } else {\n hashesToFetch.push(transaction.hash);\n }\n });\n\n if (hashesToFetch.length === 0) {\n return sortTransactionsByTimestamp(cachedTransactions);\n }\n\n const newTransactions: ServerTransactionType[] = transactions.map((tx) => ({\n // casting is correct since store transaction was replaced with fetched server transaction\n ...(tx as unknown as ServerTransactionType),\n txHash: tx.hash\n }));\n\n const retrievedHashes = newTransactions.map((tx) => tx.txHash);\n const missingHashes = hashesToFetch.filter(\n (hash) => !retrievedHashes.includes(hash)\n );\n\n if (missingHashes.length > 0) {\n const filteredTransactions = transactions.filter((transaction) =>\n missingHashes.includes(transaction.hash)\n );\n\n // In case the transactions were not found, we create a dummy transaction with the pending status\n // until all pending transactions are returned from the API\n const pendingDummyTransactions = filteredTransactions.map(\n (transaction) =>\n ({\n ...transaction,\n txHash: transaction.hash,\n price: 0,\n status: TransactionServerStatusesEnum.pending,\n gasUsed: 0,\n miniBlockHash: '',\n receiverShard: 0,\n round: 0,\n senderShard: 0,\n timestamp: Date.now()\n }) as ServerTransactionType\n );\n\n newTransactions.push(...pendingDummyTransactions);\n }\n\n const uniqueTransactionsMap = new Map<string, ITransactionListItem>();\n\n cachedTransactions.forEach((item) => {\n const key = item.hash;\n if (!key) {\n return;\n }\n uniqueTransactionsMap.set(String(key), item);\n });\n\n newTransactions.forEach((transaction) => {\n const transactionListItem = mapTransactionToListItem({\n transaction,\n address: addressSelector(store),\n explorerAddress: explorerAddressSelector(store),\n egldLabel: egldLabelSelector(store)\n });\n\n if (transactionListItem.status !== TransactionServerStatusesEnum.pending) {\n saveToCache({\n key: `transaction-${transaction.txHash}`,\n value: transactionListItem\n });\n }\n\n uniqueTransactionsMap.set(transaction.txHash, transactionListItem);\n });\n\n return sortTransactionsByTimestamp(\n Array.from(uniqueTransactionsMap.values())\n );\n};\n"],
|
|
5
|
+
"mappings": "6PAoBA,IAAMA,EAA+BC,GACnCA,EAAa,KAAK,CAACC,EAAGC,IAAMA,EAAE,UAAYD,EAAE,SAAS,EAE1CE,EAAmC,MAAO,CACrD,aAAAH,EACA,GAAGI,CACL,IAEK,CACH,IAAMC,EAAQD,EAAM,OAASE,EAAS,EAChCC,EAA6C,CAAC,EAC9CC,EAA0B,CAAC,EAcjC,GAZAR,EAAa,QAASS,GAAgB,CACpC,IAAMC,EAAoBC,EACxBF,EAAY,KACZJ,CACF,EACIK,EACFH,EAAmB,KAAKG,CAAiB,EAEzCF,EAAc,KAAKC,EAAY,IAAI,CAEvC,CAAC,EAEGD,EAAc,SAAW,EAC3B,OAAOT,EAA4BQ,CAAkB,EAGvD,IAAMK,EAA2CZ,EAAa,IAAKa,IAAQ,CAEzE,GAAIA,EACJ,OAAQA,EAAG,IACb,EAAE,EAEIC,EAAkBF,EAAgB,IAAKC,GAAOA,EAAG,MAAM,EACvDE,EAAgBP,EAAc,OACjCQ,GAAS,CAACF,EAAgB,SAASE,CAAI,CAC1C,EAEA,GAAID,EAAc,OAAS,EAAG,CAO5B,IAAME,EANuBjB,EAAa,OAAQS,GAChDM,EAAc,SAASN,EAAY,IAAI,CACzC,EAIsD,IACnDA,IACE,CACC,GAAGA,EACH,OAAQA,EAAY,KACpB,MAAO,EACP,iBACA,QAAS,EACT,cAAe,GACf,cAAe,EACf,MAAO,EACP,YAAa,EACb,UAAW,KAAK,IAAI,CACtB,EACJ,EAEAG,EAAgB,KAAK,GAAGK,CAAwB,CAClD,CAEA,IAAMC,EAAwB,IAAI,IAElC,OAAAX,EAAmB,QAASY,GAAS,CACnC,IAAMC,EAAMD,EAAK,KACZC,GAGLF,EAAsB,IAAI,OAAOE,CAAG,EAAGD,CAAI,CAC7C,CAAC,EAEDP,EAAgB,QAASH,GAAgB,CACvC,IAAMY,EAAsBC,EAAyB,CACnD,YAAAb,EACA,QAASc,EAAgBlB,CAAK,EAC9B,gBAAiBmB,EAAwBnB,CAAK,EAC9C,UAAWoB,EAAkBpB,CAAK,CACpC,CAAC,EAEGgB,EAAoB,oBACtBK,EAAY,CACV,IAAK,eAAejB,EAAY,MAAM,GACtC,MAAOY,CACT,CAAC,EAGHH,EAAsB,IAAIT,EAAY,OAAQY,CAAmB,CACnE,CAAC,EAEMtB,EACL,MAAM,KAAKmB,EAAsB,OAAO,CAAC,CAC3C,CACF",
|
|
6
6
|
"names": ["sortTransactionsByTimestamp", "transactions", "a", "b", "mapServerTransactionsToListItems", "props", "store", "getState", "cachedTransactions", "hashesToFetch", "transaction", "cachedTransaction", "getCachedTransactionListItem", "newTransactions", "tx", "retrievedHashes", "missingHashes", "hash", "pendingDummyTransactions", "uniqueTransactionsMap", "item", "key", "transactionListItem", "mapTransactionToListItem", "addressSelector", "explorerAddressSelector", "egldLabelSelector", "saveToCache"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-AU76TGKZ.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FJAJCSAI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}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-FEYKZZ67.mjs";import{s as T}from"./chunk-W3L462S3.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-FL33O3CM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-GO33UPCG.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-G26FRQE7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-W3L462S3.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-G7FYMZJO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-XUUR76YU.mjs";import{a as U}from"./chunk-4SS6EY66.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-LN5UXO64.mjs";import{a as B}from"./chunk-PHOF3Z5D.mjs";import{a as $}from"./chunk-RBZC4PEU.mjs";import{a as _}from"./chunk-ELQR4QMU.mjs";import{a as R}from"./chunk-5KCP7UJT.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{a as O}from"./chunk-R6UWDERK.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{x}from"./chunk-7CT7RHSK.mjs";import{a as G}from"./chunk-YJCTRUJT.mjs";import{a as C,c as F,f}from"./chunk-PJWJZHIS.mjs";import{a as b}from"./chunk-KD2IQ32V.mjs";import{c as L}from"./chunk-TI37DKBT.mjs";import{k as h}from"./chunk-LHEH7L4L.mjs";import{a as A}from"./chunk-UXPWG7TI.mjs";import{BigNumber as Dt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:s,egldLabel:n,network:e,gasPriceData:m,price:S,address:c,username:q,shard:H,signedIndexes:i,parsedTransactionsByDataField:K}){let p=T[s],W=p?.transaction?.sender.toString(),d=p?.transaction,o=d?.toPlainObject(),D=null,I=null,t=await _({egldLabel:n,sender:W,apiAddress:e.apiAddress,address:c,parsedTransactionsByDataField:K})(p),g=!t?.transactionTokenInfo?.tokenId,{tokenId:l,nonce:u,amount:y=""}=t?.transactionTokenInfo??{},Z=l&&u&&u.length>0?`${l}-${u}`:l,J=await O({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:a,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")I={type:r,identifier:a,amount:y,imageURL:Y};else{let P=({addCommas:St})=>f({input:g?d.value.toString():y,decimals:g?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:St}),lt=P({addCommas:!0}),ut=P({addCommas:!1}),ft=Number(g?S:Q),Tt=w({amount:ut,usd:ft,addEqualSign:!0});D={identifier:(a===h?n:a)??n,amount:lt,usdValue:Tt}}let{feeLimitFormatted:tt,feeInFiatLimit:ot}=R({transaction:d,price:S}),nt=V({shard:H,initialGasPrice:m.initialGasPrice,transaction:o,gasStationMetadata:e.gasStationMetadata}),et=B({transaction:o,gasPriceData:m}),it=x().getType(),rt=v(it),N=T.length,at=i.length>0?i[i.length-1]+1:0,k=L(o?.data??""),E=$(t?.transactionTokenInfo),st=U({data:k,identifier:a,highlight:E}),mt=M(),ct=G({to:`/${b}/${c}`,explorerAddress:mt}),pt=N===1||t?.needsSigning&&!i.includes(s),dt=f({input:et.toString(),decimals:F,addCommas:!0,digits:C}),gt=new Dt(o.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:o.receiver.toString(),data:k,decodedData:st,gasPrice:dt,gasLimit:gt,explorerLink:ct,ppu:m.ppu,ppuOptions:nt,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:ot,transactionsCount:N,currentIndex:s,currentIndexToSign:at,highlight:E,scCall:z(t?.transactionTokenInfo),needsSigning:pt,isEditable:t?.needsSigning,providerName:rt,address:c,username:q,origin:A.location?.origin},tokenTransaction:D,fungibleTransaction:I}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GC3EGW65.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-ZRN5QF4U.mjs";import{a}from"./chunk-GO33UPCG.mjs";import{a as u}from"./chunk-QN2SFLFO.mjs";import{c as n}from"./chunk-WPNLIPMJ.mjs";import{a as s}from"./chunk-UXPWG7TI.mjs";var g=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&g(r,s.localStorage);try{return u(),n.forEach(c=>c()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-H5OF5YQF.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/providers/DappProvider/helpers/logout/logout.ts"],
|
|
4
|
-
"sourcesContent": ["import { subscriptions } from 'constants/storage.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { getAddress } from 'methods/account/getAddress';\nimport { websocketManager } from 'methods/initApp/websocket/registerWebsocket';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { logoutAction } from 'store/actions/sharedActions/sharedActions';\n\nexport type LogoutPropsType = {\n shouldAttemptReLogin?: boolean;\n shouldBroadcastLogoutAcrossTabs?: boolean;\n /*\n * Only used for web-wallet crossWindow login\n */\n hasConsentPopup?: boolean;\n};\n\ninterface IProviderLogout {\n provider: IProvider;\n options?: LogoutPropsType;\n}\n\nconst broadcastLogoutAcrossTabs = (address: string, localStorage: Storage) => {\n const logoutEventKey = `sdk-dapp-logout-event-${address}`;\n const storedAddress = localStorage.getItem(logoutEventKey);\n\n if (storedAddress && address !== storedAddress) {\n return;\n }\n\n localStorage.setItem(logoutEventKey, address);\n localStorage.removeItem(logoutEventKey);\n};\n\nexport async function logout({\n provider,\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n}: IProviderLogout): Promise<boolean> {\n
|
|
5
|
-
"mappings": "wMAqBA,IAAMA,EAA4B,CAACC,EAAiBC,IAA0B,CAC5E,IAAMC,EAAiB,yBAAyBF,CAAO,GACjDG,EAAgBF,EAAa,QAAQC,CAAc,EAErDC,GAAiBH,IAAYG,IAIjCF,EAAa,QAAQC,EAAgBF,CAAO,EAC5CC,EAAa,WAAWC,CAAc,EACxC,EAEA,eAAsBE,EAAO,CAC3B,SAAAC,EACA,QAAAC,EAAU,CACR,gCAAiC,EACnC,CACF,EAAsC,CACpC,
|
|
4
|
+
"sourcesContent": ["import { subscriptions } from 'constants/storage.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { getAddress } from 'methods/account/getAddress';\nimport { websocketManager } from 'methods/initApp/websocket/registerWebsocket';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { logoutAction } from 'store/actions/sharedActions/sharedActions';\n\nexport type LogoutPropsType = {\n shouldAttemptReLogin?: boolean;\n shouldBroadcastLogoutAcrossTabs?: boolean;\n /*\n * Only used for web-wallet crossWindow login\n */\n hasConsentPopup?: boolean;\n};\n\ninterface IProviderLogout {\n provider: IProvider;\n options?: LogoutPropsType;\n}\n\nconst broadcastLogoutAcrossTabs = (address: string, localStorage: Storage) => {\n const logoutEventKey = `sdk-dapp-logout-event-${address}`;\n const storedAddress = localStorage.getItem(logoutEventKey);\n\n if (storedAddress && address !== storedAddress) {\n return;\n }\n\n localStorage.setItem(logoutEventKey, address);\n localStorage.removeItem(logoutEventKey);\n};\n\nexport async function logout({\n provider,\n options = {\n shouldBroadcastLogoutAcrossTabs: true\n }\n}: IProviderLogout): Promise<boolean> {\n const address = getAddress();\n\n if (options.shouldBroadcastLogoutAcrossTabs && safeWindow.localStorage) {\n broadcastLogoutAcrossTabs(address, safeWindow.localStorage);\n }\n try {\n logoutAction();\n\n // Clear all active subscriptions on logout\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions.clear();\n websocketManager.closeConnectionRef?.();\n const isLoggedOut = await provider.logout();\n return isLoggedOut;\n } catch (err) {\n console.error('Logging out error:', err);\n return false;\n }\n}\n"],
|
|
5
|
+
"mappings": "wMAqBA,IAAMA,EAA4B,CAACC,EAAiBC,IAA0B,CAC5E,IAAMC,EAAiB,yBAAyBF,CAAO,GACjDG,EAAgBF,EAAa,QAAQC,CAAc,EAErDC,GAAiBH,IAAYG,IAIjCF,EAAa,QAAQC,EAAgBF,CAAO,EAC5CC,EAAa,WAAWC,CAAc,EACxC,EAEA,eAAsBE,EAAO,CAC3B,SAAAC,EACA,QAAAC,EAAU,CACR,gCAAiC,EACnC,CACF,EAAsC,CACpC,IAAMN,EAAUO,EAAW,EAEvBD,EAAQ,iCAAmCE,EAAW,cACxDT,EAA0BC,EAASQ,EAAW,YAAY,EAE5D,GAAI,CACF,OAAAC,EAAa,EAGbC,EAAc,QAASC,GAAgBA,EAAY,CAAC,EACpDD,EAAc,MAAM,EACpBE,EAAiB,qBAAqB,EAClB,MAAMP,EAAS,OAAO,CAE5C,OAASQ,EAAK,CACZ,eAAQ,MAAM,qBAAsBA,CAAG,EAChC,EACT,CACF",
|
|
6
6
|
"names": ["broadcastLogoutAcrossTabs", "address", "localStorage", "logoutEventKey", "storedAddress", "logout", "provider", "options", "getAddress", "safeWindow", "logoutAction", "subscriptions", "unsubscribe", "websocketManager", "err"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u}from"./chunk-R6UWDERK.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-HD6AKORP.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.ts"],
|
|
4
|
-
"sourcesContent": ["import { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { addressIsValid } from '../../../validation';\n\ninterface IGetLockedAccountNameParams {\n receiver: string;\n sender: string;\n tokenId?: string;\n}\n\nexport const getLockedAccountName = async ({\n receiver,\n sender,\n tokenId\n}: IGetLockedAccountNameParams) => {\n let senderLockedAccount = null,\n receiverLockedAccount = null;\n\n if (!tokenId) {\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n }\n\n try {\n const tokenDetails = await getPersistedTokenDetails({ tokenId });\n const lockedAccounts = tokenDetails?.assets?.lockedAccounts;\n\n if (!lockedAccounts) {\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n }\n\n for (
|
|
5
|
-
"mappings": "kFASO,IAAMA,EAAuB,MAAO,CACzC,SAAAC,EACA,OAAAC,EACA,QAAAC,CACF,IAAmC,CACjC,IAAIC,EAAsB,KACxBC,EAAwB,KAE1B,GAAI,CAACF,EACH,MAAO,CACL,oBAAAC,EACA,sBAAAC,CACF,EAGF,GAAI,CAEF,IAAMC,GADe,MAAMC,EAAyB,CAAE,QAAAJ,CAAQ,CAAC,IAC1B,QAAQ,eAE7C,GAAI,CAACG,EACH,MAAO,CACL,oBAAAF,EACA,sBAAAC,CACF,EAGF,
|
|
4
|
+
"sourcesContent": ["import { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { addressIsValid } from '../../../validation';\n\ninterface IGetLockedAccountNameParams {\n receiver: string;\n sender: string;\n tokenId?: string;\n}\n\nexport const getLockedAccountName = async ({\n receiver,\n sender,\n tokenId\n}: IGetLockedAccountNameParams) => {\n let senderLockedAccount = null,\n receiverLockedAccount = null;\n\n if (!tokenId) {\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n }\n\n try {\n const tokenDetails = await getPersistedTokenDetails({ tokenId });\n const lockedAccounts = tokenDetails?.assets?.lockedAccounts;\n\n if (!lockedAccounts) {\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n }\n\n for (const account in lockedAccounts) {\n if (addressIsValid(account)) {\n if (sender === account) {\n senderLockedAccount = account;\n }\n\n if (receiver === account) {\n receiverLockedAccount = account;\n }\n }\n\n if (addressIsValid(lockedAccounts[account])) {\n if (sender === lockedAccounts[account]) {\n senderLockedAccount = lockedAccounts[account];\n }\n\n if (receiver === lockedAccounts[account]) {\n receiverLockedAccount = lockedAccounts[account];\n }\n }\n\n if (senderLockedAccount && receiverLockedAccount) {\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n }\n }\n } catch (error) {\n console.error('Error getting token details', error);\n }\n\n return {\n senderLockedAccount,\n receiverLockedAccount\n };\n};\n"],
|
|
5
|
+
"mappings": "kFASO,IAAMA,EAAuB,MAAO,CACzC,SAAAC,EACA,OAAAC,EACA,QAAAC,CACF,IAAmC,CACjC,IAAIC,EAAsB,KACxBC,EAAwB,KAE1B,GAAI,CAACF,EACH,MAAO,CACL,oBAAAC,EACA,sBAAAC,CACF,EAGF,GAAI,CAEF,IAAMC,GADe,MAAMC,EAAyB,CAAE,QAAAJ,CAAQ,CAAC,IAC1B,QAAQ,eAE7C,GAAI,CAACG,EACH,MAAO,CACL,oBAAAF,EACA,sBAAAC,CACF,EAGF,QAAWG,KAAWF,EAqBpB,GApBIG,EAAeD,CAAO,IACpBN,IAAWM,IACbJ,EAAsBI,GAGpBP,IAAaO,IACfH,EAAwBG,IAIxBC,EAAeH,EAAeE,CAAO,CAAC,IACpCN,IAAWI,EAAeE,CAAO,IACnCJ,EAAsBE,EAAeE,CAAO,GAG1CP,IAAaK,EAAeE,CAAO,IACrCH,EAAwBC,EAAeE,CAAO,IAI9CJ,GAAuBC,EACzB,MAAO,CACL,oBAAAD,EACA,sBAAAC,CACF,CAGN,OAASK,EAAO,CACd,QAAQ,MAAM,8BAA+BA,CAAK,CACpD,CAEA,MAAO,CACL,oBAAAN,EACA,sBAAAC,CACF,CACF",
|
|
6
6
|
"names": ["getLockedAccountName", "receiver", "sender", "tokenId", "senderLockedAccount", "receiverLockedAccount", "lockedAccounts", "getPersistedTokenDetails", "account", "addressIsValid", "error"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-XVPO7ZMT.mjs";import{b as r}from"./chunk-5UEYQ2KL.mjs";import{s as i}from"./chunk-W3L462S3.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HWI2QO32.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-N55JEIM6.mjs";import{b as n,c as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-N55JEIM6.mjs";import{b as n,c as o}from"./chunk-ZVF3CROB.mjs";import{s}from"./chunk-W3L462S3.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions?.[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IJTXME3Q.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-BOJYDCZ5.mjs";import{a as s}from"./chunk-F5JYH2GE.mjs";import{a as h}from"./chunk-B2RDSGON.mjs";import{a as k}from"./chunk-XUUR76YU.mjs";import{b as L}from"./chunk-YGMSU5HA.mjs";import{a as I}from"./chunk-YJCTRUJT.mjs";import{f as p}from"./chunk-W3L462S3.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-J4GRXGQI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-UXPWG7TI.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-J5MXSFGF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-W3L462S3.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JFWHJ7VA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-WNJKPQDV.mjs";import{a as e}from"./chunk-GO33UPCG.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-JUX7RQED.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunk-IJTXME3Q.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{b as i}from"./chunk-ZVF3CROB.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{s as n}from"./chunk-W3L462S3.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-LAOAFA7S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-W3L462S3.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-LBFTX44W.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-UXPWG7TI.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-LQ3UGB46.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-EZOGRX23.mjs";import{c as n}from"./chunk-W3L462S3.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-NKZX4KJF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-OHK76MFX.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O4PUBLYW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-JFWHJ7VA.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-OHK76MFX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-73NTM43N.mjs";import{d as m,e as l}from"./chunk-YGMSU5HA.mjs";import{q as a}from"./chunk-W3L462S3.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=500,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OR3D6ZH4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-XJ4DOOWN.mjs";import{a as O}from"./chunk-3Z2CWDRX.mjs";import{a as B}from"./chunk-SERW2VL6.mjs";import{a as b}from"./chunk-STNUKKSC.mjs";import{a as A}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-GC3EGW65.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-2GWRGSHX.mjs";import{a as R}from"./chunk-K373M2BG.mjs";import{a as j}from"./chunk-5KCP7UJT.mjs";import{s as x}from"./chunk-W3L462S3.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-Q7TZ6C22.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-BWBYU7R4.mjs";import{w as a}from"./chunk-7CT7RHSK.mjs";import{s as n}from"./chunk-W3L462S3.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as d}from"./chunk-CG2SW6XW.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-QAAOGNH4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-U6FDF6V4.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-QG4NGBHS.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-W3L462S3.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-QN2SFLFO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-LAOAFA7S.mjs";import{a as u}from"./chunk-IJTXME3Q.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{b as o}from"./chunk-ZVF3CROB.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-QOP5T5R4.mjs.map
|