@multiversx/sdk-dapp 5.6.5 → 5.6.7

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.
Files changed (375) hide show
  1. package/out/__chunks__/{chunk-4AOBQXI3.mjs → chunk-22NBE3VD.mjs} +2 -2
  2. package/out/__chunks__/{chunk-676U6OTI.mjs → chunk-2E2NCU47.mjs} +2 -2
  3. package/out/__chunks__/{chunk-G6OHKF3V.mjs → chunk-2TCYFOMD.mjs} +2 -2
  4. package/out/__chunks__/{chunk-VEIRZX44.mjs → chunk-3R3VXWC2.mjs} +2 -2
  5. package/out/__chunks__/{chunk-V73QDUSC.mjs → chunk-3WX4MR4F.mjs} +2 -2
  6. package/out/__chunks__/{chunk-JDKOXHUE.mjs → chunk-4LH5OPJN.mjs} +2 -2
  7. package/out/__chunks__/chunk-55DSSFT2.mjs +2 -0
  8. package/out/__chunks__/{chunk-IHBIVBQ3.mjs → chunk-57IMV3XF.mjs} +2 -2
  9. package/out/__chunks__/{chunk-V3ULNZJT.mjs → chunk-5JWQUNZY.mjs} +2 -2
  10. package/out/__chunks__/chunk-5YCYE5MA.mjs +2 -0
  11. package/out/__chunks__/chunk-6BAQDYWA.mjs +2 -0
  12. package/out/__chunks__/{chunk-F75YW37Y.mjs → chunk-6MEASZPG.mjs} +2 -2
  13. package/out/__chunks__/{chunk-B7CFQZKI.mjs → chunk-7ELS72QK.mjs} +2 -2
  14. package/out/__chunks__/{chunk-JFJMW7YZ.mjs → chunk-A345VSGT.mjs} +2 -2
  15. package/out/__chunks__/chunk-A46HPE6M.mjs +2 -0
  16. package/out/__chunks__/{chunk-NGF3A544.mjs.map → chunk-A46HPE6M.mjs.map} +2 -2
  17. package/out/__chunks__/{chunk-RHYDUBKD.mjs → chunk-AR6HQ5FR.mjs} +2 -2
  18. package/out/__chunks__/{chunk-JTI5OLEX.mjs → chunk-AZYMVDWU.mjs} +2 -2
  19. package/out/__chunks__/{chunk-SW7NDWBA.mjs → chunk-B6CODV2A.mjs} +2 -2
  20. package/out/__chunks__/{chunk-C2NRPSEA.mjs → chunk-BU4JQETJ.mjs} +2 -2
  21. package/out/__chunks__/chunk-CHF73P5H.mjs +2 -0
  22. package/out/__chunks__/{chunk-MN25YLTY.mjs → chunk-D43LEYIV.mjs} +2 -2
  23. package/out/__chunks__/{chunk-F4LRBZHI.mjs → chunk-EEHG7FC3.mjs} +2 -2
  24. package/out/__chunks__/{chunk-BYO4QPIX.mjs → chunk-EN4PQTRT.mjs} +2 -2
  25. package/out/__chunks__/chunk-ETA4R42O.mjs +2 -0
  26. package/out/__chunks__/{chunk-4W5VY3GO.mjs → chunk-EZIUH4RK.mjs} +2 -2
  27. package/out/__chunks__/{chunk-4P6KVGFJ.mjs → chunk-FFGUC7S7.mjs} +2 -2
  28. package/out/__chunks__/{chunk-SQIVM23U.mjs → chunk-FMXCAN3M.mjs} +2 -2
  29. package/out/__chunks__/{chunk-LDPF47U7.mjs → chunk-GILGXF3U.mjs} +2 -2
  30. package/out/__chunks__/{chunk-7ZU5KDF4.mjs → chunk-H7BHTGW7.mjs} +2 -2
  31. package/out/__chunks__/{chunk-RBEU3I23.mjs → chunk-HDUHOYDI.mjs} +2 -2
  32. package/out/__chunks__/{chunk-GAO3N3BI.mjs → chunk-HEZLSKRN.mjs} +2 -2
  33. package/out/__chunks__/{chunk-HIDRVWOQ.mjs → chunk-HH6XW3S6.mjs} +2 -2
  34. package/out/__chunks__/{chunk-3B7DG5PU.mjs → chunk-IEXYINQQ.mjs} +2 -2
  35. package/out/__chunks__/{chunk-FUUOCOBX.mjs → chunk-IONBKMFW.mjs} +2 -2
  36. package/out/__chunks__/{chunk-6PHKMRFV.mjs → chunk-JEFEDCSS.mjs} +2 -2
  37. package/out/__chunks__/chunk-JVPQSBOX.mjs +2 -0
  38. package/out/__chunks__/{chunk-4UNMUVTO.mjs → chunk-K3X454GT.mjs} +2 -2
  39. package/out/__chunks__/{chunk-C6H5TEAY.mjs → chunk-KKI3K4YH.mjs} +2 -2
  40. package/out/__chunks__/chunk-KQNCVEC3.mjs +2 -0
  41. package/out/__chunks__/{chunk-35TLBLLZ.mjs → chunk-LCMNA7KW.mjs} +2 -2
  42. package/out/__chunks__/chunk-LGIXBYM3.mjs +2 -0
  43. package/out/__chunks__/{chunk-OUYP2DZU.mjs → chunk-M6O2JENG.mjs} +2 -2
  44. package/out/__chunks__/{chunk-FQ6P5OK7.mjs → chunk-MBI2RTHM.mjs} +2 -2
  45. package/out/__chunks__/{chunk-FJW5NQC5.mjs → chunk-MFVKEPMI.mjs} +2 -2
  46. package/out/__chunks__/{chunk-XG2GIMBK.mjs → chunk-MKBRFW6F.mjs} +2 -2
  47. package/out/__chunks__/{chunk-KBUF3VYQ.mjs → chunk-N4OAQFDH.mjs} +2 -2
  48. package/out/__chunks__/chunk-NP2VNG62.mjs +2 -0
  49. package/out/__chunks__/{chunk-JJRF4KKM.mjs → chunk-O6NZ6Z6B.mjs} +2 -2
  50. package/out/__chunks__/{chunk-MW6XCNWP.mjs → chunk-OHUSVHTC.mjs} +2 -2
  51. package/out/__chunks__/chunk-ORIRXUKE.mjs +2 -0
  52. package/out/__chunks__/{chunk-IXYOEFTN.mjs → chunk-PG4PNSW6.mjs} +2 -2
  53. package/out/__chunks__/{chunk-SRPTHL6W.mjs → chunk-PKW4UGR5.mjs} +2 -2
  54. package/out/__chunks__/{chunk-EB6K5LCD.mjs → chunk-PLZG3X3K.mjs} +2 -2
  55. package/out/__chunks__/{chunk-DZZ5M34O.mjs → chunk-QD4CABEY.mjs} +2 -2
  56. package/out/__chunks__/{chunk-6B2GHZDF.mjs → chunk-QODHV6EH.mjs} +2 -2
  57. package/out/__chunks__/{chunk-M5JPM5BF.mjs → chunk-R2IQ32Q5.mjs} +2 -2
  58. package/out/__chunks__/{chunk-4EAIQB7E.mjs → chunk-RBSY7AZJ.mjs} +2 -2
  59. package/out/__chunks__/chunk-RLD5XV4S.mjs +2 -0
  60. package/out/__chunks__/{chunk-OCXXTA4P.mjs → chunk-RVC6EIC7.mjs} +2 -2
  61. package/out/__chunks__/{chunk-B3PQJ4WY.mjs → chunk-SFK5O3FE.mjs} +2 -2
  62. package/out/__chunks__/{chunk-ZBXKGK25.mjs → chunk-SMXSHPXZ.mjs} +2 -2
  63. package/out/__chunks__/{chunk-D67JUKPD.mjs → chunk-SNEWHEX2.mjs} +2 -2
  64. package/out/__chunks__/chunk-SO4J6P3C.mjs +2 -0
  65. package/out/__chunks__/{chunk-MN3XDS7Q.mjs → chunk-SOFJNMOQ.mjs} +2 -2
  66. package/out/__chunks__/{chunk-MKYGGOBL.mjs → chunk-SUKYJQTV.mjs} +2 -2
  67. package/out/__chunks__/chunk-SURYSJAU.mjs +2 -0
  68. package/out/__chunks__/{chunk-ODNGFTW5.mjs → chunk-TBSRXSFJ.mjs} +2 -2
  69. package/out/__chunks__/{chunk-EQBGROHI.mjs → chunk-TMLJELVN.mjs} +2 -2
  70. package/out/__chunks__/{chunk-FVVRPNSD.mjs → chunk-TP65TGJH.mjs} +2 -2
  71. package/out/__chunks__/{chunk-XIRJCDWC.mjs → chunk-TT5HX75E.mjs} +2 -2
  72. package/out/__chunks__/{chunk-BAWT2YA7.mjs → chunk-ULUUW4MT.mjs} +2 -2
  73. package/out/__chunks__/{chunk-LS4PX2PR.mjs → chunk-UU6WX5SY.mjs} +2 -2
  74. package/out/__chunks__/{chunk-TK7CPPUP.mjs → chunk-VAXNO6YD.mjs} +2 -2
  75. package/out/__chunks__/{chunk-IVM526MS.mjs → chunk-VJ3EQSMI.mjs} +2 -2
  76. package/out/__chunks__/chunk-VJA2NSQ4.mjs +2 -0
  77. package/out/__chunks__/{chunk-ZLOPHDVT.mjs → chunk-VZVYNN5W.mjs} +2 -2
  78. package/out/__chunks__/{chunk-7YCD5466.mjs → chunk-WFF2FARS.mjs} +2 -2
  79. package/out/__chunks__/{chunk-IWJRKPVP.mjs → chunk-WS7GSQIW.mjs} +2 -2
  80. package/out/__chunks__/{chunk-R5USHTAC.mjs → chunk-WTWUPX2O.mjs} +2 -2
  81. package/out/__chunks__/{chunk-YIMUSXYK.mjs → chunk-WX72WH5S.mjs} +2 -2
  82. package/out/__chunks__/{chunk-L3RER46P.mjs → chunk-WXAMLA7L.mjs} +2 -2
  83. package/out/__chunks__/{chunk-LDPXTCNA.mjs → chunk-XBKZZTGE.mjs} +2 -2
  84. package/out/__chunks__/{chunk-CXCWCLFJ.mjs → chunk-Y3IXSTCR.mjs} +2 -2
  85. package/out/__chunks__/{chunk-2FEH3E6U.mjs → chunk-Y3V3YLGE.mjs} +2 -2
  86. package/out/__chunks__/{chunk-CGBSNDVZ.mjs → chunk-YG3D4LLK.mjs} +2 -2
  87. package/out/__chunks__/chunk-ZELPFF47.mjs +2 -0
  88. package/out/__chunks__/{chunk-VBHP2IVI.mjs.map → chunk-ZELPFF47.mjs.map} +1 -1
  89. package/out/__chunks__/{chunk-WGK62UNL.mjs → chunk-ZHJVRF45.mjs} +2 -2
  90. package/out/__chunks__/{chunk-CDOZBMWB.mjs → chunk-ZX7RZASL.mjs} +2 -2
  91. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  92. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  93. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  94. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  95. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  96. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  97. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  98. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  99. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  100. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  101. package/out/constants/browser.constants.mjs +1 -1
  102. package/out/constants/storage.constants.mjs +1 -1
  103. package/out/constants/window.constants.cjs +1 -1
  104. package/out/constants/window.constants.cjs.map +1 -1
  105. package/out/constants/window.constants.mjs +1 -1
  106. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  107. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  108. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  109. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  110. package/out/lib/sdkDappUi.mjs +1 -1
  111. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  112. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  113. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  114. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  115. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  116. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  117. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  118. package/out/managers/ToastManager/index.mjs +1 -1
  119. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  120. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  121. package/out/managers/TransactionManager/index.mjs +1 -1
  122. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  123. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  124. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  125. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  126. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  127. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  128. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  129. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  130. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  131. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  132. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  133. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  134. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  135. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  136. package/out/methods/account/getAccount.mjs +1 -1
  137. package/out/methods/account/getAccountInfo.mjs +1 -1
  138. package/out/methods/account/getAddress.mjs +1 -1
  139. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  140. package/out/methods/account/getLatestNonce.mjs +1 -1
  141. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  142. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  143. package/out/methods/initApp/initApp.mjs +1 -1
  144. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  145. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  146. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  147. package/out/methods/network/getEgldLabel.mjs +1 -1
  148. package/out/methods/network/getExplorerAddress.mjs +1 -1
  149. package/out/methods/network/getNetworkConfig.mjs +1 -1
  150. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  151. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  152. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  153. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  154. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  155. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  156. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  157. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  158. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  159. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  160. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  161. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  162. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  163. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  164. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  165. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  166. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  167. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  168. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  169. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  170. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  171. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  172. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  173. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  174. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  175. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  176. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  177. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  178. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  179. package/out/providers/DappProvider/index.mjs +1 -1
  180. package/out/providers/ProviderFactory.mjs +1 -1
  181. package/out/providers/helpers/accountProvider.mjs +1 -1
  182. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  183. package/out/providers/helpers/restoreProvider.mjs +1 -1
  184. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  185. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  186. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  187. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  188. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  189. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  190. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  191. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  192. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  193. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  194. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  195. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  196. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  197. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  198. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  199. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  200. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  201. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  202. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  203. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  204. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  205. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  206. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  207. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  208. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  209. package/out/providers/strategies/helpers/index.mjs +1 -1
  210. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  211. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs +1 -1
  212. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.cjs.map +2 -2
  213. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  214. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  215. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  216. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  217. package/out/react/account/useGetAccount.mjs +1 -1
  218. package/out/react/account/useGetAccountInfo.mjs +1 -1
  219. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  220. package/out/react/account/useGetLatestNonce.mjs +1 -1
  221. package/out/react/index.mjs +1 -1
  222. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  223. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  224. package/out/react/store/getReactStore.mjs +1 -1
  225. package/out/react/store/useSelector.mjs +1 -1
  226. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  227. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  228. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  229. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  230. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  231. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  232. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  233. package/out/services/nativeAuth/index.mjs +1 -1
  234. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  235. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  236. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  237. package/out/store/actions/account/accountActions.mjs +1 -1
  238. package/out/store/actions/account/index.mjs +1 -1
  239. package/out/store/actions/cache/cacheActions.mjs +1 -1
  240. package/out/store/actions/cache/index.mjs +1 -1
  241. package/out/store/actions/config/configActions.mjs +1 -1
  242. package/out/store/actions/config/index.mjs +1 -1
  243. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  244. package/out/store/actions/network/index.mjs +1 -1
  245. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  246. package/out/store/actions/network/networkActions.mjs +1 -1
  247. package/out/store/actions/sharedActions/index.mjs +1 -1
  248. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  249. package/out/store/actions/toasts/index.mjs +1 -1
  250. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  251. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  252. package/out/store/actions/ui/index.mjs +1 -1
  253. package/out/store/actions/ui/uiActions.mjs +1 -1
  254. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  255. package/out/store/middleware/index.mjs +1 -1
  256. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  257. package/out/store/storage/index.mjs +1 -1
  258. package/out/store/storage/storageCallback.mjs +1 -1
  259. package/out/store/store.mjs +1 -1
  260. package/out/utils/ComponentFactory.mjs +1 -1
  261. package/out/utils/account/fetchAccount.mjs +1 -1
  262. package/out/utils/account/refreshAccount.mjs +1 -1
  263. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  264. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  265. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  266. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  267. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  268. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  269. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  270. package/out/utils/visual/switchTheme.mjs +1 -1
  271. package/out/utils/window/getIsInIframe.mjs +1 -1
  272. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  273. package/package.json +2 -2
  274. package/out/__chunks__/chunk-4G4G7FVT.mjs +0 -2
  275. package/out/__chunks__/chunk-AWODPMKF.mjs +0 -2
  276. package/out/__chunks__/chunk-I25KKLGU.mjs +0 -2
  277. package/out/__chunks__/chunk-KEZWPJRC.mjs +0 -2
  278. package/out/__chunks__/chunk-M3LLNTKM.mjs +0 -2
  279. package/out/__chunks__/chunk-NGF3A544.mjs +0 -2
  280. package/out/__chunks__/chunk-NNPFUDB7.mjs +0 -2
  281. package/out/__chunks__/chunk-NPNP2H3A.mjs +0 -2
  282. package/out/__chunks__/chunk-NXF3BPNL.mjs +0 -2
  283. package/out/__chunks__/chunk-OSOBELOT.mjs +0 -2
  284. package/out/__chunks__/chunk-OX3ABKOU.mjs +0 -2
  285. package/out/__chunks__/chunk-PYDTFFI4.mjs +0 -2
  286. package/out/__chunks__/chunk-QL6WH4QS.mjs +0 -2
  287. package/out/__chunks__/chunk-QQANPK2G.mjs +0 -2
  288. package/out/__chunks__/chunk-VBHP2IVI.mjs +0 -2
  289. package/out/__chunks__/chunk-ZP2JSMSQ.mjs +0 -2
  290. /package/out/__chunks__/{chunk-4AOBQXI3.mjs.map → chunk-22NBE3VD.mjs.map} +0 -0
  291. /package/out/__chunks__/{chunk-676U6OTI.mjs.map → chunk-2E2NCU47.mjs.map} +0 -0
  292. /package/out/__chunks__/{chunk-G6OHKF3V.mjs.map → chunk-2TCYFOMD.mjs.map} +0 -0
  293. /package/out/__chunks__/{chunk-VEIRZX44.mjs.map → chunk-3R3VXWC2.mjs.map} +0 -0
  294. /package/out/__chunks__/{chunk-V73QDUSC.mjs.map → chunk-3WX4MR4F.mjs.map} +0 -0
  295. /package/out/__chunks__/{chunk-JDKOXHUE.mjs.map → chunk-4LH5OPJN.mjs.map} +0 -0
  296. /package/out/__chunks__/{chunk-NNPFUDB7.mjs.map → chunk-55DSSFT2.mjs.map} +0 -0
  297. /package/out/__chunks__/{chunk-IHBIVBQ3.mjs.map → chunk-57IMV3XF.mjs.map} +0 -0
  298. /package/out/__chunks__/{chunk-V3ULNZJT.mjs.map → chunk-5JWQUNZY.mjs.map} +0 -0
  299. /package/out/__chunks__/{chunk-ZP2JSMSQ.mjs.map → chunk-5YCYE5MA.mjs.map} +0 -0
  300. /package/out/__chunks__/{chunk-OX3ABKOU.mjs.map → chunk-6BAQDYWA.mjs.map} +0 -0
  301. /package/out/__chunks__/{chunk-F75YW37Y.mjs.map → chunk-6MEASZPG.mjs.map} +0 -0
  302. /package/out/__chunks__/{chunk-B7CFQZKI.mjs.map → chunk-7ELS72QK.mjs.map} +0 -0
  303. /package/out/__chunks__/{chunk-JFJMW7YZ.mjs.map → chunk-A345VSGT.mjs.map} +0 -0
  304. /package/out/__chunks__/{chunk-RHYDUBKD.mjs.map → chunk-AR6HQ5FR.mjs.map} +0 -0
  305. /package/out/__chunks__/{chunk-JTI5OLEX.mjs.map → chunk-AZYMVDWU.mjs.map} +0 -0
  306. /package/out/__chunks__/{chunk-SW7NDWBA.mjs.map → chunk-B6CODV2A.mjs.map} +0 -0
  307. /package/out/__chunks__/{chunk-C2NRPSEA.mjs.map → chunk-BU4JQETJ.mjs.map} +0 -0
  308. /package/out/__chunks__/{chunk-AWODPMKF.mjs.map → chunk-CHF73P5H.mjs.map} +0 -0
  309. /package/out/__chunks__/{chunk-MN25YLTY.mjs.map → chunk-D43LEYIV.mjs.map} +0 -0
  310. /package/out/__chunks__/{chunk-F4LRBZHI.mjs.map → chunk-EEHG7FC3.mjs.map} +0 -0
  311. /package/out/__chunks__/{chunk-BYO4QPIX.mjs.map → chunk-EN4PQTRT.mjs.map} +0 -0
  312. /package/out/__chunks__/{chunk-QQANPK2G.mjs.map → chunk-ETA4R42O.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-4W5VY3GO.mjs.map → chunk-EZIUH4RK.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-4P6KVGFJ.mjs.map → chunk-FFGUC7S7.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-SQIVM23U.mjs.map → chunk-FMXCAN3M.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-LDPF47U7.mjs.map → chunk-GILGXF3U.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-7ZU5KDF4.mjs.map → chunk-H7BHTGW7.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-RBEU3I23.mjs.map → chunk-HDUHOYDI.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-GAO3N3BI.mjs.map → chunk-HEZLSKRN.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-HIDRVWOQ.mjs.map → chunk-HH6XW3S6.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-3B7DG5PU.mjs.map → chunk-IEXYINQQ.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-FUUOCOBX.mjs.map → chunk-IONBKMFW.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-6PHKMRFV.mjs.map → chunk-JEFEDCSS.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-PYDTFFI4.mjs.map → chunk-JVPQSBOX.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-4UNMUVTO.mjs.map → chunk-K3X454GT.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-C6H5TEAY.mjs.map → chunk-KKI3K4YH.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-M3LLNTKM.mjs.map → chunk-KQNCVEC3.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-35TLBLLZ.mjs.map → chunk-LCMNA7KW.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-4G4G7FVT.mjs.map → chunk-LGIXBYM3.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-OUYP2DZU.mjs.map → chunk-M6O2JENG.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-FQ6P5OK7.mjs.map → chunk-MBI2RTHM.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-FJW5NQC5.mjs.map → chunk-MFVKEPMI.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-XG2GIMBK.mjs.map → chunk-MKBRFW6F.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-KBUF3VYQ.mjs.map → chunk-N4OAQFDH.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-NPNP2H3A.mjs.map → chunk-NP2VNG62.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-JJRF4KKM.mjs.map → chunk-O6NZ6Z6B.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-MW6XCNWP.mjs.map → chunk-OHUSVHTC.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-KEZWPJRC.mjs.map → chunk-ORIRXUKE.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-IXYOEFTN.mjs.map → chunk-PG4PNSW6.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-SRPTHL6W.mjs.map → chunk-PKW4UGR5.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-EB6K5LCD.mjs.map → chunk-PLZG3X3K.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-DZZ5M34O.mjs.map → chunk-QD4CABEY.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-6B2GHZDF.mjs.map → chunk-QODHV6EH.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-M5JPM5BF.mjs.map → chunk-R2IQ32Q5.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-4EAIQB7E.mjs.map → chunk-RBSY7AZJ.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-NXF3BPNL.mjs.map → chunk-RLD5XV4S.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-OCXXTA4P.mjs.map → chunk-RVC6EIC7.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-B3PQJ4WY.mjs.map → chunk-SFK5O3FE.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-ZBXKGK25.mjs.map → chunk-SMXSHPXZ.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-D67JUKPD.mjs.map → chunk-SNEWHEX2.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-QL6WH4QS.mjs.map → chunk-SO4J6P3C.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-MN3XDS7Q.mjs.map → chunk-SOFJNMOQ.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-MKYGGOBL.mjs.map → chunk-SUKYJQTV.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-OSOBELOT.mjs.map → chunk-SURYSJAU.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-ODNGFTW5.mjs.map → chunk-TBSRXSFJ.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-EQBGROHI.mjs.map → chunk-TMLJELVN.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-FVVRPNSD.mjs.map → chunk-TP65TGJH.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-XIRJCDWC.mjs.map → chunk-TT5HX75E.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-BAWT2YA7.mjs.map → chunk-ULUUW4MT.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-LS4PX2PR.mjs.map → chunk-UU6WX5SY.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-TK7CPPUP.mjs.map → chunk-VAXNO6YD.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-IVM526MS.mjs.map → chunk-VJ3EQSMI.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-I25KKLGU.mjs.map → chunk-VJA2NSQ4.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-ZLOPHDVT.mjs.map → chunk-VZVYNN5W.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-7YCD5466.mjs.map → chunk-WFF2FARS.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-IWJRKPVP.mjs.map → chunk-WS7GSQIW.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-R5USHTAC.mjs.map → chunk-WTWUPX2O.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-YIMUSXYK.mjs.map → chunk-WX72WH5S.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-L3RER46P.mjs.map → chunk-WXAMLA7L.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-LDPXTCNA.mjs.map → chunk-XBKZZTGE.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-CXCWCLFJ.mjs.map → chunk-Y3IXSTCR.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-2FEH3E6U.mjs.map → chunk-Y3V3YLGE.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-CGBSNDVZ.mjs.map → chunk-YG3D4LLK.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-WGK62UNL.mjs.map → chunk-ZHJVRF45.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-CDOZBMWB.mjs.map → chunk-ZX7RZASL.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-VBHP2IVI.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
2
- //# sourceMappingURL=chunk-4AOBQXI3.mjs.map
1
+ import{a as e}from"./chunk-ZELPFF47.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map,n=3e3;export{r as a,i as b,p as c,n as d};
2
+ //# sourceMappingURL=chunk-22NBE3VD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-I25KKLGU.mjs";import{a as p}from"./chunk-EQBGROHI.mjs";import{a as O}from"./chunk-RHYDUBKD.mjs";import{a as M}from"./chunk-JJRF4KKM.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-6B2GHZDF.mjs";import{d as B}from"./chunk-3B7DG5PU.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-DZZ5M34O.mjs";import{a as d}from"./chunk-JDKOXHUE.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
2
- //# sourceMappingURL=chunk-676U6OTI.mjs.map
1
+ import{a as w}from"./chunk-VJA2NSQ4.mjs";import{a as p}from"./chunk-TMLJELVN.mjs";import{a as O}from"./chunk-AR6HQ5FR.mjs";import{a as M}from"./chunk-O6NZ6Z6B.mjs";import{k as I,l as F,n as N}from"./chunk-E2GGD7D4.mjs";import{a as b,b as C,d as g,e as v,g as E,h as y,i as S}from"./chunk-QODHV6EH.mjs";import{d as B}from"./chunk-IEXYINQQ.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-QD4CABEY.mjs";import{a as d}from"./chunk-4LH5OPJN.mjs";import A from"lodash.isequal";import l from"lodash.isequal";var m=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||c(),this.notificationsFeedManager=t.notificationsFeedManager||h.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let s=await this.createToastListElement();if(!s)return;this.eventBus=await s.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await d.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var u=class a{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||c(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new m({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:s,transactions:i},{toasts:e,transactions:o})=>{let n=!l(e.transactionToasts,s.transactionToasts),r=!l(o,i);(n||r)&&await this.updateTransactionToastsList(),!l(e.customToasts,s.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return a.instance||(a.instance=new a),a.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),i=s[t];if(!i)return!1;let{status:e}=i,o=N(e),n=F(e),r=I(e),T=n||r||o;return T?(this.successfulToastLifetime&&this.lifetimeManager.start(t),T):(this.lifetimeManager.stop(t),T)}async createTransactionToast(t,s){let i=E({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),i}async createCustomToast(t){let s=S(t);return await this.updateCustomToastList(),s}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:s}=t,{pendingTransactionToasts:i,completedTransactionToasts:e}=await p({store:t});this.transactionToasts=[...i,...e];for(let o of s.transactionToasts)this.handleCompletedTransaction(o.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let e="message"in s?{...s}:{...s,instantiateToastElement:b[s.toastId]};this.customToasts.push(e),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(y(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(i=>i.toastId===t)){this.lifetimeManager.stop(t);let i=C[t];return i?.(),g(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),v()}};var D="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",h=class a extends M{constructor(s){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=s||c(),this.data={...this.initialData}}static getInstance(){return a.instance||(a.instance=new a),a.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){u.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let i=this.store.subscribe(async({toasts:e,transactions:o},{toasts:n,transactions:r})=>{(!A(n.transactionToasts,e.transactionToasts)||!A(r,o))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(D,[i]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=u.getInstance();this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s}=this.store.getState(),{pendingTransactionToasts:i}=await p();this.data.pendingTransactions=i;let e=Object.keys(s).reduce((o,n)=>(["sent","pending"].includes(String(s[n].status))||(o[n]=s[n]),o),{});this.data.historicTransactions=await w.getTransactionsHistory({transactionsSessions:e}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){B(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};export{h as a,m as b,u as c};
2
+ //# sourceMappingURL=chunk-2E2NCU47.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-SQIVM23U.mjs";import{a as g}from"./chunk-OBIQ63DJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var N=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=l(h),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:m,timestamp:c}=n,p=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${m}.${r}.${p}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:f}};export{N as a};
2
- //# sourceMappingURL=chunk-G6OHKF3V.mjs.map
1
+ import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-FMXCAN3M.mjs";import{a as g}from"./chunk-OBIQ63DJ.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var N=h=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=l(h),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:m,timestamp:c}=n,p=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${m}.${r}.${p}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:f}};export{N as a};
2
+ //# sourceMappingURL=chunk-2TCYFOMD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-L3RER46P.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-3B7DG5PU.mjs";import{s as n}from"./chunk-DZZ5M34O.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
- //# sourceMappingURL=chunk-VEIRZX44.mjs.map
1
+ import{a as e}from"./chunk-WXAMLA7L.mjs";import{a as o}from"./chunk-PMHRZ5Y7.mjs";import{j as r}from"./chunk-E2GGD7D4.mjs";import{b as i}from"./chunk-IEXYINQQ.mjs";import{s as n}from"./chunk-QD4CABEY.mjs";async function E({transaction:a,sessionId:s}){let c=a.results?.find(t=>t?.returnMessage!=="");e({sessionId:s,transaction:{...a,status:"fail",inTransit:!1}});let{transactions:m}=n();m?.[s]?.transactions?.some(t=>r(t.status))||(i({sessionId:s,status:"fail",errorMessage:c?.returnMessage}),await o({sessionId:s,status:"fail"}))}export{E as a};
2
+ //# sourceMappingURL=chunk-3R3VXWC2.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as o}from"./chunk-4AOBQXI3.mjs";import{a as r}from"./chunk-4G4G7FVT.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
- //# sourceMappingURL=chunk-V73QDUSC.mjs.map
1
+ import{d as o}from"./chunk-22NBE3VD.mjs";import{a as r}from"./chunk-LGIXBYM3.mjs";var n=o/1e3;async function S({store:i,getStorageCallback:a}){if(a!==r)try{await new Promise((t,e)=>{i.persist.hasHydrated()&&t(),i.persist.onFinishHydration(()=>{t()}),setTimeout(()=>{e()},o)})}catch(t){console.warn(`Store rehydration timed out after ${n} seconds. Continuing initialization...`,t?.message)}}export{S as a};
2
+ //# sourceMappingURL=chunk-3WX4MR4F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-VBHP2IVI.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-JDKOXHUE.mjs.map
1
+ import{a as t}from"./chunk-ZELPFF47.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-4LH5OPJN.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-QD4CABEY.mjs";import{a as t}from"./chunk-FK6DWWZF.mjs";function n(r=o()){return t(r)}export{n as a};
2
+ //# sourceMappingURL=chunk-55DSSFT2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-VBHP2IVI.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
- //# sourceMappingURL=chunk-IHBIVBQ3.mjs.map
1
+ import{a as e}from"./chunk-ZELPFF47.mjs";var t=()=>{if(!e)return"";try{let r=e.document?.referrer;return r?new URL(r).origin:""}catch(r){return console.error(r),""}};export{t as a};
2
+ //# sourceMappingURL=chunk-57IMV3XF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-JJRF4KKM.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-V3ULNZJT.mjs.map
1
+ import{a as r}from"./chunk-O6NZ6Z6B.mjs";import{e}from"./chunk-QNYO7NI5.mjs";var o=class i extends r{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._gasPriceOptionMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,gasPriceOption:0,gasPriceOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){a.filter(t=>t!=null).forEach(t=>{let s=t?Number(t.gasPrice):1e9;this.updateGasPriceMap({nonce:Number(t.nonce),gasPriceOption:s,initialGasPrice:s})});let n=Number(a[0]?.gasPrice)||1e9;this.updateCommonData({gasPriceOption:n})}updateGasPriceMap({nonce:a,gasPriceOption:n,initialGasPrice:t}){this._gasPriceOptionMap[a]={...this._gasPriceOptionMap[a],gasPriceOption:n},t&&(this._gasPriceOptionMap[a].initialGasPrice=t)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,n){switch(a){case"NonFungibleESDT":this.data.nftTransaction=n,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=n,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get getGasPriceOptionMap(){return this._gasPriceOptionMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-5JWQUNZY.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as t}from"./chunk-QD4CABEY.mjs";var l=e=>t().setState(({ui:a})=>{a.isSidePanelOpen=e},!1,{type:"setIsSidePanelOpen",payload:{value:e}});export{l as a};
2
+ //# sourceMappingURL=chunk-5YCYE5MA.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-QD4CABEY.mjs";import{f as t}from"./chunk-FK6DWWZF.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-6BAQDYWA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-F4LRBZHI.mjs";import{b as r}from"./chunk-OCXXTA4P.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-DZZ5M34O.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
- //# sourceMappingURL=chunk-F75YW37Y.mjs.map
1
+ import{a as n}from"./chunk-EEHG7FC3.mjs";import{b as r}from"./chunk-RVC6EIC7.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-QD4CABEY.mjs";async function M({shard:t,apiAddress:s}){if(t!=null)try{let a=await n(t,s);if(!a?.[t]?.lastBlock)return;let e=i(o());(!e.gasStationMetadata||!e.gasStationMetadata[t]||e.gasStationMetadata[t].lastBlock!==a[t].lastBlock)&&r({...e,gasStationMetadata:{...e.gasStationMetadata,...a}})}catch(a){console.error("Error fetching gas station metadata:",a)}}export{M as a};
2
+ //# sourceMappingURL=chunk-6MEASZPG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-ODNGFTW5.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
- //# sourceMappingURL=chunk-B7CFQZKI.mjs.map
1
+ import{a as n}from"./chunk-TBSRXSFJ.mjs";import{h as e}from"./chunk-2JKCBTYK.mjs";import i from"axios";async function u({url:o=e,baseURL:t}){let c=`${n(t)}/${o}`;try{let{data:r}=await i.get(c);return r}catch(r){return console.error("err fetching economics info",r),null}}export{u as a};
2
+ //# sourceMappingURL=chunk-7ELS72QK.mjs.map
@@ -1,2 +1,2 @@
1
- import{i as g}from"./chunk-6B2GHZDF.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
2
- //# sourceMappingURL=chunk-JFJMW7YZ.mjs.map
1
+ import{i as g}from"./chunk-QODHV6EH.mjs";import{a as i,b as a,g as c}from"./chunk-M6MN4RXG.mjs";var s={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${a}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${i}-${Date.now()}`}},m={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},E=n=>{for(let[r,e]of Object.entries(m))if(n.includes(r))return e;return"Error when signing"};function O(n,r="error"){let e=n?.message,o=E(e),t=o!=="Error when signing"?"warning":r,l=Object.keys(s).includes(t)?s[t]:s.error,{toastId:T,iconClassName:d,title:u}=l;return g({toastId:T,duration:1e4,icon:"close",iconClassName:d,message:o,title:u}),o}export{O as a};
2
+ //# sourceMappingURL=chunk-A345VSGT.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as U}from"./chunk-RLD5XV4S.mjs";import{a as B}from"./chunk-GBDHEWNQ.mjs";import{a as $}from"./chunk-TP65TGJH.mjs";import{a as _}from"./chunk-CB4IL76J.mjs";import{a as j}from"./chunk-7Z7IX367.mjs";import{a as z}from"./chunk-VCQBYNNS.mjs";import{a as V}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-OMBZCVQZ.mjs";import{l as w}from"./chunk-ULUUW4MT.mjs";import{a as M}from"./chunk-YGI3KXMZ.mjs";import{a as v}from"./chunk-KKI3K4YH.mjs";import{a as O}from"./chunk-RYIJWGFA.mjs";import{k as x}from"./chunk-QNYO7NI5.mjs";import{a as A}from"./chunk-YJCTRUJT.mjs";import{a as h,c as G,f}from"./chunk-PJWJZHIS.mjs";import{a as L}from"./chunk-2JKCBTYK.mjs";import{c as F}from"./chunk-PWAP64SN.mjs";import{a as C}from"./chunk-ZELPFF47.mjs";import{BigNumber as St}from"bignumber.js";async function qt({allTransactions:u,currentScreenIndex:s,egldLabel:n,network:o,gasPriceData:T,price:S,address:m,username:q,shard:H,signedIndexes:e,parsedTransactionsByDataField:K}){let c=u[s],W=c?.transaction?.sender.toString(),p=c?.transaction,i=p?.toPlainObject(),D=null,y=null,t=await $({egldLabel:n,sender:W,apiAddress:o.apiAddress,address:m,parsedTransactionsByDataField:K})(c),d=!t?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=t?.transactionTokenInfo??{},J=g&&l&&l.length>0?`${g}-${l}`:g,Q=await v({tokenId:J}),{esdtPrice:X,tokenDecimals:Y,type:r,identifier:a,tokenImageUrl:Z}=Q;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:a,amount:I,imageURL:Z};else{let E=({addCommas:Tt})=>f({input:d?p.value.toString():I,decimals:d?Number(o.decimals):Y,digits:Number(o.digits),addCommas:Tt}),gt=E({addCommas:!0}),lt=E({addCommas:!1}),ft=Number(d?S:X),ut=M({amount:lt,usd:ft,addEqualSign:!0});D={identifier:(a===x?n:a)??n,amount:gt,usdValue:ut}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=R({transaction:p,price:S}),ot=B({shard:H,initialGasPrice:T.initialGasPrice,transaction:i,gasStationMetadata:o.gasStationMetadata}),{gasPriceOption:k}=T,et=w().getType(),it=O(et),N=u.length,rt=e.length>0?e[e.length-1]+1:0,P=F(i?.data??""),b=V(t?.transactionTokenInfo),at=_({data:P,identifier:a,highlight:b}),st=U(),mt=A({to:`/${L}/${m}`,explorerAddress:st}),ct=N===1||t?.needsSigning&&!e.includes(s),pt=f({input:k.toString(),decimals:G,addCommas:!0,digits:h}),dt=new St(i.gasLimit).toFormat({decimalSeparator:".",groupSeparator:",",groupSize:3});return{commonData:{receiver:i.receiver.toString(),data:P,decodedData:at,gasPrice:pt,gasLimit:dt,explorerLink:mt,gasPriceOption:k,gasPriceOptions:ot,egldLabel:n,tokenType:j(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:s,currentIndexToSign:rt,highlight:b,scCall:z(t?.transactionTokenInfo),needsSigning:ct,isEditable:t?.needsSigning,providerName:it,address:m,username:q,origin:C.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{qt as a};
2
+ //# sourceMappingURL=chunk-A46HPE6M.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.ts"],
4
- "sourcesContent": ["import { BigNumber } from 'bignumber.js';\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls/endpoints';\nimport { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { MULTI_TRANSFER_EGLD_TOKEN } from 'constants/mvx.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport {\n FungibleTransactionType,\n ISignTransactionsPanelCommonData\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { NetworkType } from 'types/network.types';\nimport { NftEnumType } from 'types/tokens.types';\nimport {\n MultiSignTransactionType,\n TransactionDataTokenType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getFeeData } from '../getFeeData';\nimport { getAllDecodedFormats } from './helpers/decodeDataField';\nimport { getExtractTransactionsInfo } from './helpers/getExtractTransactionsInfo';\nimport { getGasPriceOptions } from './helpers/getGasPriceOptions';\nimport { getHighlight } from './helpers/getHighlight';\nimport { getScCall } from './helpers/getScCall';\nimport { getTokenType } from './helpers/getTokenType';\n\nexport type GetCommonDataPropsType = {\n allTransactions: MultiSignTransactionType[];\n currentScreenIndex: number;\n price?: number;\n network: NetworkType;\n signedIndexes: number[];\n egldLabel: string;\n address: string;\n shard?: number;\n username?: string;\n parsedTransactionsByDataField: Record<string, TransactionDataTokenType>;\n gasPriceData: {\n initialGasPrice: number;\n gasPriceOption: number;\n };\n};\n\nexport async function getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData,\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n}: GetCommonDataPropsType) {\n const currentTransaction = allTransactions[currentScreenIndex];\n const sender = currentTransaction?.transaction?.sender.toString();\n const transaction = currentTransaction?.transaction;\n const plainTransaction = transaction?.toPlainObject();\n\n let tokenTransaction: {\n identifier?: string;\n amount: string;\n usdValue: string;\n } | null = null;\n\n let fungibleTransaction:\n | (FungibleTransactionType & {\n type: NftEnumType.NonFungibleESDT | NftEnumType.SemiFungibleESDT;\n })\n | null = null;\n\n const extractTransactionsInfo = getExtractTransactionsInfo({\n egldLabel,\n sender,\n apiAddress: network.apiAddress,\n address,\n parsedTransactionsByDataField\n });\n\n const txInfo = await extractTransactionsInfo(currentTransaction);\n\n const isEgld = !txInfo?.transactionTokenInfo?.tokenId;\n const { tokenId, nonce, amount = '' } = txInfo?.transactionTokenInfo ?? {};\n\n const isNftOrSft = tokenId && nonce && nonce.length > 0;\n const tokenIdForTokenDetails = isNftOrSft ? `${tokenId}-${nonce}` : tokenId;\n\n const tokenDetails = await getPersistedTokenDetails({\n tokenId: tokenIdForTokenDetails\n });\n\n const { esdtPrice, tokenDecimals, type, identifier, tokenImageUrl } =\n tokenDetails;\n\n const isNft =\n type === NftEnumType.SemiFungibleESDT ||\n type === NftEnumType.NonFungibleESDT;\n\n if (isNft) {\n fungibleTransaction = {\n type,\n identifier,\n amount,\n imageURL: tokenImageUrl\n };\n } else {\n const getFormattedAmount = ({ addCommas }: { addCommas: boolean }) =>\n formatAmount({\n input: isEgld ? transaction.value.toString() : amount,\n decimals: isEgld ? Number(network.decimals) : tokenDecimals,\n digits: Number(network.digits),\n showLastNonZeroDecimal: false,\n addCommas\n });\n\n const formattedAmount = getFormattedAmount({ addCommas: true });\n const rawAmount = getFormattedAmount({ addCommas: false });\n const tokenPrice = Number(isEgld ? price : esdtPrice);\n const usdValue = getUsdValue({\n amount: rawAmount,\n usd: tokenPrice,\n addEqualSign: true\n });\n\n const esdtIdentifier =\n identifier === MULTI_TRANSFER_EGLD_TOKEN ? egldLabel : identifier;\n tokenTransaction = {\n identifier: esdtIdentifier ?? egldLabel,\n amount: formattedAmount,\n usdValue\n };\n }\n\n const { feeLimitFormatted, feeInFiatLimit } = getFeeData({\n transaction,\n price\n });\n\n const gasPriceOptions = getGasPriceOptions({\n shard,\n initialGasPrice: gasPriceData.initialGasPrice,\n transaction: plainTransaction,\n gasStationMetadata: network.gasStationMetadata\n });\n\n const { gasPriceOption } = gasPriceData;\n const provider = getAccountProvider();\n const providerType = provider.getType();\n const providerName = capitalize(providerType as string);\n const transactionsCount = allTransactions.length;\n\n const currentIndexToSign =\n signedIndexes.length > 0 ? signedIndexes[signedIndexes.length - 1] + 1 : 0;\n\n const data = decodeBase64(plainTransaction?.data ?? '');\n const highlight = getHighlight(txInfo?.transactionTokenInfo);\n const decodedData = getAllDecodedFormats({ data, identifier, highlight });\n const explorerAddress = getExplorerAddress();\n const explorerLink = getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${address}`,\n explorerAddress\n });\n\n const needsSigning =\n transactionsCount === 1 ||\n (txInfo?.needsSigning && !signedIndexes.includes(currentScreenIndex));\n\n const formattedGasPrice = formatAmount({\n input: gasPriceOption.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n const formattedGasLimit = new BigNumber(plainTransaction.gasLimit).toFormat({\n decimalSeparator: '.',\n groupSeparator: ',',\n groupSize: 3\n });\n\n const commonData: ISignTransactionsPanelCommonData = {\n receiver: plainTransaction.receiver.toString(),\n data,\n decodedData,\n gasPrice: formattedGasPrice,\n gasLimit: formattedGasLimit,\n explorerLink,\n gasPriceOption,\n gasPriceOptions,\n egldLabel,\n tokenType: getTokenType(type),\n feeLimit: feeLimitFormatted,\n feeInFiatLimit,\n transactionsCount,\n currentIndex: currentScreenIndex,\n currentIndexToSign,\n highlight,\n scCall: getScCall(txInfo?.transactionTokenInfo),\n needsSigning,\n isEditable: txInfo?.needsSigning,\n providerName,\n address,\n username,\n origin: safeWindow.location?.origin\n };\n\n return { commonData, tokenTransaction, fungibleTransaction };\n}\n"],
5
- "mappings": "2uBAAA,OAAS,aAAAA,OAAiB,eA+C1B,eAAsBC,GAAc,CAClC,gBAAAC,EACA,mBAAAC,EACA,UAAAC,EACA,QAAAC,EACA,aAAAC,EACA,MAAAC,EACA,QAAAC,EACA,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,8BAAAC,CACF,EAA2B,CACzB,IAAMC,EAAqBX,EAAgBC,CAAkB,EACvDW,EAASD,GAAoB,aAAa,OAAO,SAAS,EAC1DE,EAAcF,GAAoB,YAClCG,EAAmBD,GAAa,cAAc,EAEhDE,EAIO,KAEPC,EAIO,KAULC,EAAS,MARiBC,EAA2B,CACzD,UAAAhB,EACA,OAAAU,EACA,WAAYT,EAAQ,WACpB,QAAAG,EACA,8BAAAI,CACF,CAAC,EAE4CC,CAAkB,EAEzDQ,EAAS,CAACF,GAAQ,sBAAsB,QACxC,CAAE,QAAAG,EAAS,MAAAC,EAAO,OAAAC,EAAS,EAAG,EAAIL,GAAQ,sBAAwB,CAAC,EAGnEM,EADaH,GAAWC,GAASA,EAAM,OAAS,EACV,GAAGD,CAAO,IAAIC,CAAK,GAAKD,EAE9DI,EAAe,MAAMC,EAAyB,CAClD,QAASF,CACX,CAAC,EAEK,CAAE,UAAAG,EAAW,cAAAC,EAAe,KAAAC,EAAM,WAAAC,EAAY,cAAAC,CAAc,EAChEN,EAMF,GAHEI,wBACAA,sBAGAZ,EAAsB,CACpB,KAAAY,EACA,WAAAC,EACA,OAAAP,EACA,SAAUQ,CACZ,MACK,CACL,IAAMC,EAAqB,CAAC,CAAE,UAAAC,EAAU,IACtCC,EAAa,CACX,MAAOd,EAASN,EAAY,MAAM,SAAS,EAAIS,EAC/C,SAAUH,EAAS,OAAOhB,EAAQ,QAAQ,EAAIwB,EAC9C,OAAQ,OAAOxB,EAAQ,MAAM,EAC7B,uBAAwB,GACxB,UAAA6B,EACF,CAAC,EAEGE,GAAkBH,EAAmB,CAAE,UAAW,EAAK,CAAC,EACxDI,GAAYJ,EAAmB,CAAE,UAAW,EAAM,CAAC,EACnDK,GAAa,OAAOjB,EAASd,EAAQqB,CAAS,EAC9CW,GAAWC,EAAY,CAC3B,OAAQH,GACR,IAAKC,GACL,aAAc,EAChB,CAAC,EAIDrB,EAAmB,CACjB,YAFAc,IAAeU,EAA4BrC,EAAY2B,IAEzB3B,EAC9B,OAAQgC,GACR,SAAAG,EACF,CACF,CAEA,GAAM,CAAE,kBAAAG,GAAmB,eAAAC,EAAe,EAAIC,EAAW,CACvD,YAAA7B,EACA,MAAAR,CACF,CAAC,EAEKsC,GAAkBC,EAAmB,CACzC,MAAApC,EACA,gBAAiBJ,EAAa,gBAC9B,YAAaU,EACb,mBAAoBX,EAAQ,kBAC9B,CAAC,EAEK,CAAE,eAAA0C,CAAe,EAAIzC,EAErB0C,GADWC,EAAmB,EACN,QAAQ,EAChCC,GAAeC,EAAWH,EAAsB,EAChDI,EAAoBlD,EAAgB,OAEpCmD,GACJ1C,EAAc,OAAS,EAAIA,EAAcA,EAAc,OAAS,CAAC,EAAI,EAAI,EAErE2C,EAAOC,EAAavC,GAAkB,MAAQ,EAAE,EAChDwC,EAAYC,EAAatC,GAAQ,oBAAoB,EACrDuC,GAAcC,EAAqB,CAAE,KAAAL,EAAM,WAAAvB,EAAY,UAAAyB,CAAU,CAAC,EAClEI,GAAkBC,EAAmB,EACrCC,GAAeC,EAAgB,CACnC,GAAI,IAAIC,CAAiB,IAAIxD,CAAO,GACpC,gBAAAoD,EACF,CAAC,EAEKK,GACJb,IAAsB,GACrBjC,GAAQ,cAAgB,CAACR,EAAc,SAASR,CAAkB,EAE/D+D,GAAoB/B,EAAa,CACrC,MAAOY,EAAe,SAAS,EAC/B,SAAUoB,EACV,UAAW,GACX,OAAQC,CACV,CAAC,EAEKC,GAAoB,IAAIC,GAAUtD,EAAiB,QAAQ,EAAE,SAAS,CAC1E,iBAAkB,IAClB,eAAgB,IAChB,UAAW,CACb,CAAC,EA4BD,MAAO,CAAE,WA1B4C,CACnD,SAAUA,EAAiB,SAAS,SAAS,EAC7C,KAAAsC,EACA,YAAAI,GACA,SAAUQ,GACV,SAAUG,GACV,aAAAP,GACA,eAAAf,EACA,gBAAAF,GACA,UAAAzC,EACA,UAAWmE,EAAazC,CAAI,EAC5B,SAAUY,GACV,eAAAC,GACA,kBAAAS,EACA,aAAcjD,EACd,mBAAAkD,GACA,UAAAG,EACA,OAAQgB,EAAUrD,GAAQ,oBAAoB,EAC9C,aAAA8C,GACA,WAAY9C,GAAQ,aACpB,aAAA+B,GACA,QAAA1C,EACA,SAAAC,EACA,OAAQgE,EAAW,UAAU,MAC/B,EAEqB,iBAAAxD,EAAkB,oBAAAC,CAAoB,CAC7D",
4
+ "sourcesContent": ["import { BigNumber } from 'bignumber.js';\nimport { ACCOUNTS_ENDPOINT } from 'apiCalls/endpoints';\nimport { getPersistedTokenDetails } from 'apiCalls/tokens/getPersistedTokenDetails';\nimport { MULTI_TRANSFER_EGLD_TOKEN } from 'constants/mvx.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport {\n FungibleTransactionType,\n ISignTransactionsPanelCommonData\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getExplorerAddress } from 'methods/network/getExplorerAddress';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { NetworkType } from 'types/network.types';\nimport { NftEnumType } from 'types/tokens.types';\nimport {\n MultiSignTransactionType,\n TransactionDataTokenType\n} from 'types/transactions.types';\nimport { decodeBase64 } from 'utils/decoders/base64Utils';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getUsdValue } from 'utils/operations/getUsdValue';\nimport { getExplorerLink } from 'utils/transactions/getExplorerLink';\nimport { getFeeData } from '../getFeeData';\nimport { getAllDecodedFormats } from './helpers/decodeDataField';\nimport { getExtractTransactionsInfo } from './helpers/getExtractTransactionsInfo';\nimport { getGasPriceOptions } from './helpers/getGasPriceOptions';\nimport { getHighlight } from './helpers/getHighlight';\nimport { getScCall } from './helpers/getScCall';\nimport { getTokenType } from './helpers/getTokenType';\n\nexport type GetCommonDataPropsType = {\n allTransactions: MultiSignTransactionType[];\n currentScreenIndex: number;\n price?: number;\n network: NetworkType;\n signedIndexes: number[];\n egldLabel: string;\n address: string;\n shard?: number;\n username?: string;\n parsedTransactionsByDataField: Record<string, TransactionDataTokenType>;\n gasPriceData: {\n initialGasPrice: number;\n gasPriceOption: number;\n };\n};\n\nexport async function getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData,\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n}: GetCommonDataPropsType) {\n const currentTransaction = allTransactions[currentScreenIndex];\n const sender = currentTransaction?.transaction?.sender.toString();\n const transaction = currentTransaction?.transaction;\n const plainTransaction = transaction?.toPlainObject();\n\n let tokenTransaction: {\n identifier?: string;\n amount: string;\n usdValue: string;\n } | null = null;\n\n let fungibleTransaction:\n | (FungibleTransactionType & {\n type: NftEnumType.NonFungibleESDT | NftEnumType.SemiFungibleESDT;\n })\n | null = null;\n\n const extractTransactionsInfo = getExtractTransactionsInfo({\n egldLabel,\n sender,\n apiAddress: network.apiAddress,\n address,\n parsedTransactionsByDataField\n });\n\n const txInfo = await extractTransactionsInfo(currentTransaction);\n\n const isEgld = !txInfo?.transactionTokenInfo?.tokenId;\n const { tokenId, nonce, amount = '' } = txInfo?.transactionTokenInfo ?? {};\n\n const isNftOrSft = tokenId && nonce && nonce.length > 0;\n const tokenIdForTokenDetails = isNftOrSft ? `${tokenId}-${nonce}` : tokenId;\n\n const tokenDetails = await getPersistedTokenDetails({\n tokenId: tokenIdForTokenDetails\n });\n\n const { esdtPrice, tokenDecimals, type, identifier, tokenImageUrl } =\n tokenDetails;\n\n const isNft =\n type === NftEnumType.SemiFungibleESDT ||\n type === NftEnumType.NonFungibleESDT;\n\n if (isNft) {\n fungibleTransaction = {\n type,\n identifier,\n amount,\n imageURL: tokenImageUrl\n };\n } else {\n const getFormattedAmount = ({ addCommas }: { addCommas: boolean }) =>\n formatAmount({\n input: isEgld ? transaction.value.toString() : amount,\n decimals: isEgld ? Number(network.decimals) : tokenDecimals,\n digits: Number(network.digits),\n addCommas\n });\n\n const formattedAmount = getFormattedAmount({ addCommas: true });\n const rawAmount = getFormattedAmount({ addCommas: false });\n const tokenPrice = Number(isEgld ? price : esdtPrice);\n const usdValue = getUsdValue({\n amount: rawAmount,\n usd: tokenPrice,\n addEqualSign: true\n });\n\n const esdtIdentifier =\n identifier === MULTI_TRANSFER_EGLD_TOKEN ? egldLabel : identifier;\n tokenTransaction = {\n identifier: esdtIdentifier ?? egldLabel,\n amount: formattedAmount,\n usdValue\n };\n }\n\n const { feeLimitFormatted, feeInFiatLimit } = getFeeData({\n transaction,\n price\n });\n\n const gasPriceOptions = getGasPriceOptions({\n shard,\n initialGasPrice: gasPriceData.initialGasPrice,\n transaction: plainTransaction,\n gasStationMetadata: network.gasStationMetadata\n });\n\n const { gasPriceOption } = gasPriceData;\n const provider = getAccountProvider();\n const providerType = provider.getType();\n const providerName = capitalize(providerType as string);\n const transactionsCount = allTransactions.length;\n\n const currentIndexToSign =\n signedIndexes.length > 0 ? signedIndexes[signedIndexes.length - 1] + 1 : 0;\n\n const data = decodeBase64(plainTransaction?.data ?? '');\n const highlight = getHighlight(txInfo?.transactionTokenInfo);\n const decodedData = getAllDecodedFormats({ data, identifier, highlight });\n const explorerAddress = getExplorerAddress();\n const explorerLink = getExplorerLink({\n to: `/${ACCOUNTS_ENDPOINT}/${address}`,\n explorerAddress\n });\n\n const needsSigning =\n transactionsCount === 1 ||\n (txInfo?.needsSigning && !signedIndexes.includes(currentScreenIndex));\n\n const formattedGasPrice = formatAmount({\n input: gasPriceOption.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n const formattedGasLimit = new BigNumber(plainTransaction.gasLimit).toFormat({\n decimalSeparator: '.',\n groupSeparator: ',',\n groupSize: 3\n });\n\n const commonData: ISignTransactionsPanelCommonData = {\n receiver: plainTransaction.receiver.toString(),\n data,\n decodedData,\n gasPrice: formattedGasPrice,\n gasLimit: formattedGasLimit,\n explorerLink,\n gasPriceOption,\n gasPriceOptions,\n egldLabel,\n tokenType: getTokenType(type),\n feeLimit: feeLimitFormatted,\n feeInFiatLimit,\n transactionsCount,\n currentIndex: currentScreenIndex,\n currentIndexToSign,\n highlight,\n scCall: getScCall(txInfo?.transactionTokenInfo),\n needsSigning,\n isEditable: txInfo?.needsSigning,\n providerName,\n address,\n username,\n origin: safeWindow.location?.origin\n };\n\n return { commonData, tokenTransaction, fungibleTransaction };\n}\n"],
5
+ "mappings": "2uBAAA,OAAS,aAAAA,OAAiB,eA+C1B,eAAsBC,GAAc,CAClC,gBAAAC,EACA,mBAAAC,EACA,UAAAC,EACA,QAAAC,EACA,aAAAC,EACA,MAAAC,EACA,QAAAC,EACA,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,8BAAAC,CACF,EAA2B,CACzB,IAAMC,EAAqBX,EAAgBC,CAAkB,EACvDW,EAASD,GAAoB,aAAa,OAAO,SAAS,EAC1DE,EAAcF,GAAoB,YAClCG,EAAmBD,GAAa,cAAc,EAEhDE,EAIO,KAEPC,EAIO,KAULC,EAAS,MARiBC,EAA2B,CACzD,UAAAhB,EACA,OAAAU,EACA,WAAYT,EAAQ,WACpB,QAAAG,EACA,8BAAAI,CACF,CAAC,EAE4CC,CAAkB,EAEzDQ,EAAS,CAACF,GAAQ,sBAAsB,QACxC,CAAE,QAAAG,EAAS,MAAAC,EAAO,OAAAC,EAAS,EAAG,EAAIL,GAAQ,sBAAwB,CAAC,EAGnEM,EADaH,GAAWC,GAASA,EAAM,OAAS,EACV,GAAGD,CAAO,IAAIC,CAAK,GAAKD,EAE9DI,EAAe,MAAMC,EAAyB,CAClD,QAASF,CACX,CAAC,EAEK,CAAE,UAAAG,EAAW,cAAAC,EAAe,KAAAC,EAAM,WAAAC,EAAY,cAAAC,CAAc,EAChEN,EAMF,GAHEI,wBACAA,sBAGAZ,EAAsB,CACpB,KAAAY,EACA,WAAAC,EACA,OAAAP,EACA,SAAUQ,CACZ,MACK,CACL,IAAMC,EAAqB,CAAC,CAAE,UAAAC,EAAU,IACtCC,EAAa,CACX,MAAOd,EAASN,EAAY,MAAM,SAAS,EAAIS,EAC/C,SAAUH,EAAS,OAAOhB,EAAQ,QAAQ,EAAIwB,EAC9C,OAAQ,OAAOxB,EAAQ,MAAM,EAC7B,UAAA6B,EACF,CAAC,EAEGE,GAAkBH,EAAmB,CAAE,UAAW,EAAK,CAAC,EACxDI,GAAYJ,EAAmB,CAAE,UAAW,EAAM,CAAC,EACnDK,GAAa,OAAOjB,EAASd,EAAQqB,CAAS,EAC9CW,GAAWC,EAAY,CAC3B,OAAQH,GACR,IAAKC,GACL,aAAc,EAChB,CAAC,EAIDrB,EAAmB,CACjB,YAFAc,IAAeU,EAA4BrC,EAAY2B,IAEzB3B,EAC9B,OAAQgC,GACR,SAAAG,EACF,CACF,CAEA,GAAM,CAAE,kBAAAG,GAAmB,eAAAC,EAAe,EAAIC,EAAW,CACvD,YAAA7B,EACA,MAAAR,CACF,CAAC,EAEKsC,GAAkBC,EAAmB,CACzC,MAAApC,EACA,gBAAiBJ,EAAa,gBAC9B,YAAaU,EACb,mBAAoBX,EAAQ,kBAC9B,CAAC,EAEK,CAAE,eAAA0C,CAAe,EAAIzC,EAErB0C,GADWC,EAAmB,EACN,QAAQ,EAChCC,GAAeC,EAAWH,EAAsB,EAChDI,EAAoBlD,EAAgB,OAEpCmD,GACJ1C,EAAc,OAAS,EAAIA,EAAcA,EAAc,OAAS,CAAC,EAAI,EAAI,EAErE2C,EAAOC,EAAavC,GAAkB,MAAQ,EAAE,EAChDwC,EAAYC,EAAatC,GAAQ,oBAAoB,EACrDuC,GAAcC,EAAqB,CAAE,KAAAL,EAAM,WAAAvB,EAAY,UAAAyB,CAAU,CAAC,EAClEI,GAAkBC,EAAmB,EACrCC,GAAeC,EAAgB,CACnC,GAAI,IAAIC,CAAiB,IAAIxD,CAAO,GACpC,gBAAAoD,EACF,CAAC,EAEKK,GACJb,IAAsB,GACrBjC,GAAQ,cAAgB,CAACR,EAAc,SAASR,CAAkB,EAE/D+D,GAAoB/B,EAAa,CACrC,MAAOY,EAAe,SAAS,EAC/B,SAAUoB,EACV,UAAW,GACX,OAAQC,CACV,CAAC,EAEKC,GAAoB,IAAIC,GAAUtD,EAAiB,QAAQ,EAAE,SAAS,CAC1E,iBAAkB,IAClB,eAAgB,IAChB,UAAW,CACb,CAAC,EA4BD,MAAO,CAAE,WA1B4C,CACnD,SAAUA,EAAiB,SAAS,SAAS,EAC7C,KAAAsC,EACA,YAAAI,GACA,SAAUQ,GACV,SAAUG,GACV,aAAAP,GACA,eAAAf,EACA,gBAAAF,GACA,UAAAzC,EACA,UAAWmE,EAAazC,CAAI,EAC5B,SAAUY,GACV,eAAAC,GACA,kBAAAS,EACA,aAAcjD,EACd,mBAAAkD,GACA,UAAAG,EACA,OAAQgB,EAAUrD,GAAQ,oBAAoB,EAC9C,aAAA8C,GACA,WAAY9C,GAAQ,aACpB,aAAA+B,GACA,QAAA1C,EACA,SAAAC,EACA,OAAQgE,EAAW,UAAU,MAC/B,EAEqB,iBAAAxD,EAAkB,oBAAAC,CAAoB,CAC7D",
6
6
  "names": ["BigNumber", "getCommonData", "allTransactions", "currentScreenIndex", "egldLabel", "network", "gasPriceData", "price", "address", "username", "shard", "signedIndexes", "parsedTransactionsByDataField", "currentTransaction", "sender", "transaction", "plainTransaction", "tokenTransaction", "fungibleTransaction", "txInfo", "getExtractTransactionsInfo", "isEgld", "tokenId", "nonce", "amount", "tokenIdForTokenDetails", "tokenDetails", "getPersistedTokenDetails", "esdtPrice", "tokenDecimals", "type", "identifier", "tokenImageUrl", "getFormattedAmount", "addCommas", "formatAmount", "formattedAmount", "rawAmount", "tokenPrice", "usdValue", "getUsdValue", "MULTI_TRANSFER_EGLD_TOKEN", "feeLimitFormatted", "feeInFiatLimit", "getFeeData", "gasPriceOptions", "getGasPriceOptions", "gasPriceOption", "providerType", "getAccountProvider", "providerName", "capitalize", "transactionsCount", "currentIndexToSign", "data", "decodeBase64", "highlight", "getHighlight", "decodedData", "getAllDecodedFormats", "explorerAddress", "getExplorerAddress", "explorerLink", "getExplorerLink", "ACCOUNTS_ENDPOINT", "needsSigning", "formattedGasPrice", "DECIMALS", "DIGITS", "formattedGasLimit", "BigNumber", "getTokenType", "getScCall", "safeWindow"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{b as s,d as i,h as o}from"./chunk-6B2GHZDF.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
- //# sourceMappingURL=chunk-RHYDUBKD.mjs.map
1
+ import{b as s,d as i,h as o}from"./chunk-QODHV6EH.mjs";var r=1e4,u=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=r;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let e=setTimeout(()=>{o(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,e)};this.startWithCustomDuration=(t,e)=>{if(this.stop(t),e<=0)return;let a=setTimeout(()=>{i(t);let n=s[t];n?.()},e);this.timeoutIntervals.set(t,a)};this.stop=t=>{let e=this.timeoutIntervals.get(t);e&&(clearTimeout(e),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??r}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};export{u as a};
2
+ //# sourceMappingURL=chunk-AR6HQ5FR.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-TK7CPPUP.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{T as a};
2
- //# sourceMappingURL=chunk-JTI5OLEX.mjs.map
1
+ import{a as e}from"./chunk-VAXNO6YD.mjs";var T=async a=>{let n=a.map(s=>s.hash),r=await e(n);return a.map(s=>{let t=r.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{T as a};
2
+ //# sourceMappingURL=chunk-AZYMVDWU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-MKYGGOBL.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-TWYGNEQS.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{g as S}from"./chunk-6B2GHZDF.mjs";import{a as h}from"./chunk-3B7DG5PU.mjs";import{a as y}from"./chunk-NNPFUDB7.mjs";import{h as f}from"./chunk-M6MN4RXG.mjs";import{b as l}from"./chunk-7VHTZYM2.mjs";import{a as g}from"./chunk-NI7XCWV5.mjs";import{s as m}from"./chunk-DZZ5M34O.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=b(s),n=h({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=l(m());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=y(),{apiAddress:s,apiTimeout:o}=l(m());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return g({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${f}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
- //# sourceMappingURL=chunk-SW7NDWBA.mjs.map
1
+ import{a as A}from"./chunk-SUKYJQTV.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-TWYGNEQS.mjs";import{b as T}from"./chunk-2VG3V3VD.mjs";import{g as S}from"./chunk-QODHV6EH.mjs";import{a as h}from"./chunk-IEXYINQQ.mjs";import{a as y}from"./chunk-55DSSFT2.mjs";import{h as f}from"./chunk-M6MN4RXG.mjs";import{b as l}from"./chunk-7VHTZYM2.mjs";import{a as g}from"./chunk-NI7XCWV5.mjs";import{s as m}from"./chunk-QD4CABEY.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:t,onFail:a})=>{T({onSuccess:t,onFail:a})};this.send=async t=>{if(t.length===0)throw new Error("No transactions to send");try{if(!I(t))return await this.sendSignedTransactions(t);let a=await this.sendSignedBatchTransactions(t);if(!a.data||a.data.error)throw new Error(a.data?.error??"Failed to send transactions");return a.data.transactions}catch(a){throw a.response?.data?.message??a.message}};this.track=async(t,a={disableToasts:!1})=>{let s=this.sequentialToFlatArray(t).map(e=>({...e,status:e.status??"pending"})),o=b(s),n=h({transactions:s,transactionsDisplayInfo:a.transactionsDisplayInfo,status:o??"sent",sessionInformation:a.sessionInformation});if(a.disableToasts===!0)return n;a.onSuccess&&T({onSuccess:a.onSuccess,sessionId:n}),a.onFail&&T({onFail:a.onFail,sessionId:n});let i=A(t);return S({toastId:n,totalDuration:i}),n};this.sendSignedTransactions=async t=>{let{apiAddress:a,apiTimeout:s}=l(m());return await Promise.all(t.map(async n=>{let i=await w.post(`${a}/transactions`,n.toPlainObject(),{timeout:Number(s)}),e=i.data.txHash;return{...n.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async t=>{let{address:a}=y(),{apiAddress:s,apiTimeout:o}=l(m());if(!a)return{error:"Invalid address provided. You need to be logged in to send transactions"};let n=this.buildBatchId(a),e={transactions:t.map(p=>p.map(c=>c.toPlainObject())),id:n},{data:u}=await w.post(`${s}/batch`,e,{timeout:Number(o)}),B=u.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return g({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...u,transactions:B}}};this.buildBatchId=t=>`${Date.now().toString()}${f}${t}`;this.sequentialToFlatArray=(t=[])=>this.getIsSequential(t)?t.flat():t;this.getIsSequential=t=>t?.every(a=>Array.isArray(a))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
+ //# sourceMappingURL=chunk-B6CODV2A.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-NGM3AVCY.mjs";import{s as u}from"./chunk-DZZ5M34O.mjs";import{e as s}from"./chunk-FK6DWWZF.mjs";function x(n){let e=u(),o=a(e),c=s(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-C2NRPSEA.mjs.map
1
+ import{a}from"./chunk-NGM3AVCY.mjs";import{s as u}from"./chunk-QD4CABEY.mjs";import{e as s}from"./chunk-FK6DWWZF.mjs";function x(n){let e=u(),o=a(e),c=s(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-BU4JQETJ.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-QD4CABEY.mjs";import{c as r}from"./chunk-FK6DWWZF.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-CHF73P5H.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-4P6KVGFJ.mjs";import{a as e}from"./chunk-AWODPMKF.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-DZZ5M34O.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
- //# sourceMappingURL=chunk-MN25YLTY.mjs.map
1
+ import{a}from"./chunk-6R2WFQ7U.mjs";import{a as l}from"./chunk-FFGUC7S7.mjs";import{a as e}from"./chunk-CHF73P5H.mjs";import{d as s}from"./chunk-V5ZSFCKJ.mjs";import{s as i}from"./chunk-QD4CABEY.mjs";var c=class{constructor(r){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async r=>{if(!this._login)throw new Error("Provider is not initialized.");let o=await this._login(r);if(!o?.address)throw new Error("Provider is not initialized.");return{...o,address:o.address,signature:o.signature??""}};this.initializeAddress=()=>{if(this.address)return;let r=e();r&&(this.address=r)};this.cancelAction=void 0;this.address=r??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(r,o){throw new Error("Method not implemented.")}async login(r){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let o=new AbortController;this.loginAbortController=o;let n=o.signal;try{let t=new Promise((m,p)=>{n.addEventListener("abort",()=>{p(new Error("Login cancelled"))})}),d=await Promise.race([this.loginOperation(r),t]);return this.loginAbortController=null,d}catch(t){throw this.loginAbortController=null,t}}async initSignState(){if(s(i())?.isSigningUiEnabled===!1)return{onClose:async()=>({}),manager:null};let{onClose:o,manager:n}=await l({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return n.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),n.updateData({name:a[t],type:t}),{onClose:o,manager:n}}};export{c as a};
2
+ //# sourceMappingURL=chunk-D43LEYIV.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-ODNGFTW5.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
- //# sourceMappingURL=chunk-F4LRBZHI.mjs.map
1
+ import{a as o}from"./chunk-TBSRXSFJ.mjs";import{v as e}from"./chunk-2JKCBTYK.mjs";import n from"axios";async function p(r,s){let a=`${o(s)}/${e}/${r}`;try{let{data:t}=await n.get(a);return t?{[r]:{lastBlock:t.lastBlock,fast:t.fast,faster:t.faster}}:null}catch(t){return console.error("Error fetching gas station metadata from:",a,t),null}}export{p as a};
2
+ //# sourceMappingURL=chunk-EEHG7FC3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-R5USHTAC.mjs";import{k as d}from"./chunk-BAWT2YA7.mjs";import{s as a}from"./chunk-DZZ5M34O.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-WGK62UNL.mjs";async function S(){let t=c(),m=s(),e=n(a()),o=m||t?i.webview:e,p=Object.values(i).includes(e);if(e&&!p&&(o=e),!o)return;let r=await v.create({type:o});if(!r)throw new Error("Provider not found");if(t||o===i.webview&&r.isInitialized())try{await r.login()}catch(f){console.warn("Failed to login with provider",r.getType(),f)}d(r)}export{S as a};
2
- //# sourceMappingURL=chunk-BYO4QPIX.mjs.map
1
+ import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-WTWUPX2O.mjs";import{k as d}from"./chunk-ULUUW4MT.mjs";import{s as a}from"./chunk-QD4CABEY.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-ZHJVRF45.mjs";async function S(){let t=c(),m=s(),e=n(a()),o=m||t?i.webview:e,p=Object.values(i).includes(e);if(e&&!p&&(o=e),!o)return;let r=await v.create({type:o});if(!r)throw new Error("Provider not found");if(t||o===i.webview&&r.isInitialized())try{await r.login()}catch(f){console.warn("Failed to login with provider",r.getType(),f)}d(r)}export{S as a};
2
+ //# sourceMappingURL=chunk-EN4PQTRT.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-QD4CABEY.mjs";function f(r=t()){return o(r)}export{f as a};
2
+ //# sourceMappingURL=chunk-ETA4R42O.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-LDPF47U7.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-4W5VY3GO.mjs.map
1
+ import{a as i}from"./chunk-GILGXF3U.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a),this.resetData())}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},this.allAccounts=[],super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-EZIUH4RK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-IVM526MS.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
- //# sourceMappingURL=chunk-4P6KVGFJ.mjs.map
1
+ import{a as e}from"./chunk-VJ3EQSMI.mjs";async function i(a){let n=e.getInstance();return await n.openUI(),{manager:n,onClose:async({shouldCancelAction:t=!0}={})=>{n.closeUI(),t&&a?.cancelAction&&await a.cancelAction()}}}export{i as a};
2
+ //# sourceMappingURL=chunk-FFGUC7S7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-MN3XDS7Q.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
- //# sourceMappingURL=chunk-SQIVM23U.mjs.map
1
+ import{a}from"./chunk-SOFJNMOQ.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
+ //# sourceMappingURL=chunk-FMXCAN3M.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-JDKOXHUE.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
2
- //# sourceMappingURL=chunk-LDPF47U7.mjs.map
1
+ import{a}from"./chunk-4LH5OPJN.mjs";var r=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.eventHandlers=new Map;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n);let s=this.eventHandlers.get(t)||[];s.push(e),this.eventHandlers.set(t,s)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}clearEventHandlers(t=Array.from(this.unsubscribeFunctions.keys())){t.forEach(e=>{(this.unsubscribeFunctions.get(e)||[]).forEach(n=>n()),this.unsubscribeFunctions.delete(e),this.eventHandlers.delete(e)})}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventHandlers.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}getEventHandlers(t){return this.eventHandlers.get(t)||[]}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await a.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{r as a};
2
+ //# sourceMappingURL=chunk-GILGXF3U.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-ZLOPHDVT.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
- //# sourceMappingURL=chunk-7ZU5KDF4.mjs.map
1
+ import{a as t}from"./chunk-VZVYNN5W.mjs";async function g({originalLoginToken:i,extraInfoData:n,address:o}){let e=await t({loginToken:i,extraInfoData:n}),s=n.multisig||n.impersonate||o;return{address:e!=null?s:o,modifiedLoginToken:e}}export{g as a};
2
+ //# sourceMappingURL=chunk-H7BHTGW7.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-DZZ5M34O.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
- //# sourceMappingURL=chunk-RBEU3I23.mjs.map
1
+ import{q as o}from"./chunk-QD4CABEY.mjs";import{a as c}from"./chunk-APCGI2A5.mjs";var p=t=>{o().setState(({account:e})=>{let s=e.address===t.address;e.accounts={[e.address]:s?t:c}},!1,{type:"setAccount",payload:{value:t}})},r=t=>o().setState(({account:e})=>{e.ledgerAccount=t},!1,{type:"setLedgerAccount",payload:{value:t}}),u=t=>o().setState(({account:e})=>{e.walletConnectAccount=t},!1,{type:"setWalletConnectAccount",payload:{value:t}}),l=t=>o().setState(({account:e})=>{e.websocketEvent={timestamp:Date.now(),message:t}},!1,{type:"setWebsocketEvent",payload:{value:t}}),d=t=>o().setState(({account:e})=>{e.websocketBatchEvent={timestamp:Date.now(),data:t}},!1,{type:"setWebsocketBatchEvent",payload:{value:t}}),y=t=>{o().setState(({account:e})=>{e.accounts[e.address].nonce=t},!1,{type:"setAccountNonce",payload:{value:t}})};export{p as a,r as b,u as c,l as d,d as e,y as f};
2
+ //# sourceMappingURL=chunk-HDUHOYDI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-MN25YLTY.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-VBHP2IVI.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};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=d.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 s.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(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
- //# sourceMappingURL=chunk-GAO3N3BI.mjs.map
1
+ import{a as n}from"./chunk-D43LEYIV.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-ZELPFF47.mjs";import{WebviewProvider as d}from"@multiversx/sdk-webview-provider/out/WebviewProvider";var a=class extends n{constructor(r){super(r?.address);this.cancelAction=async()=>{this.provider.cancelAction()};this.signTransactions=async(r,i)=>{if(!this.provider)throw new Error("Provider is not initialized.");try{return await this.provider.signTransactions(r)||[]}catch(t){throw this.cancelAction(),t}};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=d.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 s.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(o);return this.address&&this.setAccount({address:this.address}),r}};export{a};
2
+ //# sourceMappingURL=chunk-HEZLSKRN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ODNGFTW5.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
- //# sourceMappingURL=chunk-HIDRVWOQ.mjs.map
1
+ import{a as i}from"./chunk-TBSRXSFJ.mjs";import{a as e}from"./chunk-N56SMVGU.mjs";import{k as c}from"./chunk-PKDR5ERF.mjs";import{a as n}from"./chunk-2JKCBTYK.mjs";var a=({address:r,baseURL:o})=>{let t=i(o),s=`${t}/${n}/${r}?withGuardianInfo=true`;return e.get(s,{baseURL:t,timeout:c})},g=async({address:r,baseURL:o})=>{if(!r)return null;try{let{data:t}=await a({address:r,baseURL:o});return t}catch{console.error("error fetching configuration for ",r)}return null};export{a,g as b};
2
+ //# sourceMappingURL=chunk-HH6XW3S6.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as o}from"./chunk-DZZ5M34O.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
- //# sourceMappingURL=chunk-3B7DG5PU.mjs.map
1
+ import{q as o}from"./chunk-QD4CABEY.mjs";import{current as p}from"immer";function d({transactions:t,transactionsDisplayInfo:n,status:r,sessionInformation:s}){let a=Date.now().toString();return o().setState(({transactions:e})=>{e[a]={transactions:t,status:r,transactionsDisplayInfo:n,interpretedTransactions:{},sessionInformation:s}},!1,{type:"createTransactionsSession",payload:{value:{transactions:t,status:r,transactionsDisplayInfo:n,sessionInformation:s}}}),a}function m({sessionId:t,status:n,errorMessage:r}){o().setState(({transactions:s})=>{if(!s[t])return;let a=p(s[t]).transactionsDisplayInfo??{},e=r||a?.errorMessage;s[t].status=n,s[t].errorMessage=e,s[t].transactionsDisplayInfo={...a,errorMessage:e}},!1,{type:"updateSessionStatus",payload:{value:{sessionId:t,status:n,errorMessage:r}}})}function g({sessionId:t,transaction:n}){o().setState(({transactions:r})=>{let s=r[t]?.transactions;s!=null&&(r[t].transactions=s.map(a=>a.hash===n.hash?{...a,...n??{}}:a))},!1,{type:"updateTransactionStatus",payload:{value:{sessionId:t,transaction:n}}})}var h=()=>{o().setState(({transactions:t,toasts:n})=>{let s=Object.keys(t).filter(e=>{let c=t[e];if(!c)return!1;let{status:i}=c;return!(i==="pending"||i==="signed"||i==="sent")});s.forEach(e=>{delete t[e]});let a=n.transactionToasts.filter(e=>!s.includes(e.toastId));n.transactionToasts=a},!1,{type:"clearCompletedTransactions",payload:{value:null}})};export{d as a,m as b,g as c,h as d};
2
+ //# sourceMappingURL=chunk-IEXYINQQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-DZZ5M34O.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
2
- //# sourceMappingURL=chunk-FUUOCOBX.mjs.map
1
+ import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-QD4CABEY.mjs";var r=e=>n().setState(({config:t})=>{t.nativeAuthConfig=e},!1,{type:"setNativeAuthConfig",payload:{value:e}}),c=e=>n().setState(({config:t})=>{t.websocketStatus=e},!1,{type:"setWebsocketStatus",payload:{value:e}}),C=e=>n().setState(({config:t})=>{if(e){let l=e.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,a=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:a,walletConnectV2RelayAddress:l}}else t.walletConnectConfig=null},!1,{type:"setWalletConnectConfig",payload:{value:e}}),f=e=>n().setState(({config:t})=>{t.settings=e},!1,{type:"setProviderSettings",payload:{value:e}}),g=e=>n().setState(({config:t})=>{t.settings||(t.settings={}),t.settings.isSigningUiEnabled=e},!1,{type:"setIsSigningUiEnabled",payload:{value:e}});export{r as a,c as b,C as c,f as d,g as e};
2
+ //# sourceMappingURL=chunk-IONBKMFW.mjs.map
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-DZZ5M34O.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
- //# sourceMappingURL=chunk-6PHKMRFV.mjs.map
1
+ import{e}from"./chunk-M6MN4RXG.mjs";import{h as o}from"./chunk-7VHTZYM2.mjs";import{s as t}from"./chunk-QD4CABEY.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
+ //# sourceMappingURL=chunk-JEFEDCSS.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-UTWIKUIK.mjs";import{s as t}from"./chunk-QD4CABEY.mjs";var i=(e,o)=>r(`transaction-${e}`)(o??t())??null;export{i as a};
2
+ //# sourceMappingURL=chunk-JVPQSBOX.mjs.map
@@ -1,2 +1,2 @@
1
- import{q as t}from"./chunk-DZZ5M34O.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
2
- //# sourceMappingURL=chunk-4UNMUVTO.mjs.map
1
+ import{q as t}from"./chunk-QD4CABEY.mjs";var r=({key:e,value:a})=>{t().setState(({cache:c})=>{c[e]=a},!1,{type:"saveToCache",payload:{value:a}})},l=e=>{t().setState(({cache:a})=>{delete a[e]},!1,{type:"removeFromCache",payload:{value:e}})},s=()=>{t().setState(({cache:e})=>{Object.keys(e).forEach(a=>{delete e[a]})},!1,{type:"clearCache",payload:{value:null}})};export{r as a,l as b,s as c};
2
+ //# sourceMappingURL=chunk-K3X454GT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-DZZ5M34O.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-C6H5TEAY.mjs.map
1
+ import{a as g}from"./chunk-NYZ726DG.mjs";import{b as c}from"./chunk-7VHTZYM2.mjs";import{a as s}from"./chunk-3FXHIV6O.mjs";import{s as o}from"./chunk-QD4CABEY.mjs";import{o as a,u as m}from"./chunk-2JKCBTYK.mjs";async function I({tokenId:n}){let t=c(o()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=s(n),i=n,p=k?a:m;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-KKI3K4YH.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-NP2VNG62.mjs";function S(e){return t()(e)}export{S as a};
2
+ //# sourceMappingURL=chunk-KQNCVEC3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-BAWT2YA7.mjs";import{a as g}from"./chunk-OX3ABKOU.mjs";import{s as e}from"./chunk-DZZ5M34O.mjs";import{g as n}from"./chunk-FK6DWWZF.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
2
- //# sourceMappingURL=chunk-35TLBLLZ.mjs.map
1
+ import{a as l}from"./chunk-3GRRAVW4.mjs";import{a}from"./chunk-5HEWN34K.mjs";import{l as c}from"./chunk-ULUUW4MT.mjs";import{a as g}from"./chunk-6BAQDYWA.mjs";import{s as e}from"./chunk-QD4CABEY.mjs";import{g as n}from"./chunk-FK6DWWZF.mjs";import{e as d}from"./chunk-VNLGNNIL.mjs";import{HWProvider as P}from"@multiversx/sdk-hw-provider";async function S(s){let m=g(),t=s?.shouldInitProvider||!m,f=d(e()),o=n(e()),p=c(),i=new P;try{if(!t&&o){let u={version:o.version,dataEnabled:o.hasContractDataEnabled};return{ledgerProvider:i,ledgerConfig:u}}let r=await a({provider:p,ledgerProvider:i,ledgerLogin:f,shouldInitProvider:t}),v=await l(r);return{ledgerProvider:r,ledgerConfig:v}}catch(r){throw console.error("Could not initialize ledger app",r),r}}export{S as a};
2
+ //# sourceMappingURL=chunk-LCMNA7KW.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-ZELPFF47.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-LGIXBYM3.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-FUUOCOBX.mjs";import{d as l,e as m}from"./chunk-RBEU3I23.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{q as r}from"./chunk-DZZ5M34O.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as S}from"socket.io-client";var w=3e3,A=3,g=500,E=500,f="batchUpdated",p="connect",N="connect_error",I="disconnect";async function M(i){let{apiAddress:b,websocketUrl:k}=a(r().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let c=null,s=null,o=e=>{t.status=e,u(e)},d=e=>{c&&clearTimeout(c),c=setTimeout(()=>{l(e)},E)},C=e=>{s&&clearTimeout(s),s=setTimeout(()=>{m(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(I),e.close(),console.log("Websocket disconnected.")),o("not_initialized"),t.instance=null,c&&clearTimeout(c),s&&clearTimeout(s)},y=async()=>{o("pending");let e="";try{e=k??await T(b)}catch(n){throw console.error("Failed to get websocket url:",n),o("not_initialized"),n}if(!e){o("not_initialized");return}t.instance=S(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:A,reconnectionDelay:g,timeout:w,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),o("completed")}),t.instance.on(N,n=>{console.warn("Websocket connect error: ",n.message)}),t.instance.on(I,n=>{console.warn("Websocket disconnected: ",n),o("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await y(),{closeConnection:W}}export{M as a};
2
- //# sourceMappingURL=chunk-OUYP2DZU.mjs.map
1
+ import{a as T}from"./chunk-Q2Q4XN4M.mjs";import{b as u}from"./chunk-IONBKMFW.mjs";import{d as l,e as m}from"./chunk-HDUHOYDI.mjs";import{b as a}from"./chunk-7VHTZYM2.mjs";import{q as r}from"./chunk-QD4CABEY.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as S}from"socket.io-client";var w=3e3,A=3,g=500,E=500,f="batchUpdated",p="connect",N="connect_error",I="disconnect";async function M(i){let{apiAddress:b,websocketUrl:k}=a(r().getState());if(!i)throw new Error("Websocket could not be initialized: address missing");let c=null,s=null,o=e=>{t.status=e,u(e)},d=e=>{c&&clearTimeout(c),c=setTimeout(()=>{l(e)},E)},C=e=>{s&&clearTimeout(s),s=setTimeout(()=>{m(e)},E)},W=()=>{let e=t.instance;e&&(e.off(N),e.off(p),e.off(f),e.off(I),e.close(),console.log("Websocket disconnected.")),o("not_initialized"),t.instance=null,c&&clearTimeout(c),s&&clearTimeout(s)},y=async()=>{o("pending");let e="";try{e=k??await T(b)}catch(n){throw console.error("Failed to get websocket url:",n),o("not_initialized"),n}if(!e){o("not_initialized");return}t.instance=S(e,{forceNew:!0,reconnection:!0,reconnectionAttempts:A,reconnectionDelay:g,timeout:w,query:{address:i}}),t.instance.onAny(d),t.instance.on(f,C),t.instance.on(p,()=>{console.log("Websocket connected."),o("completed")}),t.instance.on(N,n=>{console.warn("Websocket connect error: ",n.message)}),t.instance.on(I,n=>{console.warn("Websocket disconnected: ",n),o("pending")})};return t.status==="not_initialized"&&!t.instance?.active&&await y(),{closeConnection:W}}export{M as a};
2
+ //# sourceMappingURL=chunk-M6O2JENG.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-IWJRKPVP.mjs";import{a as p}from"./chunk-573LAOYN.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
2
- //# sourceMappingURL=chunk-FQ6P5OK7.mjs.map
1
+ import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-WS7GSQIW.mjs";import{a as p}from"./chunk-573LAOYN.mjs";import{a as i}from"./chunk-M3F2J3PW.mjs";import{a as k}from"./chunk-HYPARWQN.mjs";import{a as l}from"./chunk-YJCTRUJT.mjs";import{c as m}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-OQURAWR4.mjs";var g=class{static async processTransactions({address:v,egldLabel:L,explorerAddress:a,transactions:f}){let h=f.map(e=>k({address:v,explorerAddress:a,transaction:e}));return await Promise.all(h.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),c=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:D,receiverLockedAccount:x}=await T({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=p({transaction:e}),y=r?.token.type==="MetaESDT"?void 0:r?.badgeText,d=u.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??m,digits:2}),S={badge:y??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?L:"",link:l({explorerAddress:a,to:n?.tokenExplorerLink??r?.tokenExplorerLink??""}),linkText:n?.tokenLinkText??r?.tokenLinkText,name:n?.token.name??r?.token.name,showFormattedAmount:!!(t||n?.tokenFormattedAmount||r?.tokenFormattedAmount),svgUrl:n?.token.svgUrl??r?.token.svgUrl,ticker:n?.token.ticker??r?.token.ticker,titleText:n?.titleText??r?.titleText,valueDecimal:d.valueDecimal,valueInteger:d.valueInteger},w=i(e.receiverShard),A=i(e.senderShard);return{age:e.transactionDetails.age,direction:e.transactionDetails.direction,method:e.transactionDetails.method,iconInfo:e.transactionDetails.iconInfo,link:e.links.transactionLink??"",txHash:e.txHash,receiver:{address:e.receiver,name:s??"",description:`${s??e.receiver} (${e.receiver})`,isContract:o(e.receiver),isTokenLocked:!!x,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverShardLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:c??"",description:`${c??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!D,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:S}}))}};export{g as a};
2
+ //# sourceMappingURL=chunk-MBI2RTHM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-NNPFUDB7.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-DZZ5M34O.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-FJW5NQC5.mjs.map
1
+ import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-55DSSFT2.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-QD4CABEY.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=e(o());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-MFVKEPMI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-G6OHKF3V.mjs";import{a as g}from"./chunk-HSF3JATH.mjs";import l from"lodash.isequal";async function C({loginData:f,nativeAuthConfig:r,loginToken:s}){let{address:m,signature:d,...n}=f,a=Object.keys(n).reduce((i,t)=>{let o=["multisig","impersonate"].includes(t)&&n[t]!=null?String(n[t]):null;return o!=null&&(i[t]=o.toString()),i},{}),e={...r};if(Object.keys(a).length>0&&(e.extraInfo=a),!l(r,e)){let i=g(s);return await u(e).initialize({noCache:!0,latestBlockInfo:{hash:i?.blockHash??"",timestamp:i?.extraInfo?.timestamp??0}})}return s}export{C as a};
2
- //# sourceMappingURL=chunk-XG2GIMBK.mjs.map
1
+ import{a as u}from"./chunk-2TCYFOMD.mjs";import{a as g}from"./chunk-HSF3JATH.mjs";import l from"lodash.isequal";async function C({loginData:f,nativeAuthConfig:r,loginToken:s}){let{address:m,signature:d,...n}=f,a=Object.keys(n).reduce((i,t)=>{let o=["multisig","impersonate"].includes(t)&&n[t]!=null?String(n[t]):null;return o!=null&&(i[t]=o.toString()),i},{}),e={...r};if(Object.keys(a).length>0&&(e.extraInfo=a),!l(r,e)){let i=g(s);return await u(e).initialize({noCache:!0,latestBlockInfo:{hash:i?.blockHash??"",timestamp:i?.extraInfo?.timestamp??0}})}return s}export{C as a};
2
+ //# sourceMappingURL=chunk-MKBRFW6F.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as z}from"./chunk-V3ULNZJT.mjs";import{a as H}from"./chunk-OSOBELOT.mjs";import{a as h}from"./chunk-LS4PX2PR.mjs";import{a as j}from"./chunk-B7CFQZKI.mjs";import{a as O}from"./chunk-NGF3A544.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-FJW5NQC5.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-ZP2JSMSQ.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-NNPFUDB7.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-DZZ5M34O.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
- //# sourceMappingURL=chunk-KBUF3VYQ.mjs.map
1
+ import{a as z}from"./chunk-5JWQUNZY.mjs";import{a as H}from"./chunk-SURYSJAU.mjs";import{a as h}from"./chunk-UU6WX5SY.mjs";import{a as j}from"./chunk-7ELS72QK.mjs";import{a as O}from"./chunk-A46HPE6M.mjs";import{a as K}from"./chunk-OMBZCVQZ.mjs";import{a as W}from"./chunk-MFVKEPMI.mjs";import{a as X}from"./chunk-BKQQK7WP.mjs";import{a as C}from"./chunk-5YCYE5MA.mjs";import{d as R}from"./chunk-V5ZSFCKJ.mjs";import{a as B}from"./chunk-55DSSFT2.mjs";import{e as k}from"./chunk-QNYO7NI5.mjs";import{b as _}from"./chunk-7VHTZYM2.mjs";import{s as E}from"./chunk-QD4CABEY.mjs";import{a as F,c as U,f as x}from"./chunk-PJWJZHIS.mjs";import{d as y}from"./chunk-DA76AK4I.mjs";async function On({transactions:$=[],handleSign:G,guardTransactions:L=W,options:q}){let{address:N,shard:D,username:M}=B(),u=_(E()),J=R(E()),v=H(),{allTransactions:o,parsedTransactionsByDataField:A}=X($),l=[];if(J?.isSigningUiEnabled===!1){C(!0);try{let d=[];for(let c of o){let p=await G([c.transaction]);p&&p.length>0&&d.push(p[0])}return await L(d)}finally{C(!1)}}let n=z.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let Q=async()=>{await h(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",Q),new Promise(async(d,f)=>{let c=[],p=await j({baseURL:u.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(o.map(a=>a.transaction));let S=p?.price,t=0,P=async()=>{let r=o[t]?.transaction,m=Number(r.nonce);try{n.updateIsLoading(!0);let{commonData:e,tokenTransaction:s,fungibleTransaction:i}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});s&&n.updateTokenTransaction(s),i&&n.updateNonFungibleTransaction(i.type,i),n.updateCommonData(e)}catch(e){throw console.error(`Error fetching common data for transaction at index ${t}:`,e),e}finally{n.updateIsLoading(!1)}},V=()=>{t>0&&(t--,P())},Y=(a=1e9)=>{let m=o[t].transaction,e=Number(m.nonce);n.updateGasPriceMap({nonce:e,gasPriceOption:a});let s=m.toPlainObject(),i=y.newFromPlainObject({...s,gasPrice:a}),g=K({transaction:i,price:S}),I=x({input:a.toString(),decimals:U,addCommas:!0,digits:F});n.updateCommonData({feeLimit:g.feeLimitFormatted,feeInFiatLimit:g.feeInFiatLimit,gasPrice:I,gasPriceOption:a})},Z=async()=>{f(new Error("Transaction signing cancelled by user")),await h(),n.closeUI()},w=()=>{t<n.transactionsCount-1&&(t++,P())},nn=async()=>{let r=o[t].transaction,m=Number(r.nonce),{commonData:e}=await O({allTransactions:o,currentScreenIndex:t,egldLabel:v,network:u,gasPriceData:n.getGasPriceOptionMap[m],price:S,address:N,username:M,shard:D,signedIndexes:l,parsedTransactionsByDataField:A});if(!e.needsSigning)return l.push(t),w();let s=r.toPlainObject(),i=s.nonce,{gasPriceOption:g}=n.getGasPriceOptionMap[i],I=y.newFromPlainObject({...s,gasPrice:g});try{let T=await G([I]);T&&(l.push(t),c.push(T[0]));let on=t===o.length-1,en=o.filter(b=>b.needsSigning),rn=c.length===en.length;if(on&&rn){let b=await q?.callback?.(c)||c,sn=await L(b);return n.closeUI(),d(sn)}w()}catch(T){n.closeUI(),f(T)}},tn=new Map([["NEXT_SIGN_TRANSACTIONS",w],["CONFIRM_SIGN_TRANSACTIONS",nn],["CLOSE_SIGN_TRANSACTIONS",Z],["BACK_SIGN_TRANSACTIONS",V],["SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS",Y]]);function an(){for(let[a,r]of tn)n.subscribeToEventBus(a,r)}n.clearEventHandlers(["NEXT_SIGN_TRANSACTIONS","CONFIRM_SIGN_TRANSACTIONS","CLOSE_SIGN_TRANSACTIONS","BACK_SIGN_TRANSACTIONS","SET_GAS_PRICE_OPTION_SIGN_TRANSACTIONS"]),an(),await P()})}export{On as a};
2
+ //# sourceMappingURL=chunk-N4OAQFDH.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{q as e}from"./chunk-QD4CABEY.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-NP2VNG62.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-LDPF47U7.mjs";import{a as t}from"./chunk-ZP2JSMSQ.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-JJRF4KKM.mjs.map
1
+ import{a as n}from"./chunk-GILGXF3U.mjs";import{a as t}from"./chunk-5YCYE5MA.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-O6NZ6Z6B.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-VEIRZX44.mjs";import{a as u}from"./chunk-L3RER46P.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";import{b as o}from"./chunk-3B7DG5PU.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
2
- //# sourceMappingURL=chunk-MW6XCNWP.mjs.map
1
+ import{a as m}from"./chunk-3R3VXWC2.mjs";import{a as u}from"./chunk-WXAMLA7L.mjs";import{a}from"./chunk-PMHRZ5Y7.mjs";import{l as p}from"./chunk-E2GGD7D4.mjs";import{b as o}from"./chunk-IEXYINQQ.mjs";var n={};async function b({serverTransaction:r,sessionId:t,isSequential:c}){let{hash:e,status:s,invalidTransaction:f,hasStatusChanged:S}=r;try{if(n[e]>30){o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"});return}if(f&&!c||s==="sent"){n[e]=n[e]?n[e]+1:1;return}if(c&&!s){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i});return}if(S){let i=u({sessionId:t,transaction:r});await a({sessionId:t,status:i})}p(s)&&await m({sessionId:t,transaction:r})}catch(T){console.error(T),o({sessionId:t,status:"timedOut"}),await a({sessionId:t,status:"timedOut"})}}export{b as a};
2
+ //# sourceMappingURL=chunk-OHUSVHTC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-H7BHTGW7.mjs";import{c as n}from"./chunk-QD4CABEY.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-ORIRXUKE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-R5USHTAC.mjs";import{a as s}from"./chunk-JJRF4KKM.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-DZZ5M34O.mjs";var e=class e extends s{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:n}=r(a()),i=d(t.customProviders,e.allowedProviders);this.data={providers:i,walletAddress:n},await this.openUI(),this.notifyDataUpdate()};this.selectProvider=n=>{if(!this.eventBus)throw new Error("Panel not initialized. Call openUnlockPanel() first.");this.eventBus.publish("SELECT_PROVIDER",{providerType:n})};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async n=>{!n?.isLoginFinished&&e.onClose&&await e.onClose(),this.closeUI()};this.handleLogin=async({type:n,anchor:i})=>{if(!e.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{if(c(e.loginHandler)){let o=await t.create({type:n,anchor:i}),l=e.token;await o.login(l?{token:l}:void 0),e.loginHandler()}else e.loginHandler({type:n,anchor:i});await this.handleCloseUI({isLoginFinished:!0})}catch(o){console.error(o),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await t.destroy(),e.onCancelLogin&&await e.onCancelLogin()};this.data=this.initialData}static getInstance(){return e.instance||(e.instance=new e),e.instance}static init(n){return this.loginHandler=n.loginHandler,this.allowedProviders=n.allowedProviders,n.onClose&&(this.onClose=n.onClose),n.onCancelLogin&&(this.onCancelLogin=n.onCancelLogin),n.token&&(this.token=n.token),this.getInstance()}};e.loginHandler=null,e.onClose=null,e.allowedProviders=null,e.onCancelLogin=null,e.token=null;var u=e;export{u as a};
2
- //# sourceMappingURL=chunk-IXYOEFTN.mjs.map
1
+ import{a as d}from"./chunk-CZEUFCPN.mjs";import{a as c}from"./chunk-JFP2BITI.mjs";import{i as t}from"./chunk-WTWUPX2O.mjs";import{a as s}from"./chunk-O6NZ6Z6B.mjs";import{b as r}from"./chunk-7VHTZYM2.mjs";import{s as a}from"./chunk-QD4CABEY.mjs";var e=class e extends s{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:n}=r(a()),i=d(t.customProviders,e.allowedProviders);this.data={providers:i,walletAddress:n},await this.openUI(),this.notifyDataUpdate()};this.selectProvider=n=>{if(!this.eventBus)throw new Error("Panel not initialized. Call openUnlockPanel() first.");this.eventBus.publish("SELECT_PROVIDER",{providerType:n})};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async n=>{!n?.isLoginFinished&&e.onClose&&await e.onClose(),this.closeUI()};this.handleLogin=async({type:n,anchor:i})=>{if(!e.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{if(c(e.loginHandler)){let o=await t.create({type:n,anchor:i}),l=e.token;await o.login(l?{token:l}:void 0),e.loginHandler()}else e.loginHandler({type:n,anchor:i});await this.handleCloseUI({isLoginFinished:!0})}catch(o){console.error(o),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await t.destroy(),e.onCancelLogin&&await e.onCancelLogin()};this.data=this.initialData}static getInstance(){return e.instance||(e.instance=new e),e.instance}static init(n){return this.loginHandler=n.loginHandler,this.allowedProviders=n.allowedProviders,n.onClose&&(this.onClose=n.onClose),n.onCancelLogin&&(this.onCancelLogin=n.onCancelLogin),n.token&&(this.token=n.token),this.getInstance()}};e.loginHandler=null,e.onClose=null,e.allowedProviders=null,e.onCancelLogin=null,e.token=null;var u=e;export{u as a};
2
+ //# sourceMappingURL=chunk-PG4PNSW6.mjs.map