@multiversx/sdk-dapp 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -6
- package/out/__chunks__/{chunk-7EZGGGIQ.mjs → chunk-2DUOXMZP.mjs} +2 -2
- package/out/__chunks__/{chunk-P3VXVK33.mjs → chunk-2LIUW5CF.mjs} +2 -2
- package/out/__chunks__/{chunk-CTIBYRMH.mjs → chunk-2SYDJSIO.mjs} +2 -2
- package/out/__chunks__/chunk-32Z4H2Q4.mjs +2 -0
- package/out/__chunks__/{chunk-V7TKRGVU.mjs → chunk-3DZPVOPO.mjs} +2 -2
- package/out/__chunks__/chunk-3JRG3AWF.mjs +2 -0
- package/out/__chunks__/chunk-3JRG3AWF.mjs.map +7 -0
- package/out/__chunks__/{chunk-OOPGEGEC.mjs → chunk-3TM6K4Z4.mjs} +2 -2
- package/out/__chunks__/{chunk-MOJWACYA.mjs → chunk-43SX7DUF.mjs} +2 -2
- package/out/__chunks__/{chunk-OP2IEVBM.mjs → chunk-44AUEOAU.mjs} +2 -2
- package/out/__chunks__/{chunk-MPJUP362.mjs → chunk-4CGAWZR6.mjs} +2 -2
- package/out/__chunks__/{chunk-JA27GJYB.mjs → chunk-573LAOYN.mjs} +2 -2
- package/out/__chunks__/{chunk-EZMDYBQN.mjs → chunk-5PENJRCS.mjs} +2 -2
- package/out/__chunks__/{chunk-HCYLJV62.mjs → chunk-6CMARMS2.mjs} +2 -2
- package/out/__chunks__/{chunk-FVEGUUPB.mjs → chunk-6DAQAOWP.mjs} +2 -2
- package/out/__chunks__/{chunk-V5RYJVEZ.mjs → chunk-6TJZZHFV.mjs} +2 -2
- package/out/__chunks__/chunk-6ZVWYKKI.mjs +2 -0
- package/out/__chunks__/{chunk-O3RDPZCC.mjs → chunk-764JPTJ7.mjs} +2 -2
- package/out/__chunks__/chunk-7DNJ6NZI.mjs +2 -0
- package/out/__chunks__/chunk-7DNJ6NZI.mjs.map +7 -0
- package/out/__chunks__/chunk-7MGK7ZUE.mjs +2 -0
- package/out/__chunks__/{chunk-Y6OAUXIU.mjs → chunk-A4KOSUVU.mjs} +2 -2
- package/out/__chunks__/{chunk-3U35OFEK.mjs → chunk-AIKIPJUG.mjs} +2 -2
- package/out/__chunks__/{chunk-NODAYKNL.mjs → chunk-AOF7QPPF.mjs} +2 -2
- package/out/__chunks__/{chunk-XT3FTPPC.mjs → chunk-AVEWWANG.mjs} +2 -2
- package/out/__chunks__/{chunk-VYVJQXGS.mjs → chunk-AXZ3DHTB.mjs} +2 -2
- package/out/__chunks__/{chunk-ASXSNGBB.mjs → chunk-B77BJX6Z.mjs} +2 -2
- package/out/__chunks__/{chunk-2FVSB4I6.mjs → chunk-BB7POIGL.mjs} +2 -2
- package/out/__chunks__/{chunk-JI5573A3.mjs → chunk-BPOXONMJ.mjs} +2 -2
- package/out/__chunks__/{chunk-J4XVM6TB.mjs → chunk-C65TZQBZ.mjs} +2 -2
- package/out/__chunks__/{chunk-L2GTIQ4M.mjs → chunk-CE4N3GKT.mjs} +2 -2
- package/out/__chunks__/{chunk-RTGDS56O.mjs → chunk-COPAYHAQ.mjs} +2 -2
- package/out/__chunks__/{chunk-S5NXWNSY.mjs → chunk-CT5LMMAW.mjs} +2 -2
- package/out/__chunks__/chunk-CZGN3YPT.mjs +2 -0
- package/out/__chunks__/{chunk-LHLDTVQX.mjs → chunk-DCF6BLSL.mjs} +2 -2
- package/out/__chunks__/chunk-DJUPAQRK.mjs +2 -0
- package/out/__chunks__/chunk-EET35YZW.mjs +2 -0
- package/out/__chunks__/{chunk-BZ6YK6M7.mjs → chunk-EKBFVSFP.mjs} +2 -2
- package/out/__chunks__/{chunk-CCDNY2AY.mjs → chunk-GBYZHNPO.mjs} +2 -2
- package/out/__chunks__/chunk-GQFB3L2J.mjs +2 -0
- package/out/__chunks__/{chunk-UXCL6NKM.mjs → chunk-GWZUTQLT.mjs} +2 -2
- package/out/__chunks__/{chunk-ZPRRRKH2.mjs → chunk-HXFVUYGK.mjs} +2 -2
- package/out/__chunks__/{chunk-ZHKCVM4W.mjs → chunk-IEUUVTQ5.mjs} +2 -2
- package/out/__chunks__/{chunk-BPPANN5H.mjs → chunk-JSYDF4GF.mjs} +2 -2
- package/out/__chunks__/{chunk-I2YHVWIX.mjs → chunk-JZQKOOZH.mjs} +1 -1
- package/out/__chunks__/{chunk-I2YHVWIX.mjs.map → chunk-JZQKOOZH.mjs.map} +1 -1
- package/out/__chunks__/{chunk-HJ4B3QID.mjs → chunk-K4FRH3YU.mjs} +2 -2
- package/out/__chunks__/{chunk-JT4AIBHR.mjs → chunk-LABBTN37.mjs} +2 -2
- package/out/__chunks__/{chunk-NCUUK7SW.mjs → chunk-LSAYT6GA.mjs} +2 -2
- package/out/__chunks__/chunk-LXI42ZLN.mjs +2 -0
- package/out/__chunks__/{chunk-HFY3MGS6.mjs.map → chunk-LXI42ZLN.mjs.map} +2 -2
- package/out/__chunks__/{chunk-XHZWVRMA.mjs → chunk-LY5VXESF.mjs} +2 -2
- package/out/__chunks__/{chunk-OVROSPMG.mjs → chunk-LZKKBLOO.mjs} +2 -2
- package/out/__chunks__/chunk-LZQXEMRC.mjs +2 -0
- package/out/__chunks__/{chunk-F4JEWIED.mjs → chunk-M3G5E4TL.mjs} +2 -2
- package/out/__chunks__/{chunk-XJV7SQ3A.mjs → chunk-M5COEJ24.mjs} +2 -2
- package/out/__chunks__/{chunk-I3LSEZWV.mjs → chunk-MNKQNWZS.mjs} +2 -2
- package/out/__chunks__/{chunk-ZQQN3ZGD.mjs → chunk-N3J6ROD5.mjs} +2 -2
- package/out/__chunks__/chunk-NJUTBWG5.mjs +2 -0
- package/out/__chunks__/chunk-NTCDPOM4.mjs +2 -0
- package/out/__chunks__/{chunk-PPCVJ6HZ.mjs → chunk-NZGZ2C45.mjs} +2 -2
- package/out/__chunks__/{chunk-BU2ZPMEQ.mjs → chunk-OLXCFQVN.mjs} +2 -2
- package/out/__chunks__/chunk-ON2ITKZA.mjs +2 -0
- package/out/__chunks__/{chunk-J6EXAKY6.mjs → chunk-OXJJPBYT.mjs} +2 -2
- package/out/__chunks__/{chunk-QHN6NRIA.mjs → chunk-P3WDIKX5.mjs} +2 -2
- package/out/__chunks__/chunk-P3WDIKX5.mjs.map +7 -0
- package/out/__chunks__/{chunk-HKGUI327.mjs → chunk-P3Z2DQ5Y.mjs} +2 -2
- package/out/__chunks__/{chunk-JXU7WWWE.mjs → chunk-QIXUIO74.mjs} +2 -2
- package/out/__chunks__/chunk-QLDZFO7M.mjs +2 -0
- package/out/__chunks__/{chunk-EIFX46HX.mjs.map → chunk-QLDZFO7M.mjs.map} +1 -1
- package/out/__chunks__/{chunk-WPZIGJNP.mjs → chunk-RVTPQ3R5.mjs} +2 -2
- package/out/__chunks__/{chunk-MI2K6RMJ.mjs → chunk-S3EO22CE.mjs} +2 -2
- package/out/__chunks__/{chunk-UYWQOHGW.mjs → chunk-S5DCQEU2.mjs} +2 -2
- package/out/__chunks__/{chunk-NHB5C2VT.mjs → chunk-T3SGVYSV.mjs} +2 -2
- package/out/__chunks__/{chunk-DYCP3KSI.mjs → chunk-TDRQ3OLY.mjs} +2 -2
- package/out/__chunks__/{chunk-JLLPGNLM.mjs → chunk-TZCZXHWQ.mjs} +2 -2
- package/out/__chunks__/{chunk-EUUJCC5E.mjs → chunk-U3GPFT4V.mjs} +2 -2
- package/out/__chunks__/{chunk-7NRHPYRQ.mjs → chunk-URNYMHJN.mjs} +2 -2
- package/out/__chunks__/{chunk-TZQ37JJD.mjs → chunk-USAIPG7X.mjs} +2 -2
- package/out/__chunks__/{chunk-RYEM55ZT.mjs → chunk-UTSW2MIB.mjs} +2 -2
- package/out/__chunks__/chunk-UXWVVWTD.mjs +2 -0
- package/out/__chunks__/{chunk-EQ52O73C.mjs.map → chunk-UXWVVWTD.mjs.map} +3 -3
- package/out/__chunks__/{chunk-IAHAAQ4N.mjs → chunk-V3VSL4SQ.mjs} +2 -2
- package/out/__chunks__/{chunk-5W3EWQIR.mjs → chunk-W25UUI6O.mjs} +2 -2
- package/out/__chunks__/{chunk-A7F53AUI.mjs → chunk-W4GIORRC.mjs} +2 -2
- package/out/__chunks__/chunk-WGXHIBDE.mjs +2 -0
- package/out/__chunks__/chunk-WOMDF37F.mjs +2 -0
- package/out/__chunks__/{chunk-HVWFXP4G.mjs → chunk-WRQ5IRXO.mjs} +2 -2
- package/out/__chunks__/{chunk-742ROBVD.mjs → chunk-WUKB2V3K.mjs} +2 -2
- package/out/__chunks__/{chunk-ACY76UCX.mjs → chunk-XGALUTQ5.mjs} +2 -2
- package/out/__chunks__/{chunk-72UXA2XD.mjs → chunk-XVRM5XQM.mjs} +2 -2
- package/out/__chunks__/chunk-XVZUH5QS.mjs +2 -0
- package/out/__chunks__/chunk-XZ3C4DZL.mjs +2 -0
- package/out/__chunks__/chunk-XZ3C4DZL.mjs.map +7 -0
- package/out/__chunks__/{chunk-TAXGAEX2.mjs → chunk-YNJSOBXM.mjs} +2 -2
- package/out/__chunks__/chunk-YP65EQFP.mjs +2 -0
- package/out/__chunks__/{chunk-CFWLPHKF.mjs.map → chunk-YP65EQFP.mjs.map} +2 -2
- package/out/__chunks__/{chunk-LBMKLRI7.mjs → chunk-YXWMQGAB.mjs} +2 -2
- package/out/__chunks__/{chunk-OJVDJHBR.mjs → chunk-Z7TITNCM.mjs} +2 -2
- package/out/__chunks__/{chunk-HY5BQMSU.mjs → chunk-ZKFUF6BU.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/economics/getEconomics.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.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/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/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/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/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/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/gasStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.cjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.cjs.map +2 -2
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.d.ts +1 -0
- 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/strategies/BaseProviderStrategy/BaseProviderStrategy.cjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.cjs.map +2 -2
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.d.ts +2 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.cjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.cjs.map +3 -3
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +2 -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.cjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.cjs.map +3 -3
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.d.ts +2 -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.cjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.cjs.map +3 -3
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.d.ts +2 -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.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs.map +2 -2
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.d.ts +2 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/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/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.cjs.map +3 -3
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.d.ts +2 -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.cjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.cjs.map +3 -3
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.d.ts +2 -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/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/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +3 -3
- package/out/providers/strategies/helpers/signTransactions/signTransactions.d.ts +3 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.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/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/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.cjs +1 -1
- package/out/store/actions/config/configActions.cjs.map +3 -3
- package/out/store/actions/config/configActions.d.ts +1 -0
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/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/fetchAccount.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.cjs.map +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.d.ts +2 -2
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/package.json +1 -1
- package/out/__chunks__/chunk-5XSOS5YN.mjs +0 -2
- package/out/__chunks__/chunk-635MBRGW.mjs +0 -2
- package/out/__chunks__/chunk-66O7QA3I.mjs +0 -2
- package/out/__chunks__/chunk-6AERD2V5.mjs +0 -2
- package/out/__chunks__/chunk-ASW2NQ6C.mjs +0 -2
- package/out/__chunks__/chunk-BVZPCM6G.mjs +0 -2
- package/out/__chunks__/chunk-CFWLPHKF.mjs +0 -2
- package/out/__chunks__/chunk-EIFX46HX.mjs +0 -2
- package/out/__chunks__/chunk-EQ52O73C.mjs +0 -2
- package/out/__chunks__/chunk-F2YWL325.mjs +0 -2
- package/out/__chunks__/chunk-FSL7QGMG.mjs +0 -2
- package/out/__chunks__/chunk-HFY3MGS6.mjs +0 -2
- package/out/__chunks__/chunk-HIGA7ZDP.mjs +0 -2
- package/out/__chunks__/chunk-HY34GQIC.mjs +0 -2
- package/out/__chunks__/chunk-HY34GQIC.mjs.map +0 -7
- package/out/__chunks__/chunk-IZPXIZ7K.mjs +0 -2
- package/out/__chunks__/chunk-OEFGQHO5.mjs +0 -2
- package/out/__chunks__/chunk-OEFGQHO5.mjs.map +0 -7
- package/out/__chunks__/chunk-OT634PF6.mjs +0 -2
- package/out/__chunks__/chunk-QHN6NRIA.mjs.map +0 -7
- package/out/__chunks__/chunk-RTLK66UR.mjs +0 -2
- package/out/__chunks__/chunk-WPOSW4KM.mjs +0 -2
- package/out/__chunks__/chunk-WXYAGYYV.mjs +0 -2
- package/out/__chunks__/chunk-WXYAGYYV.mjs.map +0 -7
- package/out/__chunks__/chunk-ZIZJCYTT.mjs +0 -2
- /package/out/__chunks__/{chunk-7EZGGGIQ.mjs.map → chunk-2DUOXMZP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P3VXVK33.mjs.map → chunk-2LIUW5CF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CTIBYRMH.mjs.map → chunk-2SYDJSIO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5XSOS5YN.mjs.map → chunk-32Z4H2Q4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V7TKRGVU.mjs.map → chunk-3DZPVOPO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OOPGEGEC.mjs.map → chunk-3TM6K4Z4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MOJWACYA.mjs.map → chunk-43SX7DUF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OP2IEVBM.mjs.map → chunk-44AUEOAU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MPJUP362.mjs.map → chunk-4CGAWZR6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JA27GJYB.mjs.map → chunk-573LAOYN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EZMDYBQN.mjs.map → chunk-5PENJRCS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HCYLJV62.mjs.map → chunk-6CMARMS2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FVEGUUPB.mjs.map → chunk-6DAQAOWP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V5RYJVEZ.mjs.map → chunk-6TJZZHFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZIZJCYTT.mjs.map → chunk-6ZVWYKKI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O3RDPZCC.mjs.map → chunk-764JPTJ7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RTLK66UR.mjs.map → chunk-7MGK7ZUE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y6OAUXIU.mjs.map → chunk-A4KOSUVU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3U35OFEK.mjs.map → chunk-AIKIPJUG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NODAYKNL.mjs.map → chunk-AOF7QPPF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XT3FTPPC.mjs.map → chunk-AVEWWANG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VYVJQXGS.mjs.map → chunk-AXZ3DHTB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASXSNGBB.mjs.map → chunk-B77BJX6Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2FVSB4I6.mjs.map → chunk-BB7POIGL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JI5573A3.mjs.map → chunk-BPOXONMJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J4XVM6TB.mjs.map → chunk-C65TZQBZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L2GTIQ4M.mjs.map → chunk-CE4N3GKT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RTGDS56O.mjs.map → chunk-COPAYHAQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S5NXWNSY.mjs.map → chunk-CT5LMMAW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-66O7QA3I.mjs.map → chunk-CZGN3YPT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LHLDTVQX.mjs.map → chunk-DCF6BLSL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F2YWL325.mjs.map → chunk-DJUPAQRK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ASW2NQ6C.mjs.map → chunk-EET35YZW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BZ6YK6M7.mjs.map → chunk-EKBFVSFP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CCDNY2AY.mjs.map → chunk-GBYZHNPO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IZPXIZ7K.mjs.map → chunk-GQFB3L2J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UXCL6NKM.mjs.map → chunk-GWZUTQLT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZPRRRKH2.mjs.map → chunk-HXFVUYGK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZHKCVM4W.mjs.map → chunk-IEUUVTQ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BPPANN5H.mjs.map → chunk-JSYDF4GF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HJ4B3QID.mjs.map → chunk-K4FRH3YU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JT4AIBHR.mjs.map → chunk-LABBTN37.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NCUUK7SW.mjs.map → chunk-LSAYT6GA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHZWVRMA.mjs.map → chunk-LY5VXESF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OVROSPMG.mjs.map → chunk-LZKKBLOO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OT634PF6.mjs.map → chunk-LZQXEMRC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-F4JEWIED.mjs.map → chunk-M3G5E4TL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XJV7SQ3A.mjs.map → chunk-M5COEJ24.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I3LSEZWV.mjs.map → chunk-MNKQNWZS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZQQN3ZGD.mjs.map → chunk-N3J6ROD5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6AERD2V5.mjs.map → chunk-NJUTBWG5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-635MBRGW.mjs.map → chunk-NTCDPOM4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PPCVJ6HZ.mjs.map → chunk-NZGZ2C45.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BU2ZPMEQ.mjs.map → chunk-OLXCFQVN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WPOSW4KM.mjs.map → chunk-ON2ITKZA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6EXAKY6.mjs.map → chunk-OXJJPBYT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HKGUI327.mjs.map → chunk-P3Z2DQ5Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JXU7WWWE.mjs.map → chunk-QIXUIO74.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WPZIGJNP.mjs.map → chunk-RVTPQ3R5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MI2K6RMJ.mjs.map → chunk-S3EO22CE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UYWQOHGW.mjs.map → chunk-S5DCQEU2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NHB5C2VT.mjs.map → chunk-T3SGVYSV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DYCP3KSI.mjs.map → chunk-TDRQ3OLY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JLLPGNLM.mjs.map → chunk-TZCZXHWQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EUUJCC5E.mjs.map → chunk-U3GPFT4V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7NRHPYRQ.mjs.map → chunk-URNYMHJN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TZQ37JJD.mjs.map → chunk-USAIPG7X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RYEM55ZT.mjs.map → chunk-UTSW2MIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IAHAAQ4N.mjs.map → chunk-V3VSL4SQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5W3EWQIR.mjs.map → chunk-W25UUI6O.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A7F53AUI.mjs.map → chunk-W4GIORRC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BVZPCM6G.mjs.map → chunk-WGXHIBDE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FSL7QGMG.mjs.map → chunk-WOMDF37F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HVWFXP4G.mjs.map → chunk-WRQ5IRXO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-742ROBVD.mjs.map → chunk-WUKB2V3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ACY76UCX.mjs.map → chunk-XGALUTQ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-72UXA2XD.mjs.map → chunk-XVRM5XQM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HIGA7ZDP.mjs.map → chunk-XVZUH5QS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TAXGAEX2.mjs.map → chunk-YNJSOBXM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LBMKLRI7.mjs.map → chunk-YXWMQGAB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OJVDJHBR.mjs.map → chunk-Z7TITNCM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HY5BQMSU.mjs.map → chunk-ZKFUF6BU.mjs.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as f}from"./chunk-L3EOHIBG.mjs";import{a as c}from"./chunk-FROSOADM.mjs";import{a as m}from"./chunk-VJBLHJYB.mjs";import{a as o}from"./chunk-RRK6GTWZ.mjs";import{a}from"./chunk-IPMSVHGJ.mjs";import{a as n}from"./chunk-IHAZNPKL.mjs";import{a as g}from"./chunk-PSJI2G34.mjs";import{a as i}from"./chunk-2CG6PNPJ.mjs";import{a as r,b as e}from"./chunk-2JFN726G.mjs";import{a as d}from"./chunk-RWQNLK3I.mjs";import{rest as s}from"msw";import{setupServer as k}from"msw/node";var t=u=>(A,$,p)=>$(p.status(200),p.json(u)),l=[s.get(`${e.apiAddress}/dapp/config`,t(c)),s.get(`${e.apiAddress}/network/config`,t(i)),s.get(`https://${a.url}/socket.io/`,t(g)),s.get(`${e.apiAddress}/websocket/config`,t(a)),s.get(`${e.apiAddress}/economics`,t(f)),s.get(`${e.apiAddress}/accounts/${r}`,t({...o,address:r})),s.get(`${e.apiAddress}/accounts/${o.address}`,t(o)),s.get(`${e.apiAddress}/transactions/ppu/0`,t({lastBlock:11605677,fast:0,faster:null})),s.get(`${e.apiAddress}/tokens/${n.identifier}`,t(n)),s.get(`${e.apiAddress}/accounts/${d.address}`,t(d)),s.get(`${e.apiAddress}/blocks`,t(m))],v=k(...l);export{s as a,t as b,v as c};
|
|
2
|
+
//# sourceMappingURL=chunk-LXI42ZLN.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/__mocks__/server.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n DefaultBodyType,\n PathParams,\n ResponseComposition,\n rest,\n RestContext,\n RestRequest\n} from 'msw';\nimport { setupServer } from 'msw/node';\nimport { testAddress, testNetwork } from './accountConfig';\nimport {\n account,\n blocks,\n dappConfig,\n economics,\n networkConfig,\n socketResponse,\n websocketConfig\n} from './data';\nimport { testToken } from './data/testToken';\nimport { wrapEgldContract } from './data/wrapEgldContract';\n\nexport const mockResponse =\n <T extends DefaultBodyType>(body: T) =>\n (\n _req: RestRequest<never, PathParams<string>>,\n res: ResponseComposition<DefaultBodyType>,\n ctx: RestContext\n ) => {\n return res(ctx.status(200), ctx.json(body));\n };\n\nconst handlers = [\n rest.get(`${testNetwork.apiAddress}/dapp/config`, mockResponse(dappConfig)),\n\n rest.get(\n `${testNetwork.apiAddress}/network/config`,\n mockResponse(networkConfig)\n ),\n rest.get(\n `https://${websocketConfig.url}/socket.io/`,\n mockResponse(socketResponse)\n ),\n rest.get(\n `${testNetwork.apiAddress}/websocket/config`,\n mockResponse(websocketConfig)\n ),\n rest.get(`${testNetwork.apiAddress}/economics`, mockResponse(economics)),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${testAddress}`,\n mockResponse({ ...account, address: testAddress })\n ),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${account.address}`,\n mockResponse(account)\n ),\n rest.get(\n `${testNetwork.apiAddress}/tokens/${testToken.identifier}`,\n mockResponse(testToken)\n ),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${wrapEgldContract.address}`,\n mockResponse(wrapEgldContract)\n ),\n rest.get(`${testNetwork.apiAddress}/blocks`, mockResponse(blocks))\n];\n\n// This configures a request mocking server with the given request handlers.\nconst server = setupServer(...handlers);\n\nexport { server, rest };\n"],
|
|
5
|
-
"mappings": "4ZAAA,OAIE,QAAAA,MAGK,MACP,OAAS,eAAAC,MAAmB,WAcrB,IAAMC,EACiBC,GAC5B,CACEC,EACAC,EACAC,IAEOD,EAAIC,EAAI,OAAO,GAAG,EAAGA,EAAI,KAAKH,CAAI,CAAC,EAGxCI,EAAW,CACfC,EAAK,IAAI,GAAGC,EAAY,UAAU,eAAgBP,EAAaQ,CAAU,CAAC,EAE1EF,EAAK,IACH,GAAGC,EAAY,UAAU,kBACzBP,EAAaS,CAAa,CAC5B,EACAH,EAAK,IACH,WAAWI,EAAgB,GAAG,cAC9BV,EAAaW,CAAc,CAC7B,EACAL,EAAK,IACH,GAAGC,EAAY,UAAU,oBACzBP,EAAaU,CAAe,CAC9B,EACAJ,EAAK,IAAI,GAAGC,EAAY,UAAU,aAAcP,EAAaY,CAAS,CAAC,EACvEN,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaM,CAAW,GACjDb,EAAa,CAAE,GAAGc,EAAS,QAASD,CAAY,CAAC,CACnD,EACAP,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaO,EAAQ,OAAO,GACrDd,EAAac,CAAO,CACtB,EACAR,EAAK,IACH,GAAGC,EAAY,UAAU,WAAWQ,EAAU,UAAU,GACxDf,EAAae,CAAS,CACxB,EACAT,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaS,EAAiB,OAAO,GAC9DhB,EAAagB,CAAgB,CAC/B,EACAV,EAAK,IAAI,GAAGC,EAAY,UAAU,UAAWP,EAAaiB,CAAM,CAAC,CACnE,EAGMC,EAASC,EAAY,GAAGd,CAAQ",
|
|
4
|
+
"sourcesContent": ["import {\n DefaultBodyType,\n PathParams,\n ResponseComposition,\n rest,\n RestContext,\n RestRequest\n} from 'msw';\nimport { setupServer } from 'msw/node';\nimport { testAddress, testNetwork } from './accountConfig';\nimport {\n account,\n blocks,\n dappConfig,\n economics,\n networkConfig,\n socketResponse,\n websocketConfig\n} from './data';\nimport { testToken } from './data/testToken';\nimport { wrapEgldContract } from './data/wrapEgldContract';\n\nexport const mockResponse =\n <T extends DefaultBodyType>(body: T) =>\n (\n _req: RestRequest<never, PathParams<string>>,\n res: ResponseComposition<DefaultBodyType>,\n ctx: RestContext\n ) => {\n return res(ctx.status(200), ctx.json(body));\n };\n\nconst handlers = [\n rest.get(`${testNetwork.apiAddress}/dapp/config`, mockResponse(dappConfig)),\n\n rest.get(\n `${testNetwork.apiAddress}/network/config`,\n mockResponse(networkConfig)\n ),\n rest.get(\n `https://${websocketConfig.url}/socket.io/`,\n mockResponse(socketResponse)\n ),\n rest.get(\n `${testNetwork.apiAddress}/websocket/config`,\n mockResponse(websocketConfig)\n ),\n rest.get(`${testNetwork.apiAddress}/economics`, mockResponse(economics)),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${testAddress}`,\n mockResponse({ ...account, address: testAddress })\n ),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${account.address}`,\n mockResponse(account)\n ),\n rest.get(\n `${testNetwork.apiAddress}/transactions/ppu/0`,\n mockResponse({ lastBlock: 11605677, fast: 0, faster: null })\n ),\n rest.get(\n `${testNetwork.apiAddress}/tokens/${testToken.identifier}`,\n mockResponse(testToken)\n ),\n rest.get(\n `${testNetwork.apiAddress}/accounts/${wrapEgldContract.address}`,\n mockResponse(wrapEgldContract)\n ),\n rest.get(`${testNetwork.apiAddress}/blocks`, mockResponse(blocks))\n];\n\n// This configures a request mocking server with the given request handlers.\nconst server = setupServer(...handlers);\n\nexport { server, rest };\n"],
|
|
5
|
+
"mappings": "4ZAAA,OAIE,QAAAA,MAGK,MACP,OAAS,eAAAC,MAAmB,WAcrB,IAAMC,EACiBC,GAC5B,CACEC,EACAC,EACAC,IAEOD,EAAIC,EAAI,OAAO,GAAG,EAAGA,EAAI,KAAKH,CAAI,CAAC,EAGxCI,EAAW,CACfC,EAAK,IAAI,GAAGC,EAAY,UAAU,eAAgBP,EAAaQ,CAAU,CAAC,EAE1EF,EAAK,IACH,GAAGC,EAAY,UAAU,kBACzBP,EAAaS,CAAa,CAC5B,EACAH,EAAK,IACH,WAAWI,EAAgB,GAAG,cAC9BV,EAAaW,CAAc,CAC7B,EACAL,EAAK,IACH,GAAGC,EAAY,UAAU,oBACzBP,EAAaU,CAAe,CAC9B,EACAJ,EAAK,IAAI,GAAGC,EAAY,UAAU,aAAcP,EAAaY,CAAS,CAAC,EACvEN,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaM,CAAW,GACjDb,EAAa,CAAE,GAAGc,EAAS,QAASD,CAAY,CAAC,CACnD,EACAP,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaO,EAAQ,OAAO,GACrDd,EAAac,CAAO,CACtB,EACAR,EAAK,IACH,GAAGC,EAAY,UAAU,sBACzBP,EAAa,CAAE,UAAW,SAAU,KAAM,EAAG,OAAQ,IAAK,CAAC,CAC7D,EACAM,EAAK,IACH,GAAGC,EAAY,UAAU,WAAWQ,EAAU,UAAU,GACxDf,EAAae,CAAS,CACxB,EACAT,EAAK,IACH,GAAGC,EAAY,UAAU,aAAaS,EAAiB,OAAO,GAC9DhB,EAAagB,CAAgB,CAC/B,EACAV,EAAK,IAAI,GAAGC,EAAY,UAAU,UAAWP,EAAaiB,CAAM,CAAC,CACnE,EAGMC,EAASC,EAAY,GAAGd,CAAQ",
|
|
6
6
|
"names": ["rest", "setupServer", "mockResponse", "body", "_req", "res", "ctx", "handlers", "rest", "testNetwork", "dappConfig", "networkConfig", "websocketConfig", "socketResponse", "economics", "testAddress", "account", "testToken", "wrapEgldContract", "blocks", "server", "setupServer"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-YP65EQFP.mjs";import{a as g}from"./chunk-DJUPAQRK.mjs";import{s as e}from"./chunk-XGALUTQ5.mjs";import{g as n}from"./chunk-FK6DWWZF.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LY5VXESF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-B77BJX6Z.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-LZKKBLOO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as n}from"./chunk-YP65EQFP.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M3G5E4TL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-XVRM5XQM.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M5COEJ24.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-ON2ITKZA.mjs";import{a as p}from"./chunk-URNYMHJN.mjs";import{a as O}from"./chunk-W4GIORRC.mjs";import{a as M}from"./chunk-LSAYT6GA.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-44AUEOAU.mjs";import{d as B}from"./chunk-LABBTN37.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-XGALUTQ5.mjs";import{a as d}from"./chunk-GBYZHNPO.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
|
|
2
|
+
//# sourceMappingURL=chunk-MNKQNWZS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-2DUOXMZP.mjs";import{a as c}from"./chunk-O5PAMBB3.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-N3J6ROD5.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-BB7POIGL.mjs";import{c as n}from"./chunk-XGALUTQ5.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-NTCDPOM4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as s}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as s}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-XZ3C4DZL.mjs";import{a as l}from"./chunk-LSAYT6GA.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-XGALUTQ5.mjs";var e=class e extends l{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:n}=r(o()),i=d(t.customProviders,e.allowedProviders);this.data={providers:i,walletAddress:n},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 n=>{!n?.isLoginFinished&&e.onClose&&e.onClose(),this.closeUI()};this.handleLogin=async({type:n,anchor:i})=>{if(!e.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{s(e.loginHandler)?(await(await t.create({type:n,anchor:i})).login(),e.loginHandler()):e.loginHandler({type:n,anchor:i}),await this.handleCloseUI({isLoginFinished:!0})}catch(a){console.error(a),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await t.destroy()};this.data=this.initialData}static getInstance(){return e.instance||(e.instance=new e),e.instance}static init(n){return this.loginHandler=n.loginHandler,this.allowedProviders=n.allowedProviders,n.onClose&&(this.onClose=n.onClose),this.getInstance()}};e.loginHandler=null,e.onClose=null,e.allowedProviders=null;var c=e;export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NZGZ2C45.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-LSAYT6GA.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OLXCFQVN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-QLDZFO7M.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-OXJJPBYT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-4CGAWZR6.mjs";import{a as e}from"./chunk-XVZUH5QS.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-XGALUTQ5.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P3WDIKX5.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.ts"],
|
|
4
|
+
"sourcesContent": ["import { IProviderAccount } from '@multiversx/sdk-wallet-connect-provider/out';\nimport { providerLabels } from 'constants/providerFactory.constants';\nimport { Transaction, Message } from 'lib/sdkCore';\nimport { IDAppProviderOptions, IDAppProviderAccount } from 'lib/sdkDappUtils';\nimport { PendingTransactionsEventsEnum } from 'managers/internal/PendingTransactionsStateManager';\nimport { getAddress } from 'methods/account/getAddress';\nimport { SignTransactionsOptionsType } from 'providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider';\nimport { IProvider, ProviderType } from 'providers/types/providerFactory.types';\nimport { providerSettingsSelector } from 'store/selectors/configSelectors';\nimport { getState } from 'store/store';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { getPendingTransactionsHandlers } from '../helpers';\n\nexport type LoginOptionsTypes = {\n token?: string;\n};\n\nexport abstract class BaseProviderStrategy<\n T extends ProviderType = ProviderType\n> implements IProvider<T>\n{\n protected address?: string = '';\n protected _login:\n | ((options?: LoginOptionsTypes) => Promise<IProviderAccount | null>)\n | null = null;\n protected loginAbortController: AbortController | null = null;\n\n /*\n * Allow setting provider address without store login\n */\n constructor(address?: string) {\n this.address = address ?? '';\n }\n\n abstract init(): Promise<boolean>;\n abstract logout(): Promise<boolean>;\n abstract getType(): T;\n\n abstract getAddress(): Promise<string | undefined>;\n abstract setAccount(account: IDAppProviderAccount): void;\n abstract isInitialized(): boolean;\n\n isConnected?(): boolean;\n\n getAccount(): IDAppProviderAccount | null {\n throw new Error('Method not implemented.');\n }\n\n signTransaction(\n _transaction: Transaction,\n _options?: SignTransactionsOptionsType\n ): Promise<Transaction | null> {\n throw new Error('Method not implemented.');\n }\n\n abstract signTransactions(\n transactions: Transaction[],\n options?: IDAppProviderOptions\n ): Promise<Transaction[] | null>;\n\n abstract signMessage(\n messageToSign: Message,\n options?: IDAppProviderOptions\n ): Promise<Message | null>;\n\n public async login(\n options?: LoginOptionsTypes\n ): Promise<{ address: string; signature: string }> {\n if (!this._login) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n if (this.loginAbortController) {\n this.loginAbortController.abort();\n }\n\n const controller = new AbortController();\n this.loginAbortController = controller;\n\n const signal = controller.signal;\n\n try {\n const abortPromise = new Promise<never>((_, reject) => {\n signal.addEventListener('abort', () => {\n reject(new Error('Login cancelled'));\n });\n });\n\n const loginResult = await Promise.race([\n this.loginOperation(options),\n abortPromise\n ]);\n\n this.loginAbortController = null;\n\n return loginResult;\n } catch (error) {\n this.loginAbortController = null;\n throw error;\n }\n }\n\n public cancelLogin = () => {\n if (this.loginAbortController) {\n this.loginAbortController.abort();\n }\n\n this.cancelAction?.();\n this.loginAbortController = null;\n };\n\n protected loginOperation = async (\n options?: LoginOptionsTypes\n ): Promise<{ address: string; signature: string }> => {\n if (!this._login) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n const result = await this._login(options);\n\n if (!result?.address) {\n throw new Error(ProviderErrorsEnum.notInitialized);\n }\n\n return {\n ...result,\n address: result.address,\n signature: result.signature ?? ''\n };\n };\n\n /**\n * Initializes the provider by setting the address if it is not already set.\n */\n protected initializeAddress = () => {\n if (this.address) {\n return;\n }\n\n const address = getAddress();\n\n if (!address) {\n return;\n }\n\n this.address = address;\n };\n\n cancelAction: (() => Promise<void>) | undefined = undefined;\n\n /**\n * This method should be overridden by subclasses to handle cancel login event.\n */\n // async cancelAction(): Promise<void> {\n // throw new Error('Method not implemented.');\n // }\n\n protected async initSignState() {\n const providerConfig = providerSettingsSelector(getState());\n\n // If UI is disabled, return null values to skip UI operations\n if (providerConfig?.isSigningUiEnabled === false) {\n return {\n onClose: async () => ({}),\n manager: null\n };\n }\n\n const { onClose, manager } = await getPendingTransactionsHandlers({\n cancelAction: this.cancelAction?.bind(this)\n });\n\n const type = this.getType();\n manager.subscribeToEventBus(PendingTransactionsEventsEnum.CLOSE, onClose);\n\n manager.updateData({\n name: providerLabels[type],\n type\n });\n\n return { onClose, manager };\n }\n}\n"],
|
|
5
|
+
"mappings": "wMAiBO,IAAeA,EAAf,KAGP,CAUE,YAAYC,EAAkB,CAT9B,KAAU,QAAmB,GAC7B,KAAU,OAEC,KACX,KAAU,qBAA+C,KA6EzD,KAAO,YAAc,IAAM,CACrB,KAAK,sBACP,KAAK,qBAAqB,MAAM,EAGlC,KAAK,eAAe,EACpB,KAAK,qBAAuB,IAC9B,EAEA,KAAU,eAAiB,MACzBC,GACoD,CACpD,GAAI,CAAC,KAAK,OACR,MAAM,IAAI,oCAAuC,EAGnD,IAAMC,EAAS,MAAM,KAAK,OAAOD,CAAO,EAExC,GAAI,CAACC,GAAQ,QACX,MAAM,IAAI,oCAAuC,EAGnD,MAAO,CACL,GAAGA,EACH,QAASA,EAAO,QAChB,UAAWA,EAAO,WAAa,EACjC,CACF,EAKA,KAAU,kBAAoB,IAAM,CAClC,GAAI,KAAK,QACP,OAGF,IAAMF,EAAUG,EAAW,EAEtBH,IAIL,KAAK,QAAUA,EACjB,EAEA,kBAAkD,OArHhD,KAAK,QAAUA,GAAW,EAC5B,CAYA,YAA0C,CACxC,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAEA,gBACEI,EACAC,EAC6B,CAC7B,MAAM,IAAI,MAAM,yBAAyB,CAC3C,CAYA,MAAa,MACXJ,EACiD,CACjD,GAAI,CAAC,KAAK,OACR,MAAM,IAAI,oCAAuC,EAG/C,KAAK,sBACP,KAAK,qBAAqB,MAAM,EAGlC,IAAMK,EAAa,IAAI,gBACvB,KAAK,qBAAuBA,EAE5B,IAAMC,EAASD,EAAW,OAE1B,GAAI,CACF,IAAME,EAAe,IAAI,QAAe,CAACC,EAAGC,IAAW,CACrDH,EAAO,iBAAiB,QAAS,IAAM,CACrCG,EAAO,IAAI,MAAM,iBAAiB,CAAC,CACrC,CAAC,CACH,CAAC,EAEKC,EAAc,MAAM,QAAQ,KAAK,CACrC,KAAK,eAAeV,CAAO,EAC3BO,CACF,CAAC,EAED,YAAK,qBAAuB,KAErBG,CACT,OAASC,EAAO,CACd,WAAK,qBAAuB,KACtBA,CACR,CACF,CAyDA,MAAgB,eAAgB,CAI9B,GAHuBC,EAAyBC,EAAS,CAAC,GAGtC,qBAAuB,GACzC,MAAO,CACL,QAAS,UAAa,CAAC,GACvB,QAAS,IACX,EAGF,GAAM,CAAE,QAAAC,EAAS,QAAAC,CAAQ,EAAI,MAAMC,EAA+B,CAChE,aAAc,KAAK,cAAc,KAAK,IAAI,CAC5C,CAAC,EAEKC,EAAO,KAAK,QAAQ,EAC1B,OAAAF,EAAQ,iDAAyDD,CAAO,EAExEC,EAAQ,WAAW,CACjB,KAAMG,EAAeD,CAAI,EACzB,KAAAA,CACF,CAAC,EAEM,CAAE,QAAAH,EAAS,QAAAC,CAAQ,CAC5B,CACF",
|
|
6
|
+
"names": ["BaseProviderStrategy", "address", "options", "result", "getAddress", "_transaction", "_options", "controller", "signal", "abortPromise", "_", "reject", "loginResult", "error", "providerSettingsSelector", "getState", "onClose", "manager", "getPendingTransactionsHandlers", "type", "providerLabels"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-AOF7QPPF.mjs";import{b as r}from"./chunk-2LIUW5CF.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-XGALUTQ5.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=i(o());(!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-P3Z2DQ5Y.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-CE4N3GKT.mjs";import{a as g}from"./chunk-HSF3JATH.mjs";import l from"lodash.isequal";async function C({loginData:f,nativeAuthConfig:r,loginToken:s}){let{address:m,signature:d,...n}=f,a=Object.keys(n).reduce((i,t)=>{let o=["multisig","impersonate"].includes(t)&&n[t]!=null?String(n[t]):null;return o!=null&&(i[t]=o.toString()),i},{}),e={...r};if(Object.keys(a).length>0&&(e.extraInfo=a),!l(r,e)){let i=g(s);return await u(e).initialize({noCache:!0,latestBlockInfo:{hash:i?.blockHash??"",timestamp:i?.extraInfo?.timestamp??0}})}return s}export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QIXUIO74.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.5.
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.5.1'; // will be replaced at build time\n"],
|
|
5
5
|
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
6
|
"names": ["safeWindow", "version"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as t}from"./chunk-7VHTZYM2.mjs";import{s as r}from"./chunk-XGALUTQ5.mjs";import{y as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";var c=async(s,a={apiAddress:""})=>{let{data:o}=await i.get(`${a.apiAddress||t(r())}/${e}`,{params:{hashes:s.join(","),withScResults:!0}});return o};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RVTPQ3R5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-XVRM5XQM.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-S3EO22CE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-A4KOSUVU.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-S5DCQEU2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-N3J6ROD5.mjs";import{a as p}from"./chunk-573LAOYN.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-T3SGVYSV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-CE4N3GKT.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TDRQ3OLY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-XZ3C4DZL.mjs";import{k as d}from"./chunk-YP65EQFP.mjs";import{s as a}from"./chunk-XGALUTQ5.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-LZKKBLOO.mjs";async function S(){let t=c(),m=s(),e=n(a()),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)}d(r)}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TZCZXHWQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-QLDZFO7M.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U3GPFT4V.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-WUKB2V3K.mjs";import{a as c}from"./chunk-NGM3AVCY.mjs";import{s as m}from"./chunk-XGALUTQ5.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";async function G(g){let s=g?.store??m(),n=[],a=[],y=l(s),F=c(s),C=T(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 p({transactions:P,store:s}),O=I(t),R=u(t),v=f(t),e=O||R||v,w=d(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-URNYMHJN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-NJUTBWG5.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-XGALUTQ5.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-USAIPG7X.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-CT5LMMAW.mjs";import{a as r}from"./chunk-CZGN3YPT.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UTSW2MIB.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-XGALUTQ5.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:s,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled"});export{r as a,c as b,C as c,f as d,g as e};
|
|
2
|
+
//# sourceMappingURL=chunk-UXWVVWTD.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/actions/config/configActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { fallbackWalletConnectConfigurations } from 'constants/walletConnect.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { WalletConnectConfig } from 'providers/strategies/WalletConnectProviderStrategy/types';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { IProviderSettings } from 'store/slices/config/config.types';\nimport { getStore } from 'store/store';\n\nexport const setNativeAuthConfig = (config: NativeAuthConfigType | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.nativeAuthConfig = config;\n },\n false,\n {\n type: 'setNativeAuthConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setWebsocketStatus = (status: WebsocketConnectionStatusEnum) =>\n getStore().setState(\n ({ config: state }) => {\n state.websocketStatus = status;\n },\n false,\n {\n type: 'setWebsocketStatus',\n // @ts-ignore\n payload: {\n value: status\n }\n }\n );\n\nexport const setWalletConnectConfig = (config: WalletConnectConfig | null) =>\n getStore().setState(\n ({ config: state }) => {\n if (config) {\n const walletConnectV2RelayAddress =\n config.walletConnectV2RelayAddress ||\n fallbackWalletConnectConfigurations.walletConnectV2RelayAddress;\n const walletConnectDeepLink =\n config.walletConnectDeepLink ||\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n state.walletConnectConfig = {\n ...config,\n walletConnectDeepLink,\n walletConnectV2RelayAddress\n };\n } else {\n state.walletConnectConfig = null;\n }\n },\n false,\n {\n type: 'setWalletConnectConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setProviderSettings = (settings: IProviderSettings | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.settings = settings;\n },\n false,\n {\n type: 'setProviderSettings',\n // @ts-ignore\n payload: {\n value: settings\n }\n }\n );\n"],
|
|
5
|
-
"mappings": "kFAOO,IAAMA,EAAuBC,GAClCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,iBAAmBF,CAC3B,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWG,EAAsBC,GACjCH,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,gBAAkBE,CAC1B,EACA,GACA,CACE,KAAM,qBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAA0BL,GACrCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,GAAIF,EAAQ,CACV,IAAMM,EACJN,EAAO,6BACPO,EAAoC,4BAChCC,EACJR,EAAO,uBACPO,EAAoC,sBAEtCL,EAAM,oBAAsB,CAC1B,GAAGF,EACH,sBAAAQ,EACA,4BAAAF,CACF,CACF,MACEJ,EAAM,oBAAsB,IAEhC,EACA,GACA,CACE,KAAM,yBAEN,QAAS,CACP,MAAOF,CACT,CACF,CACF,EAEWS,EAAuBC,GAClCT,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,SAAWQ,CACnB,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF",
|
|
6
|
-
"names": ["setNativeAuthConfig", "config", "getStore", "state", "setWebsocketStatus", "status", "setWalletConnectConfig", "walletConnectV2RelayAddress", "fallbackWalletConnectConfigurations", "walletConnectDeepLink", "setProviderSettings", "settings"]
|
|
4
|
+
"sourcesContent": ["import { fallbackWalletConnectConfigurations } from 'constants/walletConnect.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { WalletConnectConfig } from 'providers/strategies/WalletConnectProviderStrategy/types';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { IProviderSettings } from 'store/slices/config/config.types';\nimport { getStore } from 'store/store';\n\nexport const setNativeAuthConfig = (config: NativeAuthConfigType | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.nativeAuthConfig = config;\n },\n false,\n {\n type: 'setNativeAuthConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setWebsocketStatus = (status: WebsocketConnectionStatusEnum) =>\n getStore().setState(\n ({ config: state }) => {\n state.websocketStatus = status;\n },\n false,\n {\n type: 'setWebsocketStatus',\n // @ts-ignore\n payload: {\n value: status\n }\n }\n );\n\nexport const setWalletConnectConfig = (config: WalletConnectConfig | null) =>\n getStore().setState(\n ({ config: state }) => {\n if (config) {\n const walletConnectV2RelayAddress =\n config.walletConnectV2RelayAddress ||\n fallbackWalletConnectConfigurations.walletConnectV2RelayAddress;\n const walletConnectDeepLink =\n config.walletConnectDeepLink ||\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n state.walletConnectConfig = {\n ...config,\n walletConnectDeepLink,\n walletConnectV2RelayAddress\n };\n } else {\n state.walletConnectConfig = null;\n }\n },\n false,\n {\n type: 'setWalletConnectConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setProviderSettings = (settings: IProviderSettings | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.settings = settings;\n },\n false,\n {\n type: 'setProviderSettings',\n // @ts-ignore\n payload: {\n value: settings\n }\n }\n );\n\nexport const setIsSigningUiEnabled = (isEnabled: boolean) =>\n getStore().setState(\n ({ config: state }) => {\n if (!state.settings) {\n state.settings = {};\n }\n state.settings.isSigningUiEnabled = isEnabled;\n },\n false,\n {\n type: 'setIsSigningUiEnabled'\n }\n );\n"],
|
|
5
|
+
"mappings": "kFAOO,IAAMA,EAAuBC,GAClCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,iBAAmBF,CAC3B,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWG,EAAsBC,GACjCH,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,gBAAkBE,CAC1B,EACA,GACA,CACE,KAAM,qBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAA0BL,GACrCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,GAAIF,EAAQ,CACV,IAAMM,EACJN,EAAO,6BACPO,EAAoC,4BAChCC,EACJR,EAAO,uBACPO,EAAoC,sBAEtCL,EAAM,oBAAsB,CAC1B,GAAGF,EACH,sBAAAQ,EACA,4BAAAF,CACF,CACF,MACEJ,EAAM,oBAAsB,IAEhC,EACA,GACA,CACE,KAAM,yBAEN,QAAS,CACP,MAAOF,CACT,CACF,CACF,EAEWS,EAAuBC,GAClCT,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,SAAWQ,CACnB,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAAyBC,GACpCX,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CAChBA,EAAM,WACTA,EAAM,SAAW,CAAC,GAEpBA,EAAM,SAAS,mBAAqBU,CACtC,EACA,GACA,CACE,KAAM,uBACR,CACF",
|
|
6
|
+
"names": ["setNativeAuthConfig", "config", "getStore", "state", "setWebsocketStatus", "status", "setWalletConnectConfig", "walletConnectV2RelayAddress", "fallbackWalletConnectConfigurations", "walletConnectDeepLink", "setProviderSettings", "settings", "setIsSigningUiEnabled", "isEnabled"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-HXFVUYGK.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-LABBTN37.mjs";import{s as n}from"./chunk-XGALUTQ5.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-V3VSL4SQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-CCD7PUHB.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-CCD7PUHB.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-XGALUTQ5.mjs";import{a as n}from"./chunk-FK6DWWZF.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-W25UUI6O.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s,d as i,h as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s,d as i,h as o}from"./chunk-44AUEOAU.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-W4GIORRC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-JSYDF4GF.mjs";import{a as g}from"./chunk-YJCTRUJT.mjs";import{a as f}from"./chunk-2JKCBTYK.mjs";import{BigNumber as p}from"bignumber.js";async function b({manager:e,provider:s,login:a,token:u,explorerAddress:m,authData:x}){let o={manager:e,provider:s};return await new Promise(async function(A,I){async function d(t){let r=e?e.addressesPerPage??1:1,l=new p(t-1).times(r);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await n(o)}async function c(t){if(!(!s||!a)){e?.updateConfirmScreen({...x,selectedAddress:t.selectedAddress,explorerLink:g({to:`/${f}/${t.selectedAddress}`,explorerAddress:m})});try{let r=u?await s.tokenLogin({token:Buffer.from(`${u}{}`),addressIndex:t.addressIndex}):await a({addressIndex:t.addressIndex});e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),A({address:r.address,signature:r.signature?r.signature.toString("hex"):"",addressIndex:t.addressIndex})}catch(r){console.error("User rejected login:",r),!!e?.getConfirmScreenData()&&await n(o)}}}async function i(){await n(o),e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),I("User cancelled login")}e.subscribeToAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d})})}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WRQ5IRXO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-C65TZQBZ.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-GQFB3L2J.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-XGALUTQ5.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(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=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WUKB2V3K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-CZGN3YPT.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:M}=p(e);if(i&&M!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:u(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(W),t},n,D=e=>{n=e},o=()=>(n||D(z(()=>new k)),n),ue=(e=I)=>{let t=z(e);return D(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,W as n,z as o,D as p,o as q,ue as r,de as s};
|
|
2
|
+
//# sourceMappingURL=chunk-XGALUTQ5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-GBYZHNPO.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XVRM5XQM.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-M5COEJ24.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-ZKFUF6BU.mjs";import{a as V}from"./chunk-S3EO22CE.mjs";import{a as ae}from"./chunk-6DAQAOWP.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-LY5VXESF.mjs";import{a as ge}from"./chunk-3JRG3AWF.mjs";import{a as g}from"./chunk-P3WDIKX5.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-4CGAWZR6.mjs";import{a as z}from"./chunk-7DNJ6NZI.mjs";import{a as ce}from"./chunk-USAIPG7X.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as te}from"./chunk-4Z3DZ2A3.mjs";import{j as S,k as T,l as L}from"./chunk-YP65EQFP.mjs";import{c as N}from"./chunk-MNKQNWZS.mjs";import{a as C}from"./chunk-DJUPAQRK.mjs";import{a as Y}from"./chunk-XVZUH5QS.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-44AUEOAU.mjs";import{a as re}from"./chunk-DCF6BLSL.mjs";import{a as U}from"./chunk-EET35YZW.mjs";import{b as Q,c as Z,d as ee}from"./chunk-V5ZSFCKJ.mjs";import{g as X}from"./chunk-M6MN4RXG.mjs";import{b as f,c as K}from"./chunk-7VHTZYM2.mjs";import{a as $,q as F,s as c}from"./chunk-XGALUTQ5.mjs";import{f as j}from"./chunk-FK6DWWZF.mjs";import{a as q}from"./chunk-VNLGNNIL.mjs";import{b as y,c as G}from"./chunk-7B7XIPV2.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";async function me({message:a,handleSignMessage:o}){try{return await m({message:a,handleSignMessage:o,providerType:l.ledger})}catch(e){let{errorMessage:r}=se(e);throw r?{message:r}:e}}var w=class extends g{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(!!C())return;await V.getInstance().init(e)};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await me({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ne({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 n.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=V.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((s,i)=>ae({manager:e,resolve:s,reject:i,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,O=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=q(o),r=j(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=te(c());if(!(!this.shouldCheckConnection()||o))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,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new w({shouldInitProvider:!0});await o.init();let e=new S(o);o.getType=()=>n.ledger,T(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,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 A=class extends g{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:t,manager:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!0}),i}finally{s?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({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 n.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 Pe}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends g{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await s({shouldCancelAction:!1}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=Pe.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 n.extension}};var W=class extends g{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})}catch(i){throw await s({shouldCancelAction:!0}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[n.metamask]})};this.walletUrl=r??"",this.provider=le.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 n.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 Ce}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[y.CANCEL_ACTION,y.SIGN_LOGIN_TOKEN],x=class extends g{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let d=new Promise((p,P)=>{i.addEventListener("abort",()=>{P(new Error("cancelled by user"))})}),v=await Promise.race([this.provider.signTransactions(e),d]);return await ce(v)}catch(d){throw await s({shouldCancelAction:!0}),d}finally{t?.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:y.CANCEL_ACTION,action:Ce.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((i,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{if(this.provider?.isInitialized())return!0;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 n.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:s}=await this.provider.connect({methods:this.methods}),i=this.config.walletConnectDeepLink??R.walletConnectDeepLink;this._approval=s,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${i}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=K(c());if(Q(c())&&ve.push(y.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{re()},onClientEvent:p=>{}};try{let{walletConnectV2ProjectId:p,walletConnectV2Options:P={},walletConnectV2RelayAddress:D=""}=e,M=new G(h,t,D,p,P);return await M.init(),{walletConnectProvider:M,dappMethods:ve}}catch(p){throw console.error("Unable to connect",p),r&&await this.logout(),p}}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=I.getInstance(),{uri:s="",approval:i}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??R.walletConnectDeepLink;t.updateData({wcURI:s,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(s)}`});let v=await this.provider.login({approval:i,token:e?.token}),{address:h="",signature:p=""}=v??{};return t.handleClose({isLoginFinished:!!h}),{address:h,signature:p}}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:s="",signature:i=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!s}),{address:s,signature:i}}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(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new _;break}case n.crossWindow:{r=new A;break}case n.ledger:{r=new w({anchor:e}),await O.getInstance().init();break}case n.metamask:{r=new W;break}case n.passkey:{let i=f(c());r=new A({walletAddress:`${i.walletAddress}?${ie}=${n.passkey}`});break}case n.walletConnect:{let i=Z(c());if(!i?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...i});break}case n.webview:{r=new ge;break}default:{let i=Y();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:i,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);T(t);let s="provider"in r&&r.provider instanceof b;return pe(s?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){L().cancelLogin(),T(null),$(n.none)}};E._customProviders=[];var Te=(a,o)=>a.some(e=>e.type===o);async function m({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){if(ee(c())?.isSigningUiEnabled===!1){U(!0);try{return await o(a)}finally{U(!1)}}return await new Promise(async(i,d)=>{let{manager:v,onClose:h}=await de({cancelAction:e}),p=Object.values(E.customProviders),P=p.reduce((u,B)=>(u[B.type]=B.name,u),{}),D={...l,...P},M=async()=>{await h({shouldCancelAction:!0}),d({message:"Signing canceled"})};v.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",M);let H=Te(p,r)?r:n.none;v.updateData({name:D[H],type:H});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),d(u)}finally{v.closeUI()}})}export{m as a,me as b,w as c,O as d,A as e,_ as f,W as g,x as h,E as i};
|
|
2
|
+
//# sourceMappingURL=chunk-XZ3C4DZL.mjs.map
|