@multiversx/sdk-dapp 5.6.18 → 5.6.19
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-IYSSPSVB.mjs → chunk-26ZLUW5U.mjs} +2 -2
- package/out/__chunks__/{chunk-7HZE5WEG.mjs → chunk-2PBAIYAS.mjs} +2 -2
- package/out/__chunks__/{chunk-LLQX4NJE.mjs → chunk-2X7TEBKV.mjs} +2 -2
- package/out/__chunks__/{chunk-QRNPEDC4.mjs → chunk-34IU5RID.mjs} +2 -2
- package/out/__chunks__/{chunk-3OOEFQUC.mjs → chunk-3JLH6JA5.mjs} +2 -2
- package/out/__chunks__/{chunk-XZIQUMYI.mjs → chunk-3X725MWM.mjs} +2 -2
- package/out/__chunks__/{chunk-E4YZV652.mjs → chunk-4MYOHPWQ.mjs} +2 -2
- package/out/__chunks__/chunk-4NDAFTCP.mjs +2 -0
- package/out/__chunks__/{chunk-B2B2TDUL.mjs → chunk-4ZSQXL6B.mjs} +2 -2
- package/out/__chunks__/{chunk-JPUDVVZY.mjs → chunk-5BSNRCSS.mjs} +2 -2
- package/out/__chunks__/{chunk-47AYFELF.mjs → chunk-5JG4D2EM.mjs} +2 -2
- package/out/__chunks__/{chunk-VIQEU6ZA.mjs → chunk-6OZQESGL.mjs} +2 -2
- package/out/__chunks__/{chunk-CIEMKL2O.mjs → chunk-6WGV7MIT.mjs} +2 -2
- package/out/__chunks__/{chunk-BCZWHACO.mjs → chunk-7CHZZTO6.mjs} +2 -2
- package/out/__chunks__/{chunk-GG4GZJTT.mjs → chunk-7PJNMRIW.mjs} +2 -2
- package/out/__chunks__/{chunk-KBMUH73C.mjs → chunk-AJN4AGEU.mjs} +2 -2
- package/out/__chunks__/{chunk-TBB5SD2F.mjs → chunk-AVXFQLR7.mjs} +2 -2
- package/out/__chunks__/{chunk-4L7KZTJE.mjs → chunk-BV4E5563.mjs} +2 -2
- package/out/__chunks__/{chunk-KLKVV2YX.mjs → chunk-BVITCHFC.mjs} +2 -2
- package/out/__chunks__/{chunk-ZCTSX5A6.mjs → chunk-C5BDHCBB.mjs} +2 -2
- package/out/__chunks__/{chunk-BBIFIN3W.mjs → chunk-CAGA6FMV.mjs} +2 -2
- package/out/__chunks__/{chunk-ZHWSTQEI.mjs → chunk-CH2AZ774.mjs} +2 -2
- package/out/__chunks__/{chunk-JG44VGD5.mjs → chunk-CVTAFDQT.mjs} +2 -2
- package/out/__chunks__/{chunk-L7VHBKZV.mjs → chunk-DD7OHHU6.mjs} +2 -2
- package/out/__chunks__/{chunk-DJEEPI7Q.mjs → chunk-DDCXPWTR.mjs} +2 -2
- package/out/__chunks__/{chunk-RJU2PPYB.mjs → chunk-DX5MVIR3.mjs} +2 -2
- package/out/__chunks__/{chunk-5OI5GIVQ.mjs → chunk-ERD4AYVX.mjs} +2 -2
- package/out/__chunks__/{chunk-IP5UKLWO.mjs → chunk-EW2TPN2K.mjs} +2 -2
- package/out/__chunks__/{chunk-PES47F5C.mjs → chunk-EW7WIQXR.mjs} +2 -2
- package/out/__chunks__/{chunk-MFSHDWXD.mjs → chunk-FBNLZTZP.mjs} +2 -2
- package/out/__chunks__/{chunk-DNNIE76H.mjs → chunk-H3FKLSHF.mjs} +2 -2
- package/out/__chunks__/{chunk-UCOMADXM.mjs → chunk-H3SHS5LR.mjs} +2 -2
- package/out/__chunks__/{chunk-VRVJA2UC.mjs → chunk-HQ3ABBZC.mjs} +2 -2
- package/out/__chunks__/{chunk-QBZAZ6WB.mjs → chunk-I6FJCY4J.mjs} +2 -2
- package/out/__chunks__/{chunk-IMKE7N5T.mjs → chunk-IDQ64TF3.mjs} +2 -2
- package/out/__chunks__/chunk-IFSWMSRG.mjs +2 -0
- package/out/__chunks__/{chunk-6ISK5EQR.mjs → chunk-JWU5PA25.mjs} +2 -2
- package/out/__chunks__/{chunk-MORBVWN4.mjs → chunk-JX4HMTB3.mjs} +2 -2
- package/out/__chunks__/chunk-K6AQV35Z.mjs +2 -0
- package/out/__chunks__/{chunk-5E5P6CWQ.mjs → chunk-KDLIYFBX.mjs} +2 -2
- package/out/__chunks__/{chunk-H3ASBOLT.mjs → chunk-KNL2POIB.mjs} +2 -2
- package/out/__chunks__/chunk-KQSMID7X.mjs +2 -0
- package/out/__chunks__/{chunk-JKM3XYCF.mjs → chunk-KREXZ6T5.mjs} +2 -2
- package/out/__chunks__/{chunk-YNPRZVAK.mjs → chunk-L2LBKHHC.mjs} +2 -2
- package/out/__chunks__/{chunk-P5XJESSE.mjs → chunk-LXSL75K2.mjs} +2 -2
- package/out/__chunks__/chunk-MOLCAQOX.mjs +2 -0
- package/out/__chunks__/{chunk-JNW3DEA3.mjs → chunk-MR3GEQHS.mjs} +2 -2
- package/out/__chunks__/{chunk-TFJT3FQL.mjs → chunk-NINI4NYS.mjs} +2 -2
- package/out/__chunks__/chunk-NJNH75KC.mjs +2 -0
- package/out/__chunks__/{chunk-NUZA2DSN.mjs → chunk-NOG3CT7C.mjs} +2 -2
- package/out/__chunks__/{chunk-676S3ZXO.mjs → chunk-OVETVY3W.mjs} +2 -2
- package/out/__chunks__/{chunk-L34PPMTI.mjs → chunk-OVL2E7SE.mjs} +2 -2
- package/out/__chunks__/{chunk-I2C5F23X.mjs → chunk-OXRMSAFJ.mjs} +2 -2
- package/out/__chunks__/chunk-PD22EGXF.mjs +2 -0
- package/out/__chunks__/{chunk-UC5L5622.mjs → chunk-PMKTA4V7.mjs} +2 -2
- package/out/__chunks__/{chunk-CY6KN5YG.mjs → chunk-PNBBLEZ2.mjs} +2 -2
- package/out/__chunks__/chunk-PVEBIM2W.mjs +2 -0
- package/out/__chunks__/{chunk-U3UMCTU6.mjs.map → chunk-PVEBIM2W.mjs.map} +2 -2
- package/out/__chunks__/{chunk-TMIEU2IG.mjs → chunk-Q233S6HZ.mjs} +2 -2
- package/out/__chunks__/{chunk-NXOMGRWS.mjs → chunk-Q43FHU3P.mjs} +2 -2
- package/out/__chunks__/{chunk-V2A5JSZZ.mjs → chunk-Q7SCF37V.mjs} +2 -2
- package/out/__chunks__/{chunk-3RXJSE37.mjs → chunk-QP2HSZ6V.mjs} +2 -2
- package/out/__chunks__/chunk-QSDCXYIC.mjs +2 -0
- package/out/__chunks__/chunk-R34N7ET2.mjs +2 -0
- package/out/__chunks__/{chunk-64HF66JN.mjs → chunk-RBTJKNRA.mjs} +2 -2
- package/out/__chunks__/{chunk-OJ4YA7YX.mjs → chunk-RLIUGEQ3.mjs} +2 -2
- package/out/__chunks__/{chunk-5J4IWE7Q.mjs → chunk-RUYA6SXC.mjs} +2 -2
- package/out/__chunks__/chunk-RVOMGG2G.mjs +2 -0
- package/out/__chunks__/{chunk-WKWRP3PH.mjs.map → chunk-RVOMGG2G.mjs.map} +1 -1
- package/out/__chunks__/chunk-SXEWT77H.mjs +2 -0
- package/out/__chunks__/chunk-SZX5MGAQ.mjs +2 -0
- package/out/__chunks__/chunk-TYL3V64Q.mjs +2 -0
- package/out/__chunks__/{chunk-TQIR4R7A.mjs → chunk-TYOOTHZD.mjs} +2 -2
- package/out/__chunks__/{chunk-GSUU2PBX.mjs → chunk-UFL3GGET.mjs} +2 -2
- package/out/__chunks__/{chunk-R25SH3F4.mjs → chunk-UP6JVQ74.mjs} +2 -2
- package/out/__chunks__/chunk-UQUKDEWT.mjs +2 -0
- package/out/__chunks__/chunk-VBHWYYE5.mjs +2 -0
- package/out/__chunks__/{chunk-IBJVJ7HA.mjs → chunk-VHEZTNOT.mjs} +2 -2
- package/out/__chunks__/{chunk-ARGJ3V72.mjs → chunk-WMIOEAIT.mjs} +2 -2
- package/out/__chunks__/{chunk-XY2LABQZ.mjs → chunk-WMM5K654.mjs} +2 -2
- package/out/__chunks__/{chunk-UMPEMJY4.mjs → chunk-XAU4VOHW.mjs} +2 -2
- package/out/__chunks__/{chunk-C5FVAJRJ.mjs → chunk-XHGVRUTM.mjs} +2 -2
- package/out/__chunks__/{chunk-RSJBTSUT.mjs → chunk-XZ5SGRYM.mjs} +2 -2
- package/out/__chunks__/{chunk-UWO2OMPK.mjs → chunk-YFPLRVTS.mjs} +2 -2
- package/out/__chunks__/{chunk-D5EZPRUN.mjs → chunk-YJLJDVM5.mjs} +2 -2
- package/out/__chunks__/{chunk-5FC73VMP.mjs → chunk-YKABI5OE.mjs} +2 -2
- package/out/__chunks__/{chunk-DKSNT5LJ.mjs → chunk-YNUFS4JI.mjs} +2 -2
- package/out/__chunks__/{chunk-VBOB5XLW.mjs → chunk-ZAAROKGI.mjs} +2 -2
- package/out/__chunks__/{chunk-2GMLC2DS.mjs → chunk-ZQ447NAW.mjs} +2 -2
- package/out/__chunks__/{chunk-YPWANG47.mjs → chunk-ZQNTERBI.mjs} +2 -2
- package/out/__chunks__/{chunk-ZTVEY37I.mjs → chunk-ZXDB6Q24.mjs} +2 -2
- package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
- package/out/apiCalls/account/getScamAddressData.mjs +1 -1
- package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
- package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
- package/out/apiCalls/economics/getEconomics.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/FormatAmountController/FormatAmountController.cjs +1 -1
- package/out/controllers/FormatAmountController/FormatAmountController.cjs.map +2 -2
- package/out/controllers/FormatAmountController/FormatAmountController.mjs +1 -1
- package/out/controllers/FormatAmountController/index.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
- package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/ToastManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.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/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.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/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.mjs +1 -1
- package/out/store/actions/ui/index.mjs +1 -1
- package/out/store/actions/ui/uiActions.mjs +1 -1
- package/out/store/middleware/applyMiddlewares.mjs +1 -1
- package/out/store/middleware/index.mjs +1 -1
- package/out/store/middleware/logoutMiddleware.mjs +1 -1
- package/out/store/storage/index.mjs +1 -1
- package/out/store/storage/storageCallback.mjs +1 -1
- package/out/store/store.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/fetchAccount.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/package.json +1 -1
- package/out/__chunks__/chunk-264QHLQ6.mjs +0 -2
- package/out/__chunks__/chunk-2YFKORNQ.mjs +0 -2
- package/out/__chunks__/chunk-37XA46ZD.mjs +0 -2
- package/out/__chunks__/chunk-4SG5GRKG.mjs +0 -2
- package/out/__chunks__/chunk-64MTSCFM.mjs +0 -2
- package/out/__chunks__/chunk-A6ZFXHEW.mjs +0 -2
- package/out/__chunks__/chunk-G4EDYHSU.mjs +0 -2
- package/out/__chunks__/chunk-IRBY2LR6.mjs +0 -2
- package/out/__chunks__/chunk-KME5MTYJ.mjs +0 -2
- package/out/__chunks__/chunk-RQCJMSAJ.mjs +0 -2
- package/out/__chunks__/chunk-U3UMCTU6.mjs +0 -2
- package/out/__chunks__/chunk-VI5FQEZN.mjs +0 -2
- package/out/__chunks__/chunk-VKA6F7QH.mjs +0 -2
- package/out/__chunks__/chunk-WKWRP3PH.mjs +0 -2
- package/out/__chunks__/chunk-YANGTW26.mjs +0 -2
- package/out/__chunks__/chunk-ZTQ2OP6M.mjs +0 -2
- /package/out/__chunks__/{chunk-IYSSPSVB.mjs.map → chunk-26ZLUW5U.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7HZE5WEG.mjs.map → chunk-2PBAIYAS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LLQX4NJE.mjs.map → chunk-2X7TEBKV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QRNPEDC4.mjs.map → chunk-34IU5RID.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3OOEFQUC.mjs.map → chunk-3JLH6JA5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XZIQUMYI.mjs.map → chunk-3X725MWM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E4YZV652.mjs.map → chunk-4MYOHPWQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2YFKORNQ.mjs.map → chunk-4NDAFTCP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-B2B2TDUL.mjs.map → chunk-4ZSQXL6B.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JPUDVVZY.mjs.map → chunk-5BSNRCSS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-47AYFELF.mjs.map → chunk-5JG4D2EM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VIQEU6ZA.mjs.map → chunk-6OZQESGL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CIEMKL2O.mjs.map → chunk-6WGV7MIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BCZWHACO.mjs.map → chunk-7CHZZTO6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GG4GZJTT.mjs.map → chunk-7PJNMRIW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KBMUH73C.mjs.map → chunk-AJN4AGEU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TBB5SD2F.mjs.map → chunk-AVXFQLR7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4L7KZTJE.mjs.map → chunk-BV4E5563.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KLKVV2YX.mjs.map → chunk-BVITCHFC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZCTSX5A6.mjs.map → chunk-C5BDHCBB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BBIFIN3W.mjs.map → chunk-CAGA6FMV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZHWSTQEI.mjs.map → chunk-CH2AZ774.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JG44VGD5.mjs.map → chunk-CVTAFDQT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L7VHBKZV.mjs.map → chunk-DD7OHHU6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DJEEPI7Q.mjs.map → chunk-DDCXPWTR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RJU2PPYB.mjs.map → chunk-DX5MVIR3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5OI5GIVQ.mjs.map → chunk-ERD4AYVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IP5UKLWO.mjs.map → chunk-EW2TPN2K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PES47F5C.mjs.map → chunk-EW7WIQXR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MFSHDWXD.mjs.map → chunk-FBNLZTZP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DNNIE76H.mjs.map → chunk-H3FKLSHF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UCOMADXM.mjs.map → chunk-H3SHS5LR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VRVJA2UC.mjs.map → chunk-HQ3ABBZC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QBZAZ6WB.mjs.map → chunk-I6FJCY4J.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IMKE7N5T.mjs.map → chunk-IDQ64TF3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-37XA46ZD.mjs.map → chunk-IFSWMSRG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6ISK5EQR.mjs.map → chunk-JWU5PA25.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MORBVWN4.mjs.map → chunk-JX4HMTB3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-64MTSCFM.mjs.map → chunk-K6AQV35Z.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5E5P6CWQ.mjs.map → chunk-KDLIYFBX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H3ASBOLT.mjs.map → chunk-KNL2POIB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-G4EDYHSU.mjs.map → chunk-KQSMID7X.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JKM3XYCF.mjs.map → chunk-KREXZ6T5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YNPRZVAK.mjs.map → chunk-L2LBKHHC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-P5XJESSE.mjs.map → chunk-LXSL75K2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-264QHLQ6.mjs.map → chunk-MOLCAQOX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JNW3DEA3.mjs.map → chunk-MR3GEQHS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TFJT3FQL.mjs.map → chunk-NINI4NYS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZTQ2OP6M.mjs.map → chunk-NJNH75KC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NUZA2DSN.mjs.map → chunk-NOG3CT7C.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-676S3ZXO.mjs.map → chunk-OVETVY3W.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-L34PPMTI.mjs.map → chunk-OVL2E7SE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I2C5F23X.mjs.map → chunk-OXRMSAFJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VKA6F7QH.mjs.map → chunk-PD22EGXF.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UC5L5622.mjs.map → chunk-PMKTA4V7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CY6KN5YG.mjs.map → chunk-PNBBLEZ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TMIEU2IG.mjs.map → chunk-Q233S6HZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NXOMGRWS.mjs.map → chunk-Q43FHU3P.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-V2A5JSZZ.mjs.map → chunk-Q7SCF37V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3RXJSE37.mjs.map → chunk-QP2HSZ6V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IRBY2LR6.mjs.map → chunk-QSDCXYIC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RQCJMSAJ.mjs.map → chunk-R34N7ET2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-64HF66JN.mjs.map → chunk-RBTJKNRA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OJ4YA7YX.mjs.map → chunk-RLIUGEQ3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5J4IWE7Q.mjs.map → chunk-RUYA6SXC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KME5MTYJ.mjs.map → chunk-SXEWT77H.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4SG5GRKG.mjs.map → chunk-SZX5MGAQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YANGTW26.mjs.map → chunk-TYL3V64Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TQIR4R7A.mjs.map → chunk-TYOOTHZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GSUU2PBX.mjs.map → chunk-UFL3GGET.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-R25SH3F4.mjs.map → chunk-UP6JVQ74.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-A6ZFXHEW.mjs.map → chunk-UQUKDEWT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VI5FQEZN.mjs.map → chunk-VBHWYYE5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IBJVJ7HA.mjs.map → chunk-VHEZTNOT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ARGJ3V72.mjs.map → chunk-WMIOEAIT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XY2LABQZ.mjs.map → chunk-WMM5K654.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UMPEMJY4.mjs.map → chunk-XAU4VOHW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-C5FVAJRJ.mjs.map → chunk-XHGVRUTM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RSJBTSUT.mjs.map → chunk-XZ5SGRYM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UWO2OMPK.mjs.map → chunk-YFPLRVTS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-D5EZPRUN.mjs.map → chunk-YJLJDVM5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5FC73VMP.mjs.map → chunk-YKABI5OE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DKSNT5LJ.mjs.map → chunk-YNUFS4JI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VBOB5XLW.mjs.map → chunk-ZAAROKGI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2GMLC2DS.mjs.map → chunk-ZQ447NAW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YPWANG47.mjs.map → chunk-ZQNTERBI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZTVEY37I.mjs.map → chunk-ZXDB6Q24.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-RLIUGEQ3.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-26ZLUW5U.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-TWYGNEQS.mjs";import{b as n,c as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-TWYGNEQS.mjs";import{b as n,c as o}from"./chunk-DDCXPWTR.mjs";import{s}from"./chunk-BVITCHFC.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-2PBAIYAS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-IWP36NOU.mjs";import{a as w}from"./chunk-LGGG3HW7.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";import{q as u}from"./chunk-BVITCHFC.mjs";import{a as l}from"./chunk-SQVKVA7X.mjs";var e=o=>u().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...l,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await c(a),f=r.roundDuration?null:await w(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2X7TEBKV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-ZAAROKGI.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-34IU5RID.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6WGV7MIT.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3JLH6JA5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-3JLH6JA5.mjs";import{a as t}from"./chunk-IFSWMSRG.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-3X725MWM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as e}from"./chunk-BVITCHFC.mjs";import{a as o}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=i(e());return{origin:t?.origin||o().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4MYOHPWQ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as z}from"./chunk-HQ3ABBZC.mjs";import{a as H}from"./chunk-TYL3V64Q.mjs";import{a as h}from"./chunk-7PJNMRIW.mjs";import{a as j}from"./chunk-26ZLUW5U.mjs";import{a as O}from"./chunk-EW7WIQXR.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-ZQ447NAW.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-IFSWMSRG.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-PD22EGXF.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-BVITCHFC.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4ZSQXL6B.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-QP2HSZ6V.mjs";import{a as r}from"./chunk-NJNH75KC.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5BSNRCSS.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as a,q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as a,q as o}from"./chunk-BVITCHFC.mjs";import{f as p}from"./chunk-DA76AK4I.mjs";var d=()=>o().setState(a,!1,{type:"logoutAction",payload:{value:null}}),s=({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{d as a,s as b};
|
|
2
|
+
//# sourceMappingURL=chunk-5JG4D2EM.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as g}from"./chunk-XZ5SGRYM.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6OZQESGL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-RVOMGG2G.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-6WGV7MIT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-RVOMGG2G.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-7CHZZTO6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as n}from"./chunk-PNBBLEZ2.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7PJNMRIW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-JWU5PA25.mjs";import{a as g}from"./chunk-YJCTRUJT.mjs";import{a as f}from"./chunk-2JKCBTYK.mjs";import{BigNumber as p}from"bignumber.js";async function b({manager:e,provider:s,login:a,token:u,explorerAddress:m,authData:x}){let o={manager:e,provider:s};return await new Promise(async function(A,I){async function d(t){let r=e?e.addressesPerPage??1:1,l=new p(t-1).times(r);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await n(o)}async function c(t){if(!(!s||!a)){e?.updateConfirmScreen({...x,selectedAddress:t.selectedAddress,explorerLink:g({to:`/${f}/${t.selectedAddress}`,explorerAddress:m})});try{let r=u?await s.tokenLogin({token:Buffer.from(`${u}{}`),addressIndex:t.addressIndex}):await a({addressIndex:t.addressIndex});e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),A({address:r.address,signature:r.signature?r.signature.toString("hex"):"",addressIndex:t.addressIndex})}catch(r){console.error("User rejected login:",r),!!e?.getConfirmScreenData()&&await n(o)}}}async function i(){await n(o),e.unsubscribeFromAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d}),I("User cancelled login")}e.subscribeToAuthEvents({handleCancel:i,handleAccessWallet:c,handleGoToPage:d})})}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AJN4AGEU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-BVITCHFC.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AVXFQLR7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-2PBAIYAS.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-DDCXPWTR.mjs";import{s as n}from"./chunk-BVITCHFC.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BV4E5563.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-NJNH75KC.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=u};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:D}=p(e);if(i&&D!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A,!1,{type:"logoutMiddleware",payload:{value:null}}))};var M=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:S(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(M),t},n,z=e=>{n=e},o=()=>(n||z(W(()=>new k)),n),Se=(e=I)=>{let t=W(e);return z(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,M as n,W as o,z as p,o as q,Se as r,de as s};
|
|
2
|
+
//# sourceMappingURL=chunk-BVITCHFC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-BVITCHFC.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
|
|
2
|
+
//# sourceMappingURL=chunk-C5BDHCBB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-CCD7PUHB.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-CCD7PUHB.mjs";import{a as S}from"./chunk-EAJBSX6Y.mjs";import{c as r,d as a}from"./chunk-M6MN4RXG.mjs";import{s as e}from"./chunk-BVITCHFC.mjs";import{a as n}from"./chunk-FK6DWWZF.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CAGA6FMV.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-VHEZTNOT.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-CH2AZ774.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-LXSL75K2.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-MOLCAQOX.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-BVITCHFC.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CVTAFDQT.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-PNBBLEZ2.mjs";import{q as M}from"./chunk-BVITCHFC.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-RVOMGG2G.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(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DD7OHHU6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as o}from"./chunk-BVITCHFC.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-DDCXPWTR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-PVEBIM2W.mjs";import{a as T}from"./chunk-YKABI5OE.mjs";import{a as p}from"./chunk-TWOVGGG2.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DX5MVIR3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-3X725MWM.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-ERD4AYVX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-KDLIYFBX.mjs";import{b as r}from"./chunk-2X7TEBKV.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-BVITCHFC.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EW2TPN2K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as U}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as U}from"./chunk-UQUKDEWT.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-NINI4NYS.mjs";import{a as _}from"./chunk-AC3N236P.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-OMBZCVQZ.mjs";import{l as w}from"./chunk-PNBBLEZ2.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-FBNLZTZP.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{k as x}from"./chunk-QNYO7NI5.mjs";import{a as A}from"./chunk-YJCTRUJT.mjs";import{a as h,c as G,f}from"./chunk-PJWJZHIS.mjs";import{a as L}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-RVOMGG2G.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:n,network:o,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:n,sender:W,apiAddress:o.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},J=g&&l&&l.length>0?`${g}-${l}`:g,Q=await v({tokenId:J}),{esdtPrice:X,tokenDecimals:Y,type:r,identifier:a,tokenImageUrl:Z}=Q;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Z};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(o.decimals):Y,digits:Number(o.digits),addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:X),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?n:a)??n,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=R({transaction:p,price:S}),ot=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:o.gasStationMetadata}),{gasPriceOption:k}=T,et=w().getType(),it=O(et),N=u.length,rt=e.length>0?e[e.length-1]+1:0,P=F(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=A({to:`/${L}/${m}`,explorerAddress:st}),ct=N===1||t?.needsSigning&&!e.includes(s),pt=f({input:k.toString(),decimals:G,addCommas:!0,digits:h}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:k,gasPriceOptions:ot,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:C.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EW7WIQXR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-BVITCHFC.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;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-FBNLZTZP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as w}from"./chunk-4NDAFTCP.mjs";import{a as p}from"./chunk-UP6JVQ74.mjs";import{a as O}from"./chunk-YNUFS4JI.mjs";import{a as M}from"./chunk-3X725MWM.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-XZ5SGRYM.mjs";import{d as B}from"./chunk-DDCXPWTR.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-BVITCHFC.mjs";import{a as d}from"./chunk-6WGV7MIT.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
|
|
2
|
+
//# sourceMappingURL=chunk-H3FKLSHF.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-PMKTA4V7.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-H3SHS5LR.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-3X725MWM.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HQ3ABBZC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-BV4E5563.mjs";import{a as u}from"./chunk-2PBAIYAS.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";import{b as o}from"./chunk-DDCXPWTR.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-I6FJCY4J.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-ERD4AYVX.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IDQ64TF3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I}from"./chunk-26ZLUW5U.mjs";import{a as h}from"./chunk-KQSMID7X.mjs";import{a as x}from"./chunk-QSDCXYIC.mjs";import{a as w}from"./chunk-YGI3KXMZ.mjs";import{f as g}from"./chunk-PJWJZHIS.mjs";import{a as f,f as b}from"./chunk-DA76AK4I.mjs";import y from"bignumber.js";var M=async({manager:e,provider:u})=>{let L=new f;if(!e||!u)throw new Error("Provider is not initialized.");let{network:l}=h(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await I({baseURL:l.apiAddress}),A=o=>o.index>=s&&o.index<s+e.addressesPerPage,O=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),p=r.filter(A),P=!!O[s];if(e.updateAccountScreen({isLoading:!P}),p.length>0){e.updateAccountScreen({accounts:p});return}try{let o=Math.floor(s/e.addressesPerPage),n=await u.getAccounts(o,e.addressesPerPage),S=n.map((t,c)=>{let i=L.getShardOfAddress(b.newFromBech32(t));return{address:t,balance:"...",index:c+s,shard:i}}),j=[...r,...S],B=n.map(t=>x({address:t,baseURL:l.apiAddress})),U=await Promise.all(B),d=j.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});U.forEach(t=>{if(!t||!a||!a.price)return;let c=new y(t.balance),i=c.dividedBy(y(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let N=w({amount:g({input:t.balance}),usd:a?.price});d[t.address].balance=i,d[t.address].usdValue=N});let m=Object.values(d).sort((t,c)=>t.index-c.index),E=m.filter(A);e.updateAllAccounts(m),e.updateAccountScreen({accounts:E,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JWU5PA25.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-IDQ64TF3.mjs";import{a as e}from"./chunk-K6AQV35Z.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-BVITCHFC.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JX4HMTB3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-RLIUGEQ3.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KDLIYFBX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-YFPLRVTS.mjs";import{a as o}from"./chunk-HSF3JATH.mjs";async function p({loginToken:i,extraInfoData:n}){if(i==null||Object.keys(n).length===0)return null;let t=o(String(i)),{timestamp:e,...a}=t?.extraInfo||{};if(!(t&&e!=null))return null;let s={hash:String(t?.blockHash),timestamp:Number(e)};return await r({extraInfo:{...a,...n},expirySeconds:t?.ttl,origin:t?.origin}).initialize({latestBlockInfo:s})}export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KNL2POIB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-3JLH6JA5.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}get walletConnectData(){return{...this.data}}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-KREXZ6T5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-JKM3XYCF.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-676S3ZXO.mjs";import{a as V}from"./chunk-GSUU2PBX.mjs";import{a as ae}from"./chunk-ARGJ3V72.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-ZTVEY37I.mjs";import{a as ge}from"./chunk-D5EZPRUN.mjs";import{a as g}from"./chunk-MORBVWN4.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-IMKE7N5T.mjs";import{a as z}from"./chunk-B2B2TDUL.mjs";import{a as ce}from"./chunk-2GMLC2DS.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as te}from"./chunk-4Z3DZ2A3.mjs";import{j as S,k as T,l as L}from"./chunk-CY6KN5YG.mjs";import{c as N}from"./chunk-DNNIE76H.mjs";import{a as C}from"./chunk-4SG5GRKG.mjs";import{a as Y}from"./chunk-64MTSCFM.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-RSJBTSUT.mjs";import{a as re}from"./chunk-47AYFELF.mjs";import{a as U}from"./chunk-37XA46ZD.mjs";import{b as Q,c as Z,d as ee}from"./chunk-V5ZSFCKJ.mjs";import{g as X}from"./chunk-M6MN4RXG.mjs";import{b as f,c as K}from"./chunk-7VHTZYM2.mjs";import{a as $,q as F,s as c}from"./chunk-KLKVV2YX.mjs";import{f as j}from"./chunk-FK6DWWZF.mjs";import{a as q}from"./chunk-VNLGNNIL.mjs";import{b as y,c as G}from"./chunk-7B7XIPV2.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";async function me({message:a,handleSignMessage:o}){try{return await m({message:a,handleSignMessage:o,providerType:l.ledger})}catch(e){let{errorMessage:r}=se(e);throw r?{message:r}:e}}var w=class extends g{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!C())return;await V.getInstance().init(e)};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await me({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ne({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=V.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((s,i)=>ae({manager:e,resolve:s,reject:i,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,O=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=q(o),r=j(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=te(c());if(!(!this.shouldCheckConnection()||o))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new w({shouldInitProvider:!0});await o.init();let e=new S(o);o.getType=()=>n.ledger,T(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var A=class extends g{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:t,manager:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!0}),i}finally{s?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as Pe}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends g{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await s({shouldCancelAction:!1}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=Pe.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var W=class extends g{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})}catch(i){throw await s({shouldCancelAction:!0}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[n.metamask]})};this.walletUrl=r??"",this.provider=le.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as Ce}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[y.CANCEL_ACTION,y.SIGN_LOGIN_TOKEN],x=class extends g{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let d=new Promise((p,P)=>{i.addEventListener("abort",()=>{P(new Error("cancelled by user"))})}),v=await Promise.race([this.provider.signTransactions(e),d]);return await ce(v)}catch(d){throw await s({shouldCancelAction:!0}),d}finally{t?.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:y.CANCEL_ACTION,action:Ce.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((i,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{if(this.provider?.isInitialized())return!0;await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:s}=await this.provider.connect({methods:this.methods}),i=this.config.walletConnectDeepLink??R.walletConnectDeepLink;this._approval=s,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${i}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=K(c());if(Q(c())&&ve.push(y.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{re()},onClientEvent:p=>{}};try{let{walletConnectV2ProjectId:p,walletConnectV2Options:P={},walletConnectV2RelayAddress:D=""}=e,M=new G(h,t,D,p,P);return await M.init(),{walletConnectProvider:M,dappMethods:ve}}catch(p){throw console.error("Unable to connect",p),r&&await this.logout(),p}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:s="",approval:i}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??R.walletConnectDeepLink;t.updateData({wcURI:s,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(s)}`});let v=await this.provider.login({approval:i,token:e?.token}),{address:h="",signature:p=""}=v??{};return t.handleClose({isLoginFinished:!!h}),{address:h,signature:p}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:s="",signature:i=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!s}),{address:s,signature:i}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var E=class{static set customProviders(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new _;break}case n.crossWindow:{r=new A;break}case n.ledger:{r=new w({anchor:e}),await O.getInstance().init();break}case n.metamask:{r=new W;break}case n.passkey:{let i=f(c());r=new A({walletAddress:`${i.walletAddress}?${ie}=${n.passkey}`});break}case n.walletConnect:{let i=Z(c());if(!i?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...i});break}case n.webview:{r=new ge;break}default:{let i=Y();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:i,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);T(t);let s="provider"in r&&r.provider instanceof b;return pe(s?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){L().cancelLogin(),T(null),$(n.none)}};E._customProviders=[];var Te=(a,o)=>a.some(e=>e.type===o);async function m({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){if(ee(c())?.isSigningUiEnabled===!1){U(!0);try{return await o(a)}finally{U(!1)}}return await new Promise(async(i,d)=>{let{manager:v,onClose:h}=await de({cancelAction:e}),p=Object.values(E.customProviders),P=p.reduce((u,B)=>(u[B.type]=B.name,u),{}),D={...l,...P},M=async()=>{await h({shouldCancelAction:!0}),d({message:"Signing canceled"})};v.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",M);let H=Te(p,r)?r:n.none;v.updateData({name:D[H],type:H});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),d(u)}finally{v.closeUI()}})}export{m as a,me as b,w as c,O as d,A as e,_ as f,W as g,x as h,E as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as le}from"./chunk-M3YL36ZL.mjs";import{a as I}from"./chunk-KREXZ6T5.mjs";import{a as pe}from"./chunk-2Y66XRQK.mjs";import{a as oe}from"./chunk-OVETVY3W.mjs";import{a as V}from"./chunk-UFL3GGET.mjs";import{a as ae}from"./chunk-WMIOEAIT.mjs";import{a as se}from"./chunk-YUFPUG5O.mjs";import{a as ne}from"./chunk-ZXDB6Q24.mjs";import{a as ge}from"./chunk-YJLJDVM5.mjs";import{a as g}from"./chunk-JX4HMTB3.mjs";import{a as l,b as ie}from"./chunk-6R2WFQ7U.mjs";import{a as de}from"./chunk-IDQ64TF3.mjs";import{a as z}from"./chunk-4ZSQXL6B.mjs";import{a as ce}from"./chunk-ZQ447NAW.mjs";import{a as b}from"./chunk-QJGFIK7H.mjs";import{b as te}from"./chunk-4Z3DZ2A3.mjs";import{j as S,k as T,l as L}from"./chunk-PNBBLEZ2.mjs";import{c as N}from"./chunk-H3FKLSHF.mjs";import{a as C}from"./chunk-SZX5MGAQ.mjs";import{a as Y}from"./chunk-K6AQV35Z.mjs";import{a as R}from"./chunk-4TBVQD27.mjs";import{i as J}from"./chunk-XZ5SGRYM.mjs";import{a as re}from"./chunk-5JG4D2EM.mjs";import{a as U}from"./chunk-IFSWMSRG.mjs";import{b as Q,c as Z,d as ee}from"./chunk-V5ZSFCKJ.mjs";import{g as X}from"./chunk-M6MN4RXG.mjs";import{b as f,c as K}from"./chunk-7VHTZYM2.mjs";import{a as $,q as F,s as c}from"./chunk-BVITCHFC.mjs";import{f as j}from"./chunk-FK6DWWZF.mjs";import{a as q}from"./chunk-VNLGNNIL.mjs";import{b as y,c as G}from"./chunk-7B7XIPV2.mjs";import{a as n}from"./chunk-LJX4MW7B.mjs";async function me({message:a,handleSignMessage:o}){try{return await m({message:a,handleSignMessage:o,providerType:l.ledger})}catch(e){let{errorMessage:r}=se(e);throw r?{message:r}:e}}var w=class extends g{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await oe({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!C())return;await V.getInstance().init(e)};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await me({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await ne({shouldInitProvider:!0});this.provider=r}catch(r){throw J({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"close",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=V.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((s,i)=>ae({manager:e,resolve:s,reject:i,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ue=3e4,fe=5e3,we=3e3,O=class a{constructor(){this.store=F();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let o=this.store.getState(),{providerType:e}=q(o),r=j(o);return!!(e===n.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let o=te(c());if(!(!this.shouldCheckConnection()||o))try{await L().getProvider().getAddress()}catch{if(N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"close",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,fe)}},ue))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let o=new w({shouldInitProvider:!0});await o.init();let e=new S(o);o.getType=()=>n.ledger,T(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,N.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:we,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var A=class extends g{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:t,manager:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await t({shouldCancelAction:!0}),i}finally{s?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=b.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=f(c()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return n.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as Pe}from"@multiversx/sdk-extension-provider/out/extensionProvider";var _=class extends g{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(i){throw await s({shouldCancelAction:!1}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension})};this.provider=Pe.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return n.extension}};var W=class extends g{constructor({address:e,walletUrl:r}={}){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();try{return await z({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider),options:r})}catch(i){throw await s({shouldCancelAction:!0}),i}finally{t?.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l[n.metamask]})};this.walletUrl=r??"",this.provider=le.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=f(c());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return n.metamask}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as Ce}from"@multiversx/sdk-wallet-connect-provider/out";var ve=[y.CANCEL_ACTION,y.SIGN_LOGIN_TOKEN],x=class extends g{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async(e,r)=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:t,onClose:s}=await this.initSignState();this.cancelActionAbortController=new AbortController;let i=this.cancelActionAbortController.signal;try{let d=new Promise((p,P)=>{i.addEventListener("abort",()=>{P(new Error("cancelled by user"))})}),v=await Promise.race([this.provider.signTransactions(e),d]);return await ce(v)}catch(d){throw await s({shouldCancelAction:!0}),d}finally{t?.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:y.CANCEL_ACTION,action:Ce.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((i,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([m({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:l.extension}),t])};this.config=e}async init(){try{if(this.provider?.isInitialized())return!0;await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return n.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:s}=await this.provider.connect({methods:this.methods}),i=this.config.walletConnectDeepLink??R.walletConnectDeepLink;this._approval=s,I.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${i}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!C())return;await I.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=C(),t=K(c());if(Q(c())&&ve.push(y.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let h={onClientLogin:()=>{},onClientLogout:()=>{re()},onClientEvent:p=>{}};try{let{walletConnectV2ProjectId:p,walletConnectV2Options:P={},walletConnectV2RelayAddress:D=""}=e,M=new G(h,t,D,p,P);return await M.init(),{walletConnectProvider:M,dappMethods:ve}}catch(p){throw console.error("Unable to connect",p),r&&await this.logout(),p}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=I.getInstance(),{uri:s="",approval:i}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??R.walletConnectDeepLink;t.updateData({wcURI:s,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(s)}`});let v=await this.provider.login({approval:i,token:e?.token}),{address:h="",signature:p=""}=v??{};return t.handleClose({isLoginFinished:!!h}),{address:h,signature:p}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:s="",signature:i=""}=t??{};return I.getInstance().handleClose({isLoginFinished:!!s}),{address:s,signature:i}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var E=class{static set customProviders(o){this._customProviders=o}static get customProviders(){return this._customProviders}static async create({type:o,anchor:e}){let r=null;switch(o){case n.extension:{r=new _;break}case n.crossWindow:{r=new A;break}case n.ledger:{r=new w({anchor:e}),await O.getInstance().init();break}case n.metamask:{r=new W;break}case n.passkey:{let i=f(c());r=new A({walletAddress:`${i.walletAddress}?${ie}=${n.passkey}`});break}case n.walletConnect:{let i=Z(c());if(!i?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new x({anchor:e,...i});break}case n.webview:{r=new ge;break}default:{let i=Y();for(let d of this._customProviders)d.type===o&&(r=await d.constructor({address:i,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new S(r);T(t);let s="provider"in r&&r.provider instanceof b;return pe(s?{skipLoginMethod:n.crossWindow}:null),t}static async destroy(){L().cancelLogin(),T(null),$(n.none)}};E._customProviders=[];var Te=(a,o)=>a.some(e=>e.type===o);async function m({message:a,handleSignMessage:o,cancelAction:e,providerType:r}){if(ee(c())?.isSigningUiEnabled===!1){U(!0);try{return await o(a)}finally{U(!1)}}return await new Promise(async(i,d)=>{let{manager:v,onClose:h}=await de({cancelAction:e}),p=Object.values(E.customProviders),P=p.reduce((u,B)=>(u[B.type]=B.name,u),{}),D={...l,...P},M=async()=>{await h({shouldCancelAction:!0}),d({message:"Signing canceled"})};v.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",M);let H=Te(p,r)?r:n.none;v.updateData({name:D[H],type:H});try{let u=await o(a);i(u)}catch(u){await h({shouldCancelAction:!0}),d(u)}finally{v.closeUI()}})}export{m as a,me as b,w as c,O as d,A as e,_ as f,W as g,x as h,E as i};
|
|
2
|
+
//# sourceMappingURL=chunk-L2LBKHHC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as t}from"./chunk-BVITCHFC.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
|
|
2
|
+
//# sourceMappingURL=chunk-LXSL75K2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as o}from"./chunk-BVITCHFC.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
|
|
2
|
+
//# sourceMappingURL=chunk-MR3GEQHS.mjs.map
|