@multiversx/sdk-dapp 5.1.10 → 5.2.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 +1 -0
- package/out/__chunks__/{chunk-JFOYQVDZ.mjs → chunk-32ZBY2AE.mjs} +2 -2
- package/out/__chunks__/{chunk-TT5VL5H4.mjs → chunk-34ZJZYMC.mjs} +2 -2
- package/out/__chunks__/chunk-3JEK5A62.mjs +2 -0
- package/out/__chunks__/chunk-3MW2H273.mjs +2 -0
- package/out/__chunks__/{chunk-TPJ7WT4J.mjs.map → chunk-3MW2H273.mjs.map} +1 -1
- package/out/__chunks__/{chunk-DMBZGJ6Q.mjs → chunk-4G2T73DC.mjs} +2 -2
- package/out/__chunks__/{chunk-R6GH7DA7.mjs → chunk-4LTMFD6V.mjs} +2 -2
- package/out/__chunks__/{chunk-S4VD34VQ.mjs → chunk-4NQ35FCJ.mjs} +2 -2
- package/out/__chunks__/{chunk-K4TMKMCO.mjs → chunk-57P66SOT.mjs} +2 -2
- package/out/__chunks__/{chunk-ZJ47ZJGM.mjs → chunk-5JVY6GJC.mjs} +2 -2
- package/out/__chunks__/chunk-5LFB2H3K.mjs +2 -0
- package/out/__chunks__/{chunk-EPG3L2S3.mjs → chunk-5PGKBWB6.mjs} +2 -2
- package/out/__chunks__/chunk-5UYF2YJN.mjs +2 -0
- package/out/__chunks__/{chunk-43DVKBLZ.mjs → chunk-5VSKEHYA.mjs} +2 -2
- package/out/__chunks__/chunk-5W77GYVQ.mjs +2 -0
- package/out/__chunks__/{chunk-CRMKEEKH.mjs → chunk-62QLCUQH.mjs} +2 -2
- package/out/__chunks__/{chunk-BPIDBLI4.mjs → chunk-6FPG2OTI.mjs} +2 -2
- package/out/__chunks__/{chunk-ZORPCBON.mjs → chunk-7JATWFXB.mjs} +2 -2
- package/out/__chunks__/chunk-7Z665D57.mjs +2 -0
- package/out/__chunks__/{chunk-VDMJZZU4.mjs → chunk-AJC3F2YT.mjs} +1 -1
- package/out/__chunks__/{chunk-VDMJZZU4.mjs.map → chunk-AJC3F2YT.mjs.map} +1 -1
- package/out/__chunks__/{chunk-NMISWSIO.mjs → chunk-AMS6KZTC.mjs} +2 -2
- package/out/__chunks__/chunk-AS7XXEHY.mjs +2 -0
- package/out/__chunks__/chunk-AS7XXEHY.mjs.map +7 -0
- package/out/__chunks__/{chunk-FT5G3VJ5.mjs → chunk-B5K6T6DF.mjs} +2 -2
- package/out/__chunks__/{chunk-TX4NQXZO.mjs → chunk-BBCLPJC4.mjs} +2 -2
- package/out/__chunks__/{chunk-CD7RYHHQ.mjs → chunk-BKVZCTUG.mjs} +2 -2
- package/out/__chunks__/chunk-C3Y3ANFE.mjs +2 -0
- package/out/__chunks__/chunk-C3Y3ANFE.mjs.map +7 -0
- package/out/__chunks__/chunk-CGLVVKZU.mjs +2 -0
- package/out/__chunks__/chunk-CTITNRKA.mjs +2 -0
- package/out/__chunks__/{chunk-DOLG56CN.mjs → chunk-DE6O7BFR.mjs} +2 -2
- package/out/__chunks__/{chunk-5G5ETZM4.mjs → chunk-DGMI66QS.mjs} +1 -1
- package/out/__chunks__/{chunk-5G5ETZM4.mjs.map → chunk-DGMI66QS.mjs.map} +1 -1
- package/out/__chunks__/{chunk-HESE5NRU.mjs → chunk-DHTRPE3R.mjs} +2 -2
- package/out/__chunks__/{chunk-AVWNBQDX.mjs → chunk-DZ5FL2WV.mjs} +2 -2
- package/out/__chunks__/{chunk-BPVF6WD4.mjs → chunk-EIOADZ47.mjs} +2 -2
- package/out/__chunks__/{chunk-E6WW5OHD.mjs → chunk-EP4OBHW4.mjs} +2 -2
- package/out/__chunks__/{chunk-667PINAR.mjs → chunk-EPMKXFFR.mjs} +2 -2
- package/out/__chunks__/{chunk-BIVZJPSH.mjs → chunk-GB2K574L.mjs} +1 -1
- package/out/__chunks__/{chunk-BIVZJPSH.mjs.map → chunk-GB2K574L.mjs.map} +1 -1
- package/out/__chunks__/{chunk-JNEQJC3B.mjs → chunk-GYYCA57F.mjs} +2 -2
- package/out/__chunks__/{chunk-NX6LPULJ.mjs → chunk-H2EFE4NU.mjs} +2 -2
- package/out/__chunks__/{chunk-UBZGPJ3E.mjs → chunk-HEA7NFOF.mjs} +2 -2
- package/out/__chunks__/chunk-HSYMR5UW.mjs +2 -0
- package/out/__chunks__/{chunk-DXTUMMVX.mjs → chunk-IGTIIBN6.mjs} +2 -2
- package/out/__chunks__/{chunk-ALPIQGXL.mjs → chunk-IJKCH7CT.mjs} +2 -2
- package/out/__chunks__/{chunk-QMY5RUJ3.mjs → chunk-IPIX74CB.mjs} +2 -2
- package/out/__chunks__/{chunk-NQTTC42T.mjs → chunk-IV4LWBR3.mjs} +2 -2
- package/out/__chunks__/chunk-IYVM5B26.mjs +2 -0
- package/out/__chunks__/{chunk-PYHZTCM4.mjs → chunk-JIKCHL57.mjs} +2 -2
- package/out/__chunks__/{chunk-OXHTDT7J.mjs → chunk-JV4IJH7L.mjs} +2 -2
- package/out/__chunks__/chunk-K3OKY7NL.mjs +2 -0
- package/out/__chunks__/{chunk-C53VPXWP.mjs → chunk-N2KEJEOD.mjs} +2 -2
- package/out/__chunks__/{chunk-7YHUOWFV.mjs → chunk-NE4YNYCQ.mjs} +2 -2
- package/out/__chunks__/{chunk-3AQIQDPA.mjs → chunk-O6RJHMIJ.mjs} +2 -2
- package/out/__chunks__/chunk-O72VJVJC.mjs +2 -0
- package/out/__chunks__/{chunk-UAEUFVGE.mjs → chunk-OFU3D2KB.mjs} +2 -2
- package/out/__chunks__/{chunk-Y4QDT6I2.mjs → chunk-OHHNQ66F.mjs} +2 -2
- package/out/__chunks__/{chunk-6YCGOXOL.mjs → chunk-OLOOCCNU.mjs} +2 -2
- package/out/__chunks__/{chunk-FPBY3DHR.mjs → chunk-OMZ6A4DO.mjs} +2 -2
- package/out/__chunks__/{chunk-VF75NE7S.mjs → chunk-OPX7XWAC.mjs} +2 -2
- package/out/__chunks__/{chunk-JB3LG75C.mjs → chunk-OXPZVCKM.mjs} +2 -2
- package/out/__chunks__/{chunk-QJW6PYFV.mjs → chunk-OYCDHRNS.mjs} +2 -2
- package/out/__chunks__/{chunk-IPYKRZ2A.mjs → chunk-PGGSHHQJ.mjs} +2 -2
- package/out/__chunks__/chunk-PKD3AEXI.mjs +1 -0
- package/out/__chunks__/{chunk-YY724VZR.mjs → chunk-PZHQ37I6.mjs} +2 -2
- package/out/__chunks__/chunk-QB4NUTLA.mjs +2 -0
- package/out/__chunks__/{chunk-3T75EERX.mjs → chunk-QVGM6655.mjs} +2 -2
- package/out/__chunks__/{chunk-AI7UKECA.mjs → chunk-R6QKRGY5.mjs} +2 -2
- package/out/__chunks__/{chunk-44FB23KP.mjs → chunk-R7667VN6.mjs} +2 -2
- package/out/__chunks__/chunk-R76CQZZH.mjs +2 -0
- package/out/__chunks__/{chunk-IYMSWFCP.mjs → chunk-RYOUAM3L.mjs} +2 -2
- package/out/__chunks__/{chunk-NWSFXZMR.mjs → chunk-SBOOJTIB.mjs} +2 -2
- package/out/__chunks__/{chunk-J6R2XFXZ.mjs → chunk-SG5YZ37N.mjs} +2 -2
- package/out/__chunks__/chunk-SMFNVU6B.mjs +2 -0
- package/out/__chunks__/chunk-SMFNVU6B.mjs.map +7 -0
- package/out/__chunks__/chunk-SYWFZFFJ.mjs +2 -0
- package/out/__chunks__/{chunk-XQWEAEGW.mjs → chunk-TASSEE6N.mjs} +2 -2
- package/out/__chunks__/chunk-TSBH5KYD.mjs +2 -0
- package/out/__chunks__/{chunk-OLMTXXEH.mjs → chunk-TZJL7CZF.mjs} +2 -2
- package/out/__chunks__/{chunk-MXEJ6NB4.mjs → chunk-UN2MEJKC.mjs} +2 -2
- package/out/__chunks__/chunk-UN2MEJKC.mjs.map +7 -0
- package/out/__chunks__/{chunk-YRXESD4B.mjs → chunk-VNMU246H.mjs} +2 -2
- package/out/__chunks__/{chunk-YRXESD4B.mjs.map → chunk-VNMU246H.mjs.map} +1 -1
- package/out/__chunks__/{chunk-QDT3NABZ.mjs → chunk-W75ZD7BB.mjs} +2 -2
- package/out/__chunks__/chunk-WAM7WNSA.mjs +2 -0
- package/out/__chunks__/{chunk-A6TCEIG4.mjs → chunk-WLXKUUZ3.mjs} +2 -2
- package/out/__chunks__/{chunk-C7IGU65A.mjs → chunk-WQAFFPAS.mjs} +2 -2
- package/out/__chunks__/chunk-WVZRN2HX.mjs +2 -0
- package/out/__chunks__/{chunk-RF5IAADG.mjs.map → chunk-WVZRN2HX.mjs.map} +1 -1
- package/out/__chunks__/{chunk-PJNZSN57.mjs → chunk-X5IHXBJ3.mjs} +2 -2
- package/out/__chunks__/{chunk-SAV2LFBH.mjs → chunk-XI2BWIQP.mjs} +2 -2
- package/out/__chunks__/{chunk-5DP2QBUG.mjs → chunk-XU34NXIS.mjs} +2 -2
- package/out/__chunks__/{chunk-5MMHERWI.mjs → chunk-XV2BD67Y.mjs} +2 -2
- package/out/__chunks__/{chunk-GIZJB7FR.mjs → chunk-ZEJRHV7U.mjs} +2 -2
- package/out/__chunks__/{chunk-FY7XZQRH.mjs → chunk-ZHGONRBM.mjs} +2 -2
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.cjs +2 -2
- package/out/managers/LogoutManager/LogoutManager.cjs.map +2 -2
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs +4 -4
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs.map +2 -2
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.d.ts +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/ToastManager.cjs +8 -8
- package/out/managers/{internal/ToastManager → ToastManager}/ToastManager.cjs.map +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/ToastManager.d.ts +8 -8
- package/out/managers/ToastManager/ToastManager.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/LifetimeManager.cjs +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/LifetimeManager.cjs.map +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createToastsFromTransactions.cjs +4 -4
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createToastsFromTransactions.cjs.map +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createToastsFromTransactions.d.ts +3 -3
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createTransactionToast.cjs +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createTransactionToast.cjs.map +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/createTransactionToast.d.ts +3 -3
- package/out/managers/ToastManager/helpers/createTransactionToast.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastDataStateByStatus.cjs +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastDataStateByStatus.cjs.map +1 -1
- package/out/managers/ToastManager/helpers/getToastDataStateByStatus.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastTransactionsStatus.cjs +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastTransactionsStatus.cjs.map +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastTransactionsStatus.d.ts +1 -1
- package/out/managers/ToastManager/helpers/getToastTransactionsStatus.mjs +2 -0
- package/out/managers/ToastManager/helpers/tests/baseTransactionMock.d.ts +2 -0
- package/out/managers/ToastManager/index.cjs +23 -0
- package/out/managers/ToastManager/index.cjs.map +7 -0
- package/out/managers/ToastManager/index.d.ts +1 -0
- package/out/managers/ToastManager/index.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/types/index.cjs.map +1 -1
- package/out/managers/ToastManager/types/index.mjs +2 -0
- package/out/managers/{internal/ToastManager → ToastManager}/types/toast.types.cjs.map +1 -1
- package/out/managers/{internal/ToastManager → ToastManager}/types/toast.types.d.ts +3 -3
- package/out/managers/ToastManager/types/toast.types.mjs +2 -0
- package/out/managers/ToastManager/types/toast.types.mjs.map +7 -0
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.cjs +2 -2
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.cjs.map +2 -2
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.cjs +0 -3
- package/out/managers/internal/index.cjs.map +2 -2
- package/out/managers/internal/index.d.ts +0 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.cjs +1 -1
- package/out/methods/initApp/initApp.cjs.map +2 -2
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.cjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.cjs.map +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs.map +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.cjs +5 -5
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.cjs.map +2 -2
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.cjs +7 -0
- package/out/store/actions/transactions/transactionsActions.cjs.map +2 -2
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +2 -2
- package/out/__chunks__/chunk-2NXPS7R3.mjs +0 -2
- package/out/__chunks__/chunk-32WMC3HQ.mjs +0 -2
- package/out/__chunks__/chunk-33ZUFX42.mjs +0 -2
- package/out/__chunks__/chunk-4HEYQZNL.mjs +0 -2
- package/out/__chunks__/chunk-4Z7G5RCK.mjs +0 -2
- package/out/__chunks__/chunk-6CY7XXBE.mjs +0 -2
- package/out/__chunks__/chunk-DTSAE3IB.mjs +0 -2
- package/out/__chunks__/chunk-DTSAE3IB.mjs.map +0 -7
- package/out/__chunks__/chunk-JD3WTXPU.mjs +0 -2
- package/out/__chunks__/chunk-JFX27ZGH.mjs +0 -2
- package/out/__chunks__/chunk-KKBWOSVH.mjs +0 -2
- package/out/__chunks__/chunk-KYBNCMQL.mjs +0 -2
- package/out/__chunks__/chunk-MXEJ6NB4.mjs.map +0 -7
- package/out/__chunks__/chunk-NL5FA7NT.mjs +0 -2
- package/out/__chunks__/chunk-NL5FA7NT.mjs.map +0 -7
- package/out/__chunks__/chunk-RBJ3O63I.mjs +0 -2
- package/out/__chunks__/chunk-RBJ3O63I.mjs.map +0 -7
- package/out/__chunks__/chunk-RF5IAADG.mjs +0 -2
- package/out/__chunks__/chunk-RPNTVD3R.mjs +0 -2
- package/out/__chunks__/chunk-RRKJBSXY.mjs +0 -2
- package/out/__chunks__/chunk-SCSHU7XJ.mjs +0 -1
- package/out/__chunks__/chunk-TPJ7WT4J.mjs +0 -2
- package/out/__chunks__/chunk-UHQDTMYM.mjs +0 -2
- package/out/__chunks__/chunk-XBJKQBW3.mjs +0 -2
- package/out/__chunks__/chunk-YRRWYFH3.mjs +0 -2
- package/out/__chunks__/chunk-YUD55T7W.mjs +0 -2
- package/out/managers/internal/ToastManager/ToastManager.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/getToastTransactionsStatus.mjs +0 -2
- package/out/managers/internal/ToastManager/helpers/tests/baseTransactionMock.d.ts +0 -2
- package/out/managers/internal/ToastManager/types/index.mjs +0 -2
- package/out/managers/internal/ToastManager/types/toast.types.mjs +0 -2
- /package/out/__chunks__/{chunk-JFOYQVDZ.mjs.map → chunk-32ZBY2AE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TT5VL5H4.mjs.map → chunk-34ZJZYMC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2NXPS7R3.mjs.map → chunk-3JEK5A62.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DMBZGJ6Q.mjs.map → chunk-4G2T73DC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R6GH7DA7.mjs.map → chunk-4LTMFD6V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S4VD34VQ.mjs.map → chunk-4NQ35FCJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K4TMKMCO.mjs.map → chunk-57P66SOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZJ47ZJGM.mjs.map → chunk-5JVY6GJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KYBNCMQL.mjs.map → chunk-5LFB2H3K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EPG3L2S3.mjs.map → chunk-5PGKBWB6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UHQDTMYM.mjs.map → chunk-5UYF2YJN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-43DVKBLZ.mjs.map → chunk-5VSKEHYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KKBWOSVH.mjs.map → chunk-5W77GYVQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CRMKEEKH.mjs.map → chunk-62QLCUQH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BPIDBLI4.mjs.map → chunk-6FPG2OTI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZORPCBON.mjs.map → chunk-7JATWFXB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4Z7G5RCK.mjs.map → chunk-7Z665D57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NMISWSIO.mjs.map → chunk-AMS6KZTC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FT5G3VJ5.mjs.map → chunk-B5K6T6DF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TX4NQXZO.mjs.map → chunk-BBCLPJC4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CD7RYHHQ.mjs.map → chunk-BKVZCTUG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4HEYQZNL.mjs.map → chunk-CGLVVKZU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JD3WTXPU.mjs.map → chunk-CTITNRKA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DOLG56CN.mjs.map → chunk-DE6O7BFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HESE5NRU.mjs.map → chunk-DHTRPE3R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AVWNBQDX.mjs.map → chunk-DZ5FL2WV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BPVF6WD4.mjs.map → chunk-EIOADZ47.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E6WW5OHD.mjs.map → chunk-EP4OBHW4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-667PINAR.mjs.map → chunk-EPMKXFFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JNEQJC3B.mjs.map → chunk-GYYCA57F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NX6LPULJ.mjs.map → chunk-H2EFE4NU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UBZGPJ3E.mjs.map → chunk-HEA7NFOF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-32WMC3HQ.mjs.map → chunk-HSYMR5UW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DXTUMMVX.mjs.map → chunk-IGTIIBN6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ALPIQGXL.mjs.map → chunk-IJKCH7CT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QMY5RUJ3.mjs.map → chunk-IPIX74CB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NQTTC42T.mjs.map → chunk-IV4LWBR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XBJKQBW3.mjs.map → chunk-IYVM5B26.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PYHZTCM4.mjs.map → chunk-JIKCHL57.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OXHTDT7J.mjs.map → chunk-JV4IJH7L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-33ZUFX42.mjs.map → chunk-K3OKY7NL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C53VPXWP.mjs.map → chunk-N2KEJEOD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7YHUOWFV.mjs.map → chunk-NE4YNYCQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3AQIQDPA.mjs.map → chunk-O6RJHMIJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RPNTVD3R.mjs.map → chunk-O72VJVJC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UAEUFVGE.mjs.map → chunk-OFU3D2KB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y4QDT6I2.mjs.map → chunk-OHHNQ66F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6YCGOXOL.mjs.map → chunk-OLOOCCNU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FPBY3DHR.mjs.map → chunk-OMZ6A4DO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VF75NE7S.mjs.map → chunk-OPX7XWAC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JB3LG75C.mjs.map → chunk-OXPZVCKM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QJW6PYFV.mjs.map → chunk-OYCDHRNS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IPYKRZ2A.mjs.map → chunk-PGGSHHQJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SCSHU7XJ.mjs.map → chunk-PKD3AEXI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YY724VZR.mjs.map → chunk-PZHQ37I6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6CY7XXBE.mjs.map → chunk-QB4NUTLA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3T75EERX.mjs.map → chunk-QVGM6655.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AI7UKECA.mjs.map → chunk-R6QKRGY5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-44FB23KP.mjs.map → chunk-R7667VN6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JFX27ZGH.mjs.map → chunk-R76CQZZH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IYMSWFCP.mjs.map → chunk-RYOUAM3L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NWSFXZMR.mjs.map → chunk-SBOOJTIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6R2XFXZ.mjs.map → chunk-SG5YZ37N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RRKJBSXY.mjs.map → chunk-SYWFZFFJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XQWEAEGW.mjs.map → chunk-TASSEE6N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YRRWYFH3.mjs.map → chunk-TSBH5KYD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OLMTXXEH.mjs.map → chunk-TZJL7CZF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QDT3NABZ.mjs.map → chunk-W75ZD7BB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YUD55T7W.mjs.map → chunk-WAM7WNSA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A6TCEIG4.mjs.map → chunk-WLXKUUZ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C7IGU65A.mjs.map → chunk-WQAFFPAS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PJNZSN57.mjs.map → chunk-X5IHXBJ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SAV2LFBH.mjs.map → chunk-XI2BWIQP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5DP2QBUG.mjs.map → chunk-XU34NXIS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5MMHERWI.mjs.map → chunk-XV2BD67Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GIZJB7FR.mjs.map → chunk-ZEJRHV7U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FY7XZQRH.mjs.map → chunk-ZHGONRBM.mjs.map} +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/ToastManager.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/LifetimeManager.d.ts +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/LifetimeManager.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/createToastsFromTransactions.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/createTransactionToast.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastDataStateByStatus.d.ts +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastDataStateByStatus.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/helpers/getToastTransactionsStatus.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager/types → ToastManager}/index.mjs.map +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/types/index.cjs +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/types/index.d.ts +0 -0
- /package/out/managers/{internal/ToastManager/types/toast.types.mjs.map → ToastManager/types/index.mjs.map} +0 -0
- /package/out/managers/{internal/ToastManager → ToastManager}/types/toast.types.cjs +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-WQAFFPAS.mjs";import{a as B}from"./chunk-5UYF2YJN.mjs";import{a as b}from"./chunk-6FPG2OTI.mjs";import{a as O}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-QVGM6655.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-4NQ35FCJ.mjs";import{a as R}from"./chunk-PZHQ37I6.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as A}from"./chunk-5W77GYVQ.mjs";import{s as x}from"./chunk-4LTMFD6V.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=A(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=k.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await O({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EIOADZ47.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-ZEJRHV7U.mjs";import{a as o}from"./chunk-LJX4MW7B.mjs";import{a as e,b as t}from"./chunk-WVZRN2HX.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EP4OBHW4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WLXKUUZ3.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-EPMKXFFR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var a=(t=>(t.success="Transaction successful",t.received="Transaction received",t.failed="Transaction failed",t.pending="Processing transaction",t.timedOut="Transaction timed out",t.invalid="Transaction invalid",t))(a||{}),r=(t=>(t.OPEN_NOTIFICATIONS_FEED="OPEN_NOTIFICATIONS_FEED",t.CLOSE="CLOSE_TOAST",t.TRANSACTION_TOAST_DATA_UPDATE="TRANSACTION_TOAST_DATA_UPDATE",t.CUSTOM_TOAST_DATA_UPDATE="CUSTOM_TOAST_DATA_UPDATE",t.HIDE="HIDE_TOAST_LIST",t.SHOW="SHOW_TOAST_LIST",t))(r||{});export{a,r as b};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-GB2K574L.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/managers/
|
|
3
|
+
"sources": ["../../src/managers/ToastManager/types/toast.types.ts"],
|
|
4
4
|
"sourcesContent": ["import { ITransactionListItem } from 'lib/sdkDappUi';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionsDisplayInfoType } from 'types/transactions.types';\n\nexport enum TransactionsDefaultTitles {\n success = 'Transaction successful',\n received = 'Transaction received',\n failed = 'Transaction failed',\n pending = 'Processing transaction',\n timedOut = 'Transaction timed out',\n invalid = 'Transaction invalid'\n}\n\nexport interface GetToastsOptionsDataPropsType {\n address: string;\n sender: string;\n status?: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n toastId: string;\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n txActionName?: string;\n}\n\nexport interface IToastDataState {\n id: string;\n icon: string;\n hasCloseButton: boolean;\n title: string;\n iconClassName: string;\n}\nexport interface ITransactionProgressState {\n startTime: number;\n endTime: number;\n}\nexport interface ITransaction {\n hash: string;\n status: string;\n link: string;\n}\nexport interface ITransactionToast {\n toastId: string;\n processedTransactionsStatus: string;\n transactions: ITransactionListItem[];\n toastDataState: IToastDataState;\n transactionProgressState?: ITransactionProgressState | null;\n}\n\nexport enum ToastEventsEnum {\n OPEN_NOTIFICATIONS_FEED = 'OPEN_NOTIFICATIONS_FEED',\n CLOSE = 'CLOSE_TOAST',\n // Event to update the transaction toast data\n TRANSACTION_TOAST_DATA_UPDATE = 'TRANSACTION_TOAST_DATA_UPDATE',\n // Event to update the custom toast data\n CUSTOM_TOAST_DATA_UPDATE = 'CUSTOM_TOAST_DATA_UPDATE',\n HIDE = 'HIDE_TOAST_LIST',\n SHOW = 'SHOW_TOAST_LIST'\n}\n"],
|
|
5
5
|
"mappings": "AAOO,IAAKA,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,uBACXA,EAAA,OAAS,qBACTA,EAAA,QAAU,yBACVA,EAAA,SAAW,wBACXA,EAAA,QAAU,sBANAA,OAAA,IA0CAC,OACVA,EAAA,wBAA0B,0BAC1BA,EAAA,MAAQ,cAERA,EAAA,8BAAgC,gCAEhCA,EAAA,yBAA2B,2BAC3BA,EAAA,KAAO,kBACPA,EAAA,KAAO,kBARGA,OAAA",
|
|
6
6
|
"names": ["TransactionsDefaultTitles", "ToastEventsEnum"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{q as u}from"./chunk-4LTMFD6V.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-GYYCA57F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-SBOOJTIB.mjs";import{a as o}from"./chunk-WE7YOBO7.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-H2EFE4NU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as c}from"./chunk-4LTMFD6V.mjs";import{a as o}from"./chunk-JMC7CMTU.mjs";var r=e=>{c().setState(({account:t})=>{let s=t.address===e.address;t.accounts={[t.address]:s?e:o}},!1,"setAccount")},u=e=>c().setState(({account:t})=>{t.ledgerAccount=e},!1,"setLedgerAccount"),p=e=>c().setState(({account:t})=>{t.walletConnectAccount=e},!1,"setWalletConnectAccount"),l=e=>c().setState(({account:t})=>{t.websocketEvent={timestamp:Date.now(),message:e}},!1,"setWebsocketEvent"),m=e=>c().setState(({account:t})=>{t.websocketBatchEvent={timestamp:Date.now(),data:e}},!1,"setWebsocketBatchEvent"),A=e=>{c().setState(({account:t})=>{t.accounts[t.address].nonce=e},!1,"setAccountNonce")};export{r as a,u as b,p as c,l as d,m as e,A as f};
|
|
2
|
+
//# sourceMappingURL=chunk-HEA7NFOF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WVZRN2HX.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
|
|
2
|
+
//# sourceMappingURL=chunk-IGTIIBN6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-4LTMFD6V.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IJKCH7CT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-SYWFZFFJ.mjs";import{a as f}from"./chunk-SBOOJTIB.mjs";import{a as g}from"./chunk-5PGKBWB6.mjs";import{b as a}from"./chunk-4LTMFD6V.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IPIX74CB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-4LTMFD6V.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IV4LWBR3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-FRDR4A7Z.mjs";import{w as g}from"./chunk-AS7XXEHY.mjs";import{a as c}from"./chunk-3JEK5A62.mjs";import{s as n}from"./chunk-4LTMFD6V.mjs";import{g as a}from"./chunk-UERJ6AKK.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=c(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=g(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JIKCHL57.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-WLXKUUZ3.mjs";import{a as t}from"./chunk-5LFB2H3K.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JV4IJH7L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-BBCLPJC4.mjs";import{a as d}from"./chunk-TZJL7CZF.mjs";import{a as f}from"./chunk-R76CQZZH.mjs";import{a as h}from"./chunk-3L7HZ2SO.mjs";var g=t=>t.sort((n,i)=>i.timestamp-n.timestamp),k=async({transactions:t,address:n,explorerAddress:i,egldLabel:u,skipFetchingTransactions:I=!1})=>{let o=[],e=[];if(t.forEach(s=>{let a=f(s.hash);a?o.push(a):e.push(s.hash)}),e.length===0)return g(o);let c=I?t.map(s=>({...s,txHash:s.hash})):await p(e),l=c.map(s=>s.txHash),T=e.filter(s=>!l.includes(s));if(T.length>0){let a=t.filter(r=>T.includes(r.hash)).map(r=>({...r,txHash:r.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...a)}let m=new Map;return o.forEach(s=>{let a=s.hash;a&&m.set(String(a),s)}),c.forEach(s=>{let a=h({transaction:s,address:n,explorerAddress:i,egldLabel:u});a.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:a}),m.set(s.txHash,a)}),g(Array.from(m.values()))};export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-N2KEJEOD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-UN2MEJKC.mjs";import{a as u}from"./chunk-JV4IJH7L.mjs";import{s as c}from"./chunk-4LTMFD6V.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-6JSWL75O.mjs";import{a}from"./chunk-LJX4MW7B.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NE4YNYCQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-KDWLSBQB.mjs";import{b as e,c as i}from"./chunk-C3Y3ANFE.mjs";import{j as r}from"./chunk-65L5EBBL.mjs";import{q as n}from"./chunk-4LTMFD6V.mjs";async function E({results:u,hash:c,sessionId:s}){let a=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...a,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=n().getState();m[s].transactions.some(t=>r(t.status))||(e({sessionId:s,status:"fail",errorMessage:a?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-O6RJHMIJ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-WVZRN2HX.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OFU3D2KB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-JV4IJH7L.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OHHNQ66F.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-IYVM5B26.mjs";import{a as m}from"./chunk-NZYB675D.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>m({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=g({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OLOOCCNU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-BBCLPJC4.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OMZ6A4DO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-WVZRN2HX.mjs";var n=class{static get create(){return this.createComponent}static set create(e){this.createComponent=e}};n.createComponent=async({name:e,anchor:m})=>{if(!t?.customElements?.get(e))return null;let o=t.document.createElement(e);return(m||t.document.body).appendChild(o),await customElements.whenDefined(e),o};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OPX7XWAC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-5VSKEHYA.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OXPZVCKM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-H2EFE4NU.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OYCDHRNS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-BKVZCTUG.mjs";import{a}from"./chunk-O72VJVJC.mjs";import{a as u}from"./chunk-TASSEE6N.mjs";import{c as n}from"./chunk-IGTIIBN6.mjs";import{a as s}from"./chunk-WVZRN2HX.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PGGSHHQJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-PKD3AEXI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-SMFNVU6B.mjs";function e(t){let{allTransactions:n,parsedTransactionsByDataField:r}=a({transactions:t});return{parsedTransactionsByDataField:r,allTransactions:n}}export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PZHQ37I6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-RYOUAM3L.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{w as G}from"./chunk-AS7XXEHY.mjs";import{a as L}from"./chunk-K3OKY7NL.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-WVZRN2HX.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QVGM6655.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-JIKCHL57.mjs";import{a}from"./chunk-YUFPUG5O.mjs";import{a as c}from"./chunk-3JEK5A62.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R6QKRGY5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-4LTMFD6V.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-R7667VN6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-LGAWIVRO.mjs";import{s as m}from"./chunk-4LTMFD6V.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RYOUAM3L.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3S57OP4Z.mjs";import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-62QLCUQH.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SBOOJTIB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WVZRN2HX.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SG5YZ37N.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l}from"./chunk-7CA6UKPK.mjs";import{b as T}from"./chunk-6DWUEZO7.mjs";import{c}from"./chunk-TI37DKBT.mjs";function y({transactions:s}){let e=[],a={};return!s||s.length===0?{allTransactions:e,parsedTransactionsByDataField:a}:(s.forEach((t,p)=>{let u=t.toPlainObject(),o=c(u?.data??""),r=l(o);if(r.length>0)r.forEach((n,i)=>{let m=i===r.length-1,d={transaction:t,multiTxData:n.data,transactionIndex:i,needsSigning:m};a[n.data]={tokenId:n.token?n.token:"",amount:n.amount?n.amount:"",type:n.type,nonce:n.nonce?n.nonce:"",multiTxData:n.data,receiver:n.receiver},e.push(d)});else{let{tokenId:n,amount:i}=T(o);n&&(a[o]={tokenId:n,amount:i,receiver:t.receiver.toBech32()}),e.push({transaction:t,transactionIndex:p,multiTxData:o,needsSigning:!0})}}),{allTransactions:e,parsedTransactionsByDataField:a})}export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SMFNVU6B.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Transaction } from '@multiversx/sdk-core';\n\nimport {\n MultiSignTransactionType,\n TransactionsDataTokensType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { getTokenFromData } from './getTokenFromData';\nimport { parseMultiEsdtTransferData } from './parseMultiEsdtTransferData';\n\nexport function parseMultiEsdtTransferDataForMultipleTransactions({\n transactions\n}: {\n transactions?: Transaction[];\n}) {\n const allTransactions: MultiSignTransactionType[] = [];\n const parsedTransactionsByDataField: TransactionsDataTokensType = {};\n\n if (!transactions || transactions.length === 0) {\n return {\n allTransactions,\n parsedTransactionsByDataField\n };\n }\n\n transactions.forEach((transaction, transactionIndex) => {\n const plainTransaction = transaction.toPlainObject();\n const txData = decodeBase64(plainTransaction?.data ?? '');\n const multiTxs = parseMultiEsdtTransferData(txData);\n\n if (multiTxs.length > 0) {\n multiTxs.forEach((trx, idx) => {\n const isLastView = idx === multiTxs.length - 1;\n\n const newTx: MultiSignTransactionType = {\n transaction,\n multiTxData: trx.data,\n transactionIndex: idx,\n needsSigning: isLastView\n };\n\n parsedTransactionsByDataField[trx.data] = {\n tokenId: trx.token ? trx.token : '',\n amount: trx.amount ? trx.amount : '',\n type: trx.type,\n nonce: trx.nonce ? trx.nonce : '',\n multiTxData: trx.data,\n receiver: trx.receiver\n };\n\n allTransactions.push(newTx);\n });\n } else {\n const { tokenId, amount } = getTokenFromData(txData);\n\n if (tokenId) {\n parsedTransactionsByDataField[txData] = {\n tokenId,\n amount,\n receiver: transaction.receiver.toBech32()\n };\n }\n allTransactions.push({\n transaction,\n transactionIndex,\n multiTxData: txData,\n needsSigning: true\n });\n }\n });\n\n return {\n allTransactions,\n parsedTransactionsByDataField\n };\n}\n"],
|
|
5
|
+
"mappings": "sHAUO,SAASA,EAAkD,CAChE,aAAAC,CACF,EAEG,CACD,IAAMC,EAA8C,CAAC,EAC/CC,EAA4D,CAAC,EAEnE,MAAI,CAACF,GAAgBA,EAAa,SAAW,EACpC,CACL,gBAAAC,EACA,8BAAAC,CACF,GAGFF,EAAa,QAAQ,CAACG,EAAaC,IAAqB,CACtD,IAAMC,EAAmBF,EAAY,cAAc,EAC7CG,EAASC,EAAaF,GAAkB,MAAQ,EAAE,EAClDG,EAAWC,EAA2BH,CAAM,EAElD,GAAIE,EAAS,OAAS,EACpBA,EAAS,QAAQ,CAACE,EAAKC,IAAQ,CAC7B,IAAMC,EAAaD,IAAQH,EAAS,OAAS,EAEvCK,EAAkC,CACtC,YAAAV,EACA,YAAaO,EAAI,KACjB,iBAAkBC,EAClB,aAAcC,CAChB,EAEAV,EAA8BQ,EAAI,IAAI,EAAI,CACxC,QAASA,EAAI,MAAQA,EAAI,MAAQ,GACjC,OAAQA,EAAI,OAASA,EAAI,OAAS,GAClC,KAAMA,EAAI,KACV,MAAOA,EAAI,MAAQA,EAAI,MAAQ,GAC/B,YAAaA,EAAI,KACjB,SAAUA,EAAI,QAChB,EAEAT,EAAgB,KAAKY,CAAK,CAC5B,CAAC,MACI,CACL,GAAM,CAAE,QAAAC,EAAS,OAAAC,CAAO,EAAIC,EAAiBV,CAAM,EAE/CQ,IACFZ,EAA8BI,CAAM,EAAI,CACtC,QAAAQ,EACA,OAAAC,EACA,SAAUZ,EAAY,SAAS,SAAS,CAC1C,GAEFF,EAAgB,KAAK,CACnB,YAAAE,EACA,iBAAAC,EACA,YAAaE,EACb,aAAc,EAChB,CAAC,CACH,CACF,CAAC,EAEM,CACL,gBAAAL,EACA,8BAAAC,CACF,EACF",
|
|
6
|
+
"names": ["parseMultiEsdtTransferDataForMultipleTransactions", "transactions", "allTransactions", "parsedTransactionsByDataField", "transaction", "transactionIndex", "plainTransaction", "txData", "decodeBase64", "multiTxs", "parseMultiEsdtTransferData", "trx", "idx", "isLastView", "newTx", "tokenId", "amount", "getTokenFromData"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as p,q as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as p,q as e}from"./chunk-4LTMFD6V.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-TASSEE6N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as a}from"./chunk-4LTMFD6V.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-TZJL7CZF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-2Y66XRQK.mjs";import{a as te}from"./chunk-PJNZSN57.mjs";import{a as U}from"./chunk-DOLG56CN.mjs";import{a as ie}from"./chunk-AI7UKECA.mjs";import{a as re}from"./chunk-PYHZTCM4.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-E6WW5OHD.mjs";import{a as p}from"./chunk-GIZJB7FR.mjs";import{a as Z}from"./chunk-FT5G3VJ5.mjs";import{a as ne}from"./chunk-BPVF6WD4.mjs";import{a as oe}from"./chunk-S4VD34VQ.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as I,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,u as M,v as C,w as L}from"./chunk-NL5FA7NT.mjs";import{a as y}from"./chunk-667PINAR.mjs";import{a as P}from"./chunk-2NXPS7R3.mjs";import{a as q}from"./chunk-RPNTVD3R.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-XQWEAEGW.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-R6GH7DA7.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-6JSWL75O.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!P())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",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=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>ie({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>n.ledger,C(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await oe(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),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 ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var fe={passkey:n.passkey,metamask:n.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());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.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}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 ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[I.CANCEL_ACTION,I.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:I.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=o,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!P())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=P(),t=V(l());if(H(l())&&le.push(I.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new T({type:pe.metamask});break}case n.passkey:{r=new T({type:pe.passkey});break}case n.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);C(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),C(null),F(n.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:n.none;d.updateData({name:x[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,z as f,k as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-EPMKXFFR.mjs";import{a as se}from"./chunk-2Y66XRQK.mjs";import{a as te}from"./chunk-X5IHXBJ3.mjs";import{a as U}from"./chunk-DE6O7BFR.mjs";import{a as ie}from"./chunk-R6QKRGY5.mjs";import{a as re}from"./chunk-JIKCHL57.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-EP4OBHW4.mjs";import{a as p}from"./chunk-ZEJRHV7U.mjs";import{a as Z}from"./chunk-B5K6T6DF.mjs";import{a as ne}from"./chunk-EIOADZ47.mjs";import{a as oe}from"./chunk-4NQ35FCJ.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,u as M,v as P,w as L}from"./chunk-AS7XXEHY.mjs";import{a as y}from"./chunk-3JEK5A62.mjs";import{a as q}from"./chunk-O72VJVJC.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-TASSEE6N.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-4LTMFD6V.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-6JSWL75O.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!y())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",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=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((o,s)=>ie({manager:e,resolve:o,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>n.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var z=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let o=await this.provider.signTransactions(e)??[];return await oe(o)}catch(o){throw await r({shouldCancelAction:!0}),o}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),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 ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var k=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(o){throw await t({shouldCancelAction:!1}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var fe={passkey:n.passkey,metamask:n.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(o){throw await t({shouldCancelAction:!0}),o}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());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.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}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 ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let o=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{o.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return 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:o}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=o,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!y())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=y(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:o="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:o,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(o)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:o="",signature:s=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!o}),{address:o,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case n.extension:{r=new k;break}case n.crossWindow:{r=new z;break}case n.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case n.metamask:{r=new T({type:pe.metamask});break}case n.passkey:{r=new T({type:pe.passkey});break}case n.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case n.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let o=n.crossWindow===i;return se(o?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(n.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(o,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:n.none;d.updateData({name:x[w],type:w});try{let u=await i(a);o(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,z as f,k as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-UN2MEJKC.mjs.map
|