@multiversx/sdk-dapp 5.2.7 → 5.2.8-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/__chunks__/chunk-2FLZIC6T.mjs +2 -0
- package/out/__chunks__/{chunk-IGN5F3GN.mjs → chunk-3MFZNIVA.mjs} +2 -2
- package/out/__chunks__/chunk-3WVYWVBO.mjs +2 -0
- package/out/__chunks__/{chunk-NUJ4VCBC.mjs → chunk-46Q7GAGQ.mjs} +2 -2
- package/out/__chunks__/{chunk-5FZ5WUYZ.mjs → chunk-4AX4KREP.mjs} +2 -2
- package/out/__chunks__/chunk-4JMULQUT.mjs +2 -0
- package/out/__chunks__/{chunk-C6D4JSK4.mjs.map → chunk-4JMULQUT.mjs.map} +2 -2
- package/out/__chunks__/{chunk-ZC6ENJP4.mjs → chunk-4UX2RGA3.mjs} +2 -2
- package/out/__chunks__/chunk-54A3AEYY.mjs +2 -0
- package/out/__chunks__/{chunk-JTIXXP4J.mjs → chunk-5N6XRB6X.mjs} +2 -2
- package/out/__chunks__/{chunk-EEVAKQEF.mjs → chunk-5OKB7OJO.mjs} +2 -2
- package/out/__chunks__/{chunk-Y3OGRXWT.mjs → chunk-5QNV3N3Y.mjs} +2 -2
- package/out/__chunks__/chunk-655BRTJU.mjs +2 -0
- package/out/__chunks__/chunk-655BRTJU.mjs.map +7 -0
- package/out/__chunks__/chunk-6DE2ILBM.mjs +2 -0
- package/out/__chunks__/chunk-6DE2ILBM.mjs.map +7 -0
- package/out/__chunks__/chunk-6JYFAXYV.mjs +2 -0
- package/out/__chunks__/chunk-6JYFAXYV.mjs.map +7 -0
- package/out/__chunks__/chunk-7DANVXEC.mjs +2 -0
- package/out/__chunks__/chunk-7DTSCLFH.mjs +2 -0
- package/out/__chunks__/chunk-7DTSCLFH.mjs.map +7 -0
- package/out/__chunks__/chunk-AK2C7BRV.mjs +2 -0
- package/out/__chunks__/{chunk-XFBUY46Y.mjs.map → chunk-AK2C7BRV.mjs.map} +2 -2
- package/out/__chunks__/chunk-B5FGXPIB.mjs +2 -0
- package/out/__chunks__/{chunk-A4KEELZM.mjs → chunk-BGDXQQ5S.mjs} +2 -2
- package/out/__chunks__/{chunk-3Q5IOJ67.mjs → chunk-BOCVH7LE.mjs} +2 -2
- package/out/__chunks__/chunk-CN6OY7S3.mjs +2 -0
- package/out/__chunks__/{chunk-LFBY6WV3.mjs → chunk-CNY5PSVG.mjs} +2 -2
- package/out/__chunks__/{chunk-RIB3PJIR.mjs → chunk-DGESHOFR.mjs} +2 -2
- package/out/__chunks__/{chunk-Z3NZ36LQ.mjs → chunk-DPDIXMEZ.mjs} +2 -2
- package/out/__chunks__/chunk-FSRZBXEX.mjs +2 -0
- package/out/__chunks__/{chunk-QAOBZWSF.mjs.map → chunk-FSRZBXEX.mjs.map} +1 -1
- package/out/__chunks__/{chunk-K3VNFEPP.mjs → chunk-GUX5TQUF.mjs} +2 -2
- package/out/__chunks__/{chunk-UY57JRX7.mjs → chunk-GXT4ECQX.mjs} +2 -2
- package/out/__chunks__/{chunk-HGQYSGTG.mjs → chunk-HEDV65MF.mjs} +2 -2
- package/out/__chunks__/{chunk-SGNJ44D2.mjs → chunk-IKJDNJBZ.mjs} +2 -2
- package/out/__chunks__/chunk-IYDCYLCH.mjs +2 -0
- package/out/__chunks__/{chunk-RXX3GSOM.mjs → chunk-JC33WJRK.mjs} +2 -2
- package/out/__chunks__/{chunk-NOIBKBS3.mjs → chunk-JOW3L3HD.mjs} +2 -2
- package/out/__chunks__/{chunk-JQ57YAGP.mjs → chunk-JRTS5QFV.mjs} +2 -2
- package/out/__chunks__/{chunk-CT235ZUB.mjs → chunk-JRYLZOIG.mjs} +2 -2
- package/out/__chunks__/chunk-KA5UARE7.mjs +2 -0
- package/out/__chunks__/chunk-KA5UARE7.mjs.map +7 -0
- package/out/__chunks__/chunk-KFBY5KJV.mjs +2 -0
- package/out/__chunks__/{chunk-A3D3GW7R.mjs → chunk-KI7U7TTV.mjs} +2 -2
- package/out/__chunks__/chunk-KUX3SSFI.mjs +2 -0
- package/out/__chunks__/{chunk-37O2ROE4.mjs → chunk-KVFGAX26.mjs} +2 -2
- package/out/__chunks__/{chunk-XYPOYVRU.mjs → chunk-L3CWG4NY.mjs} +2 -2
- package/out/__chunks__/{chunk-5TNG3JR3.mjs → chunk-L6LOZYKR.mjs} +2 -2
- package/out/__chunks__/{chunk-J6WJ6ULQ.mjs → chunk-LDOBY5TI.mjs} +2 -2
- package/out/__chunks__/{chunk-LUCBMBG7.mjs → chunk-M4QSM7JZ.mjs} +2 -2
- package/out/__chunks__/{chunk-QUPXSKV4.mjs → chunk-MGCDGZ65.mjs} +2 -2
- package/out/__chunks__/{chunk-PI3A4HAK.mjs → chunk-MKHRCP4S.mjs} +2 -2
- package/out/__chunks__/chunk-O4T46OZT.mjs +2 -0
- package/out/__chunks__/{chunk-JVRKUYW6.mjs → chunk-OBDXC5PA.mjs} +2 -2
- package/out/__chunks__/{chunk-VOJLXYJ3.mjs → chunk-OPTTKCAB.mjs} +2 -2
- package/out/__chunks__/{chunk-4JCZWUDH.mjs → chunk-OUCGS3VX.mjs} +2 -2
- package/out/__chunks__/{chunk-PBTBNQ25.mjs → chunk-OUT4RJKC.mjs} +2 -2
- package/out/__chunks__/chunk-PE2UUWBT.mjs +2 -0
- package/out/__chunks__/chunk-PE2UUWBT.mjs.map +7 -0
- package/out/__chunks__/{chunk-FNMAWOLC.mjs → chunk-PGAZRXNE.mjs} +2 -2
- package/out/__chunks__/chunk-Q7FSG7W5.mjs +2 -0
- package/out/__chunks__/{chunk-THWK4TAG.mjs → chunk-QIHYXPAQ.mjs} +2 -2
- package/out/__chunks__/{chunk-K7X3YFJU.mjs → chunk-QLSUEZBN.mjs} +2 -2
- package/out/__chunks__/chunk-QSD35D6R.mjs +2 -0
- package/out/__chunks__/chunk-R2HTOWVS.mjs +2 -0
- package/out/__chunks__/chunk-R7JZ76EL.mjs +2 -0
- package/out/__chunks__/chunk-R7JZ76EL.mjs.map +7 -0
- package/out/__chunks__/{chunk-G5VTJTDE.mjs → chunk-RA6POCQX.mjs} +2 -2
- package/out/__chunks__/chunk-RDTOLMUB.mjs +2 -0
- package/out/__chunks__/chunk-S2S3PSTA.mjs +2 -0
- package/out/__chunks__/chunk-S2S3PSTA.mjs.map +7 -0
- package/out/__chunks__/{chunk-EYNHHGCH.mjs → chunk-S7FF34CP.mjs} +2 -2
- package/out/__chunks__/{chunk-Z64FHGQ2.mjs → chunk-SJ4J2X3Q.mjs} +2 -2
- package/out/__chunks__/{chunk-3WS7UAIF.mjs → chunk-T5FZS4TI.mjs} +2 -2
- package/out/__chunks__/{chunk-ZRMZYVMR.mjs → chunk-TA5A4RZR.mjs} +2 -2
- package/out/__chunks__/{chunk-Q6RQNGJC.mjs → chunk-TAECVK2M.mjs} +2 -2
- package/out/__chunks__/chunk-UIWCJ3CV.mjs +2 -0
- package/out/__chunks__/{chunk-I47BE6ON.mjs → chunk-UM33WRU6.mjs} +2 -2
- package/out/__chunks__/{chunk-PCTCQEFY.mjs → chunk-URGEY6PS.mjs} +2 -2
- package/out/__chunks__/chunk-UYPJFAL4.mjs +2 -0
- package/out/__chunks__/chunk-UZUNMI2K.mjs +2 -0
- package/out/__chunks__/chunk-V57G6XBX.mjs +2 -0
- package/out/__chunks__/chunk-V57G6XBX.mjs.map +7 -0
- package/out/__chunks__/{chunk-XH2ZG7PU.mjs → chunk-VOJNL3IQ.mjs} +2 -2
- package/out/__chunks__/{chunk-DP53BNR6.mjs → chunk-VQS22XW6.mjs} +2 -2
- package/out/__chunks__/{chunk-JIIULTH3.mjs → chunk-WPAJCDKZ.mjs} +2 -2
- package/out/__chunks__/{chunk-B5ETDLE6.mjs → chunk-X4KVARIH.mjs} +2 -2
- package/out/__chunks__/{chunk-WGKDCYB7.mjs → chunk-XOVAG77B.mjs} +2 -2
- package/out/__chunks__/chunk-XQV7WLUX.mjs +2 -0
- package/out/__chunks__/chunk-XQV7WLUX.mjs.map +7 -0
- package/out/__chunks__/{chunk-4PQ3E6VH.mjs → chunk-YCND2MYJ.mjs} +2 -2
- package/out/__chunks__/{chunk-Y5BESSJK.mjs → chunk-YQZQJ3XD.mjs} +2 -2
- package/out/__chunks__/{chunk-TLW7RSAO.mjs → chunk-YYWIEBZG.mjs} +2 -2
- package/out/__chunks__/{chunk-IF3IASJC.mjs → chunk-ZUIVPDNY.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.d.ts +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/configuration/index.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.d.ts +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactions.d.ts +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs +5 -4
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs.map +2 -2
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.d.ts +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs +4 -3
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs.map +2 -2
- 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.cjs +2 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.cjs.map +2 -2
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.cjs +50 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.cjs.map +7 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.d.ts +3 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.mjs +2 -0
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.mjs.map +7 -0
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.cjs +42 -6
- package/out/store/actions/account/accountActions.cjs.map +2 -2
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.cjs +14 -2
- package/out/store/actions/cache/cacheActions.cjs.map +2 -2
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.cjs +21 -3
- package/out/store/actions/config/configActions.cjs.map +2 -2
- 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.cjs +63 -9
- package/out/store/actions/loginInfo/loginInfoActions.cjs.map +2 -2
- 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.cjs +7 -1
- package/out/store/actions/network/networkActions.cjs.map +2 -2
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.cjs +7 -1
- package/out/store/actions/sharedActions/sharedActions.cjs.map +2 -2
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.cjs +21 -3
- package/out/store/actions/toasts/toastsActions.cjs.map +2 -2
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.cjs +42 -27
- package/out/store/actions/transactions/transactionsActions.cjs.map +2 -2
- package/out/store/actions/transactions/transactionsActions.d.ts +6 -5
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.cjs +7 -1
- package/out/store/actions/ui/uiActions.cjs.map +2 -2
- 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.cjs +4 -1
- package/out/store/store.cjs.map +2 -2
- 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-22IJ3QB4.mjs +0 -2
- package/out/__chunks__/chunk-34PFLOIB.mjs +0 -2
- package/out/__chunks__/chunk-4L2AXB2K.mjs +0 -2
- package/out/__chunks__/chunk-5MKXCLBG.mjs +0 -2
- package/out/__chunks__/chunk-5WVYRVED.mjs +0 -2
- package/out/__chunks__/chunk-63MIE6JF.mjs +0 -2
- package/out/__chunks__/chunk-6L7YQWGX.mjs +0 -2
- package/out/__chunks__/chunk-AORVRKD7.mjs +0 -2
- package/out/__chunks__/chunk-B4QT6VK6.mjs +0 -2
- package/out/__chunks__/chunk-BAWWEDTL.mjs +0 -2
- package/out/__chunks__/chunk-C6D4JSK4.mjs +0 -2
- package/out/__chunks__/chunk-EETNNBUP.mjs +0 -2
- package/out/__chunks__/chunk-EETNNBUP.mjs.map +0 -7
- package/out/__chunks__/chunk-EYGPOZGS.mjs +0 -2
- package/out/__chunks__/chunk-FUFPNXYS.mjs +0 -2
- package/out/__chunks__/chunk-FUFPNXYS.mjs.map +0 -7
- package/out/__chunks__/chunk-GFEDWIDV.mjs +0 -2
- package/out/__chunks__/chunk-GFEDWIDV.mjs.map +0 -7
- package/out/__chunks__/chunk-ICTG3GLU.mjs +0 -2
- package/out/__chunks__/chunk-ICTG3GLU.mjs.map +0 -7
- package/out/__chunks__/chunk-JRRBXKOK.mjs +0 -2
- package/out/__chunks__/chunk-KLDTJCML.mjs +0 -2
- package/out/__chunks__/chunk-KLDTJCML.mjs.map +0 -7
- package/out/__chunks__/chunk-KOLL3XGD.mjs +0 -2
- package/out/__chunks__/chunk-MSF6QQXH.mjs +0 -2
- package/out/__chunks__/chunk-O4I2ENO6.mjs +0 -2
- package/out/__chunks__/chunk-OPHTJKDE.mjs +0 -2
- package/out/__chunks__/chunk-QAOBZWSF.mjs +0 -2
- package/out/__chunks__/chunk-QSXHUZLS.mjs +0 -2
- package/out/__chunks__/chunk-QSXHUZLS.mjs.map +0 -7
- package/out/__chunks__/chunk-TBCYELRO.mjs +0 -2
- package/out/__chunks__/chunk-TBCYELRO.mjs.map +0 -7
- package/out/__chunks__/chunk-TFCXKUX5.mjs +0 -2
- package/out/__chunks__/chunk-V7P525KM.mjs +0 -2
- package/out/__chunks__/chunk-V7P525KM.mjs.map +0 -7
- package/out/__chunks__/chunk-VW2RKDMX.mjs +0 -2
- package/out/__chunks__/chunk-VW2RKDMX.mjs.map +0 -7
- package/out/__chunks__/chunk-XFBUY46Y.mjs +0 -2
- /package/out/__chunks__/{chunk-5MKXCLBG.mjs.map → chunk-2FLZIC6T.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IGN5F3GN.mjs.map → chunk-3MFZNIVA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MSF6QQXH.mjs.map → chunk-3WVYWVBO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NUJ4VCBC.mjs.map → chunk-46Q7GAGQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5FZ5WUYZ.mjs.map → chunk-4AX4KREP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZC6ENJP4.mjs.map → chunk-4UX2RGA3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BAWWEDTL.mjs.map → chunk-54A3AEYY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JTIXXP4J.mjs.map → chunk-5N6XRB6X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EEVAKQEF.mjs.map → chunk-5OKB7OJO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y3OGRXWT.mjs.map → chunk-5QNV3N3Y.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OPHTJKDE.mjs.map → chunk-7DANVXEC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-22IJ3QB4.mjs.map → chunk-B5FGXPIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A4KEELZM.mjs.map → chunk-BGDXQQ5S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3Q5IOJ67.mjs.map → chunk-BOCVH7LE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-34PFLOIB.mjs.map → chunk-CN6OY7S3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LFBY6WV3.mjs.map → chunk-CNY5PSVG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RIB3PJIR.mjs.map → chunk-DGESHOFR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z3NZ36LQ.mjs.map → chunk-DPDIXMEZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K3VNFEPP.mjs.map → chunk-GUX5TQUF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UY57JRX7.mjs.map → chunk-GXT4ECQX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HGQYSGTG.mjs.map → chunk-HEDV65MF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-SGNJ44D2.mjs.map → chunk-IKJDNJBZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AORVRKD7.mjs.map → chunk-IYDCYLCH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RXX3GSOM.mjs.map → chunk-JC33WJRK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NOIBKBS3.mjs.map → chunk-JOW3L3HD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JQ57YAGP.mjs.map → chunk-JRTS5QFV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CT235ZUB.mjs.map → chunk-JRYLZOIG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TFCXKUX5.mjs.map → chunk-KFBY5KJV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A3D3GW7R.mjs.map → chunk-KI7U7TTV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4L2AXB2K.mjs.map → chunk-KUX3SSFI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-37O2ROE4.mjs.map → chunk-KVFGAX26.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XYPOYVRU.mjs.map → chunk-L3CWG4NY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5TNG3JR3.mjs.map → chunk-L6LOZYKR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J6WJ6ULQ.mjs.map → chunk-LDOBY5TI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LUCBMBG7.mjs.map → chunk-M4QSM7JZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QUPXSKV4.mjs.map → chunk-MGCDGZ65.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PI3A4HAK.mjs.map → chunk-MKHRCP4S.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O4I2ENO6.mjs.map → chunk-O4T46OZT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JVRKUYW6.mjs.map → chunk-OBDXC5PA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VOJLXYJ3.mjs.map → chunk-OPTTKCAB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4JCZWUDH.mjs.map → chunk-OUCGS3VX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PBTBNQ25.mjs.map → chunk-OUT4RJKC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FNMAWOLC.mjs.map → chunk-PGAZRXNE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6L7YQWGX.mjs.map → chunk-Q7FSG7W5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-THWK4TAG.mjs.map → chunk-QIHYXPAQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-K7X3YFJU.mjs.map → chunk-QLSUEZBN.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EYGPOZGS.mjs.map → chunk-QSD35D6R.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KOLL3XGD.mjs.map → chunk-R2HTOWVS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G5VTJTDE.mjs.map → chunk-RA6POCQX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B4QT6VK6.mjs.map → chunk-RDTOLMUB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-EYNHHGCH.mjs.map → chunk-S7FF34CP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z64FHGQ2.mjs.map → chunk-SJ4J2X3Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3WS7UAIF.mjs.map → chunk-T5FZS4TI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZRMZYVMR.mjs.map → chunk-TA5A4RZR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Q6RQNGJC.mjs.map → chunk-TAECVK2M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5WVYRVED.mjs.map → chunk-UIWCJ3CV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I47BE6ON.mjs.map → chunk-UM33WRU6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PCTCQEFY.mjs.map → chunk-URGEY6PS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JRRBXKOK.mjs.map → chunk-UYPJFAL4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-63MIE6JF.mjs.map → chunk-UZUNMI2K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XH2ZG7PU.mjs.map → chunk-VOJNL3IQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DP53BNR6.mjs.map → chunk-VQS22XW6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JIIULTH3.mjs.map → chunk-WPAJCDKZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B5ETDLE6.mjs.map → chunk-X4KVARIH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WGKDCYB7.mjs.map → chunk-XOVAG77B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4PQ3E6VH.mjs.map → chunk-YCND2MYJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y5BESSJK.mjs.map → chunk-YQZQJ3XD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TLW7RSAO.mjs.map → chunk-YYWIEBZG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IF3IASJC.mjs.map → chunk-ZUIVPDNY.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-NGM3AVCY.mjs";import{s}from"./chunk-7DTSCLFH.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-3MFZNIVA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-7DTSCLFH.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-46Q7GAGQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-CNY5PSVG.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4AX4KREP.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as n,q as o}from"./chunk-7DTSCLFH.mjs";import{c as p}from"./chunk-NTEMINYA.mjs";var s=()=>o().setState(n),l=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{s as a,l as b};
|
|
2
|
+
//# sourceMappingURL=chunk-4JMULQUT.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/actions/sharedActions/sharedActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { Address } from 'lib/sdkCore';\nimport { ProviderType } from 'providers/types/providerFactory.types';\nimport { resetStore } from 'store/middleware/logoutMiddleware';\nimport { getStore } from 'store/store';\n\nexport const logoutAction = () => getStore().setState(resetStore);\nexport interface LoginActionPayloadType<T extends ProviderType = ProviderType> {\n address: string;\n providerType: T;\n}\n\nexport const loginAction = ({\n address,\n providerType\n}: LoginActionPayloadType) => {\n getStore().setState(\n ({ account, loginInfo }) => {\n account.address = address;\n account.publicKey = new Address(address).toHex();\n\n if (loginInfo) {\n loginInfo.providerType = providerType;\n }\n },\n false,\n 'loginAction'\n );\n};\n"],
|
|
5
|
-
"mappings": "yFAKO,IAAMA,EAAe,IAAMC,EAAS,EAAE,SAASC,CAAU,EAMnDC,EAAc,CAAC,CAC1B,QAAAC,EACA,aAAAC,CACF,IAA8B,CAC5BJ,EAAS,EAAE,SACT,CAAC,CAAE,QAAAK,EAAS,UAAAC,CAAU,IAAM,CAC1BD,EAAQ,QAAUF,EAClBE,EAAQ,UAAY,IAAIE,EAAQJ,CAAO,EAAE,MAAM,EAE3CG,IACFA,EAAU,aAAeF,EAE7B,EACA,GACA,
|
|
4
|
+
"sourcesContent": ["import { Address } from 'lib/sdkCore';\nimport { ProviderType } from 'providers/types/providerFactory.types';\nimport { resetStore } from 'store/middleware/logoutMiddleware';\nimport { getStore } from 'store/store';\n\nexport const logoutAction = () => getStore().setState(resetStore);\nexport interface LoginActionPayloadType<T extends ProviderType = ProviderType> {\n address: string;\n providerType: T;\n}\n\nexport const loginAction = ({\n address,\n providerType\n}: LoginActionPayloadType) => {\n getStore().setState(\n ({ account, loginInfo }) => {\n account.address = address;\n account.publicKey = new Address(address).toHex();\n\n if (loginInfo) {\n loginInfo.providerType = providerType;\n }\n },\n false,\n {\n type: 'loginAction',\n // @ts-ignore\n payload: {\n value: { address, providerType }\n }\n }\n );\n};\n"],
|
|
5
|
+
"mappings": "yFAKO,IAAMA,EAAe,IAAMC,EAAS,EAAE,SAASC,CAAU,EAMnDC,EAAc,CAAC,CAC1B,QAAAC,EACA,aAAAC,CACF,IAA8B,CAC5BJ,EAAS,EAAE,SACT,CAAC,CAAE,QAAAK,EAAS,UAAAC,CAAU,IAAM,CAC1BD,EAAQ,QAAUF,EAClBE,EAAQ,UAAY,IAAIE,EAAQJ,CAAO,EAAE,MAAM,EAE3CG,IACFA,EAAU,aAAeF,EAE7B,EACA,GACA,CACE,KAAM,cAEN,QAAS,CACP,MAAO,CAAE,QAAAD,EAAS,aAAAC,CAAa,CACjC,CACF,CACF,CACF",
|
|
6
6
|
"names": ["logoutAction", "getStore", "resetStore", "loginAction", "address", "providerType", "account", "loginInfo", "Address"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-YCND2MYJ.mjs";import{a as u}from"./chunk-EAXWH64Z.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as T}from"./chunk-JSSRK6RP.mjs";import{a as m}from"./chunk-U3UMCTU6.mjs";import{a as k}from"./chunk-BRJNX4JF.mjs";import{c as l}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-7CELSV4S.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:h}){let f=h.map(e=>T({address:v,explorerAddress:a,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await p({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=u({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=m.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??l,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:k({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4UX2RGA3.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-DLWDO7M6.mjs";import{d as v}from"./chunk-QLSUEZBN.mjs";import{w as m}from"./chunk-V57G6XBX.mjs";import{s as n}from"./chunk-7DTSCLFH.mjs";import{d as s}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as p}from"./chunk-KVFGAX26.mjs";async function g(){let t=a(),d=p(),r=s(n()),e=d||t?i.webview:r,c=Object.values(i).includes(r);if(r&&!c&&(e=r),!e)return;let o=await v.create({type:e});if(!o)throw new Error("Provider not found");(t||e===i.webview&&o.isInitialized())&&await o.login(),m(o)}export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-54A3AEYY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-ZUIVPDNY.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-5N6XRB6X.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-YQZQJ3XD.mjs";import{b as r}from"./chunk-S2S3PSTA.mjs";import{s as i}from"./chunk-7DTSCLFH.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5OKB7OJO.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-OUCGS3VX.mjs";import{a}from"./chunk-CN6OY7S3.mjs";import{a as u}from"./chunk-4JMULQUT.mjs";import{c as n}from"./chunk-HEDV65MF.mjs";import{a as s}from"./chunk-FSRZBXEX.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-5QNV3N3Y.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{q as o}from"./chunk-7DTSCLFH.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
|
|
2
|
+
//# sourceMappingURL=chunk-655BRTJU.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/store/actions/transactions/transactionsActions.ts"],
|
|
4
|
+
"sourcesContent": ["import { current } from 'immer';\nimport { getStore } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport {\n TransactionsDisplayInfoType,\n SignedTransactionType\n} from 'types/transactions.types';\n\nexport type CreateTransactionsSessionType = {\n transactions: SignedTransactionType[];\n transactionsDisplayInfo?: TransactionsDisplayInfoType;\n status: TransactionBatchStatusesEnum | TransactionServerStatusesEnum;\n sessionInformation?: any;\n};\n\nexport function createTransactionsSession({\n transactions,\n transactionsDisplayInfo,\n status,\n sessionInformation\n}: CreateTransactionsSessionType) {\n const sessionId = Date.now().toString();\n getStore().setState(\n ({ transactions: state }) => {\n state[sessionId] = {\n transactions,\n status,\n transactionsDisplayInfo,\n interpretedTransactions: {},\n sessionInformation\n };\n },\n false,\n {\n type: 'createTransactionsSession',\n // @ts-ignore\n payload: {\n value: {\n transactions,\n status,\n transactionsDisplayInfo,\n sessionInformation\n }\n }\n }\n );\n return sessionId;\n}\n\nexport function updateSessionStatus({\n sessionId,\n status,\n errorMessage\n}: {\n sessionId: string;\n status: TransactionBatchStatusesEnum;\n errorMessage?: string;\n}) {\n getStore().setState(\n ({ transactions: state }) => {\n if (!state[sessionId]) {\n return;\n }\n const transactionsDisplayInfo =\n current(state[sessionId]).transactionsDisplayInfo ?? {};\n\n const newErrorMessage =\n errorMessage || transactionsDisplayInfo?.errorMessage;\n\n state[sessionId].status = status;\n state[sessionId].errorMessage = newErrorMessage;\n state[sessionId].transactionsDisplayInfo = {\n ...transactionsDisplayInfo,\n errorMessage: newErrorMessage\n };\n },\n false,\n {\n type: 'updateSessionStatus',\n // @ts-ignore\n payload: {\n value: { sessionId, status, errorMessage }\n }\n }\n );\n}\n\nexport type UpdateTransactionStatusPropsType = {\n sessionId: string;\n transaction: SignedTransactionType;\n};\n\nexport function updateTransactionStatus({\n sessionId,\n transaction: updatedTransaction\n}: UpdateTransactionStatusPropsType) {\n getStore().setState(\n ({ transactions: state }) => {\n const transactions = state[sessionId]?.transactions;\n if (transactions != null) {\n state[sessionId].transactions = transactions.map((transaction) => {\n if (transaction.hash === updatedTransaction.hash) {\n return {\n ...transaction,\n ...(updatedTransaction ?? {})\n };\n }\n return transaction;\n });\n }\n },\n false,\n {\n type: 'updateTransactionStatus',\n // @ts-ignore\n payload: {\n value: { sessionId, transaction: updatedTransaction }\n }\n }\n );\n}\n\nexport const clearCompletedTransactions = () => {\n getStore().setState(\n ({ transactions: state, toasts: toastsState }) => {\n const sessionIds = Object.keys(state);\n\n const completedSessionIds = sessionIds.filter((sessionId) => {\n const session = state[sessionId];\n if (!session) {\n return false;\n }\n\n const { status } = session;\n\n const isPending =\n status === TransactionServerStatusesEnum.pending ||\n status === TransactionBatchStatusesEnum.signed ||\n status === TransactionBatchStatusesEnum.sent;\n\n return !isPending;\n });\n\n completedSessionIds.forEach((sessionId) => {\n delete state[sessionId];\n });\n\n const filteredTransactionToasts = toastsState.transactionToasts.filter(\n (toast) => !completedSessionIds.includes(toast.toastId)\n );\n\n toastsState.transactionToasts = filteredTransactionToasts;\n },\n false,\n {\n type: 'clearCompletedTransactions',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n"],
|
|
5
|
+
"mappings": "yCAAA,OAAS,WAAAA,MAAe,QAkBjB,SAASC,EAA0B,CACxC,aAAAC,EACA,wBAAAC,EACA,OAAAC,EACA,mBAAAC,CACF,EAAkC,CAChC,IAAMC,EAAY,KAAK,IAAI,EAAE,SAAS,EACtC,OAAAC,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3BA,EAAMF,CAAS,EAAI,CACjB,aAAAJ,EACA,OAAAE,EACA,wBAAAD,EACA,wBAAyB,CAAC,EAC1B,mBAAAE,CACF,CACF,EACA,GACA,CACE,KAAM,4BAEN,QAAS,CACP,MAAO,CACL,aAAAH,EACA,OAAAE,EACA,wBAAAD,EACA,mBAAAE,CACF,CACF,CACF,CACF,EACOC,CACT,CAEO,SAASG,EAAoB,CAClC,UAAAH,EACA,OAAAF,EACA,aAAAM,CACF,EAIG,CACDH,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,GAAI,CAACA,EAAMF,CAAS,EAClB,OAEF,IAAMH,EACJQ,EAAQH,EAAMF,CAAS,CAAC,EAAE,yBAA2B,CAAC,EAElDM,EACJF,GAAgBP,GAAyB,aAE3CK,EAAMF,CAAS,EAAE,OAASF,EAC1BI,EAAMF,CAAS,EAAE,aAAeM,EAChCJ,EAAMF,CAAS,EAAE,wBAA0B,CACzC,GAAGH,EACH,aAAcS,CAChB,CACF,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAO,CAAE,UAAAN,EAAW,OAAAF,EAAQ,aAAAM,CAAa,CAC3C,CACF,CACF,CACF,CAOO,SAASG,EAAwB,CACtC,UAAAP,EACA,YAAaQ,CACf,EAAqC,CACnCP,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,CAAM,IAAM,CAC3B,IAAMN,EAAeM,EAAMF,CAAS,GAAG,aACnCJ,GAAgB,OAClBM,EAAMF,CAAS,EAAE,aAAeJ,EAAa,IAAKa,GAC5CA,EAAY,OAASD,EAAmB,KACnC,CACL,GAAGC,EACH,GAAID,GAAsB,CAAC,CAC7B,EAEKC,CACR,EAEL,EACA,GACA,CACE,KAAM,0BAEN,QAAS,CACP,MAAO,CAAE,UAAAT,EAAW,YAAaQ,CAAmB,CACtD,CACF,CACF,CACF,CAEO,IAAME,EAA6B,IAAM,CAC9CT,EAAS,EAAE,SACT,CAAC,CAAE,aAAcC,EAAO,OAAQS,CAAY,IAAM,CAGhD,IAAMC,EAFa,OAAO,KAAKV,CAAK,EAEG,OAAQF,GAAc,CAC3D,IAAMa,EAAUX,EAAMF,CAAS,EAC/B,GAAI,CAACa,EACH,MAAO,GAGT,GAAM,CAAE,OAAAf,CAAO,EAAIe,EAOnB,MAAO,EAJLf,eACAA,cACAA,WAGJ,CAAC,EAEDc,EAAoB,QAASZ,GAAc,CACzC,OAAOE,EAAMF,CAAS,CACxB,CAAC,EAED,IAAMc,EAA4BH,EAAY,kBAAkB,OAC7DI,GAAU,CAACH,EAAoB,SAASG,EAAM,OAAO,CACxD,EAEAJ,EAAY,kBAAoBG,CAClC,EACA,GACA,CACE,KAAM,6BAEN,QAAS,CACP,MAAO,IACT,CACF,CACF,CACF",
|
|
6
|
+
"names": ["current", "createTransactionsSession", "transactions", "transactionsDisplayInfo", "status", "sessionInformation", "sessionId", "getStore", "state", "updateSessionStatus", "errorMessage", "current", "newErrorMessage", "updateTransactionStatus", "updatedTransaction", "transaction", "clearCompletedTransactions", "toastsState", "completedSessionIds", "session", "filteredTransactionToasts", "toast"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-N55JEIM6.mjs";import{b as n,c as o}from"./chunk-655BRTJU.mjs";import{s}from"./chunk-7DTSCLFH.mjs";function T({sessionId:t,transaction:e}){o({sessionId:t,transaction:e});let i=s().transactions[t].transactions,a=r(i);return a&&n({sessionId:t,status:a}),a}export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6DE2ILBM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.ts"],
|
|
4
|
+
"sourcesContent": ["import { getTransactionsSessionStatus } from 'managers/TransactionManager/helpers/getTransactionsStatus';\nimport {\n updateSessionStatus,\n updateTransactionStatus,\n UpdateTransactionStatusPropsType\n} from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\n\nexport function updateTransactionAndSessionStatus({\n sessionId,\n transaction\n}: UpdateTransactionStatusPropsType): TransactionBatchStatusesEnum | null {\n updateTransactionStatus({\n sessionId,\n transaction\n });\n\n const state = getState();\n const transactions = state.transactions[sessionId].transactions;\n\n const status = getTransactionsSessionStatus(transactions);\n\n if (status) {\n updateSessionStatus({\n sessionId,\n status\n });\n }\n\n return status;\n}\n"],
|
|
5
|
+
"mappings": "6HASO,SAASA,EAAkC,CAChD,UAAAC,EACA,YAAAC,CACF,EAA0E,CACxEC,EAAwB,CACtB,UAAAF,EACA,YAAAC,CACF,CAAC,EAGD,IAAME,EADQC,EAAS,EACI,aAAaJ,CAAS,EAAE,aAE7CK,EAASC,EAA6BH,CAAY,EAExD,OAAIE,GACFE,EAAoB,CAClB,UAAAP,EACA,OAAAK,CACF,CAAC,EAGIA,CACT",
|
|
6
|
+
"names": ["updateTransactionAndSessionStatus", "sessionId", "transaction", "updateTransactionStatus", "transactions", "getState", "status", "getTransactionsSessionStatus", "updateSessionStatus"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-6DE2ILBM.mjs";import{a as e}from"./chunk-KDWLSBQB.mjs";import{b as o}from"./chunk-655BRTJU.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{q as a}from"./chunk-7DTSCLFH.mjs";async function M({results:u,hash:c,sessionId:s}){let n=u?.find(t=>t?.returnMessage!=="");i({sessionId:s,transaction:{...n,hash:c,status:"fail",inTransit:!1}});let{transactions:m}=a().getState();m[s].transactions.some(t=>r(t.status))||(o({sessionId:s,status:"fail",errorMessage:n?.returnMessage}),await e({sessionId:s,status:"fail"}))}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6JYFAXYV.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.ts"],
|
|
4
|
+
"sourcesContent": ["import { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { getStore } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { ResultType } from 'types/serverTransactions.types';\nimport { SignedTransactionType } from 'types/transactions.types';\nimport { runSessionCallbacks } from './runSessionCallbacks';\nimport { updateTransactionAndSessionStatus } from './updateTransactionAndSessionStatus';\n\nexport async function manageFailedTransactions({\n results,\n hash,\n sessionId\n}: {\n results: ResultType[];\n hash: string;\n sessionId: string;\n}) {\n const resultWithError = results?.find(\n (scResult) => scResult?.returnMessage !== ''\n );\n\n updateTransactionAndSessionStatus({\n sessionId,\n transaction: {\n ...(resultWithError as unknown as SignedTransactionType),\n hash,\n status: TransactionServerStatusesEnum.fail,\n inTransit: false\n }\n });\n\n const { transactions: sessions } = getStore().getState();\n const session = sessions[sessionId];\n\n const hasPendingTransactions = session.transactions.some((tx) =>\n getIsTransactionPending(tx.status)\n );\n\n if (!hasPendingTransactions) {\n updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail,\n errorMessage: resultWithError?.returnMessage\n });\n\n await runSessionCallbacks({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n}\n"],
|
|
5
|
+
"mappings": "6MAYA,eAAsBA,EAAyB,CAC7C,QAAAC,EACA,KAAAC,EACA,UAAAC,CACF,EAIG,CACD,IAAMC,EAAkBH,GAAS,KAC9BI,GAAaA,GAAU,gBAAkB,EAC5C,EAEAC,EAAkC,CAChC,UAAAH,EACA,YAAa,CACX,GAAIC,EACJ,KAAAF,EACA,cACA,UAAW,EACb,CACF,CAAC,EAED,GAAM,CAAE,aAAcK,CAAS,EAAIC,EAAS,EAAE,SAAS,EACvCD,EAASJ,CAAS,EAEK,aAAa,KAAMM,GACxDC,EAAwBD,EAAG,MAAM,CACnC,IAGEE,EAAoB,CAClB,UAAAR,EACA,cACA,aAAcC,GAAiB,aACjC,CAAC,EAED,MAAMQ,EAAoB,CACxB,UAAAT,EACA,aACF,CAAC,EAEL",
|
|
6
|
+
"names": ["manageFailedTransactions", "results", "hash", "sessionId", "resultWithError", "scResult", "updateTransactionAndSessionStatus", "sessions", "getStore", "tx", "getIsTransactionPending", "updateSessionStatus", "runSessionCallbacks"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as a,f as p}from"./chunk-UERJ6AKK.mjs";import{f as l}from"./chunk-VNLGNNIL.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as I}from"./chunk-2FLZIC6T.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{b as T}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{c as s}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=p(e),n=l(e),{address:i,publicKey:M}=a(e);if(i&&M!==new s(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var W=(e,t)=>{C(e)};var z=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:L(...n),transactions:y(...n),toasts:u(...n),cache:T(...n),ui:v(...n)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(W),t},r,D=e=>{r=e},o=()=>(r||D(z(()=>new k)),r),le=(e=I)=>{let t=z(e);return D(t),t},se=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),ye=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{me as a,fe as b,Se as c,ue as d,de as e,ye as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,W as n,z as o,D as p,o as q,le as r,se as s};
|
|
2
|
+
//# sourceMappingURL=chunk-7DTSCLFH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/store/store.ts", "../../src/store/middleware/logoutMiddleware.ts", "../../src/store/middleware/applyMiddlewares.ts", "../../src/store/actions/loginInfo/loginInfoActions.ts"],
|
|
4
|
+
"sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport {\n networkSlice,\n accountSlice,\n loginInfoSlice,\n configSlice,\n toastSlice,\n cacheSlice,\n uiSlice\n} from './slices';\nimport { transactionsSlice } from './slices/transactions';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n ),\n {\n name: 'sdk-dapp'\n }\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n const dappStore = createDAppStore(getStorageCallback);\n setDAppStore(dappStore);\n return dappStore;\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector,\n loginExpiresAtSelector\n} from 'store/selectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).toHex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore);\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import { ProviderType } from 'providers/types/providerFactory.types';\nimport {\n LedgerLoginType,\n WalletConnectLoginType\n} from 'store/slices/loginInfo/loginInfo.types';\nimport { getStore } from 'store/store';\nimport { TokenLoginType } from 'types/login.types';\n\nexport const setProviderType = <T extends ProviderType = ProviderType>(\n providerType: T\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.providerType = providerType;\n },\n false,\n {\n type: 'setProviderType',\n // @ts-ignore\n payload: {\n value: providerType\n }\n }\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n {\n type: 'setTokenLogin',\n // @ts-ignore\n payload: {\n value: tokenLogin\n }\n }\n );\n\nexport const setLoginToken = (loginToken: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state.tokenLogin != null) {\n state.tokenLogin.loginToken = loginToken;\n return;\n }\n state.tokenLogin = {\n loginToken\n };\n },\n false,\n {\n type: 'setLoginToken',\n // @ts-ignore\n payload: {\n value: loginToken\n }\n }\n );\n\nexport const setTokenLoginSignature = (signature: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state?.tokenLogin != null) {\n state.tokenLogin.signature = signature;\n }\n },\n false,\n {\n type: 'setTokenLoginSignature',\n // @ts-ignore\n payload: {\n value: signature\n }\n }\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n {\n type: 'setWalletConnectLogin',\n // @ts-ignore\n payload: {\n value: walletConnectLogin\n }\n }\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n {\n type: 'setLedgerLogin',\n // @ts-ignore\n payload: {\n value: ledgerLogin\n }\n }\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n {\n type: 'setIsWalletConnectV2Initialized',\n // @ts-ignore\n payload: {\n value: isInitialized\n }\n }\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n {\n type: 'removeLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n {\n type: 'addLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: expiresAt\n }\n }\n );\n"],
|
|
5
|
+
"mappings": "wjBAAA,OAAS,qBAAAA,EAAmB,YAAAC,EAAU,WAAAC,MAAe,qBACrD,OAAS,SAAAC,MAAa,2BACtB,OAAS,eAAAC,MAAmB,kBCgBrB,IAAMC,EAAcC,GAAoC,CAC7DA,EAAM,QAAUC,EAChBD,EAAM,UAAYC,EAClBD,EAAM,aAAeC,EACrBD,EAAM,OAASC,CACjB,EAEO,SAASC,GAA8B,CAC5C,OAAO,IAAI,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,EAAI,EAAE,CACvD,CAEO,SAASC,EAAkBC,EAA0B,CAC1D,GAAIA,GAAa,KAAM,CACrBC,EAAqB,EACrB,MACF,CACAC,EAAkBF,CAAS,CAC7B,CAEO,IAAMG,EAAoBC,GAAqB,CACpD,IAAMC,EAAaC,EAAmBF,CAAK,EACrCG,EAAiBC,EAAuBJ,CAAK,EAC7C,CAAE,QAAAK,EAAS,UAAAC,CAAU,EAAIC,EAAoBP,CAAK,EAMxD,GAJIK,GAAWC,IAAc,IAAIE,EAAQH,CAAO,EAAE,MAAM,GACtDd,EAAWS,CAAK,EAGd,CAACC,EACH,OAGF,GAAIE,GAAkB,KAAM,CAC1BR,EAAkBD,EAA4B,CAAC,EAC/C,MACF,CAEA,IAAMe,EAAM,KAAK,IAAI,EACHN,EAAiBM,EAAM,IAIvCd,EAAkB,IAAI,EACtBe,EAAS,EAAE,SAASnB,CAAU,EAElC,EC5DO,IAAMoB,EAAmB,CAACC,EAAkBC,IAA0B,CAC3EC,EAAiBF,CAAK,CACxB,EF4BO,IAAMG,EAAmBC,GAAwC,CACtE,IAAMC,EAAQC,EACZC,EACEC,EACEC,EAAM,IAAIC,KAAU,CAClB,QAASC,EAAa,GAAGD,CAAI,EAC7B,QAASE,EAAa,GAAGF,CAAI,EAC7B,UAAWG,EAAe,GAAGH,CAAI,EACjC,OAAQI,EAAY,GAAGJ,CAAI,EAC3B,aAAcK,EAAkB,GAAGL,CAAI,EACvC,OAAQM,EAAW,GAAGN,CAAI,EAC1B,MAAOO,EAAW,GAAGP,CAAI,EACzB,GAAIQ,EAAQ,GAAGR,CAAI,CACrB,EAAE,EACF,CACE,KAAM,iBACN,QAASS,EAAkBf,CAAkB,CAC/C,CACF,EACA,CACE,KAAM,UACR,CACF,CACF,EACA,OAAAC,EAAM,UAAUe,CAAgB,EACzBf,CACT,EAIIA,EAESgB,EAAgBC,GAAqB,CAChDjB,EAAQiB,CACV,EAEaC,EAAW,KACjBlB,GACHgB,EAAalB,EAAgB,IAAM,IAAIqB,CAAiB,CAAC,EAEpDnB,GAgBIoB,GAAY,CAACrB,EAAqBsB,IAA2B,CACxE,IAAMC,EAAYxB,EAAgBC,CAAkB,EACpD,OAAAiB,EAAaM,CAAS,EACfA,CACT,EAEaC,GAAW,IAAML,EAAS,EAAE,SAAS,EGvF3C,IAAMM,GACXC,GAEAC,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,aAAeF,CACvB,EACA,GACA,CACE,KAAM,kBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWG,GAAiBC,GAC5BH,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,WAAaE,CACrB,EACA,GACA,CACE,KAAM,gBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,GAAiBC,GAC5BL,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxB,GAAIA,EAAM,YAAc,KAAM,CAC5BA,EAAM,WAAW,WAAaI,EAC9B,MACF,CACAJ,EAAM,WAAa,CACjB,WAAAI,CACF,CACF,EACA,GACA,CACE,KAAM,gBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,GAA0BC,GACrCP,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACpBA,GAAO,YAAc,OACvBA,EAAM,WAAW,UAAYM,EAEjC,EACA,GACA,CACE,KAAM,yBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,GACXC,GAEAT,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,mBAAqBQ,CAC7B,EACA,GACA,CACE,KAAM,wBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,GAAkBC,GAC7BX,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,YAAcU,CACtB,EACA,GACA,CACE,KAAM,iBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,GAAmCC,GAC9Cb,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,6BAA+BY,CACvC,EACA,GACA,CACE,KAAM,kCAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAAuB,IAClCd,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiB,IACzB,EACA,GACA,CACE,KAAM,uBAEN,QAAS,CACP,MAAO,IACT,CACF,CACF,EAEWc,EAAqBC,GAChChB,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiBe,CACzB,EACA,GACA,CACE,KAAM,oBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF",
|
|
6
|
+
"names": ["createJSONStorage", "devtools", "persist", "immer", "createStore", "resetStore", "store", "initialState", "getNewLoginExpiresTimestamp", "setLoginExpiresAt", "expiresAt", "removeLoginExpiresAt", "addLoginExpiresAt", "logoutMiddleware", "state", "isLoggedIn", "isLoggedInSelector", "loginTimestamp", "loginExpiresAtSelector", "address", "publicKey", "accountInfoSelector", "Address", "now", "getStore", "applyMiddlewares", "state", "_prevState", "logoutMiddleware", "createDAppStore", "getStorageCallback", "store", "createStore", "devtools", "persist", "immer", "args", "networkSlice", "accountSlice", "loginInfoSlice", "configSlice", "transactionsSlice", "toastSlice", "cacheSlice", "uiSlice", "createJSONStorage", "applyMiddlewares", "setDAppStore", "_store", "getStore", "InMemoryStorage", "initStore", "defaultStorageCallback", "dappStore", "getState", "setProviderType", "providerType", "getStore", "state", "setTokenLogin", "tokenLogin", "setLoginToken", "loginToken", "setTokenLoginSignature", "signature", "setWalletConnectLogin", "walletConnectLogin", "setLedgerLogin", "ledgerLogin", "setIsWalletConnectV2Initialized", "isInitialized", "removeLoginExpiresAt", "addLoginExpiresAt", "expiresAt"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/actions/ui/uiActions.ts"],
|
|
4
|
-
"sourcesContent": ["import { getStore } from 'store/store';\n\nexport const setIsSidePanelOpen = (isOpen: boolean) =>\n getStore().setState(\n ({ ui: state }) => {\n state.isSidePanelOpen = isOpen;\n },\n false,\n 'setIsSidePanelOpen'\n );\n"],
|
|
5
|
-
"mappings": "yCAEO,IAAMA,EAAsBC,GACjCC,EAAS,EAAE,SACT,CAAC,CAAE,GAAIC,CAAM,IAAM,CACjBA,EAAM,gBAAkBF,CAC1B,EACA,GACA,
|
|
4
|
+
"sourcesContent": ["import { getStore } from 'store/store';\n\nexport const setIsSidePanelOpen = (isOpen: boolean) =>\n getStore().setState(\n ({ ui: state }) => {\n state.isSidePanelOpen = isOpen;\n },\n false,\n {\n type: 'setIsSidePanelOpen',\n // @ts-ignore\n payload: {\n value: isOpen\n }\n }\n );\n"],
|
|
5
|
+
"mappings": "yCAEO,IAAMA,EAAsBC,GACjCC,EAAS,EAAE,SACT,CAAC,CAAE,GAAIC,CAAM,IAAM,CACjBA,EAAM,gBAAkBF,CAC1B,EACA,GACA,CACE,KAAM,qBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF",
|
|
6
6
|
"names": ["setIsSidePanelOpen", "isOpen", "getStore", "state"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-FSRZBXEX.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-BGDXQQ5S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-3QWTD55I.mjs";import{s as m}from"./chunk-7DTSCLFH.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BOCVH7LE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-BGDXQQ5S.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-CNY5PSVG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as O}from"./chunk-M4QSM7JZ.mjs";import{a as k}from"./chunk-UYPJFAL4.mjs";import{a as B}from"./chunk-B5FGXPIB.mjs";import{a as b}from"./chunk-URGEY6PS.mjs";import{a as A}from"./chunk-QXC4D3AC.mjs";import{a as D}from"./chunk-TA5A4RZR.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as _}from"./chunk-OPTTKCAB.mjs";import{a as R}from"./chunk-K373M2BG.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{s as x}from"./chunk-7DTSCLFH.mjs";import{b as v}from"./chunk-7VHTZYM2.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=k(),g=v(x()),C=B(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=O.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await A({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DGESHOFR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as s}from"./chunk-QLSUEZBN.mjs";import{a as u}from"./chunk-LDOBY5TI.mjs";import{s as c}from"./chunk-7DTSCLFH.mjs";import{b as d}from"./chunk-7VHTZYM2.mjs";import{a as v}from"./chunk-6R2WFQ7U.mjs";import{a}from"./chunk-LJX4MW7B.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:o})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:o})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:o}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(a).filter(n=>![a.none,a.webview].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DPDIXMEZ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/window.constants.ts"],
|
|
4
|
-
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.2.
|
|
4
|
+
"sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.2.8-alpha.1'; // will be replaced at build time\n"],
|
|
5
5
|
"mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
|
|
6
6
|
"names": ["safeWindow", "version"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as A}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as A}from"./chunk-OBDXC5PA.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{g as f}from"./chunk-V57G6XBX.mjs";import{a as S}from"./chunk-N55JEIM6.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{a as y}from"./chunk-655BRTJU.mjs";import{a as h}from"./chunk-RDTOLMUB.mjs";import{h as g}from"./chunk-M6MN4RXG.mjs";import{s as l}from"./chunk-7DTSCLFH.mjs";import{b as m}from"./chunk-7VHTZYM2.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=S(s),n=y({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return f({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=m(l());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=h(),{apiAddress:s,apiTimeout:o}=m(l());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${g}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GUX5TQUF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-XOVAG77B.mjs";import{a as g}from"./chunk-KA5UARE7.mjs";import{a as I}from"./chunk-UZUNMI2K.mjs";import{a as S}from"./chunk-4MWQKLVG.mjs";import{s as l}from"./chunk-7DTSCLFH.mjs";import{c as T}from"./chunk-UERJ6AKK.mjs";import{d as h,f as d,g as f}from"./chunk-7VHTZYM2.mjs";var y=t=>t.sort((o,a)=>a.timestamp-o.timestamp),B=async({transactions:t,skipFetchingTransactions:o=!1,store:a=l()})=>{let i=[],r=[];if(t.forEach(s=>{let e=I(s.hash,a);e?i.push(e):r.push(s.hash)}),r.length===0)return y(i);let c=o?t.map(s=>({...s,txHash:s.hash})):await u(r,{apiAddress:h(a)}),v=c.map(s=>s.txHash),p=r.filter(s=>!v.includes(s));if(p.length>0){let e=t.filter(n=>p.includes(n.hash)).map(n=>({...n,txHash:n.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return i.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=S({transaction:s,address:T(a),explorerAddress:f(a),egldLabel:d(a)});e.status!=="pending"&&g({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),y(Array.from(m.values()))};export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GXT4ECQX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-FSRZBXEX.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-HEDV65MF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-FSRZBXEX.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IKJDNJBZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{x as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o,c as i}from"./chunk-QJGFIK7H.mjs";import{x as g}from"./chunk-V57G6XBX.mjs";import{q as M}from"./chunk-7DTSCLFH.mjs";import{a as d}from"./chunk-UERJ6AKK.mjs";import{a as u,c as p,g as c}from"./chunk-NTEMINYA.mjs";import{a as l}from"./chunk-FSRZBXEX.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){l.addEventListener("message",this.handleMessage)}stopListening(){l.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case o.finalizeHandshakeRequest:this.handshake({event:e});break;case o.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case o.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case o.signTransactionsRequest:this.signTransactions({event:e});break;case i.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=d(this.store.getState()),r=g(),n=`${t}${a}`,y=new c({address:new p(t),data:new Uint8Array(Buffer.from(n))}),f=(await r.signMessage(y))?.signature??"";e.source?.postMessage({type:i.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&this.handleLoginCancelled()}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:i.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=d(this.store.getState()),{message:t}=s;try{let r=new c({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(r))?.signature??"";e.source?.postMessage({type:i.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(n=>u.newFromPlainObject(n)),r=await s.signTransactions(t);e.source?.postMessage({type:i.signTransactionsResponse,payload:{data:r.map(n=>n.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JC33WJRK.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-UM33WRU6.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-JOW3L3HD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-FSRZBXEX.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
|
|
2
|
+
//# sourceMappingURL=chunk-JRTS5QFV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-RDTOLMUB.mjs";import{a as f}from"./chunk-JOW3L3HD.mjs";import{a as g}from"./chunk-WPAJCDKZ.mjs";import{b as a}from"./chunk-7DTSCLFH.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-JRYLZOIG.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{q as t}from"./chunk-7DTSCLFH.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},s=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},h=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-KA5UARE7.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/store/actions/cache/cacheActions.ts"],
|
|
4
|
+
"sourcesContent": ["import { getStore } from 'store/store';\n\nexport const saveToCache = <T>({ key, value }: { key: string; value: T }) => {\n getStore().setState(\n ({ cache: state }) => {\n state[key] = value;\n },\n false,\n {\n type: 'saveToCache',\n // @ts-ignore\n payload: {\n value\n }\n }\n );\n};\n\nexport const removeFromCache = (key: string) => {\n getStore().setState(\n ({ cache: state }) => {\n delete state[key];\n },\n false,\n {\n type: 'removeFromCache',\n // @ts-ignore\n payload: {\n value: key\n }\n }\n );\n};\n\nexport const clearCache = () => {\n getStore().setState(\n ({ cache: state }) => {\n Object.keys(state).forEach((key) => {\n delete state[key];\n });\n },\n false,\n 'clearCache'\n );\n};\n"],
|
|
5
|
+
"mappings": "yCAEO,IAAMA,EAAc,CAAI,CAAE,IAAAC,EAAK,MAAAC,CAAM,IAAiC,CAC3EC,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpBA,EAAMH,CAAG,EAAIC,CACf,EACA,GACA,CACE,KAAM,cAEN,QAAS,CACP,MAAAA,CACF,CACF,CACF,CACF,EAEaG,EAAmBJ,GAAgB,CAC9CE,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAOA,EAAMH,CAAG,CAClB,EACA,GACA,CACE,KAAM,kBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,CACF,EAEaK,EAAa,IAAM,CAC9BH,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAO,KAAKA,CAAK,EAAE,QAASH,GAAQ,CAClC,OAAOG,EAAMH,CAAG,CAClB,CAAC,CACH,EACA,GACA,YACF,CACF",
|
|
6
|
+
"names": ["saveToCache", "key", "value", "getStore", "state", "removeFromCache", "clearCache"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-2CG6PNPJ.mjs";import{a as i}from"./chunk-FROSOADM.mjs";import{a as g}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as p,b as e}from"./chunk-4VUMAG4J.mjs";import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as c}from"./chunk-PSJI2G34.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(i)),t.get(`${e.apiAddress}/network/config`,s(d)),t.get(`https://${o.url}/socket.io/`,s(c)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(g))],P=u(...k);export{t as a,s as b,P as c};
|
|
2
|
+
//# sourceMappingURL=chunk-KFBY5KJV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-7DTSCLFH.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KI7U7TTV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-SJ4J2X3Q.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KVFGAX26.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-RA6POCQX.mjs";import{a as e}from"./chunk-CN6OY7S3.mjs";import{a as i}from"./chunk-6R2WFQ7U.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-L3CWG4NY.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-LDOBY5TI.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-L6LOZYKR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-CNY5PSVG.mjs";import{a as t}from"./chunk-AK2C7BRV.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-LDOBY5TI.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-LDOBY5TI.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M4QSM7JZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-7DTSCLFH.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-MGCDGZ65.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-CNY5PSVG.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-MKHRCP4S.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-M6MN4RXG.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-M6MN4RXG.mjs";import{s as e}from"./chunk-7DTSCLFH.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-OBDXC5PA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-RDTOLMUB.mjs";import{s as e}from"./chunk-7DTSCLFH.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OPTTKCAB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-VOJNL3IQ.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OUCGS3VX.mjs.map
|