@multiversx/sdk-dapp 5.1.2 → 5.1.3-alpha.0
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-23BMJL5I.mjs +2 -0
- package/out/__chunks__/chunk-23VZAAPS.mjs +2 -0
- package/out/__chunks__/chunk-2ARILYKC.mjs +2 -0
- package/out/__chunks__/{chunk-ZS4EBCWC.mjs → chunk-2GG67TZD.mjs} +2 -2
- package/out/__chunks__/chunk-2IUBMLF4.mjs +2 -0
- package/out/__chunks__/{chunk-CAA4VJRH.mjs.map → chunk-2IUBMLF4.mjs.map} +3 -3
- package/out/__chunks__/chunk-2OYUVJ4V.mjs +2 -0
- package/out/__chunks__/{chunk-I6WJ63GD.mjs → chunk-3DBK6MUI.mjs} +2 -2
- package/out/__chunks__/{chunk-H4DISFAI.mjs → chunk-42XAKFZX.mjs} +2 -2
- package/out/__chunks__/chunk-4I7IJNEQ.mjs +2 -0
- package/out/__chunks__/{chunk-2ONA7QPD.mjs → chunk-5DP2QBUG.mjs} +2 -2
- package/out/__chunks__/{chunk-IR743HKQ.mjs → chunk-5IB7V3T5.mjs} +2 -2
- package/out/__chunks__/{chunk-54XYKDH7.mjs → chunk-6CWZFHNV.mjs} +2 -2
- package/out/__chunks__/{chunk-5KVNYLOM.mjs → chunk-6DWUEZO7.mjs} +2 -2
- package/out/__chunks__/{chunk-LQ6WESDL.mjs → chunk-6QURUDVX.mjs} +2 -2
- package/out/__chunks__/{chunk-WJI5FXSZ.mjs → chunk-7R7GYV2Q.mjs} +2 -2
- package/out/__chunks__/{chunk-Y7QM3LPW.mjs → chunk-AIHJZJX7.mjs} +2 -2
- package/out/__chunks__/{chunk-STVYY4LI.mjs → chunk-AJ5LH5DY.mjs} +2 -2
- package/out/__chunks__/{chunk-2DUVXRMU.mjs → chunk-ALLSMTZ6.mjs} +2 -2
- package/out/__chunks__/chunk-BFIHV4M5.mjs +2 -0
- package/out/__chunks__/chunk-BHAHZQVO.mjs +2 -0
- package/out/__chunks__/chunk-BHAHZQVO.mjs.map +7 -0
- package/out/__chunks__/{chunk-OP2PPPAN.mjs → chunk-BIQTHJFC.mjs} +2 -2
- package/out/__chunks__/{chunk-KP4MUQKU.mjs → chunk-BJX6XZJZ.mjs} +2 -2
- package/out/__chunks__/{chunk-NZWPA245.mjs → chunk-CP5CXMNG.mjs} +2 -2
- package/out/__chunks__/{chunk-I4HR64FU.mjs → chunk-D2MEDQRS.mjs} +2 -2
- package/out/__chunks__/{chunk-PAAJPYAE.mjs → chunk-D7Q254FK.mjs} +2 -2
- package/out/__chunks__/{chunk-2SVWHJC4.mjs → chunk-DATOYALW.mjs} +2 -2
- package/out/__chunks__/{chunk-S5YFFC7A.mjs → chunk-DO4PJGXP.mjs} +2 -2
- package/out/__chunks__/chunk-DSVSX4ZT.mjs +2 -0
- package/out/__chunks__/chunk-DSVSX4ZT.mjs.map +7 -0
- package/out/__chunks__/{chunk-6BF62TP4.mjs → chunk-DXI7IIPO.mjs} +2 -2
- package/out/__chunks__/chunk-DZ2BIDRW.mjs +2 -0
- package/out/__chunks__/chunk-DZ2BIDRW.mjs.map +7 -0
- package/out/__chunks__/{chunk-UJUAT5NK.mjs → chunk-E75WVJBY.mjs} +2 -2
- package/out/__chunks__/chunk-EAH7XGM3.mjs +2 -0
- package/out/__chunks__/chunk-EAH7XGM3.mjs.map +7 -0
- package/out/__chunks__/{chunk-DG77T3NS.mjs → chunk-ECUWXEXM.mjs} +2 -2
- package/out/__chunks__/{chunk-ARAO6B2F.mjs → chunk-EE3KJKGZ.mjs} +2 -2
- package/out/__chunks__/chunk-ESLRNICJ.mjs +2 -0
- package/out/__chunks__/chunk-EYNCTMGG.mjs +2 -0
- package/out/__chunks__/{chunk-KAQ5IXKK.mjs → chunk-FI6P7XAS.mjs} +2 -2
- package/out/__chunks__/chunk-G4CMYBPE.mjs +2 -0
- package/out/__chunks__/chunk-GF6ZP3BP.mjs +2 -0
- package/out/__chunks__/{chunk-RNSBN5JT.mjs → chunk-GWOW4TBY.mjs} +2 -2
- package/out/__chunks__/chunk-HI6GWYQP.mjs +2 -0
- package/out/__chunks__/{chunk-YFXATY46.mjs → chunk-HSCQLXDI.mjs} +2 -2
- package/out/__chunks__/{chunk-HOJ7JMTW.mjs → chunk-HZII4LOV.mjs} +2 -2
- package/out/__chunks__/chunk-I4BDQFVV.mjs +2 -0
- package/out/__chunks__/{chunk-2L25IGHZ.mjs → chunk-IBVUYIRU.mjs} +2 -2
- package/out/__chunks__/chunk-IE3UIHJF.mjs +2 -0
- package/out/__chunks__/{chunk-KX5J6EMC.mjs.map → chunk-IE3UIHJF.mjs.map} +1 -1
- package/out/__chunks__/{chunk-3CKDOF3O.mjs → chunk-IGTJKYGR.mjs} +2 -2
- package/out/__chunks__/{chunk-RJOP7SCI.mjs → chunk-ITHXLW7N.mjs} +2 -2
- package/out/__chunks__/{chunk-FVFVOSQ4.mjs → chunk-J2SRCAF3.mjs} +2 -2
- package/out/__chunks__/{chunk-BGUYSNNW.mjs → chunk-J42MMBDO.mjs} +2 -2
- package/out/__chunks__/{chunk-YD2O3NV7.mjs → chunk-JW2KPAHT.mjs} +2 -2
- package/out/__chunks__/chunk-KDNN7EJ5.mjs +2 -0
- package/out/__chunks__/{chunk-N6QD4PLA.mjs → chunk-KG5VFT6E.mjs} +2 -2
- package/out/__chunks__/chunk-KIOUFP5Q.mjs +1 -0
- package/out/__chunks__/{chunk-4AUL3FHT.mjs → chunk-KJB2FQHY.mjs} +2 -2
- package/out/__chunks__/{chunk-FFHHIKMI.mjs → chunk-KQNIDAOO.mjs} +2 -2
- package/out/__chunks__/{chunk-JV7AJLRI.mjs → chunk-L5SWSYR7.mjs} +2 -2
- package/out/__chunks__/{chunk-IZ4B4B35.mjs → chunk-M2GO2ZKG.mjs} +2 -2
- package/out/__chunks__/{chunk-PO3ODHJ7.mjs → chunk-MQABF3VZ.mjs} +2 -2
- package/out/__chunks__/{chunk-BQP6NPQM.mjs → chunk-MVDR6OGY.mjs} +2 -2
- package/out/__chunks__/chunk-N342XMFH.mjs +6 -0
- package/out/__chunks__/chunk-N342XMFH.mjs.map +7 -0
- package/out/__chunks__/{chunk-7ONKP4ZG.mjs → chunk-NHIO5LHC.mjs} +2 -2
- package/out/__chunks__/{chunk-GSRRAPL5.mjs → chunk-NIUHMHFD.mjs} +2 -2
- package/out/__chunks__/{chunk-7VNNDJ7P.mjs → chunk-NOMP7OYA.mjs} +2 -2
- package/out/__chunks__/{chunk-DJ2HTZOV.mjs → chunk-NP5YXGD3.mjs} +2 -2
- package/out/__chunks__/{chunk-DCX2NQAU.mjs → chunk-OBUQ633K.mjs} +2 -2
- package/out/__chunks__/chunk-OL6LWUIJ.mjs +1 -0
- package/out/__chunks__/chunk-OL6LWUIJ.mjs.map +7 -0
- package/out/__chunks__/chunk-OOVV574D.mjs +2 -0
- package/out/__chunks__/chunk-OOVV574D.mjs.map +7 -0
- package/out/__chunks__/{chunk-AXCK3KRV.mjs → chunk-OV6QTSRW.mjs} +2 -2
- package/out/__chunks__/{chunk-Z63LDNZJ.mjs → chunk-P5OCEUZJ.mjs} +2 -2
- package/out/__chunks__/chunk-PLMCHSS6.mjs +2 -0
- package/out/__chunks__/chunk-PLMCHSS6.mjs.map +7 -0
- package/out/__chunks__/{chunk-E5CUE265.mjs → chunk-PZKUGWW4.mjs} +2 -2
- package/out/__chunks__/chunk-QCKPVCWD.mjs +2 -0
- package/out/__chunks__/{chunk-BNBD3WVN.mjs → chunk-RBJ3O63I.mjs} +2 -2
- package/out/__chunks__/{chunk-5AZZG5KG.mjs → chunk-RDTIWBQU.mjs} +2 -2
- package/out/__chunks__/{chunk-XUADWD55.mjs → chunk-RHJ4M62M.mjs} +2 -2
- package/out/__chunks__/{chunk-LPGMDX6Q.mjs → chunk-SDFOOFQZ.mjs} +2 -2
- package/out/__chunks__/chunk-SMWXMBEX.mjs +2 -0
- package/out/__chunks__/{chunk-OCGNA44K.mjs → chunk-ST2OXKY2.mjs} +2 -2
- package/out/__chunks__/{chunk-XNIJIKGB.mjs → chunk-T54HTQQQ.mjs} +2 -2
- package/out/__chunks__/chunk-TFZ46GCB.mjs +1 -0
- package/out/__chunks__/chunk-TFZ46GCB.mjs.map +7 -0
- package/out/__chunks__/{chunk-TMMUB3IK.mjs → chunk-U63YDSPL.mjs} +2 -2
- package/out/__chunks__/{chunk-2HKAVY3C.mjs → chunk-UB2NR7NA.mjs} +2 -2
- package/out/__chunks__/{chunk-CYEMHPEX.mjs → chunk-UGLW3SSB.mjs} +2 -2
- package/out/__chunks__/{chunk-DNFWIYZH.mjs → chunk-UNBTFF6K.mjs} +2 -2
- package/out/__chunks__/{chunk-PHMJQ5FC.mjs → chunk-V226OFPH.mjs} +2 -2
- package/out/__chunks__/{chunk-VRG2R5C7.mjs → chunk-VBXM6QDZ.mjs} +2 -2
- package/out/__chunks__/{chunk-CAAMS3C5.mjs → chunk-WCHM6ROW.mjs} +2 -2
- package/out/__chunks__/chunk-WJQVMI33.mjs +2 -0
- package/out/__chunks__/chunk-WJQVMI33.mjs.map +7 -0
- package/out/__chunks__/{chunk-72D44IHE.mjs → chunk-WPGHI7H5.mjs} +2 -2
- package/out/__chunks__/chunk-WQYM2QJ2.mjs +2 -0
- package/out/__chunks__/{chunk-UXYMY3HG.mjs → chunk-X4PG526M.mjs} +2 -2
- package/out/__chunks__/{chunk-KXUILKL2.mjs → chunk-XBF3UPD7.mjs} +2 -2
- package/out/__chunks__/{chunk-IWROXIQ5.mjs → chunk-XJ54ERL3.mjs} +2 -2
- package/out/__chunks__/{chunk-6PDGQGIS.mjs → chunk-YGA2ZW7F.mjs} +2 -2
- package/out/__chunks__/chunk-YIF2ADTM.mjs +2 -0
- package/out/__chunks__/chunk-YIF2ADTM.mjs.map +7 -0
- package/out/__chunks__/{chunk-O24MRZB2.mjs → chunk-YPEZAU5L.mjs} +2 -2
- package/out/__chunks__/{chunk-XHKNB4IP.mjs → chunk-YY724VZR.mjs} +2 -2
- package/out/__chunks__/{chunk-4XIT3N7Y.mjs → chunk-ZAPTIV5E.mjs} +2 -2
- package/out/__chunks__/{chunk-S53SAYHR.mjs → chunk-ZGPDC6C7.mjs} +2 -2
- package/out/__chunks__/{chunk-27OTZWDO.mjs → chunk-ZQFABMSJ.mjs} +2 -2
- package/out/__mocks__/accountConfig.mjs +1 -1
- package/out/__mocks__/data/index.mjs +1 -1
- package/out/__mocks__/index.mjs +1 -1
- package/out/__mocks__/server.mjs +1 -1
- package/out/__mocks__/utils/index.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/index.mjs +1 -1
- package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
- package/out/apiCalls/tokens/index.mjs +1 -1
- package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
- package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
- package/out/constants/browser.constants.mjs +1 -1
- package/out/constants/index.mjs +1 -1
- package/out/constants/storage.constants.mjs +1 -1
- package/out/constants/transactions.constants.cjs +3 -0
- package/out/constants/transactions.constants.cjs.map +2 -2
- package/out/constants/transactions.constants.d.ts +1 -0
- package/out/constants/transactions.constants.mjs +1 -1
- package/out/constants/window.constants.cjs +1 -1
- package/out/constants/window.constants.cjs.map +1 -1
- package/out/constants/window.constants.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
- package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
- package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
- package/out/controllers/TransactionsTableController/index.mjs +1 -1
- package/out/index.mjs +1 -1
- package/out/lib/sdkDappUi.mjs +1 -1
- package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
- package/out/managers/NotificationsFeedManager/index.mjs +1 -1
- package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
- package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
- package/out/managers/TransactionManager/index.mjs +1 -1
- package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
- package/out/managers/UnlockPanelManager/index.mjs +1 -1
- package/out/managers/index.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
- package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
- package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
- package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
- package/out/managers/internal/ToastManager/ToastManager.cjs +3 -6
- package/out/managers/internal/ToastManager/ToastManager.cjs.map +2 -2
- package/out/managers/internal/ToastManager/ToastManager.d.ts +1 -1
- package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
- package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
- package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
- package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
- package/out/managers/internal/index.mjs +1 -1
- package/out/methods/account/getAccount.mjs +1 -1
- package/out/methods/account/getAccountInfo.mjs +1 -1
- package/out/methods/account/getAddress.mjs +1 -1
- package/out/methods/account/getIsLoggedIn.mjs +1 -1
- package/out/methods/account/getLatestNonce.mjs +1 -1
- package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
- package/out/methods/initApp/initApp.mjs +1 -1
- package/out/methods/initApp/initApp.mjs.map +1 -1
- package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
- package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
- package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
- package/out/methods/network/getEgldLabel.mjs +1 -1
- package/out/methods/network/getExplorerAddress.mjs +1 -1
- package/out/methods/network/getNetworkConfig.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
- package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
- package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
- package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactions.mjs +1 -1
- package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactions.mjs +1 -1
- package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
- package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
- package/out/methods/transactions/getTransactionSessions.mjs +1 -1
- package/out/providers/DappProvider/DappProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
- package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
- package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
- package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
- package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
- package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
- package/out/providers/DappProvider/index.mjs +1 -1
- package/out/providers/ProviderFactory.mjs +1 -1
- package/out/providers/helpers/accountProvider.mjs +1 -1
- package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
- package/out/providers/helpers/restoreProvider.mjs +1 -1
- package/out/providers/index.mjs +1 -1
- package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
- package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
- package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
- package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
- package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
- package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
- package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
- package/out/providers/strategies/helpers/index.mjs +1 -1
- package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.cjs +2 -221
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.cjs.map +3 -3
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
- package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
- package/out/providers/strategies/index.mjs +1 -1
- package/out/react/account/useGetAccount.mjs +1 -1
- package/out/react/account/useGetAccountInfo.mjs +1 -1
- package/out/react/account/useGetIsLoggedIn.mjs +1 -1
- package/out/react/account/useGetLatestNonce.mjs +1 -1
- package/out/react/index.mjs +1 -1
- package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
- package/out/react/network/useGetNetworkConfig.mjs +1 -1
- package/out/react/store/getReactStore.mjs +1 -1
- package/out/react/store/useSelector.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
- package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
- package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
- package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
- package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
- package/out/services/index.mjs +1 -1
- package/out/services/nativeAuth/index.mjs +1 -1
- package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
- package/out/services/nativeAuth/methods/index.mjs +1 -1
- package/out/services/nativeAuth/nativeAuth.mjs +1 -1
- package/out/store/actions/account/accountActions.mjs +1 -1
- package/out/store/actions/account/index.mjs +1 -1
- package/out/store/actions/cache/cacheActions.mjs +1 -1
- package/out/store/actions/cache/index.mjs +1 -1
- package/out/store/actions/config/configActions.mjs +1 -1
- package/out/store/actions/config/index.mjs +1 -1
- package/out/store/actions/index.mjs +1 -1
- package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
- package/out/store/actions/network/index.mjs +1 -1
- package/out/store/actions/network/initializeNetwork.mjs +1 -1
- package/out/store/actions/network/networkActions.mjs +1 -1
- package/out/store/actions/sharedActions/index.mjs +1 -1
- package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
- package/out/store/actions/toasts/index.mjs +1 -1
- package/out/store/actions/toasts/toastsActions.mjs +1 -1
- package/out/store/actions/transactions/transactionsActions.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/selectors/index.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/types/index.mjs +1 -1
- package/out/utils/ComponentFactory.mjs +1 -1
- package/out/utils/account/index.mjs +1 -1
- package/out/utils/account/refreshAccount.mjs +1 -1
- package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
- package/out/utils/dateTime/index.mjs +1 -1
- package/out/utils/index.mjs +1 -1
- package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.cjs +111 -0
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.d.ts +9 -0
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/getDecodedDataField.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.cjs +90 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.d.ts +8 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.cjs +48 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.d.ts +9 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.cjs +45 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.d.ts +9 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.cjs +61 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.d.ts +9 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getHexValidationWarnings.cjs +39 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getHexValidationWarnings.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getHexValidationWarnings.d.ts +1 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getHexValidationWarnings.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getHexValidationWarnings.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.cjs +52 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.d.ts +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/index.cjs +33 -0
- package/out/utils/transactions/getDecodedDataField/helpers/index.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/helpers/index.d.ts +6 -0
- package/out/utils/transactions/getDecodedDataField/helpers/index.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/helpers/index.mjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/index.cjs +25 -0
- package/out/utils/transactions/getDecodedDataField/index.cjs.map +7 -0
- package/out/utils/transactions/getDecodedDataField/index.d.ts +2 -0
- package/out/utils/transactions/getDecodedDataField/index.mjs +2 -0
- package/out/utils/transactions/getDecodedDataField/index.mjs.map +7 -0
- package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
- package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
- package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
- package/out/utils/transactions/index.cjs +2 -0
- package/out/utils/transactions/index.cjs.map +2 -2
- package/out/utils/transactions/index.d.ts +1 -0
- package/out/utils/transactions/index.mjs +1 -1
- package/out/utils/validation/index.mjs +1 -1
- package/out/utils/validation/isContract.mjs +1 -1
- package/out/utils/visual/index.mjs +1 -1
- package/out/utils/visual/switchTheme.mjs +1 -1
- package/out/utils/window/getIsInIframe.mjs +1 -1
- package/out/utils/window/getWindowParentOrigin.mjs +1 -1
- package/out/utils/window/index.mjs +1 -1
- package/package.json +1 -1
- package/out/__chunks__/chunk-3NQTC6AZ.mjs +0 -2
- package/out/__chunks__/chunk-4EMQSUU6.mjs +0 -2
- package/out/__chunks__/chunk-5JYD7XMI.mjs +0 -2
- package/out/__chunks__/chunk-6CQMLD25.mjs +0 -1
- package/out/__chunks__/chunk-BETSOJFK.mjs +0 -6
- package/out/__chunks__/chunk-BETSOJFK.mjs.map +0 -7
- package/out/__chunks__/chunk-CAA4VJRH.mjs +0 -2
- package/out/__chunks__/chunk-IRBGQJE4.mjs +0 -2
- package/out/__chunks__/chunk-J64N3RXX.mjs +0 -2
- package/out/__chunks__/chunk-JN5CTLWW.mjs +0 -2
- package/out/__chunks__/chunk-KK25BEMY.mjs +0 -2
- package/out/__chunks__/chunk-KX5J6EMC.mjs +0 -2
- package/out/__chunks__/chunk-LTRQRVWX.mjs +0 -2
- package/out/__chunks__/chunk-LY3MRREN.mjs +0 -2
- package/out/__chunks__/chunk-LY3MRREN.mjs.map +0 -7
- package/out/__chunks__/chunk-MGHFXYZ5.mjs +0 -2
- package/out/__chunks__/chunk-MK36TMYT.mjs +0 -2
- package/out/__chunks__/chunk-OF3XH6ZU.mjs +0 -2
- package/out/__chunks__/chunk-QQEQNSRI.mjs +0 -2
- package/out/__chunks__/chunk-SGQJOLH2.mjs +0 -2
- package/out/__chunks__/chunk-TMOMM4JN.mjs +0 -2
- package/out/__chunks__/chunk-XUI3Z5NN.mjs +0 -2
- package/out/__chunks__/chunk-YVLFUMPH.mjs +0 -2
- /package/out/__chunks__/{chunk-SGQJOLH2.mjs.map → chunk-23BMJL5I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IRBGQJE4.mjs.map → chunk-23VZAAPS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MK36TMYT.mjs.map → chunk-2ARILYKC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ZS4EBCWC.mjs.map → chunk-2GG67TZD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-J64N3RXX.mjs.map → chunk-2OYUVJ4V.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I6WJ63GD.mjs.map → chunk-3DBK6MUI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-H4DISFAI.mjs.map → chunk-42XAKFZX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4EMQSUU6.mjs.map → chunk-4I7IJNEQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2ONA7QPD.mjs.map → chunk-5DP2QBUG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IR743HKQ.mjs.map → chunk-5IB7V3T5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-54XYKDH7.mjs.map → chunk-6CWZFHNV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5KVNYLOM.mjs.map → chunk-6DWUEZO7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LQ6WESDL.mjs.map → chunk-6QURUDVX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-WJI5FXSZ.mjs.map → chunk-7R7GYV2Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Y7QM3LPW.mjs.map → chunk-AIHJZJX7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-STVYY4LI.mjs.map → chunk-AJ5LH5DY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2DUVXRMU.mjs.map → chunk-ALLSMTZ6.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-MGHFXYZ5.mjs.map → chunk-BFIHV4M5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OP2PPPAN.mjs.map → chunk-BIQTHJFC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KP4MUQKU.mjs.map → chunk-BJX6XZJZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-NZWPA245.mjs.map → chunk-CP5CXMNG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-I4HR64FU.mjs.map → chunk-D2MEDQRS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PAAJPYAE.mjs.map → chunk-D7Q254FK.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2SVWHJC4.mjs.map → chunk-DATOYALW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S5YFFC7A.mjs.map → chunk-DO4PJGXP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6BF62TP4.mjs.map → chunk-DXI7IIPO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UJUAT5NK.mjs.map → chunk-E75WVJBY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DG77T3NS.mjs.map → chunk-ECUWXEXM.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-ARAO6B2F.mjs.map → chunk-EE3KJKGZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5JYD7XMI.mjs.map → chunk-ESLRNICJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YVLFUMPH.mjs.map → chunk-EYNCTMGG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KAQ5IXKK.mjs.map → chunk-FI6P7XAS.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LTRQRVWX.mjs.map → chunk-G4CMYBPE.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3NQTC6AZ.mjs.map → chunk-GF6ZP3BP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RNSBN5JT.mjs.map → chunk-GWOW4TBY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JN5CTLWW.mjs.map → chunk-HI6GWYQP.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YFXATY46.mjs.map → chunk-HSCQLXDI.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-HOJ7JMTW.mjs.map → chunk-HZII4LOV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-QQEQNSRI.mjs.map → chunk-I4BDQFVV.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2L25IGHZ.mjs.map → chunk-IBVUYIRU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-3CKDOF3O.mjs.map → chunk-IGTJKYGR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-RJOP7SCI.mjs.map → chunk-ITHXLW7N.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FVFVOSQ4.mjs.map → chunk-J2SRCAF3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BGUYSNNW.mjs.map → chunk-J42MMBDO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-YD2O3NV7.mjs.map → chunk-JW2KPAHT.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XUI3Z5NN.mjs.map → chunk-KDNN7EJ5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-N6QD4PLA.mjs.map → chunk-KG5VFT6E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6CQMLD25.mjs.map → chunk-KIOUFP5Q.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4AUL3FHT.mjs.map → chunk-KJB2FQHY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-FFHHIKMI.mjs.map → chunk-KQNIDAOO.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-JV7AJLRI.mjs.map → chunk-L5SWSYR7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IZ4B4B35.mjs.map → chunk-M2GO2ZKG.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PO3ODHJ7.mjs.map → chunk-MQABF3VZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BQP6NPQM.mjs.map → chunk-MVDR6OGY.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7ONKP4ZG.mjs.map → chunk-NHIO5LHC.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-GSRRAPL5.mjs.map → chunk-NIUHMHFD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-7VNNDJ7P.mjs.map → chunk-NOMP7OYA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DJ2HTZOV.mjs.map → chunk-NP5YXGD3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DCX2NQAU.mjs.map → chunk-OBUQ633K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-AXCK3KRV.mjs.map → chunk-OV6QTSRW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-Z63LDNZJ.mjs.map → chunk-P5OCEUZJ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-E5CUE265.mjs.map → chunk-PZKUGWW4.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OF3XH6ZU.mjs.map → chunk-QCKPVCWD.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-BNBD3WVN.mjs.map → chunk-RBJ3O63I.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-5AZZG5KG.mjs.map → chunk-RDTIWBQU.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XUADWD55.mjs.map → chunk-RHJ4M62M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-LPGMDX6Q.mjs.map → chunk-SDFOOFQZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KK25BEMY.mjs.map → chunk-SMWXMBEX.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-OCGNA44K.mjs.map → chunk-ST2OXKY2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XNIJIKGB.mjs.map → chunk-T54HTQQQ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TMMUB3IK.mjs.map → chunk-U63YDSPL.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-2HKAVY3C.mjs.map → chunk-UB2NR7NA.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CYEMHPEX.mjs.map → chunk-UGLW3SSB.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-DNFWIYZH.mjs.map → chunk-UNBTFF6K.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-PHMJQ5FC.mjs.map → chunk-V226OFPH.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-VRG2R5C7.mjs.map → chunk-VBXM6QDZ.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-CAAMS3C5.mjs.map → chunk-WCHM6ROW.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-72D44IHE.mjs.map → chunk-WPGHI7H5.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-TMOMM4JN.mjs.map → chunk-WQYM2QJ2.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-UXYMY3HG.mjs.map → chunk-X4PG526M.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-KXUILKL2.mjs.map → chunk-XBF3UPD7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-IWROXIQ5.mjs.map → chunk-XJ54ERL3.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-6PDGQGIS.mjs.map → chunk-YGA2ZW7F.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-O24MRZB2.mjs.map → chunk-YPEZAU5L.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-XHKNB4IP.mjs.map → chunk-YY724VZR.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-4XIT3N7Y.mjs.map → chunk-ZAPTIV5E.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-S53SAYHR.mjs.map → chunk-ZGPDC6C7.mjs.map} +0 -0
- /package/out/__chunks__/{chunk-27OTZWDO.mjs.map → chunk-ZQFABMSJ.mjs.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-NIUHMHFD.mjs";import o from"axios";var n="transactions/ppu";async function l(a,s){let r=`${e(s)}/${n}/${a}`;try{let{data:t}=await o.get(r);return t?{[a]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",r,t),null}}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MVDR6OGY.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{m as D}from"./chunk-2IUBMLF4.mjs";import{a as f}from"./chunk-DSVSX4ZT.mjs";import{a as d}from"./chunk-WJQVMI33.mjs";import{a as m}from"./chunk-BHAHZQVO.mjs";import{a as s}from"./chunk-OOVV574D.mjs";var F=({data:t,decodeMethod:e,identifier:r,highlight:n=null})=>{let i={displayValue:"",validationWarnings:[],highlight:n};if(t.length>36e3&&["decimal","smart"].includes(e))return{...i,displayValue:t};let c=t.includes("@"),p=t.includes(`
|
|
2
|
+
`);if(!c&&!p)return{...i,displayValue:s({data:t,decodeMethod:e}),highlight:n&&s({data:n,decodeMethod:e})};if(c){let a=t.split("@"),l=f({parts:a,decodeMethod:e,identifier:r,decodedData:i}),o=n?d({data:n,identifier:r,decodeMethod:e,delimiter:"@"}):null;return{...i,displayValue:l.join("@"),highlight:o}}if(p){let a=t.split(`
|
|
3
|
+
`),l=a.map(u=>e==="raw"?u:s({data:Buffer.from(u,"base64").toString("hex"),decodeMethod:e})),o=m({parts:a,initialDecodedParts:l,identifier:r,decodeMethod:e}),y=n?d({data:n,identifier:r,decodeMethod:e,delimiter:`
|
|
4
|
+
`}):null;return{...i,displayValue:o.join(`
|
|
5
|
+
`),highlight:y}}return i};export{F as a};
|
|
6
|
+
//# sourceMappingURL=chunk-N342XMFH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/transactions/getDecodedDataField/getDecodedDataField.ts"],
|
|
4
|
+
"sourcesContent": ["import { MAX_DECODE_TX_DATA_LENGTH } from 'constants/transactions.constants';\nimport {\n DecodeMethodEnum,\n DecodedDisplayType\n} from 'types/serverTransactions.types';\nimport { decodeByMethod } from './helpers/decodeByMethod';\nimport { decodeHighlight } from './helpers/decodeHighlight';\nimport { getDecodedParts } from './helpers/getDecodedParts';\nimport { getDisplayValueAndValidationWarnings } from './helpers/getDisplayValueAndValidationWarnings';\n\ninterface IDecodedDataField {\n data: string;\n decodeMethod: DecodeMethodEnum;\n identifier?: string;\n highlight?: string | null;\n}\n\nexport const getDecodedDataField = ({\n data,\n decodeMethod,\n identifier,\n highlight = null\n}: IDecodedDataField): DecodedDisplayType => {\n const decodedData: DecodedDisplayType = {\n displayValue: '',\n validationWarnings: [],\n highlight\n };\n\n if (\n data.length > MAX_DECODE_TX_DATA_LENGTH &&\n [DecodeMethodEnum.decimal, DecodeMethodEnum.smart].includes(decodeMethod)\n ) {\n return {\n ...decodedData,\n displayValue: data\n };\n }\n\n const hasAt = data.includes('@');\n const hasNewLine = data.includes('\\n');\n\n if (!hasAt && !hasNewLine) {\n return {\n ...decodedData,\n displayValue: decodeByMethod({ data, decodeMethod }),\n highlight: highlight\n ? decodeByMethod({ data: highlight, decodeMethod })\n : highlight\n };\n }\n\n if (hasAt) {\n const parts = data.split('@');\n const decodedParts = getDisplayValueAndValidationWarnings({\n parts,\n decodeMethod,\n identifier,\n decodedData\n });\n\n const decodedHighlight = highlight\n ? decodeHighlight({\n data: highlight,\n identifier,\n decodeMethod,\n delimiter: '@'\n })\n : null;\n\n return {\n ...decodedData,\n displayValue: decodedParts.join('@'),\n highlight: decodedHighlight\n };\n }\n\n if (hasNewLine) {\n const parts = data.split('\\n');\n\n const initialDecodedParts = parts.map((part) => {\n if (decodeMethod === DecodeMethodEnum.raw) {\n return part;\n }\n\n return decodeByMethod({\n data: Buffer.from(part, 'base64').toString('hex'),\n decodeMethod\n });\n });\n\n const decodedParts = getDecodedParts({\n parts,\n initialDecodedParts,\n identifier,\n decodeMethod\n });\n\n const decodedHighlight = highlight\n ? decodeHighlight({\n data: highlight,\n identifier,\n decodeMethod,\n delimiter: '\\n'\n })\n : null;\n\n return {\n ...decodedData,\n displayValue: decodedParts.join('\\n'),\n highlight: decodedHighlight\n };\n }\n\n return decodedData;\n};\n"],
|
|
5
|
+
"mappings": "6MAiBO,IAAMA,EAAsB,CAAC,CAClC,KAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EAAY,IACd,IAA6C,CAC3C,IAAMC,EAAkC,CACtC,aAAc,GACd,mBAAoB,CAAC,EACrB,UAAAD,CACF,EAEA,GACEH,EAAK,OAAS,MACd,kBAAiD,EAAE,SAASC,CAAY,EAExE,MAAO,CACL,GAAGG,EACH,aAAcJ,CAChB,EAGF,IAAMK,EAAQL,EAAK,SAAS,GAAG,EACzBM,EAAaN,EAAK,SAAS;AAAA,CAAI,EAErC,GAAI,CAACK,GAAS,CAACC,EACb,MAAO,CACL,GAAGF,EACH,aAAcG,EAAe,CAAE,KAAAP,EAAM,aAAAC,CAAa,CAAC,EACnD,UAAWE,GACPI,EAAe,CAAE,KAAMJ,EAAW,aAAAF,CAAa,CAAC,CAEtD,EAGF,GAAII,EAAO,CACT,IAAMG,EAAQR,EAAK,MAAM,GAAG,EACtBS,EAAeC,EAAqC,CACxD,MAAAF,EACA,aAAAP,EACA,WAAAC,EACA,YAAAE,CACF,CAAC,EAEKO,EAAmBR,EACrBS,EAAgB,CACd,KAAMT,EACN,WAAAD,EACA,aAAAD,EACA,UAAW,GACb,CAAC,EACD,KAEJ,MAAO,CACL,GAAGG,EACH,aAAcK,EAAa,KAAK,GAAG,EACnC,UAAWE,CACb,CACF,CAEA,GAAIL,EAAY,CACd,IAAME,EAAQR,EAAK,MAAM;AAAA,CAAI,EAEvBa,EAAsBL,EAAM,IAAKM,GACjCb,UACKa,EAGFP,EAAe,CACpB,KAAM,OAAO,KAAKO,EAAM,QAAQ,EAAE,SAAS,KAAK,EAChD,aAAAb,CACF,CAAC,CACF,EAEKQ,EAAeM,EAAgB,CACnC,MAAAP,EACA,oBAAAK,EACA,WAAAX,EACA,aAAAD,CACF,CAAC,EAEKU,EAAmBR,EACrBS,EAAgB,CACd,KAAMT,EACN,WAAAD,EACA,aAAAD,EACA,UAAW;AAAA,CACb,CAAC,EACD,KAEJ,MAAO,CACL,GAAGG,EACH,aAAcK,EAAa,KAAK;AAAA,CAAI,EACpC,UAAWE,CACb,CACF,CAEA,OAAOP,CACT",
|
|
6
|
+
"names": ["getDecodedDataField", "data", "decodeMethod", "identifier", "highlight", "decodedData", "hasAt", "hasNewLine", "decodeByMethod", "parts", "decodedParts", "getDisplayValueAndValidationWarnings", "decodedHighlight", "decodeHighlight", "initialDecodedParts", "part", "getDecodedParts"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-RHJ4M62M.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-NHIO5LHC.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as r}from"./chunk-SDFOOFQZ.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NIUHMHFD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-2L25IGHZ.mjs";import{a as U}from"./chunk-OP2PPPAN.mjs";import{a as ie}from"./chunk-VRG2R5C7.mjs";import{a as re}from"./chunk-WJI5FXSZ.mjs";import{a as I}from"./chunk-SGQJOLH2.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-DCX2NQAU.mjs";import{a as p}from"./chunk-Y7QM3LPW.mjs";import{a as Z}from"./chunk-RJOP7SCI.mjs";import{a as ne}from"./chunk-O24MRZB2.mjs";import{a as oe}from"./chunk-KP4MUQKU.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-LY3MRREN.mjs";import{a as y}from"./chunk-E5CUE265.mjs";import{g as K}from"./chunk-CAA4VJRH.mjs";import{a as q}from"./chunk-OF3XH6ZU.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-2HKAVY3C.mjs";import{a as F,q as j,s as l}from"./chunk-LPGMDX6Q.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return se(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as de}from"./chunk-M3YL36ZL.mjs";import{a as se}from"./chunk-AQ6D3F5K.mjs";import{a as te}from"./chunk-IBVUYIRU.mjs";import{a as U}from"./chunk-BIQTHJFC.mjs";import{a as ie}from"./chunk-VBXM6QDZ.mjs";import{a as re}from"./chunk-7R7GYV2Q.mjs";import{a as I}from"./chunk-23BMJL5I.mjs";import{a as ee}from"./chunk-YUFPUG5O.mjs";import{a as ae}from"./chunk-OBUQ633K.mjs";import{a as p}from"./chunk-AIHJZJX7.mjs";import{a as Z}from"./chunk-ITHXLW7N.mjs";import{a as ne}from"./chunk-YPEZAU5L.mjs";import{a as oe}from"./chunk-BJX6XZJZ.mjs";import{a as Q}from"./chunk-QJGFIK7H.mjs";import{b as J}from"./chunk-4Z3DZ2A3.mjs";import{b as C,c as Y}from"./chunk-NRXYSTRW.mjs";import{j as $,l as O,r as M,s as P,t as L}from"./chunk-YIF2ADTM.mjs";import{a as y}from"./chunk-PZKUGWW4.mjs";import{a as q}from"./chunk-QCKPVCWD.mjs";import{a as D}from"./chunk-4TBVQD27.mjs";import{a as X}from"./chunk-UB2NR7NA.mjs";import{g as K}from"./chunk-2IUBMLF4.mjs";import{a as F,q as j,s as l}from"./chunk-SDFOOFQZ.mjs";import{f as R}from"./chunk-UERJ6AKK.mjs";import{b as E,c as V}from"./chunk-SAAOQW7P.mjs";import{a as B}from"./chunk-VNLGNNIL.mjs";import{b as H,c as G}from"./chunk-6JM4DPOH.mjs";import{a as c}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{IframeLoginTypes as pe}from"@multiversx/sdk-web-wallet-iframe-provider/out/constants";var f=class extends p{constructor({address:e,anchor:r,shouldInitProvider:t}){super(e);this.provider=null;this.config=null;this.ledgerLogin=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");if(!e||typeof e.addressIndex!="number")throw new Error("Missing addressIndex for Ledger login");let{address:r,signature:t}=await this.provider.login({addressIndex:e.addressIndex});return{address:r,signature:t??""}};this.loginOperation=async e=>{if(!this.provider||!this.config)throw new Error("Provider is not initialized.");return await te({options:e,config:this.config,provider:this.provider,login:this.ledgerLogin.bind(this)})};this.initLegderConnectManager=async e=>{if(!!I())return;await U.getInstance().init(e)};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ne({transactions:e,handleSign:this.provider.signTransactions.bind(this.provider)})};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await this.rebuildProvider(),await ce({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider)})};this.rebuildProvider=async()=>{try{await this.provider?.getAddress()}catch{try{let{ledgerProvider:r}=await re({shouldInitProvider:!0});this.provider=r}catch(r){throw $({toastId:"ledger-provider-rebuild-error",duration:1e4,icon:"times",iconClassName:"warning",message:"Unlock your device & open the MultiversX App",title:"Ledger unavailable"}),r}}};this.options={anchor:r,shouldInitProvider:t},this._login=this.ledgerLogin.bind(this)}async init(){try{this.initializeAddress(),await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.ledger}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){await this.initLegderConnectManager(this.options?.anchor);let e=U.getInstance(),{ledgerProvider:r,ledgerConfig:t}=await new Promise((n,s)=>ie({manager:e,resolve:n,reject:s,shouldInitProvider:this.options?.shouldInitProvider}));this.config=t,this.provider=r}};var ve=3e4,me=5e3,he=3e3,S=class a{constructor(){this.store=j();this.connectionCheckInterval=null;this.recreateProviderInterval=null;this.init=async()=>{this.startCheckConnectionLoop()};this.shouldCheckConnection=()=>{let i=this.store.getState(),{providerType:e}=B(i),r=R(i);return!!(e===o.ledger&&r)};this.startCheckConnectionLoop=()=>{this.connectionCheckInterval||(this.connectionCheckInterval=setInterval(async()=>{let i=J(l());if(!(!this.shouldCheckConnection()||i))try{await L().getProvider().getAddress()}catch{if(O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",icon:"times",iconClassName:"warning",message:"Unlock your device to continue signing transactions",title:"Ledger disconnected"}),this.reset(),this.recreateProviderInterval)return;this.recreateProviderInterval=setInterval(this.reconnectProvider,me)}},ve))};this.reconnectProvider=async()=>{if(this.shouldCheckConnection())try{let i=new f({shouldInitProvider:!0});await i.init();let e=new M(i);i.getType=()=>o.ledger,P(e),this.reset(),clearInterval(this.recreateProviderInterval??0),this.recreateProviderInterval=null,O.getInstance().createCustomToast({toastId:"ledger-provider-idle-warning",duration:he,icon:"check",iconClassName:"success",message:"Your device is ready to sign transactions",title:"Ledger reconnected"}),this.startCheckConnectionLoop()}catch{console.log("Unable to reconnect to Ledger")}};this.reset=()=>{clearInterval(this.connectionCheckInterval??0),this.connectionCheckInterval=null}}static getInstance(){return a.instance||(a.instance=new a),a.instance}};var k=class extends p{constructor(e){super(e?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{onClose:r,manager:t}=await this.initSignState();try{let n=await this.provider.signTransactions(e)??[];return await oe(n)}catch(n){throw await r({shouldCancelAction:!0}),n}finally{t.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.crossWindow})};this.walletAddress=e?.walletAddress,this.provider=Q.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=E(l()),r=await this.provider.init();return this.provider.setWalletUrl(this.walletAddress??e.walletAddress),this.address&&this.provider.setAddress(this.address),r}logout(){return this.provider.logout()}getType(){return o.crossWindow}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{ExtensionProvider as ue}from"@multiversx/sdk-extension-provider/out/extensionProvider";var z=class extends p{constructor(e){super(e);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)??[]}catch(n){throw await t({shouldCancelAction:!1}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension})};this.provider=ue.getInstance(),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}async initializeProvider(){let e=await this.provider.init();return this.address&&this.setAccount({address:this.address}),e}getAddress(){return this.provider.getAddress()}setAccount(e){return this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}logout(){return this.provider.logout()}getType(){return o.extension}};var fe={passkey:o.passkey,metamask:o.metamask},T=class extends p{constructor({type:e,address:r,walletUrl:t}){super(r);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();try{return await this.provider.signTransactions(e)}catch(n){throw await t({shouldCancelAction:!0}),n}finally{r.closeUI()}};this.signMessage=async e=>{if(!this.provider||!this.type)throw new Error("Provider is not initialized.");return await g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c[this.type]})};this.type=e,this.walletUrl=t??"",this.provider=de.getInstance(),this._login=this.provider.login.bind(this.provider)}init(){return this.initializeAddress(),this.initializeWalletUrl(),this.initializeProvider()}initializeWalletUrl(){if(this.walletUrl)return;let e=E(l());if(!e.iframeWalletAddress)throw new Error("Invalid walletUrl");this.walletUrl=e.iframeWalletAddress}async initializeProvider(){return await this.provider.init(),this.address&&this.setAccount({address:this.address}),this.provider.setLoginType(this.type),this.provider.setWalletUrl(this.walletUrl),!0}logout(){return this.provider.logout()}getType(){return fe[this.type]}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.getAddress()}setAccount(e){this.provider.setAccount(e)}isInitialized(){return this.provider.isInitialized()}};import{OptionalOperation as ye}from"@multiversx/sdk-wallet-connect-provider/out";var le=[C.CANCEL_ACTION,C.SIGN_LOGIN_TOKEN],_=class extends p{constructor(e){super();this.provider=null;this.methods=[];this._approval=null;this.cancelActionAbortController=null;this.signTransactions=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");let{manager:r,onClose:t}=await this.initSignState();this.cancelActionAbortController=new AbortController;let n=this.cancelActionAbortController.signal;try{let s=new Promise((h,v)=>{n.addEventListener("abort",()=>{v(new Error("cancelled by user"))})});return await Promise.race([this.provider.signTransactions(e),s])}catch(s){throw await t({shouldCancelAction:!0}),s}finally{r.closeUI()}};this.cancelAction=async()=>{this.sendCustomRequest({method:C.CANCEL_ACTION,action:ye.CANCEL_ACTION}),this.cancelActionAbortController?.abort()};this.signMessage=async e=>{if(!this.provider)throw new Error("Provider is not initialized.");this.cancelActionAbortController=new AbortController;let r=this.cancelActionAbortController.signal,t=new Promise((s,d)=>{r.addEventListener("abort",()=>{d(new Error("cancelled by user"))})});return await Promise.race([g({message:e,handleSignMessage:this.provider.signMessage.bind(this.provider),cancelAction:this.cancelAction,providerType:c.extension}),t])};this.config=e}async init(){try{await this.initializeProvider()}catch{return!1}return!0}logout(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.logout()}getType(){return o.walletConnect}getAddress(){if(!this.provider)throw new Error("Provider is not initialized.");return Promise.resolve(this.provider.getAddress())}setAccount(e){return this.provider?.setAccount(e)}isInitialized(){if(!this.provider)throw new Error("Provider is not initialized.");return this.provider.isInitialized()}async initializeProvider(){if(await this.initWalletConnectManager(),!this.config)throw new Error("Invalid WalletConnect setup");let{walletConnectProvider:e,dappMethods:r}=await this.createWalletConnectProvider(this.config);this.provider=e,this.methods=r;let{uri:t="",approval:n}=await this.provider.connect({methods:this.methods}),s=this.config.walletConnectDeepLink??D.walletConnectDeepLink;this._approval=n,y.getInstance().updateData({wcURI:t,walletConnectDeepLink:`${s}?wallet-connect=${encodeURIComponent(t)}`})}async initWalletConnectManager(){if(!!I())return;await y.getInstance().init(this.config?.anchor)}async createWalletConnectProvider(e){let r=I(),t=V(l());if(H(l())&&le.push(C.SIGN_NATIVE_AUTH_TOKEN),!e?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");let v={onClientLogin:()=>{},onClientLogout:()=>{X()},onClientEvent:m=>{}};try{let{walletConnectV2ProjectId:m,walletConnectV2Options:x={},walletConnectV2RelayAddress:W=""}=e,w=new Y(v,t,W,m,x);return await w.init(),{walletConnectProvider:w,dappMethods:le}}catch(m){throw console.error("Unable to connect",m),r&&await this.logout(),m}}async login(e){if(!this.provider)throw new Error("Provider is not initialized. Call createProvider first.");let r=async()=>{if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.init();let t=y.getInstance(),{uri:n="",approval:s}=await this.provider.connect({methods:this.methods}),d=this.config.walletConnectDeepLink??D.walletConnectDeepLink;t.updateData({wcURI:n,walletConnectDeepLink:`${d}?wallet-connect=${encodeURIComponent(n)}`});let h=await this.provider.login({approval:s,token:e?.token}),{address:v="",signature:m=""}=h??{};return t.handleClose({isLoginFinished:!!v}),{address:v,signature:m}}catch{return await r()}};if(!this._approval)throw new Error("Approval or login is not initialized");try{let t=await this.provider.login({approval:this._approval.bind(this),token:e?.token}),{address:n="",signature:s=""}=t??{};return y.getInstance().handleClose({isLoginFinished:!!n}),{address:n,signature:s}}catch(t){return console.error("User rejected connection proposal",t),await r()}}async sendCustomRequest({action:e,method:r}){if(!this.provider)throw new Error("Provider is not initialized.");try{await this.provider.sendCustomRequest?.({request:{method:r,params:{action:e}}})}catch(t){console.error("Unable to send event",t)}}};var A=class{static set customProviders(i){this._customProviders=i}static get customProviders(){return this._customProviders}static async create({type:i,anchor:e}){let r=null;switch(i){case o.extension:{r=new z;break}case o.crossWindow:{r=new k;break}case o.ledger:{r=new f({anchor:e}),await S.getInstance().init();break}case o.metamask:{r=new T({type:pe.metamask});break}case o.passkey:{r=new T({type:pe.passkey});break}case o.walletConnect:{let s=G(l());if(!s?.walletConnectV2ProjectId)throw new Error("Invalid WalletConnect setup");r=new _({anchor:e,...s});break}case o.webview:{r=new ae;break}default:{let s=q();for(let d of this._customProviders)d.type===i&&(r=await d.constructor({address:s,anchor:e}));break}}if(!r)throw new Error("Unable to create provider");await r.init();let t=new M(r);P(t);let n=[o.crossWindow,o.metamask,o.passkey].includes(i);return se(n?{skipLoginMethod:i}:null),t}static async destroy(){L().cancelLogin(),P(null),F(o.none)}};A._customProviders=[];var Pe=(a,i)=>a.some(e=>e.type===i);async function g({message:a,handleSignMessage:i,cancelAction:e,providerType:r}){return await new Promise(async(n,s)=>{let{manager:d,onClose:h}=await Z({cancelAction:e}),v=Object.values(A.customProviders),m=v.reduce((u,N)=>(u[N.type]=N.name,u),{}),x={...c,...m},W=async()=>{await h({shouldCancelAction:!0}),s({message:"Signing canceled"})};d.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",W);let w=Pe(v,r)?r:o.none;d.updateData({name:x[w],type:w});try{let u=await i(a);n(u)}catch(u){await h({shouldCancelAction:!0}),s(u)}finally{d.closeUI()}})}async function ce({message:a,handleSignMessage:i}){try{return await g({message:a,handleSignMessage:i,providerType:c.ledger})}catch(e){let{errorMessage:r}=ee(e);throw r?{message:r}:e}}export{ce as a,f as b,S as c,A as d,g as e,k as f,z as g,T as h,_ as i};
|
|
2
|
+
//# sourceMappingURL=chunk-NOMP7OYA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-ESLRNICJ.mjs";import{a as f}from"./chunk-EE3KJKGZ.mjs";import{a as g}from"./chunk-XJ54ERL3.mjs";import{b as a}from"./chunk-SDFOOFQZ.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NP5YXGD3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-AIHJZJX7.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";import{a as e,b as t}from"./chunk-IE3UIHJF.mjs";import{WebviewProvider as a}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var n=class extends s{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(i){throw this.cancelAction(),i}};this.signMessage=async r=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signMessage(r)}catch(i){throw this.cancelAction(),i}};this.provider=a.getInstance({resetStateCallback:()=>{e.localStorage?.clear?.(),e.sessionStorage?.clear?.()}}),this._login=this.provider.login.bind(this.provider)}async init(){return this.initializeAddress(),this.initializeProvider()}logout(){return this.provider.logout()}getType(){return o.webview}getAddress(){throw new Error("Method not implemented.")}setAccount(r){return this.provider.setAccount(r)}isInitialized(){return this.provider.isInitialized()}async initializeProvider(){let r=await this.provider.init(t);return this.address&&this.setAccount({address:this.address}),r}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OBUQ633K.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-OL6LWUIJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n}from"./chunk-HH5SA7BX.mjs";import{a as s}from"./chunk-I3MK6KZJ.mjs";import{Address as d}from"@multiversx/sdk-core";import c from"bignumber.js";var l=({data:e,decodeMethod:i,transactionTokens:t})=>{switch(i){case"text":try{return Buffer.from(e,"hex").toString("utf8")}catch{return e}case"decimal":return e!==""?new c(e,16).toString(10):"";case"smart":try{let r=d.newFromHex(e).toString();if(s(r))return r}catch{}try{let r=Buffer.from(e,"hex").toString("utf8");if(n(r))return r;{if(t&&[...t.esdts,...t.nfts].some(f=>r.includes(f)))return r;let o=new c(e,16);return o.isFinite()?o.toString(10):e}}catch{return e}case"raw":default:return e}};export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OOVV574D.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/transactions/getDecodedDataField/helpers/decodeByMethod.ts"],
|
|
4
|
+
"sourcesContent": ["import { Address } from '@multiversx/sdk-core';\nimport BigNumber from 'bignumber.js';\n\nimport {\n DecodeMethodEnum,\n TransactionTokensType\n} from 'types/serverTransactions.types';\nimport { isUtf8 } from 'utils/decoders';\nimport { addressIsValid } from 'utils/validation/addressIsValid';\n\ninterface IDecodeByMethod {\n data: string;\n decodeMethod: DecodeMethodEnum | string;\n transactionTokens?: TransactionTokensType;\n}\n\nexport const decodeByMethod = ({\n data,\n decodeMethod,\n transactionTokens\n}: IDecodeByMethod) => {\n switch (decodeMethod) {\n case DecodeMethodEnum.text:\n try {\n return Buffer.from(data, 'hex').toString('utf8');\n } catch {\n return data;\n }\n\n case DecodeMethodEnum.decimal:\n return data !== '' ? new BigNumber(data, 16).toString(10) : '';\n case DecodeMethodEnum.smart:\n try {\n const bech32Encoded = Address.newFromHex(data).toString();\n\n if (addressIsValid(bech32Encoded)) {\n return bech32Encoded;\n }\n } catch {\n // skip\n }\n\n try {\n const decoded = Buffer.from(data, 'hex').toString('utf8');\n\n if (!isUtf8(decoded)) {\n if (transactionTokens) {\n const tokens = [\n ...transactionTokens.esdts,\n ...transactionTokens.nfts\n ];\n\n if (tokens.some((token) => decoded.includes(token))) {\n return decoded;\n }\n }\n\n const bigNumber = new BigNumber(data, 16);\n\n return bigNumber.isFinite() ? bigNumber.toString(10) : data;\n } else {\n return decoded;\n }\n } catch {\n return data;\n }\n\n case DecodeMethodEnum.raw:\n default:\n return data;\n }\n};\n"],
|
|
5
|
+
"mappings": "kFAAA,OAAS,WAAAA,MAAe,uBACxB,OAAOC,MAAe,eAef,IAAMC,EAAiB,CAAC,CAC7B,KAAAC,EACA,aAAAC,EACA,kBAAAC,CACF,IAAuB,CACrB,OAAQD,EAAc,CACpB,WACE,GAAI,CACF,OAAO,OAAO,KAAKD,EAAM,KAAK,EAAE,SAAS,MAAM,CACjD,MAAQ,CACN,OAAOA,CACT,CAEF,cACE,OAAOA,IAAS,GAAK,IAAIG,EAAUH,EAAM,EAAE,EAAE,SAAS,EAAE,EAAI,GAC9D,YACE,GAAI,CACF,IAAMI,EAAgBC,EAAQ,WAAWL,CAAI,EAAE,SAAS,EAExD,GAAIM,EAAeF,CAAa,EAC9B,OAAOA,CAEX,MAAQ,CAER,CAEA,GAAI,CACF,IAAMG,EAAU,OAAO,KAAKP,EAAM,KAAK,EAAE,SAAS,MAAM,EAExD,GAAKQ,EAAOD,CAAO,EAgBjB,OAAOA,EAhBa,CACpB,GAAIL,GACa,CACb,GAAGA,EAAkB,MACrB,GAAGA,EAAkB,IACvB,EAEW,KAAMO,GAAUF,EAAQ,SAASE,CAAK,CAAC,EAChD,OAAOF,EAIX,IAAMG,EAAY,IAAIP,EAAUH,EAAM,EAAE,EAExC,OAAOU,EAAU,SAAS,EAAIA,EAAU,SAAS,EAAE,EAAIV,CACzD,CAGF,MAAQ,CACN,OAAOA,CACT,CAEF,UACA,QACE,OAAOA,CACX,CACF",
|
|
6
|
+
"names": ["Address", "BigNumber", "decodeByMethod", "data", "decodeMethod", "transactionTokens", "BigNumber", "bech32Encoded", "Address", "addressIsValid", "decoded", "isUtf8", "token", "bigNumber"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-L5SWSYR7.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OV6QTSRW.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as M}from"./chunk-PLMCHSS6.mjs";import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-BQX7MJR6.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-3DBK6MUI.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-YIF2ADTM.mjs";import{a as L}from"./chunk-WQYM2QJ2.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-IE3UIHJF.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P5OCEUZJ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-N342XMFH.mjs";import{h as o}from"./chunk-OEPTRJEB.mjs";var D=({data:r,highlight:a,identifier:i})=>{let e={};return Object.values(o).forEach(t=>{let c=d({data:r,identifier:i,decodeMethod:t,highlight:a});e[t]=c}),e};export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PLMCHSS6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n DecodeMethodEnum,\n DecodedDisplayType\n} from 'types/serverTransactions.types';\nimport { getDecodedDataField } from 'utils/transactions/getDecodedDataField';\n\nexport const getAllDecodedFormats = ({\n data,\n highlight,\n identifier\n}: {\n data: string;\n highlight: string | null;\n identifier?: string;\n}) => {\n const decodedFormats: Partial<Record<DecodeMethodEnum, DecodedDisplayType>> =\n {};\n\n Object.values(DecodeMethodEnum).forEach((decodeMethod) => {\n const decodedData = getDecodedDataField({\n data,\n identifier,\n decodeMethod,\n highlight\n });\n\n decodedFormats[decodeMethod] = decodedData;\n });\n\n return decodedFormats;\n};\n"],
|
|
5
|
+
"mappings": "kFAMO,IAAMA,EAAuB,CAAC,CACnC,KAAAC,EACA,UAAAC,EACA,WAAAC,CACF,IAIM,CACJ,IAAMC,EACJ,CAAC,EAEH,cAAO,OAAOC,CAAgB,EAAE,QAASC,GAAiB,CACxD,IAAMC,EAAcC,EAAoB,CACtC,KAAAP,EACA,WAAAE,EACA,aAAAG,EACA,UAAAJ,CACF,CAAC,EAEDE,EAAeE,CAAY,EAAIC,CACjC,CAAC,EAEMH,CACT",
|
|
6
|
+
"names": ["getAllDecodedFormats", "data", "highlight", "identifier", "decodedFormats", "DecodeMethodEnum", "decodeMethod", "decodedData", "getDecodedDataField"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KQNIDAOO.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PZKUGWW4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-7CA6UKPK.mjs";import{b as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-7CA6UKPK.mjs";import{b as T}from"./chunk-6DWUEZO7.mjs";import{c}from"./chunk-TI37DKBT.mjs";function D({transactions:i}){let e=[],o={};return!i||i.length===0?{allTransactions:e,parsedTransactionsByDataField:o}:(i.forEach((n,m)=>{let p=c(n.data.toString()??""),s=u(p);if(s.length>0)s.forEach((t,a)=>{let r=a===s.length-1,l={transaction:n,multiTxData:t.data,transactionIndex:a,needsSigning:r};o[t.data]={tokenId:t.token?t.token:"",amount:t.amount?t.amount:"",type:t.type,nonce:t.nonce?t.nonce:"",multiTxData:t.data,receiver:t.receiver},e.push(l)});else{let t=c(n.data.toString()??""),{tokenId:a,amount:r}=T(t);a&&(o[t]={tokenId:a,amount:r,receiver:n.receiver.toBech32()}),e.push({transaction:n,transactionIndex:m,multiTxData:t,needsSigning:!0})}}),{allTransactions:e,parsedTransactionsByDataField:o})}export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RBJ3O63I.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-IE3UIHJF.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-RDTIWBQU.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-KQNIDAOO.mjs";import{a as t}from"./chunk-SMWXMBEX.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-RHJ4M62M.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-HI6GWYQP.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).toHex()&&A(e),!t)return;if(n==null){w(H());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,H as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
|
|
2
|
+
//# sourceMappingURL=chunk-SDFOOFQZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-GWOW4TBY.mjs";async function l({results:e,hash:i,sessionId:t}){let a=e?.find(o=>o?.returnMessage!=="");r({sessionId:t,transaction:{...a,hash:i,status:"fail",inTransit:!1}}),s({sessionId:t,status:"fail",errorMessage:a?.returnMessage}),await n({sessionId:t,status:"fail"})}export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ST2OXKY2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-SDFOOFQZ.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-T54HTQQQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-TFZ46GCB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-NTOY6GTP.mjs";import{c as r,d as a}from"./chunk-2IUBMLF4.mjs";import{s as e}from"./chunk-SDFOOFQZ.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-U63YDSPL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as p,q as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as p,q as e}from"./chunk-SDFOOFQZ.mjs";import{c as i}from"./chunk-NTEMINYA.mjs";var T=()=>e().setState(p),a=({address:o,providerType:d})=>{e().setState(({account:r,loginInfo:t})=>{r.address=o,r.publicKey=new i(o).toHex(),t&&(t.providerType=d)},!1,"loginAction")};export{T as a,a as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UB2NR7NA.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-O7LCTC4K.mjs";import{s as m}from"./chunk-SDFOOFQZ.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UGLW3SSB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-OLOCTHIE.mjs";import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as c}from"./chunk-L7L56ZTG.mjs";import{a as T}from"./chunk-V4YC4AKQ.mjs";import{a as p}from"./chunk-OLOCTHIE.mjs";import{b as m}from"./chunk-2GG67TZD.mjs";import{a as k}from"./chunk-B72JAXSF.mjs";import{a as g}from"./chunk-6GREKTLP.mjs";import{a as f}from"./chunk-ZJ2WPN2K.mjs";import{a as d}from"./chunk-HS34AFHY.mjs";import{a}from"./chunk-B3IKUIRK.mjs";import{a as r}from"./chunk-BRJNX4JF.mjs";import{a as t}from"./chunk-DBIIY2TX.mjs";import{a as s}from"./chunk-7CELSV4S.mjs";function z({transaction:e,address:h,explorerAddress:o}){let y=e.tokenIdentifier??m(e.data).tokenId,n=d(e),u=f(e),l={timeAgo:c(e.timestamp*1e3,!0),tooltip:a({value:e.timestamp,noSeconds:!1,utc:!0})},v=k({address:h,transaction:e,receiver:n}),I={actionDescription:e.action?.description,name:T(e)},S=g(e),D=r({explorerAddress:o,to:t.accountDetails(e.sender)}),L=r({explorerAddress:o,to:t.accountDetails(n)}),A=r({explorerAddress:o,to:t.senderShard(e.senderShard)}),H=r({explorerAddress:o,to:t.receiverShard(e.receiverShard)}),i=e.originalTxHash||e.txHash,x=r({explorerAddress:o,to:t.transactionDetails(i)});return{...e,txHash:i,tokenIdentifier:y,receiver:n,receiverAssets:u,transactionDetails:{age:l,direction:v,method:I,iconInfo:p(e),transactionTokens:S,isContract:s(e.sender)},links:{senderLink:D,receiverLink:L,senderShardLink:A,receiverShardLink:H,transactionLink:x}}}export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UNBTFF6K.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{q as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{q as a}from"./chunk-SDFOOFQZ.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
|
|
2
|
+
//# sourceMappingURL=chunk-V226OFPH.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-7R7GYV2Q.mjs";import{a as c}from"./chunk-23BMJL5I.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VBXM6QDZ.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-MVDR6OGY.mjs";import{b as r}from"./chunk-6QURUDVX.mjs";import{s as i}from"./chunk-SDFOOFQZ.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=o(i());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WCHM6ROW.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-BHAHZQVO.mjs";import{a as i}from"./chunk-OOVV574D.mjs";var m=({data:o,decodeMethod:e,delimiter:r,identifier:c})=>{let t=o.split("@"),n=t.map(g=>i({data:g,decodeMethod:e}));return d({parts:t,initialDecodedParts:n,identifier:c,decodeMethod:e}).join(r)};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WJQVMI33.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/transactions/getDecodedDataField/helpers/decodeHighlight.ts"],
|
|
4
|
+
"sourcesContent": ["import { DecodeMethodEnum } from 'types/serverTransactions.types';\nimport { decodeByMethod } from './decodeByMethod';\nimport { getDecodedParts } from './getDecodedParts';\n\ninterface IDecodeHighlight {\n data: string;\n decodeMethod: DecodeMethodEnum;\n delimiter: string;\n identifier?: string;\n}\n\nexport const decodeHighlight = ({\n data,\n decodeMethod,\n delimiter,\n identifier\n}: IDecodeHighlight) => {\n const parts = data.split('@');\n\n const initialDecodedParts = parts.map((part) => {\n return decodeByMethod({ data: part, decodeMethod });\n });\n\n const decodedHighlight = getDecodedParts({\n parts,\n initialDecodedParts,\n identifier,\n decodeMethod\n });\n\n return decodedHighlight.join(delimiter);\n};\n"],
|
|
5
|
+
"mappings": "kFAWO,IAAMA,EAAkB,CAAC,CAC9B,KAAAC,EACA,aAAAC,EACA,UAAAC,EACA,WAAAC,CACF,IAAwB,CACtB,IAAMC,EAAQJ,EAAK,MAAM,GAAG,EAEtBK,EAAsBD,EAAM,IAAKE,GAC9BC,EAAe,CAAE,KAAMD,EAAM,aAAAL,CAAa,CAAC,CACnD,EASD,OAPyBO,EAAgB,CACvC,MAAAJ,EACA,oBAAAC,EACA,WAAAF,EACA,aAAAF,CACF,CAAC,EAEuB,KAAKC,CAAS,CACxC",
|
|
6
|
+
"names": ["decodeHighlight", "data", "decodeMethod", "delimiter", "identifier", "parts", "initialDecodedParts", "part", "decodeByMethod", "getDecodedParts"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-RHJ4M62M.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WPGHI7H5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-KG5VFT6E.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-X4PG526M.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-HZII4LOV.mjs";import{d as m,e as l}from"./chunk-CP5CXMNG.mjs";import{q as a}from"./chunk-SDFOOFQZ.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as y}from"socket.io-client";var A=3e3,g=3,w=500,E=1e3,f="batchUpdated",p="connect",N="connect_error",b="disconnect";async function M(i){let{apiAddress:k,websocketUrl:I}=r(a().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,u(e)},d=e=>{o&&clearTimeout(o),o=setTimeout(()=>{m(e)},E)},C=e=>{n&&clearTimeout(n),n=setTimeout(()=>{l(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(b),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},S=async()=>{c("pending");let e=I??await T(k);if(!e){c("not_initialized");return}t.instance=y(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:g,reconnectionDelay:w,timeout:A,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(N,s=>{console.warn("Websocket connect error: ",s.message)}),t.instance.on(b,s=>{console.warn("Websocket disconnected: ",s),c("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await S(),{closeConnection:W}}export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XBF3UPD7.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{s as e}from"./chunk-SDFOOFQZ.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XJ54ERL3.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-IE3UIHJF.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-YGA2ZW7F.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as et}from"./chunk-BFIHV4M5.mjs";import{a as mt}from"./chunk-6UZHM5LW.mjs";import{a as S}from"./chunk-E75WVJBY.mjs";import{a as Tt}from"./chunk-WCHM6ROW.mjs";import{a as w}from"./chunk-ALLSMTZ6.mjs";import{a as It}from"./chunk-4ODPAHHA.mjs";import{a as gt}from"./chunk-ZQFABMSJ.mjs";import{b as C}from"./chunk-MQABF3VZ.mjs";import{a as dt}from"./chunk-4I7IJNEQ.mjs";import{a as ht}from"./chunk-MDVI45IV.mjs";import{a as ft}from"./chunk-FI6P7XAS.mjs";import{a as f}from"./chunk-G4CMYBPE.mjs";import{a as X}from"./chunk-QCKPVCWD.mjs";import{a as ut}from"./chunk-RHJ4M62M.mjs";import{a as L}from"./chunk-T54HTQQQ.mjs";import{a as b,f as pt}from"./chunk-CP5CXMNG.mjs";import{d as rt}from"./chunk-GWOW4TBY.mjs";import{k as it,l as nt,n as at}from"./chunk-65L5EBBL.mjs";import{b as lt}from"./chunk-UB2NR7NA.mjs";import{a as A}from"./chunk-HORSXVIV.mjs";import{a as vt}from"./chunk-ESLRNICJ.mjs";import{a as Q}from"./chunk-EE3KJKGZ.mjs";import{a as E}from"./chunk-QTKK6OSJ.mjs";import{a as J}from"./chunk-6ACLOUQ3.mjs";import{a as y}from"./chunk-NZYB675D.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as yt}from"./chunk-NJN53MJV.mjs";import{a as Z,b as tt,g as ot,l as st}from"./chunk-2IUBMLF4.mjs";import{a as V,b as q,q as u,s as Y}from"./chunk-SDFOOFQZ.mjs";import{c as H,f as $}from"./chunk-UERJ6AKK.mjs";import{b as g}from"./chunk-VNLGNNIL.mjs";import{b as v}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-NTEMINYA.mjs";import{b as Et}from"./chunk-76URRONH.mjs";import{a as ct}from"./chunk-YGA2ZW7F.mjs";import{a as I}from"./chunk-PLUWBWJ2.mjs";import W from"lodash.isequal";import Lt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",x=class e extends ut{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){T.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let s=this.store.subscribe(async({toasts:i,transactions:n},{toasts:a,transactions:c})=>{(!Lt(a.transactionToasts,i.transactionToasts)||!Lt(c,n))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[s]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=T.getInstance();this.closeUI(),await o.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:o,account:s,toasts:i,network:n}=this.store.getState(),{pendingTransactionToasts:a}=await S({toastList:i,transactionsSessions:o,account:s});this.data.pendingTransactions=a,this.data.historicTransactions=await et.getTransactionsHistory({transactionsSessions:o,address:s.address,explorerAddress:n.network.explorerAddress,egldLabel:n.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){rt(),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))}};import R from"bignumber.js";var N=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),o=g(t),{isExpired:s}=E(o?.nativeAuthToken);s?h().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),o=g(t),s=$(t);return!!(o?.nativeAuthToken&&s)};this.addPlannedLogout=()=>{let t=h(),o=H(this.store.getState()),s=t.getType()===I.webview;if(!o||s)return;this.addLogoutWarning();let i=g(this.store.getState()),{secondsUntilExpires:n,expiresAt:a}=E(i?.nativeAuthToken),c=new R(String(n)),r=`${o}_${a}`,m=this.plannedLogoutKey===r;if(!(n&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let d=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{T.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},d.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},d.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=v(this.store.getState()),o=g(this.store.getState()),{secondsUntilExpires:s}=E(o?.nativeAuthToken),i=new R(String(s)),n=i.times(1e3);if(!s||i.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=i.times(1e3).minus(c),m=mt(n.toNumber()),p=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{T.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:o}){let s=await y({address:e,baseURL:o});if(!s)throw new Error("Account not found");lt({address:e,providerType:t.getType()});let i={...s,username:A(s.username),nonce:L(s)};b(i),await C(e),w(),s.shard!=null&&await Tt({shard:Number(s.shard),apiAddress:o})}async function kt(e){let{network:{apiAddress:t}}=f();await e.login();let o=await e.getAddress();if(!o)throw new Error("Address not found");return await B({address:o,provider:e,apiAddress:t}),{address:o}}async function Dt({provider:e,nativeAuthConfig:t,token:o}){let{network:{apiAddress:s}}=f(),i=Q(t),n=o;n||(n=await i.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:n});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let p=J(r?.accessToken)?r.accessToken:i.getToken({address:a,token:n,signature:c});q({loginToken:n,signature:c,nativeAuthToken:p});let d=await dt({loginToken:n,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:d,provider:e,apiAddress:s}),{address:d,signature:c}}async function St(e,t){let o=v(Y());if(o)return await Dt({provider:e,nativeAuthConfig:o,token:t?.token});let{address:s}=await kt(e);return await C(s),w(),{address:s}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${tt}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${Z}-${Date.now()}`}},Rt={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"},Bt=e=>{for(let[t,o]of Object.entries(Rt))if(e.includes(t))return o;return"Error when signing"};function _(e,t="error"){let o=e?.message,s=Bt(o),n=s!=="Error when signing"?"warning":t,a=Object.keys(U).includes(n)?U[n]:U.error,{toastId:c,iconClassName:r,title:m}=a;return M({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:s,title:m}),s}async function bt({provider:e,transactions:t,options:o={}}){await Ct();let{isGuarded:s,activeGuardianAddress:i,nonce:n}=vt(),a=e.getType()===I.ledger,c=It({latestNonce:n,transactions:t}),r=i&&s&&!o.skipGuardian?c?.map(p=>(p.version=G.withTxOptions().valueOf(),p.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),p.guardian=K.newFromBech32(i),p)):c,m=await e.signTransactions(r)??[];return pt(n+m.length),m}var O=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await St(this.provider,t);return V(this.provider.getType()),wt(this),N.getInstance().init(),o}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let o=await gt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await bt({provider:this.provider,transactions:t,options:o})}catch(s){let i=_(s);throw new Error(i)}}async signMessage(t,o){try{return await ft({provider:this.provider,message:t,options:o})}catch(s){let i=_(s,"warning");throw new Error(i)}}async verifyMessage(t){return await ht(t)}cancelLogin(){this.provider.cancelLogin?.()}};var At=null;function wt(e){At=e}function h(){return At||new O(Et)}var Ut=async()=>{try{let e=X(),{network:t}=f();try{let o=await y({address:e,baseURL:t.apiAddress});if(o!=null){let s={...o,username:A(o.username),nonce:L(o)};return b(s),s}}catch(o){console.error("Failed getting account ",o)}}catch(e){console.error("Failed getting address ",e)}return null};async function Ct(){let e=h();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},l={},_t=(e,t)=>{u().setState(({toasts:o})=>{let s=o.customToasts.length>0?Math.max(...o.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,i=t??`custom-toast-${s+1}`,n=o.customToasts.findIndex(r=>r.toastId===i),a={...e,toastId:i};if(n!==-1){o.customToasts[n]=a;return}o.customToasts.push({...a,toastId:i})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==e)},!1,"removeCustomToast")},xt=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},zs=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},Nt=({toastId:e,totalDuration:t})=>{let o="";return u().setState(({toasts:s})=>{let i=s.transactionToasts.length>0?Math.max(...s.transactionToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0;o=e??`transaction-toast-${i+1}`,s.transactionToasts.push({startTime:j(),endTime:yt(t),toastId:o})},!1,"addTransactionToast"),o},k=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==e)},!1,"removeTransactionToast"),delete l[e],delete F[e]},M=e=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0,s=e.toastId||`custom-toast-${o+1}`;return e.onClose&&(l[s]=e.onClose),e.instantiateToastElement?(F[s]=e.instantiateToastElement,u().setState(({toasts:i})=>{let n=i.customToasts.findIndex(r=>r.toastId===s),a={...e,instantiateToastElement:null,toastId:s};n!==-1?i.customToasts[n]=a:i.customToasts.push(a)},!1,"createCustomToast"),s):(_t(e,s),s)};var Mt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Mt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{k(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let s=setTimeout(()=>{P(t);let i=l[t];i?.()},o);this.timeoutIntervals.set(t,s)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Mt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var T=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=x.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:o,transactions:s},{toasts:i,transactions:n})=>{(!W(i.transactionToasts,o.transactionToasts)||!W(n,s))&&await this.updateTransactionToastsList(),W(i.customToasts,o.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),s=o[t];if(!s)return!1;let{status:i}=s,n=at(i),a=nt(i),c=it(i),r=a||c||n;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,o){let s=Nt({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),s}createCustomToast(t){let o=M(t);return this.updateCustomToastList(),o}async updateTransactionToastsList(){let{toasts:t,transactions:o,account:s}=this.store.getState(),{pendingTransactionToasts:i,completedTransactionToasts:n}=await S({toastList:t,transactionsSessions:o,account:s});this.transactionToasts=[...i,...n];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let i="message"in o?{...o}:{...o,instantiateToastElement:F[o.toastId]};this.customToasts.push(i),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ct.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&k(t)}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.closeToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.closeToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}closeToast(t){if(this.customToasts.find(s=>s.toastId===t)){this.lifetimeManager.stop(t);let s=l[t];s?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),xt(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{x as a,F as b,l as c,_t as d,P as e,xt as f,zs as g,Nt as h,k as i,M as j,D as k,T as l,N as m,B as n,St as o,_ as p,bt as q,O as r,wt as s,h as t,Ct as u};
|
|
2
|
+
//# sourceMappingURL=chunk-YIF2ADTM.mjs.map
|