@multiversx/sdk-dapp 5.6.3 → 5.6.5

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 (392) hide show
  1. package/out/__chunks__/chunk-2FEH3E6U.mjs +2 -0
  2. package/out/__chunks__/chunk-2FEH3E6U.mjs.map +7 -0
  3. package/out/__chunks__/{chunk-KBDUCN6V.mjs → chunk-35TLBLLZ.mjs} +2 -2
  4. package/out/__chunks__/{chunk-OTFG6FYJ.mjs → chunk-3B7DG5PU.mjs} +2 -2
  5. package/out/__chunks__/{chunk-UOKJWB7L.mjs → chunk-4AOBQXI3.mjs} +2 -2
  6. package/out/__chunks__/{chunk-RUH7HLTP.mjs → chunk-4EAIQB7E.mjs} +2 -2
  7. package/out/__chunks__/chunk-4G4G7FVT.mjs +2 -0
  8. package/out/__chunks__/{chunk-C2YSQJEV.mjs → chunk-4P6KVGFJ.mjs} +2 -2
  9. package/out/__chunks__/chunk-4UNMUVTO.mjs +2 -0
  10. package/out/__chunks__/{chunk-OTDI42RV.mjs.map → chunk-4UNMUVTO.mjs.map} +2 -2
  11. package/out/__chunks__/{chunk-4RELBVB7.mjs → chunk-4W5VY3GO.mjs} +2 -2
  12. package/out/__chunks__/{chunk-CPAFNPLQ.mjs → chunk-676U6OTI.mjs} +2 -2
  13. package/out/__chunks__/chunk-6B2GHZDF.mjs +2 -0
  14. package/out/__chunks__/chunk-6B2GHZDF.mjs.map +7 -0
  15. package/out/__chunks__/{chunk-D7CVEV7I.mjs → chunk-6PHKMRFV.mjs} +2 -2
  16. package/out/__chunks__/{chunk-RO7SO5LA.mjs → chunk-7YCD5466.mjs} +2 -2
  17. package/out/__chunks__/{chunk-OMREOWFU.mjs → chunk-7ZU5KDF4.mjs} +2 -2
  18. package/out/__chunks__/chunk-AWODPMKF.mjs +2 -0
  19. package/out/__chunks__/{chunk-K5D7EAJK.mjs → chunk-B3PQJ4WY.mjs} +2 -2
  20. package/out/__chunks__/{chunk-BRY5BA6A.mjs → chunk-B7CFQZKI.mjs} +2 -2
  21. package/out/__chunks__/{chunk-EJ3QAFY6.mjs → chunk-BAWT2YA7.mjs} +2 -2
  22. package/out/__chunks__/{chunk-ND2NXMCD.mjs → chunk-BYO4QPIX.mjs} +2 -2
  23. package/out/__chunks__/{chunk-JDOHWW3H.mjs → chunk-C2NRPSEA.mjs} +2 -2
  24. package/out/__chunks__/{chunk-QYNRDUZM.mjs → chunk-C6H5TEAY.mjs} +2 -2
  25. package/out/__chunks__/{chunk-KQI42KC7.mjs → chunk-CDOZBMWB.mjs} +2 -2
  26. package/out/__chunks__/{chunk-UVBK3OPF.mjs → chunk-CGBSNDVZ.mjs} +2 -2
  27. package/out/__chunks__/{chunk-NY5RZF3S.mjs → chunk-CXCWCLFJ.mjs} +2 -2
  28. package/out/__chunks__/{chunk-OCJN5W6F.mjs → chunk-D67JUKPD.mjs} +2 -2
  29. package/out/__chunks__/chunk-DZZ5M34O.mjs +2 -0
  30. package/out/__chunks__/{chunk-24CPBGCH.mjs.map → chunk-DZZ5M34O.mjs.map} +2 -2
  31. package/out/__chunks__/{chunk-6SJ27LTT.mjs → chunk-EB6K5LCD.mjs} +2 -2
  32. package/out/__chunks__/{chunk-RVR5IHSG.mjs → chunk-EQBGROHI.mjs} +2 -2
  33. package/out/__chunks__/{chunk-BQECZ57V.mjs → chunk-F4LRBZHI.mjs} +2 -2
  34. package/out/__chunks__/{chunk-4V3TPITU.mjs → chunk-F75YW37Y.mjs} +2 -2
  35. package/out/__chunks__/{chunk-I353LINT.mjs → chunk-FJW5NQC5.mjs} +2 -2
  36. package/out/__chunks__/{chunk-GDCPUXS7.mjs → chunk-FQ6P5OK7.mjs} +2 -2
  37. package/out/__chunks__/{chunk-B3NKDU2X.mjs → chunk-FUUOCOBX.mjs} +2 -2
  38. package/out/__chunks__/{chunk-B3NKDU2X.mjs.map → chunk-FUUOCOBX.mjs.map} +2 -2
  39. package/out/__chunks__/{chunk-QSJQYXYK.mjs → chunk-FVVRPNSD.mjs} +2 -2
  40. package/out/__chunks__/{chunk-YUWDAJJR.mjs → chunk-G6OHKF3V.mjs} +2 -2
  41. package/out/__chunks__/{chunk-UNQALHBG.mjs → chunk-GAO3N3BI.mjs} +2 -2
  42. package/out/__chunks__/{chunk-5UL4FBN6.mjs → chunk-HIDRVWOQ.mjs} +2 -2
  43. package/out/__chunks__/chunk-I25KKLGU.mjs +2 -0
  44. package/out/__chunks__/{chunk-YOL5BR6T.mjs → chunk-IHBIVBQ3.mjs} +2 -2
  45. package/out/__chunks__/{chunk-3RPLSVYB.mjs → chunk-IVM526MS.mjs} +2 -2
  46. package/out/__chunks__/{chunk-I6EBU6LQ.mjs → chunk-IWJRKPVP.mjs} +2 -2
  47. package/out/__chunks__/{chunk-653YOZ5D.mjs → chunk-IXYOEFTN.mjs} +2 -2
  48. package/out/__chunks__/{chunk-5MHI6OUR.mjs → chunk-JDKOXHUE.mjs} +2 -2
  49. package/out/__chunks__/{chunk-XYYV37IV.mjs → chunk-JFJMW7YZ.mjs} +2 -2
  50. package/out/__chunks__/{chunk-WLKPV4TY.mjs → chunk-JJRF4KKM.mjs} +2 -2
  51. package/out/__chunks__/{chunk-ELNE773L.mjs → chunk-JTI5OLEX.mjs} +2 -2
  52. package/out/__chunks__/{chunk-W7BOAMKU.mjs → chunk-KBUF3VYQ.mjs} +2 -2
  53. package/out/__chunks__/chunk-KEZWPJRC.mjs +2 -0
  54. package/out/__chunks__/{chunk-7K6MWD7N.mjs → chunk-L3RER46P.mjs} +2 -2
  55. package/out/__chunks__/{chunk-UH5DD4GC.mjs → chunk-LDPF47U7.mjs} +2 -2
  56. package/out/__chunks__/{chunk-IHTRH334.mjs → chunk-LDPXTCNA.mjs} +2 -2
  57. package/out/__chunks__/{chunk-23SYZQVD.mjs → chunk-LS4PX2PR.mjs} +2 -2
  58. package/out/__chunks__/chunk-M3LLNTKM.mjs +2 -0
  59. package/out/__chunks__/{chunk-J4HHNGK7.mjs → chunk-M5JPM5BF.mjs} +2 -2
  60. package/out/__chunks__/{chunk-2AO3IMQY.mjs → chunk-MKYGGOBL.mjs} +2 -2
  61. package/out/__chunks__/{chunk-HS5VQCLV.mjs → chunk-MN25YLTY.mjs} +2 -2
  62. package/out/__chunks__/{chunk-5OLZRP26.mjs → chunk-MN3XDS7Q.mjs} +2 -2
  63. package/out/__chunks__/{chunk-74GRPF4E.mjs → chunk-MW6XCNWP.mjs} +2 -2
  64. package/out/__chunks__/{chunk-ALFFIEML.mjs → chunk-NGF3A544.mjs} +2 -2
  65. package/out/__chunks__/chunk-NNPFUDB7.mjs +2 -0
  66. package/out/__chunks__/chunk-NPNP2H3A.mjs +2 -0
  67. package/out/__chunks__/chunk-NXF3BPNL.mjs +2 -0
  68. package/out/__chunks__/{chunk-24RY7VT6.mjs → chunk-OCXXTA4P.mjs} +2 -2
  69. package/out/__chunks__/{chunk-XS32F7NC.mjs → chunk-ODNGFTW5.mjs} +2 -2
  70. package/out/__chunks__/chunk-OSOBELOT.mjs +2 -0
  71. package/out/__chunks__/{chunk-DNNARVBG.mjs → chunk-OUYP2DZU.mjs} +2 -2
  72. package/out/__chunks__/chunk-OX3ABKOU.mjs +2 -0
  73. package/out/__chunks__/chunk-PYDTFFI4.mjs +2 -0
  74. package/out/__chunks__/chunk-QL6WH4QS.mjs +2 -0
  75. package/out/__chunks__/chunk-QQANPK2G.mjs +2 -0
  76. package/out/__chunks__/{chunk-YTIAQLNG.mjs → chunk-R5USHTAC.mjs} +2 -2
  77. package/out/__chunks__/{chunk-GI6SK256.mjs → chunk-RBEU3I23.mjs} +2 -2
  78. package/out/__chunks__/{chunk-SMYMCVXB.mjs → chunk-RHYDUBKD.mjs} +2 -2
  79. package/out/__chunks__/{chunk-QFB7J2WW.mjs → chunk-SQIVM23U.mjs} +2 -2
  80. package/out/__chunks__/{chunk-I6YSI7MZ.mjs → chunk-SRPTHL6W.mjs} +2 -2
  81. package/out/__chunks__/{chunk-SUCNMWH6.mjs → chunk-SW7NDWBA.mjs} +2 -2
  82. package/out/__chunks__/{chunk-CR5UUXIL.mjs → chunk-TK7CPPUP.mjs} +2 -2
  83. package/out/__chunks__/{chunk-UKKIRYLD.mjs → chunk-V3ULNZJT.mjs} +2 -2
  84. package/out/__chunks__/{chunk-DSYP6YGQ.mjs → chunk-V73QDUSC.mjs} +2 -2
  85. package/out/__chunks__/chunk-VBHP2IVI.mjs +2 -0
  86. package/out/__chunks__/{chunk-JSMKFORN.mjs.map → chunk-VBHP2IVI.mjs.map} +1 -1
  87. package/out/__chunks__/{chunk-HGE2R7QZ.mjs → chunk-VEIRZX44.mjs} +2 -2
  88. package/out/__chunks__/{chunk-C5KXFGPH.mjs → chunk-WGK62UNL.mjs} +2 -2
  89. package/out/__chunks__/{chunk-4LA2XSVA.mjs → chunk-XG2GIMBK.mjs} +2 -2
  90. package/out/__chunks__/chunk-XIRJCDWC.mjs +2 -0
  91. package/out/__chunks__/{chunk-QACPAUZ2.mjs.map → chunk-XIRJCDWC.mjs.map} +2 -2
  92. package/out/__chunks__/{chunk-ZXQWU6B3.mjs → chunk-YIMUSXYK.mjs} +2 -2
  93. package/out/__chunks__/{chunk-HMUB4VRE.mjs → chunk-ZBXKGK25.mjs} +2 -2
  94. package/out/__chunks__/{chunk-7TBLQVXJ.mjs → chunk-ZLOPHDVT.mjs} +2 -2
  95. package/out/__chunks__/chunk-ZP2JSMSQ.mjs +2 -0
  96. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  97. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  98. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  99. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  100. package/out/apiCalls/economics/getEconomics.mjs +1 -1
  101. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  102. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  103. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  104. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  105. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  106. package/out/constants/browser.constants.mjs +1 -1
  107. package/out/constants/storage.constants.mjs +1 -1
  108. package/out/constants/window.constants.cjs +1 -1
  109. package/out/constants/window.constants.cjs.map +1 -1
  110. package/out/constants/window.constants.mjs +1 -1
  111. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  112. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  113. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  114. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  115. package/out/lib/sdkDappUi.mjs +1 -1
  116. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  117. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  118. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  119. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  120. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  121. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  122. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  123. package/out/managers/ToastManager/index.mjs +1 -1
  124. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  125. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  126. package/out/managers/TransactionManager/index.mjs +1 -1
  127. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  128. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  129. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  130. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  131. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  132. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  133. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  134. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  135. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  136. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  137. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  138. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  139. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.cjs +1 -1
  140. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.cjs.map +2 -2
  141. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.d.ts +1 -0
  142. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  143. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  144. package/out/methods/account/getAccount.mjs +1 -1
  145. package/out/methods/account/getAccountInfo.mjs +1 -1
  146. package/out/methods/account/getAddress.mjs +1 -1
  147. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  148. package/out/methods/account/getLatestNonce.mjs +1 -1
  149. package/out/methods/initApp/gasStationMetadata/setGasStationMetadata.mjs +1 -1
  150. package/out/methods/initApp/helpers/waitForStoreRehydration.mjs +1 -1
  151. package/out/methods/initApp/initApp.mjs +1 -1
  152. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  153. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  154. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  155. package/out/methods/network/getEgldLabel.mjs +1 -1
  156. package/out/methods/network/getExplorerAddress.mjs +1 -1
  157. package/out/methods/network/getNetworkConfig.mjs +1 -1
  158. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  159. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +1 -1
  160. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +1 -1
  161. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +1 -1
  162. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +1 -1
  163. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +1 -1
  164. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  165. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  166. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  167. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  168. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  169. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  170. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  171. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  172. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  173. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  174. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  175. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  176. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  177. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  178. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  179. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +1 -1
  180. package/out/providers/DappProvider/helpers/login/helpers/loginWithNativeToken.mjs +1 -1
  181. package/out/providers/DappProvider/helpers/login/helpers/loginWithoutNativeToken.mjs +1 -1
  182. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  183. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  184. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  185. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  186. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  187. package/out/providers/DappProvider/index.mjs +1 -1
  188. package/out/providers/ProviderFactory.mjs +1 -1
  189. package/out/providers/helpers/accountProvider.mjs +1 -1
  190. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  191. package/out/providers/helpers/restoreProvider.mjs +1 -1
  192. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  193. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  194. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  195. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  196. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  197. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  198. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  199. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  200. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/authenticateLedgerAccount.mjs +1 -1
  201. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/index.mjs +1 -1
  202. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  203. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/helpers/waitForLedgerSelection.mjs +1 -1
  204. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount/index.mjs +1 -1
  205. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/getLedgerProvider.mjs +1 -1
  206. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider/index.mjs +1 -1
  207. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  208. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  209. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  210. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  211. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  212. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  213. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  214. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  215. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  216. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  217. package/out/providers/strategies/helpers/index.mjs +1 -1
  218. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  219. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  220. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  221. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  222. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  223. package/out/react/account/useGetAccount.mjs +1 -1
  224. package/out/react/account/useGetAccountInfo.mjs +1 -1
  225. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  226. package/out/react/account/useGetLatestNonce.mjs +1 -1
  227. package/out/react/index.mjs +1 -1
  228. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  229. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  230. package/out/react/store/getReactStore.mjs +1 -1
  231. package/out/react/store/useSelector.mjs +1 -1
  232. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  233. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  234. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  235. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  236. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  237. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  238. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  239. package/out/services/nativeAuth/index.mjs +1 -1
  240. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  241. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  242. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  243. package/out/store/actions/account/accountActions.mjs +1 -1
  244. package/out/store/actions/account/index.mjs +1 -1
  245. package/out/store/actions/cache/cacheActions.cjs +1 -1
  246. package/out/store/actions/cache/cacheActions.cjs.map +2 -2
  247. package/out/store/actions/cache/cacheActions.mjs +1 -1
  248. package/out/store/actions/cache/index.mjs +1 -1
  249. package/out/store/actions/config/configActions.cjs +1 -1
  250. package/out/store/actions/config/configActions.cjs.map +2 -2
  251. package/out/store/actions/config/configActions.mjs +1 -1
  252. package/out/store/actions/config/index.mjs +1 -1
  253. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  254. package/out/store/actions/network/index.mjs +1 -1
  255. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  256. package/out/store/actions/network/networkActions.mjs +1 -1
  257. package/out/store/actions/sharedActions/index.mjs +1 -1
  258. package/out/store/actions/sharedActions/sharedActions.cjs +1 -1
  259. package/out/store/actions/sharedActions/sharedActions.cjs.map +2 -2
  260. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  261. package/out/store/actions/toasts/index.mjs +1 -1
  262. package/out/store/actions/toasts/toastsActions.cjs +1 -1
  263. package/out/store/actions/toasts/toastsActions.cjs.map +2 -2
  264. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  265. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  266. package/out/store/actions/ui/index.mjs +1 -1
  267. package/out/store/actions/ui/uiActions.mjs +1 -1
  268. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  269. package/out/store/middleware/index.mjs +1 -1
  270. package/out/store/middleware/logoutMiddleware.cjs +1 -1
  271. package/out/store/middleware/logoutMiddleware.cjs.map +2 -2
  272. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  273. package/out/store/storage/index.mjs +1 -1
  274. package/out/store/storage/storageCallback.mjs +1 -1
  275. package/out/store/store.mjs +1 -1
  276. package/out/utils/ComponentFactory.mjs +1 -1
  277. package/out/utils/account/fetchAccount.mjs +1 -1
  278. package/out/utils/account/refreshAccount.mjs +1 -1
  279. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  280. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  281. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  282. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  283. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  284. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  285. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  286. package/out/utils/visual/switchTheme.mjs +1 -1
  287. package/out/utils/window/getIsInIframe.mjs +1 -1
  288. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  289. package/package.json +2 -2
  290. package/out/__chunks__/chunk-24CPBGCH.mjs +0 -2
  291. package/out/__chunks__/chunk-35EXU334.mjs +0 -2
  292. package/out/__chunks__/chunk-6MORBL7D.mjs +0 -2
  293. package/out/__chunks__/chunk-A73PXGDS.mjs +0 -2
  294. package/out/__chunks__/chunk-BFXBUPF6.mjs +0 -2
  295. package/out/__chunks__/chunk-CS4W23Q6.mjs +0 -2
  296. package/out/__chunks__/chunk-DHEVOIFX.mjs +0 -2
  297. package/out/__chunks__/chunk-ENTK35RW.mjs +0 -2
  298. package/out/__chunks__/chunk-EZ5EHJAG.mjs +0 -2
  299. package/out/__chunks__/chunk-EZ5EHJAG.mjs.map +0 -7
  300. package/out/__chunks__/chunk-GSUNOQV4.mjs +0 -2
  301. package/out/__chunks__/chunk-I2OKZQ54.mjs +0 -2
  302. package/out/__chunks__/chunk-IABRMIY4.mjs +0 -2
  303. package/out/__chunks__/chunk-JSMKFORN.mjs +0 -2
  304. package/out/__chunks__/chunk-KO2HL52Q.mjs +0 -2
  305. package/out/__chunks__/chunk-OTDI42RV.mjs +0 -2
  306. package/out/__chunks__/chunk-P5FZPZ2Q.mjs +0 -2
  307. package/out/__chunks__/chunk-QACPAUZ2.mjs +0 -2
  308. package/out/__chunks__/chunk-QRRLMYAY.mjs +0 -2
  309. package/out/__chunks__/chunk-QRRLMYAY.mjs.map +0 -7
  310. package/out/__chunks__/chunk-YEIQTWTR.mjs +0 -2
  311. package/out/__chunks__/chunk-ZBYJXV52.mjs +0 -2
  312. /package/out/__chunks__/{chunk-KBDUCN6V.mjs.map → chunk-35TLBLLZ.mjs.map} +0 -0
  313. /package/out/__chunks__/{chunk-OTFG6FYJ.mjs.map → chunk-3B7DG5PU.mjs.map} +0 -0
  314. /package/out/__chunks__/{chunk-UOKJWB7L.mjs.map → chunk-4AOBQXI3.mjs.map} +0 -0
  315. /package/out/__chunks__/{chunk-RUH7HLTP.mjs.map → chunk-4EAIQB7E.mjs.map} +0 -0
  316. /package/out/__chunks__/{chunk-35EXU334.mjs.map → chunk-4G4G7FVT.mjs.map} +0 -0
  317. /package/out/__chunks__/{chunk-C2YSQJEV.mjs.map → chunk-4P6KVGFJ.mjs.map} +0 -0
  318. /package/out/__chunks__/{chunk-4RELBVB7.mjs.map → chunk-4W5VY3GO.mjs.map} +0 -0
  319. /package/out/__chunks__/{chunk-CPAFNPLQ.mjs.map → chunk-676U6OTI.mjs.map} +0 -0
  320. /package/out/__chunks__/{chunk-D7CVEV7I.mjs.map → chunk-6PHKMRFV.mjs.map} +0 -0
  321. /package/out/__chunks__/{chunk-RO7SO5LA.mjs.map → chunk-7YCD5466.mjs.map} +0 -0
  322. /package/out/__chunks__/{chunk-OMREOWFU.mjs.map → chunk-7ZU5KDF4.mjs.map} +0 -0
  323. /package/out/__chunks__/{chunk-6MORBL7D.mjs.map → chunk-AWODPMKF.mjs.map} +0 -0
  324. /package/out/__chunks__/{chunk-K5D7EAJK.mjs.map → chunk-B3PQJ4WY.mjs.map} +0 -0
  325. /package/out/__chunks__/{chunk-BRY5BA6A.mjs.map → chunk-B7CFQZKI.mjs.map} +0 -0
  326. /package/out/__chunks__/{chunk-EJ3QAFY6.mjs.map → chunk-BAWT2YA7.mjs.map} +0 -0
  327. /package/out/__chunks__/{chunk-ND2NXMCD.mjs.map → chunk-BYO4QPIX.mjs.map} +0 -0
  328. /package/out/__chunks__/{chunk-JDOHWW3H.mjs.map → chunk-C2NRPSEA.mjs.map} +0 -0
  329. /package/out/__chunks__/{chunk-QYNRDUZM.mjs.map → chunk-C6H5TEAY.mjs.map} +0 -0
  330. /package/out/__chunks__/{chunk-KQI42KC7.mjs.map → chunk-CDOZBMWB.mjs.map} +0 -0
  331. /package/out/__chunks__/{chunk-UVBK3OPF.mjs.map → chunk-CGBSNDVZ.mjs.map} +0 -0
  332. /package/out/__chunks__/{chunk-NY5RZF3S.mjs.map → chunk-CXCWCLFJ.mjs.map} +0 -0
  333. /package/out/__chunks__/{chunk-OCJN5W6F.mjs.map → chunk-D67JUKPD.mjs.map} +0 -0
  334. /package/out/__chunks__/{chunk-6SJ27LTT.mjs.map → chunk-EB6K5LCD.mjs.map} +0 -0
  335. /package/out/__chunks__/{chunk-RVR5IHSG.mjs.map → chunk-EQBGROHI.mjs.map} +0 -0
  336. /package/out/__chunks__/{chunk-BQECZ57V.mjs.map → chunk-F4LRBZHI.mjs.map} +0 -0
  337. /package/out/__chunks__/{chunk-4V3TPITU.mjs.map → chunk-F75YW37Y.mjs.map} +0 -0
  338. /package/out/__chunks__/{chunk-I353LINT.mjs.map → chunk-FJW5NQC5.mjs.map} +0 -0
  339. /package/out/__chunks__/{chunk-GDCPUXS7.mjs.map → chunk-FQ6P5OK7.mjs.map} +0 -0
  340. /package/out/__chunks__/{chunk-QSJQYXYK.mjs.map → chunk-FVVRPNSD.mjs.map} +0 -0
  341. /package/out/__chunks__/{chunk-YUWDAJJR.mjs.map → chunk-G6OHKF3V.mjs.map} +0 -0
  342. /package/out/__chunks__/{chunk-UNQALHBG.mjs.map → chunk-GAO3N3BI.mjs.map} +0 -0
  343. /package/out/__chunks__/{chunk-5UL4FBN6.mjs.map → chunk-HIDRVWOQ.mjs.map} +0 -0
  344. /package/out/__chunks__/{chunk-CS4W23Q6.mjs.map → chunk-I25KKLGU.mjs.map} +0 -0
  345. /package/out/__chunks__/{chunk-YOL5BR6T.mjs.map → chunk-IHBIVBQ3.mjs.map} +0 -0
  346. /package/out/__chunks__/{chunk-3RPLSVYB.mjs.map → chunk-IVM526MS.mjs.map} +0 -0
  347. /package/out/__chunks__/{chunk-I6EBU6LQ.mjs.map → chunk-IWJRKPVP.mjs.map} +0 -0
  348. /package/out/__chunks__/{chunk-653YOZ5D.mjs.map → chunk-IXYOEFTN.mjs.map} +0 -0
  349. /package/out/__chunks__/{chunk-5MHI6OUR.mjs.map → chunk-JDKOXHUE.mjs.map} +0 -0
  350. /package/out/__chunks__/{chunk-XYYV37IV.mjs.map → chunk-JFJMW7YZ.mjs.map} +0 -0
  351. /package/out/__chunks__/{chunk-WLKPV4TY.mjs.map → chunk-JJRF4KKM.mjs.map} +0 -0
  352. /package/out/__chunks__/{chunk-ELNE773L.mjs.map → chunk-JTI5OLEX.mjs.map} +0 -0
  353. /package/out/__chunks__/{chunk-W7BOAMKU.mjs.map → chunk-KBUF3VYQ.mjs.map} +0 -0
  354. /package/out/__chunks__/{chunk-DHEVOIFX.mjs.map → chunk-KEZWPJRC.mjs.map} +0 -0
  355. /package/out/__chunks__/{chunk-7K6MWD7N.mjs.map → chunk-L3RER46P.mjs.map} +0 -0
  356. /package/out/__chunks__/{chunk-UH5DD4GC.mjs.map → chunk-LDPF47U7.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-IHTRH334.mjs.map → chunk-LDPXTCNA.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-23SYZQVD.mjs.map → chunk-LS4PX2PR.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-KO2HL52Q.mjs.map → chunk-M3LLNTKM.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-J4HHNGK7.mjs.map → chunk-M5JPM5BF.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-2AO3IMQY.mjs.map → chunk-MKYGGOBL.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-HS5VQCLV.mjs.map → chunk-MN25YLTY.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-5OLZRP26.mjs.map → chunk-MN3XDS7Q.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-74GRPF4E.mjs.map → chunk-MW6XCNWP.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-ALFFIEML.mjs.map → chunk-NGF3A544.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-A73PXGDS.mjs.map → chunk-NNPFUDB7.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-ENTK35RW.mjs.map → chunk-NPNP2H3A.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-YEIQTWTR.mjs.map → chunk-NXF3BPNL.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-24RY7VT6.mjs.map → chunk-OCXXTA4P.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-XS32F7NC.mjs.map → chunk-ODNGFTW5.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-GSUNOQV4.mjs.map → chunk-OSOBELOT.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-DNNARVBG.mjs.map → chunk-OUYP2DZU.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-IABRMIY4.mjs.map → chunk-OX3ABKOU.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-BFXBUPF6.mjs.map → chunk-PYDTFFI4.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-I2OKZQ54.mjs.map → chunk-QL6WH4QS.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-ZBYJXV52.mjs.map → chunk-QQANPK2G.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-YTIAQLNG.mjs.map → chunk-R5USHTAC.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-GI6SK256.mjs.map → chunk-RBEU3I23.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-SMYMCVXB.mjs.map → chunk-RHYDUBKD.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-QFB7J2WW.mjs.map → chunk-SQIVM23U.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-I6YSI7MZ.mjs.map → chunk-SRPTHL6W.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-SUCNMWH6.mjs.map → chunk-SW7NDWBA.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-CR5UUXIL.mjs.map → chunk-TK7CPPUP.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-UKKIRYLD.mjs.map → chunk-V3ULNZJT.mjs.map} +0 -0
  385. /package/out/__chunks__/{chunk-DSYP6YGQ.mjs.map → chunk-V73QDUSC.mjs.map} +0 -0
  386. /package/out/__chunks__/{chunk-HGE2R7QZ.mjs.map → chunk-VEIRZX44.mjs.map} +0 -0
  387. /package/out/__chunks__/{chunk-C5KXFGPH.mjs.map → chunk-WGK62UNL.mjs.map} +0 -0
  388. /package/out/__chunks__/{chunk-4LA2XSVA.mjs.map → chunk-XG2GIMBK.mjs.map} +0 -0
  389. /package/out/__chunks__/{chunk-ZXQWU6B3.mjs.map → chunk-YIMUSXYK.mjs.map} +0 -0
  390. /package/out/__chunks__/{chunk-HMUB4VRE.mjs.map → chunk-ZBXKGK25.mjs.map} +0 -0
  391. /package/out/__chunks__/{chunk-7TBLQVXJ.mjs.map → chunk-ZLOPHDVT.mjs.map} +0 -0
  392. /package/out/__chunks__/{chunk-P5FZPZ2Q.mjs.map → chunk-ZP2JSMSQ.mjs.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{j as a,q as o}from"./chunk-DZZ5M34O.mjs";import{f as p}from"./chunk-DA76AK4I.mjs";var d=()=>o().setState(a,!1,{type:"logoutAction",payload:{value:null}}),s=({address:e,providerType:t})=>{o().setState(({account:r,loginInfo:i})=>{r.address=e,r.publicKey=new p(e).toHex(),i&&(i.providerType=t)},!1,{type:"loginAction",payload:{value:{address:e,providerType:t}}})};export{d as a,s as b};
2
+ //# sourceMappingURL=chunk-2FEH3E6U.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/actions/sharedActions/sharedActions.ts"],
4
+ "sourcesContent": ["import { Address } from 'lib/sdkCore';\nimport { ProviderType } from 'providers/types/providerFactory.types';\nimport { resetStore } from 'store/middleware/logoutMiddleware';\nimport { getStore } from 'store/store';\n\nexport const logoutAction = () =>\n getStore().setState(resetStore, false, {\n type: 'logoutAction',\n // @ts-ignore\n payload: {\n value: null\n }\n });\nexport interface LoginActionPayloadType<T extends ProviderType = ProviderType> {\n address: string;\n providerType: T;\n}\n\nexport const loginAction = ({\n address,\n providerType\n}: LoginActionPayloadType) => {\n getStore().setState(\n ({ account, loginInfo }) => {\n account.address = address;\n account.publicKey = new Address(address).toHex();\n\n if (loginInfo) {\n loginInfo.providerType = providerType;\n }\n },\n false,\n {\n type: 'loginAction',\n // @ts-ignore\n payload: {\n value: { address, providerType }\n }\n }\n );\n};\n"],
5
+ "mappings": "yFAKO,IAAMA,EAAe,IAC1BC,EAAS,EAAE,SAASC,EAAY,GAAO,CACrC,KAAM,eAEN,QAAS,CACP,MAAO,IACT,CACF,CAAC,EAMUC,EAAc,CAAC,CAC1B,QAAAC,EACA,aAAAC,CACF,IAA8B,CAC5BJ,EAAS,EAAE,SACT,CAAC,CAAE,QAAAK,EAAS,UAAAC,CAAU,IAAM,CAC1BD,EAAQ,QAAUF,EAClBE,EAAQ,UAAY,IAAIE,EAAQJ,CAAO,EAAE,MAAM,EAE3CG,IACFA,EAAU,aAAeF,EAE7B,EACA,GACA,CACE,KAAM,cAEN,QAAS,CACP,MAAO,CAAE,QAAAD,EAAS,aAAAC,CAAa,CACjC,CACF,CACF,CACF",
6
+ "names": ["logoutAction", "getStore", "resetStore", "loginAction", "address", "providerType", "account", "loginInfo", "Address"]
7
+ }
@@ -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-EJ3QAFY6.mjs";import{a as g}from"./chunk-IABRMIY4.mjs";import{s as e}from"./chunk-24CPBGCH.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-KBDUCN6V.mjs.map
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,2 +1,2 @@
1
- import{q as o}from"./chunk-24CPBGCH.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-OTFG6FYJ.mjs.map
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,2 +1,2 @@
1
- import{a as e}from"./chunk-JSMKFORN.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-UOKJWB7L.mjs.map
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,2 +1,2 @@
1
- import{a as t}from"./chunk-JSMKFORN.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
- //# sourceMappingURL=chunk-RUH7HLTP.mjs.map
1
+ import{a as t}from"./chunk-VBHP2IVI.mjs";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"||!t))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a};
2
+ //# sourceMappingURL=chunk-4EAIQB7E.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-VBHP2IVI.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-4G4G7FVT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-3RPLSVYB.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-C2YSQJEV.mjs.map
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
@@ -0,0 +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,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/actions/cache/cacheActions.ts"],
4
- "sourcesContent": ["import { getStore } from 'store/store';\n\nexport const saveToCache = <T>({ key, value }: { key: string; value: T }) => {\n getStore().setState(\n ({ cache: state }) => {\n state[key] = value;\n },\n false,\n {\n type: 'saveToCache',\n // @ts-ignore\n payload: {\n value\n }\n }\n );\n};\n\nexport const removeFromCache = (key: string) => {\n getStore().setState(\n ({ cache: state }) => {\n delete state[key];\n },\n false,\n {\n type: 'removeFromCache',\n // @ts-ignore\n payload: {\n value: key\n }\n }\n );\n};\n\nexport const clearCache = () => {\n getStore().setState(\n ({ cache: state }) => {\n Object.keys(state).forEach((key) => {\n delete state[key];\n });\n },\n false,\n 'clearCache'\n );\n};\n"],
5
- "mappings": "yCAEO,IAAMA,EAAc,CAAI,CAAE,IAAAC,EAAK,MAAAC,CAAM,IAAiC,CAC3EC,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpBA,EAAMH,CAAG,EAAIC,CACf,EACA,GACA,CACE,KAAM,cAEN,QAAS,CACP,MAAAA,CACF,CACF,CACF,CACF,EAEaG,EAAmBJ,GAAgB,CAC9CE,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAOA,EAAMH,CAAG,CAClB,EACA,GACA,CACE,KAAM,kBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,CACF,EAEaK,EAAa,IAAM,CAC9BH,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAO,KAAKA,CAAK,EAAE,QAASH,GAAQ,CAClC,OAAOG,EAAMH,CAAG,CAClB,CAAC,CACH,EACA,GACA,YACF,CACF",
4
+ "sourcesContent": ["import { getStore } from 'store/store';\n\nexport const saveToCache = <T>({ key, value }: { key: string; value: T }) => {\n getStore().setState(\n ({ cache: state }) => {\n state[key] = value;\n },\n false,\n {\n type: 'saveToCache',\n // @ts-ignore\n payload: {\n value\n }\n }\n );\n};\n\nexport const removeFromCache = (key: string) => {\n getStore().setState(\n ({ cache: state }) => {\n delete state[key];\n },\n false,\n {\n type: 'removeFromCache',\n // @ts-ignore\n payload: {\n value: key\n }\n }\n );\n};\n\nexport const clearCache = () => {\n getStore().setState(\n ({ cache: state }) => {\n Object.keys(state).forEach((key) => {\n delete state[key];\n });\n },\n false,\n {\n type: 'clearCache',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n"],
5
+ "mappings": "yCAEO,IAAMA,EAAc,CAAI,CAAE,IAAAC,EAAK,MAAAC,CAAM,IAAiC,CAC3EC,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpBA,EAAMH,CAAG,EAAIC,CACf,EACA,GACA,CACE,KAAM,cAEN,QAAS,CACP,MAAAA,CACF,CACF,CACF,CACF,EAEaG,EAAmBJ,GAAgB,CAC9CE,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAOA,EAAMH,CAAG,CAClB,EACA,GACA,CACE,KAAM,kBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,CACF,EAEaK,EAAa,IAAM,CAC9BH,EAAS,EAAE,SACT,CAAC,CAAE,MAAOC,CAAM,IAAM,CACpB,OAAO,KAAKA,CAAK,EAAE,QAASH,GAAQ,CAClC,OAAOG,EAAMH,CAAG,CAClB,CAAC,CACH,EACA,GACA,CACE,KAAM,aAEN,QAAS,CACP,MAAO,IACT,CACF,CACF,CACF",
6
6
  "names": ["saveToCache", "key", "value", "getStore", "state", "removeFromCache", "clearCache"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-UH5DD4GC.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-4RELBVB7.mjs.map
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,2 +1,2 @@
1
- import{a as w}from"./chunk-CS4W23Q6.mjs";import{a as p}from"./chunk-RVR5IHSG.mjs";import{a as O}from"./chunk-SMYMCVXB.mjs";import{a as M}from"./chunk-WLKPV4TY.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-EZ5EHJAG.mjs";import{d as B}from"./chunk-OTFG6FYJ.mjs";import{l as f}from"./chunk-M6MN4RXG.mjs";import{q as c}from"./chunk-24CPBGCH.mjs";import{a as d}from"./chunk-5MHI6OUR.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-CPAFNPLQ.mjs.map
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
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-NJN53MJV.mjs";import{a as l}from"./chunk-YSCND2MX.mjs";import{q as n}from"./chunk-DZZ5M34O.mjs";var c={},u={},p=(t,o)=>{n().setState(({toasts:s})=>{let a=s.customToasts.length>0?Math.max(...s.customToasts.map(m=>parseInt(m.toastId.split("-").pop()??"0"))):0,e=o??`custom-toast-${a+1}`,T=s.customToasts.findIndex(m=>m.toastId===e),i={...t,toastId:e};if(T!==-1){s.customToasts[T]=i;return}s.customToasts.push({...i,toastId:e})},!1,{type:"addCustomToast",payload:{value:{customToast:t,currentToastId:o}}})},C=t=>{n().setState(({toasts:o})=>{o.customToasts=o.customToasts.filter(s=>s.toastId!==t)},!1,{type:"removeCustomToast",payload:{value:t}})},I=()=>{n().setState(({toasts:t})=>{t.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},f=()=>{n().setState(({toasts:t})=>{t.transactionToasts=[]},!1,{type:"removeAllTransactionToasts",payload:{value:null}})},g=({toastId:t,totalDuration:o})=>{let s="";return n().setState(({toasts:a})=>{let e=a.transactionToasts.length>0?Math.max(...a.transactionToasts.map(T=>parseInt(T.toastId.split("-").pop()??"0"))):0;s=t??`transaction-toast-${e+1}`,a.transactionToasts.push({startTime:l(),endTime:r(o),toastId:s})},!1,{type:"addTransactionToast",payload:{value:{toastId:t,totalDuration:o}}}),s},v=t=>{n().setState(({toasts:o})=>{o.transactionToasts=o.transactionToasts.filter(s=>s.toastId!==t)},!1,{type:"removeTransactionToast",payload:{value:t}}),delete u[t],delete c[t]},h=t=>{let{toasts:o}=n().getState(),s=o.customToasts.length>0?Math.max(...o.customToasts.map(e=>parseInt(e.toastId.split("-").pop()??"0"))):0,a=t.toastId||`custom-toast-${s+1}`;return t.onClose&&(u[a]=t.onClose),t.instantiateToastElement?(c[a]=t.instantiateToastElement,n().setState(({toasts:e})=>{let T=e.customToasts.findIndex(m=>m.toastId===a),i={...t,instantiateToastElement:null,toastId:a};T!==-1?e.customToasts[T]=i:e.customToasts.push(i)},!1,{type:"createCustomToast",payload:{value:t}}),a):(p(t,a),a)};export{c as a,u as b,p as c,C as d,I as e,f,g,v as h,h as i};
2
+ //# sourceMappingURL=chunk-6B2GHZDF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/actions/toasts/toastsActions.ts"],
4
+ "sourcesContent": ["import {\n CustomToastType,\n IComponentToast\n} from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport {\n getUnixTimestamp,\n getUnixTimestampWithAddedMilliseconds\n} from 'utils/dateTime';\n\nexport const customToastComponentDictionary: Record<\n string,\n IComponentToast['instantiateToastElement']\n> = {};\nexport const customToastCloseHandlersDictionary: Record<string, () => void> =\n {};\n\nexport const addCustomToast = (\n customToast: CustomToastType,\n currentToastId?: string\n) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.customToasts.length > 0\n ? Math.max(\n ...state.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const toastId = currentToastId ?? `custom-toast-${lastToastIndex + 1}`;\n\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const newToast: CustomToastType = {\n ...customToast,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = newToast;\n return;\n }\n\n state.customToasts.push({\n ...newToast,\n toastId\n });\n },\n false,\n {\n type: 'addCustomToast',\n // @ts-ignore\n payload: {\n value: { customToast, currentToastId }\n }\n }\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n {\n type: 'removeCustomToast',\n // @ts-ignore\n payload: {\n value: toastId\n }\n }\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n {\n type: 'removeAllCustomToasts',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = [];\n },\n false,\n {\n type: 'removeAllTransactionToasts',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n\nexport const addTransactionToast = ({\n toastId,\n totalDuration\n}: {\n toastId: string;\n totalDuration: number;\n}): string => {\n let newToastId: string = '';\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.transactionToasts.length > 0\n ? Math.max(\n ...state.transactionToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n newToastId = toastId ?? `transaction-toast-${lastToastIndex + 1}`;\n\n state.transactionToasts.push({\n startTime: getUnixTimestamp(),\n endTime: getUnixTimestampWithAddedMilliseconds(totalDuration),\n toastId: newToastId\n });\n },\n false,\n {\n type: 'addTransactionToast',\n // @ts-ignore\n payload: {\n value: { toastId, totalDuration }\n }\n }\n );\n\n return newToastId;\n};\n\nexport const removeTransactionToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = state.transactionToasts.filter((toast) => {\n return toast.toastId !== toastId;\n });\n },\n false,\n {\n type: 'removeTransactionToast',\n // @ts-ignore\n payload: {\n value: toastId\n }\n }\n );\n\n delete customToastCloseHandlersDictionary[toastId];\n delete customToastComponentDictionary[toastId];\n};\n\nexport const createCustomToast = (props: CustomToastType) => {\n const { toasts } = getStore().getState();\n\n const lastToastIndex =\n toasts.customToasts.length > 0\n ? Math.max(\n ...toasts.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n\n const toastId = props.toastId || `custom-toast-${lastToastIndex + 1}`;\n\n if (props.onClose) {\n customToastCloseHandlersDictionary[toastId] = props.onClose;\n }\n\n if (props.instantiateToastElement) {\n customToastComponentDictionary[toastId] = props.instantiateToastElement;\n\n getStore().setState(\n ({ toasts: state }) => {\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const toast: CustomToastType = {\n ...props,\n instantiateToastElement: null,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = toast;\n } else {\n state.customToasts.push(toast);\n }\n },\n false,\n {\n type: 'createCustomToast',\n // @ts-ignore\n payload: {\n value: props\n }\n }\n );\n\n return toastId;\n }\n\n addCustomToast(props, toastId);\n return toastId;\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["customToastComponentDictionary", "customToastCloseHandlersDictionary", "addCustomToast", "customToast", "currentToastId", "getStore", "state", "lastToastIndex", "toast", "toastId", "existingToastIndex", "newToast", "removeCustomToast", "removeAllCustomToasts", "removeAllTransactionToasts", "addTransactionToast", "totalDuration", "newToastId", "getUnixTimestamp", "getUnixTimestampWithAddedMilliseconds", "removeTransactionToast", "createCustomToast", "props", "toasts"]
7
+ }
@@ -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-24CPBGCH.mjs";function m(){let r=o(t());return r?Math.max(1e3,r/2):9e4}export{m as a};
2
- //# sourceMappingURL=chunk-D7CVEV7I.mjs.map
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,2 +1,2 @@
1
- import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-UVBK3OPF.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
- //# sourceMappingURL=chunk-RO7SO5LA.mjs.map
1
+ import{a as r}from"./chunk-55W25Q35.mjs";import{a as s}from"./chunk-CGBSNDVZ.mjs";import o from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(o(t))return[];let i=r(t);return s({transactions:i})};export{e as a};
2
+ //# sourceMappingURL=chunk-7YCD5466.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-7TBLQVXJ.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-OMREOWFU.mjs.map
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
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-DZZ5M34O.mjs";import{c as r}from"./chunk-FK6DWWZF.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-AWODPMKF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-JSMKFORN.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
- //# sourceMappingURL=chunk-K5D7EAJK.mjs.map
1
+ import{a as e}from"./chunk-VBHP2IVI.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
+ //# sourceMappingURL=chunk-B3PQJ4WY.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-XS32F7NC.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-BRY5BA6A.mjs.map
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,2 +1,2 @@
1
- import{a as Z}from"./chunk-ELNE773L.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-CPAFNPLQ.mjs";import{a as rt}from"./chunk-4V3TPITU.mjs";import{a as tt}from"./chunk-IABRMIY4.mjs";import{a as et}from"./chunk-74GRPF4E.mjs";import{a as nt}from"./chunk-D7CVEV7I.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-4LA2XSVA.mjs";import{a as st}from"./chunk-DHEVOIFX.mjs";import{a as ut}from"./chunk-J4HHNGK7.mjs";import{a as M}from"./chunk-XYYV37IV.mjs";import{a as ct}from"./chunk-HMUB4VRE.mjs";import{b as A}from"./chunk-IHTRH334.mjs";import{c as O}from"./chunk-UOKJWB7L.mjs";import{a as d}from"./chunk-ZBYJXV52.mjs";import{a as J}from"./chunk-6MORBL7D.mjs";import{a as w}from"./chunk-JDOHWW3H.mjs";import{a as P,f as X}from"./chunk-GI6SK256.mjs";import{b as it}from"./chunk-QRRLMYAY.mjs";import{b as k}from"./chunk-OTFG6FYJ.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-A73PXGDS.mjs";import{a as _}from"./chunk-YUWDAJJR.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-I2OKZQ54.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-24CPBGCH.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
2
- //# sourceMappingURL=chunk-EJ3QAFY6.mjs.map
1
+ import{a as Z}from"./chunk-JTI5OLEX.mjs";import{a as Q}from"./chunk-6UZHM5LW.mjs";import{c as W}from"./chunk-676U6OTI.mjs";import{a as rt}from"./chunk-F75YW37Y.mjs";import{a as tt}from"./chunk-OX3ABKOU.mjs";import{a as et}from"./chunk-MW6XCNWP.mjs";import{a as nt}from"./chunk-6PHKMRFV.mjs";import{a as ot}from"./chunk-ABBDCZHP.mjs";import{a as mt}from"./chunk-4ODPAHHA.mjs";import{a as at}from"./chunk-XG2GIMBK.mjs";import{a as st}from"./chunk-KEZWPJRC.mjs";import{a as ut}from"./chunk-M5JPM5BF.mjs";import{a as M}from"./chunk-JFJMW7YZ.mjs";import{a as ct}from"./chunk-ZBXKGK25.mjs";import{b as A}from"./chunk-LDPXTCNA.mjs";import{c as O}from"./chunk-4AOBQXI3.mjs";import{a as d}from"./chunk-QQANPK2G.mjs";import{a as J}from"./chunk-AWODPMKF.mjs";import{a as w}from"./chunk-C2NRPSEA.mjs";import{a as P,f as X}from"./chunk-RBEU3I23.mjs";import{b as it}from"./chunk-2FEH3E6U.mjs";import{b as k}from"./chunk-3B7DG5PU.mjs";import{b as S}from"./chunk-V5ZSFCKJ.mjs";import{a as Y}from"./chunk-NNPFUDB7.mjs";import{a as _}from"./chunk-G6OHKF3V.mjs";import{a as y}from"./chunk-BSA3IGL6.mjs";import{a as j}from"./chunk-NWRCQLFI.mjs";import{a as b}from"./chunk-QL6WH4QS.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{b as G}from"./chunk-NGM3AVCY.mjs";import{a as K,b as q,q as v,s as l}from"./chunk-DZZ5M34O.mjs";import{c as V,d as $,f as H}from"./chunk-FK6DWWZF.mjs";import{b as f}from"./chunk-VNLGNNIL.mjs";import{b as B}from"./chunk-2AJ5KJ2V.mjs";import{a as h}from"./chunk-LJX4MW7B.mjs";import{b as D,c as F,f as z}from"./chunk-DA76AK4I.mjs";import U from"bignumber.js";var Lt=async()=>{try{let o=J(),{network:e}=d();try{let t=await b({address:o,baseURL:e.apiAddress});if(t!=null){let n={...t,username:L(t.username),nonce:w(t)};return P(n),n}}catch(t){console.error("Failed getting account ",t)}}catch(o){console.error("Failed getting address ",o)}return null};async function I(){let o=T();if(o==null)throw"Provider not initialized";try{if(!o.init)throw"Current provider does not have init() function";return await o.init()?await Lt():void 0}catch(e){console.error("Failed initializing provider ",e)}}async function gt({sessionId:o,transactionBatch:e,isSequential:t}){try{if(e==null)return;let n=tt(),r=ot(e),i=await Z(r);for(let g of i)await et({serverTransaction:g,sessionId:o,isSequential:t});if(!i.every(g=>g.status!=="pending"))return;n&&await I();let{transactions:c}=l(),s=c?.[o];if(s.transactions.every(g=>g.status==="success"))return k({sessionId:o,status:"success"});if(s.transactions.some(g=>g.status==="fail"))return k({sessionId:o,status:"fail"});if(s.transactions.every(g=>g.status==="not executed"))return k({sessionId:o,status:"invalid"})}catch(n){console.error(n)}}async function pt(){let o=G(l()),e=Object.entries(o);e.length!==0&&await Promise.all(e.map(([t,{transactions:n}])=>gt({sessionId:t,transactionBatch:n})))}async function x(){let o=v(),e=nt(),t=null,n=$(o.getState())?.timestamp??null,r=async()=>{try{await pt()}catch(a){console.error("[trackTransactions] Error checking transaction status:",a)}},i=()=>{t||(t=setInterval(r,e))},p=()=>{t&&(clearInterval(t),t=null)},c=()=>{p();let a=o.subscribe(({account:{websocketEvent:m}})=>{m?.message&&m.timestamp!=null&&n!==m.timestamp&&(n=m.timestamp,r())});O.set("websocketEventReceived",a)};r();let s=()=>{p()},u=o.subscribe(({account:{address:a},config:{websocketStatus:m}},g)=>{if(g.config.websocketStatus!==m)switch(m){case"completed":c();break;case"pending":i();break;default:a?i():s();break}});return O.set("websocketStatusChanged",u),{stopTransactionsTracking:s}}async function N({address:o,provider:e,apiAddress:t}){let n=await b({address:o,baseURL:t});if(!n)throw new Error("Account not found");it({address:o,providerType:e.getType()});let r={...n,username:L(n.username),nonce:w(n)};P(r),await A(o),x(),n.shard!=null&&await rt({shard:Number(n.shard),apiAddress:t})}async function lt({provider:o,nativeAuthConfig:e,token:t}){let{network:{apiAddress:n}}=d(),r=_(e),i=t;i||(i=await r.initialize({noCache:!0}));let p=await o.login({token:i}),{address:c,signature:s,...u}=p;if(!c)return console.warn("Login cancelled."),null;if(!s)return console.error("Failed to sign login token"),null;let a=j(u?.accessToken),m=await at({loginData:p,nativeAuthConfig:e,loginToken:i}),g=a?u.accessToken:r.getToken({address:c,token:m,signature:s});q({loginToken:i,signature:s,nativeAuthToken:g});let C=await st({loginToken:i,extraInfoData:{multisig:u?.multisig,impersonate:u?.impersonate},address:c});return await N({address:C,provider:o,apiAddress:n}),{address:C,signature:s}}async function dt(o){let{network:{apiAddress:e}}=d();await o.login();let t=await o.getAddress();if(!t)throw new Error("Address not found");return await N({address:t,provider:o,apiAddress:e}),{address:t}}async function ft(o,e){let t=S(l());if(t)return await lt({provider:o,nativeAuthConfig:t,token:e?.token});let{address:n}=await dt(o);return await A(n),x(),{address:n,signature:""}}async function Tt({provider:o,transactions:e,options:t={}}){await I();let{isGuarded:n,activeGuardianAddress:r,nonce:i}=Y(),p=o.getType()===h.ledger,c=mt({latestNonce:i,transactions:e}),s=r&&n&&!t.skipGuardian?c?.map(a=>(a.version=D.withTxOptions().valueOf(),a.options=F.withOptions({guarded:!0,...p?{hashSign:!0}:{}}).valueOf(),a.guardian=z.newFromBech32(r),a)):c,u=await o.signTransactions(s,t)??[];return X(i+u.length),u}var E=class{constructor(e){this._isLoggingOut=!1;this.provider=e}init(){return this.provider.init()}async login(e){let t=await ft(this.provider,e);return K(this.provider.getType()),ht(this),R.getInstance().init(),t}isInitialized(){return this.provider.isInitialized()}async logout(e={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let t=await ct({provider:this.provider,options:e});return this._isLoggingOut=!1,t}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(e,t){try{return await Tt({provider:this.provider,transactions:e,options:t})}catch(n){let r=M(n);throw new Error(r)}}async signMessage(e,t){try{return await ut({provider:this.provider,message:e,options:t})}catch(n){let r=M(n,"warning");throw new Error(r)}}cancelLogin(){this.provider.cancelLogin?.()}};var vt=null;function ht(o){vt=o}function T(){return vt||new E(B)}var R=class o{constructor(){this.store=v();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let e=this.store.getState(),t=f(e),{isExpired:n}=y(t?.nativeAuthToken);n?T().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let e=this.store.getState(),t=f(e),n=H(e);return!!(t?.nativeAuthToken&&n)};this.addPlannedLogout=()=>{let e=T(),t=V(this.store.getState()),n=e.getType()===h.webview;if(!t||n)return;this.addLogoutWarning();let r=f(this.store.getState()),{secondsUntilExpires:i,expiresAt:p}=y(r?.nativeAuthToken),c=new U(String(i)),s=`${t}_${p}`,u=this.plannedLogoutKey===s;if(!(i&&c.isGreaterThan(0))||u)return;this.plannedLogoutKey=s,clearTimeout(this.plannedLogoutTimeoutRef??0);let m=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},m.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{e.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},m.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let e=S(this.store.getState()),t=f(this.store.getState()),{secondsUntilExpires:n}=y(t?.nativeAuthToken),r=new U(String(n)),i=r.times(1e3);if(!n||r.isLessThanOrEqualTo(0)||!e?.tokenExpirationToastWarningSeconds)return;let c=new U(e?.tokenExpirationToastWarningSeconds??0).times(1e3),s=r.times(1e3).minus(c),u=Q(i.toNumber()),a=s.isLessThanOrEqualTo(0)?0:s.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{W.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${u}!`}),this.warningLogoutTimeoutRef=null},a)}}static getInstance(){return o.instance||(o.instance=new o),o.instance}};export{R as a,gt as b,pt as c,x as d,N as e,lt as f,dt as g,ft as h,Tt as i,E as j,ht as k,T as l,I as m};
2
+ //# sourceMappingURL=chunk-BAWT2YA7.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-DLWDO7M6.mjs";import{i as v}from"./chunk-YTIAQLNG.mjs";import{k as d}from"./chunk-EJ3QAFY6.mjs";import{s as a}from"./chunk-24CPBGCH.mjs";import{d as n}from"./chunk-VNLGNNIL.mjs";import{a as i}from"./chunk-LJX4MW7B.mjs";import{a as s}from"./chunk-C5KXFGPH.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-ND2NXMCD.mjs.map
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,2 +1,2 @@
1
- import{a}from"./chunk-NGM3AVCY.mjs";import{s as u}from"./chunk-24CPBGCH.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-JDOHWW3H.mjs.map
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,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-24CPBGCH.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-QYNRDUZM.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-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,2 +1,2 @@
1
- import{a as s}from"./chunk-4RELBVB7.mjs";import{a as p}from"./chunk-I6YSI7MZ.mjs";import{a as m}from"./chunk-NY5RZF3S.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-YEIQTWTR.mjs";import{b as a}from"./chunk-GI6SK256.mjs";import{f as i}from"./chunk-24CPBGCH.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
- //# sourceMappingURL=chunk-KQI42KC7.mjs.map
1
+ import{a as s}from"./chunk-4W5VY3GO.mjs";import{a as p}from"./chunk-SRPTHL6W.mjs";import{a as m}from"./chunk-CXCWCLFJ.mjs";import{a as c}from"./chunk-WFMBEYKX.mjs";import{a as g}from"./chunk-NXF3BPNL.mjs";import{b as a}from"./chunk-RBEU3I23.mjs";import{f as i}from"./chunk-DZZ5M34O.mjs";import{a as d}from"./chunk-LJX4MW7B.mjs";async function E({options:r,config:t,provider:o,login:l}){let n=s.getInstance(),L=g(),u=c({loginToken:r?.token,version:t.version});await m({manager:n,provider:o});let e=await p({manager:n,provider:o,login:l,token:r?.token,explorerAddress:L,authData:u}),{version:f,dataEnabled:T}=t;return i({index:e.addressIndex,loginType:d.ledger}),a({address:e.address,index:e.addressIndex,version:f,hasContractDataEnabled:T}),{address:e.address,signature:e.signature}}export{E as a};
2
+ //# sourceMappingURL=chunk-CDOZBMWB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-OTDI42RV.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-BFXBUPF6.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-24CPBGCH.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
- //# sourceMappingURL=chunk-UVBK3OPF.mjs.map
1
+ import{a as d}from"./chunk-4UNMUVTO.mjs";import{f,g as l}from"./chunk-7VHTZYM2.mjs";import{a as S}from"./chunk-PYDTFFI4.mjs";import{a as u}from"./chunk-4O27AVB7.mjs";import{s as h}from"./chunk-DZZ5M34O.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";var I=r=>r.sort((n,t)=>t.timestamp-n.timestamp),M=async({transactions:r,...n})=>{let t=n.store??h(),o=[],i=[];if(r.forEach(s=>{let e=S(s.hash,t);e?o.push(e):i.push(s.hash)}),i.length===0)return I(o);let c=r.map(s=>({...s,txHash:s.hash})),g=c.map(s=>s.txHash),p=i.filter(s=>!g.includes(s));if(p.length>0){let e=r.filter(a=>p.includes(a.hash)).map(a=>({...a,txHash:a.hash,price:0,status:"pending",gasUsed:0,miniBlockHash:"",receiverShard:0,round:0,senderShard:0,timestamp:Date.now()}));c.push(...e)}let m=new Map;return o.forEach(s=>{let e=s.hash;e&&m.set(String(e),s)}),c.forEach(s=>{let e=u({transaction:s,address:T(t),explorerAddress:l(t),egldLabel:f(t)});e.status!=="pending"&&d({key:`transaction-${s.txHash}`,value:e}),m.set(s.txHash,e)}),I(Array.from(m.values()))};export{M as a};
2
+ //# sourceMappingURL=chunk-CGBSNDVZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-BRY5BA6A.mjs";import{a as b}from"./chunk-ZBYJXV52.mjs";import{a as g}from"./chunk-I2OKZQ54.mjs";import{a as m}from"./chunk-YGI3KXMZ.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>g({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=m({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
- //# sourceMappingURL=chunk-NY5RZF3S.mjs.map
1
+ import{a as w}from"./chunk-B7CFQZKI.mjs";import{a as b}from"./chunk-QQANPK2G.mjs";import{a as g}from"./chunk-QL6WH4QS.mjs";import{a as m}from"./chunk-YGI3KXMZ.mjs";import{f}from"./chunk-PJWJZHIS.mjs";import x from"bignumber.js";var F=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),s=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=o=>o.index>=s&&o.index<s+e.addressesPerPage,I=r.reduce((o,n)=>Object.assign(o,{[n.index]:n}),{}),A=r.filter(l),y=!!I[s];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let o=Math.floor(s/e.addressesPerPage),n=await d.getAccounts(o,e.addressesPerPage),L=n.map((t,c)=>({address:t,balance:"...",index:c+s})),P=[...r,...L],h=n.map(t=>g({address:t,baseURL:u.apiAddress})),j=await Promise.all(h),i=P.reduce((t,c)=>Object.assign(t,{[c.address]:c}),{});j.forEach(t=>{if(!t||!a||!a.price)return;let c=new x(t.balance),S=c.dividedBy(x(10).pow(18)).toFormat(4).toString();if(c.isNaN())return;let U=m({amount:f({input:t.balance}),usd:a?.price});i[t.address].balance=S,i[t.address].usdValue=U});let p=Object.values(i).sort((t,c)=>t.index-c.index),O=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:O,isLoading:!1})}catch(o){console.error("Failed to fetch accounts:",o)}};export{F as a};
2
+ //# sourceMappingURL=chunk-CXCWCLFJ.mjs.map
@@ -1,2 +1,2 @@
1
- import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-EJ3QAFY6.mjs";import{q as M}from"./chunk-24CPBGCH.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-JSMKFORN.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
- //# sourceMappingURL=chunk-OCJN5W6F.mjs.map
1
+ import{b as r,c as n}from"./chunk-QJGFIK7H.mjs";import{l as g}from"./chunk-BAWT2YA7.mjs";import{q as M}from"./chunk-DZZ5M34O.mjs";import{a as c}from"./chunk-FK6DWWZF.mjs";import{d as u,f as p,g as l}from"./chunk-DA76AK4I.mjs";import{a as d}from"./chunk-VBHP2IVI.mjs";var m=class{constructor({onLoginCancelled:e}){this.handlers=new Map;this.store=M();this.isLoginInitiated=!1;this.handleMessage=this.handleMessage.bind(this),this.handleLoginCancelled=e}startListening(){d.addEventListener("message",this.handleMessage)}stopListening(){d.removeEventListener("message",this.handleMessage)}registerEvent(e,s){this.handlers.set(e,s)}unregisterEvent(e){this.handlers.delete(e)}async handleMessage(e){let s=e.data?.type;if(typeof s=="string"&&this.handlers.has(s))return this.handlers.get(s)?.(e);switch(s){case r.finalizeHandshakeRequest:this.handshake({event:e});break;case r.signMessageRequest:this.signMessage({event:e,payload:e.data.payload});break;case r.loginRequest:this.isLoginInitiated=!0,this.login({event:e,payload:e.data.payload});break;case r.signTransactionsRequest:this.signTransactions({event:e});break;case n.cancelResponse:case"cancelAction":this.isLoginInitiated&&await this.handleLoginCancelled();break;default:break}}async login({event:e,payload:s}){let a=s?.token;if(a)try{let{address:t}=c(this.store.getState()),o=g(),i=`${t}${a}`,y=new l({address:new p(t),data:new Uint8Array(Buffer.from(i))}),f=(await o.signMessage(y))?.signature??"";e.source?.postMessage({type:n.loginResponse,payload:{data:{address:t,signature:Buffer.from(f).toString("hex")}}},{targetOrigin:e.origin})}catch{this.isLoginInitiated&&(await this.handleLoginCancelled(),e.source?.postMessage({type:n.cancelResponse,payload:null},{targetOrigin:e.origin}))}finally{this.isLoginInitiated=!1}}handshake({event:e}){let s=Date.now().toString();e.source?.postMessage({type:n.finalizeHandshakeResponse,payload:{data:s}},{targetOrigin:e.origin})}async signMessage({event:e,payload:s}){let{address:a}=c(this.store.getState()),{message:t}=s;try{let o=new l({address:new p(a),data:new Uint8Array(Buffer.from(t))}),h=(await g().signMessage(o))?.signature??"";e.source?.postMessage({type:n.signMessageResponse,payload:{data:{signature:Buffer.from(h).toString("hex"),status:"signed"}}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign message")}}async signTransactions({event:e}){let s=g(),{payload:a}=e.data;if(Array.isArray(a))try{let t=a.map(i=>u.newFromPlainObject(i)),o=await s.signTransactions(t);e.source?.postMessage({type:n.signTransactionsResponse,payload:{data:o.map(i=>i.toPlainObject())}},{targetOrigin:e.origin})}catch{throw new Error("Could not sign transactions")}}};export{m as a};
2
+ //# sourceMappingURL=chunk-D67JUKPD.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as p,f as l}from"./chunk-FK6DWWZF.mjs";import{f as s}from"./chunk-VNLGNNIL.mjs";import{b as x}from"./chunk-A7FTKX2A.mjs";import{a as m,b as c}from"./chunk-RIPIZH54.mjs";import{a as T}from"./chunk-2DNGCNYM.mjs";import{a as f,b as g}from"./chunk-M7BM6QPB.mjs";import{a as L}from"./chunk-ONT6BGYB.mjs";import{a as d,b as y}from"./chunk-NLRDRI7Q.mjs";import{a as u,b as S}from"./chunk-VKEESSBI.mjs";import{a as I}from"./chunk-4G4G7FVT.mjs";import{a as k}from"./chunk-KRWR77QE.mjs";import{a as v}from"./chunk-NB7A4C7L.mjs";import{f as a}from"./chunk-DA76AK4I.mjs";import{createJSONStorage as O,devtools as V,persist as h}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=m,e.loginInfo=f,e.transactions=d,e.toasts=u};function H(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=l(e),r=s(e),{address:i,publicKey:D}=p(e);if(i&&D!==new a(i).toHex()&&A(e),!t)return;if(r==null){w(H());return}let P=Date.now();r-P<0&&(w(null),o().setState(A,!1,{type:"logoutMiddleware",payload:{value:null}}))};var M=(e,t)=>{C(e)};var W=e=>{let t=J(V(h(N((...r)=>({network:T(...r),account:c(...r),loginInfo:g(...r),config:L(...r),transactions:y(...r),toasts:S(...r),cache:x(...r),ui:v(...r)})),{name:"sdk-dapp-store",storage:O(e)}),{name:"sdk-dapp"}));return t.subscribe(M),t},n,z=e=>{n=e},o=()=>(n||z(W(()=>new k)),n),Se=(e=I)=>{let t=W(e);return z(t),t},de=()=>o().getState();var Le=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,{type:"setProviderType",payload:{value:e}}),Te=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,{type:"setTokenLogin",payload:{value:e}}),ve=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,{type:"setLoginToken",payload:{value:e}}),Ie=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,{type:"setTokenLoginSignature",payload:{value:e}}),ke=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,{type:"setWalletConnectLogin",payload:{value:e}}),Ae=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,{type:"setLedgerLogin",payload:{value:e}}),we=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,{type:"setIsWalletConnectV2Initialized",payload:{value:e}}),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,{type:"removeLoginExpiresAt",payload:{value:null}}),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,{type:"addLoginExpiresAt",payload:{value:e}});export{Le as a,Te as b,ve as c,Ie as d,ke as e,Ae as f,we as g,E as h,b as i,A as j,H as k,w as l,C as m,M as n,W as o,z as p,o as q,Se as r,de as s};
2
+ //# sourceMappingURL=chunk-DZZ5M34O.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/store.ts", "../../src/store/middleware/logoutMiddleware.ts", "../../src/store/middleware/applyMiddlewares.ts", "../../src/store/actions/loginInfo/loginInfoActions.ts"],
4
- "sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport { accountSlice } from './slices/account';\nimport { cacheSlice } from './slices/cache';\nimport { configSlice } from './slices/config';\nimport { loginInfoSlice } from './slices/loginInfo';\nimport { networkSlice } from './slices/network';\nimport { toastSlice } from './slices/toast';\nimport { transactionsSlice } from './slices/transactions';\nimport { uiSlice } from './slices/ui';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n ),\n {\n name: 'sdk-dapp'\n }\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n const dappStore = createDAppStore(getStorageCallback);\n setDAppStore(dappStore);\n return dappStore;\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { loginExpiresAtSelector } from 'store/selectors/loginInfoSelectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).toHex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore);\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import { ProviderType } from 'providers/types/providerFactory.types';\nimport {\n LedgerLoginType,\n WalletConnectLoginType\n} from 'store/slices/loginInfo/loginInfo.types';\nimport { getStore } from 'store/store';\nimport { TokenLoginType } from 'types/login.types';\n\nexport const setProviderType = <T extends ProviderType = ProviderType>(\n providerType: T\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.providerType = providerType;\n },\n false,\n {\n type: 'setProviderType',\n // @ts-ignore\n payload: {\n value: providerType\n }\n }\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n {\n type: 'setTokenLogin',\n // @ts-ignore\n payload: {\n value: tokenLogin\n }\n }\n );\n\nexport const setLoginToken = (loginToken: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state.tokenLogin != null) {\n state.tokenLogin.loginToken = loginToken;\n return;\n }\n state.tokenLogin = {\n loginToken\n };\n },\n false,\n {\n type: 'setLoginToken',\n // @ts-ignore\n payload: {\n value: loginToken\n }\n }\n );\n\nexport const setTokenLoginSignature = (signature: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state?.tokenLogin != null) {\n state.tokenLogin.signature = signature;\n }\n },\n false,\n {\n type: 'setTokenLoginSignature',\n // @ts-ignore\n payload: {\n value: signature\n }\n }\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n {\n type: 'setWalletConnectLogin',\n // @ts-ignore\n payload: {\n value: walletConnectLogin\n }\n }\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n {\n type: 'setLedgerLogin',\n // @ts-ignore\n payload: {\n value: ledgerLogin\n }\n }\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n {\n type: 'setIsWalletConnectV2Initialized',\n // @ts-ignore\n payload: {\n value: isInitialized\n }\n }\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n {\n type: 'removeLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n {\n type: 'addLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: expiresAt\n }\n }\n );\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport { accountSlice } from './slices/account';\nimport { cacheSlice } from './slices/cache';\nimport { configSlice } from './slices/config';\nimport { loginInfoSlice } from './slices/loginInfo';\nimport { networkSlice } from './slices/network';\nimport { toastSlice } from './slices/toast';\nimport { transactionsSlice } from './slices/transactions';\nimport { uiSlice } from './slices/ui';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n ),\n {\n name: 'sdk-dapp'\n }\n )\n );\n store.subscribe(applyMiddlewares);\n return store;\n};\n\nexport type StoreApi = ReturnType<typeof createDAppStore>;\n\nlet store: StoreApi;\n\nexport const setDAppStore = (_store: StoreApi) => {\n store = _store;\n};\n\nexport const getStore = () => {\n if (!store) {\n setDAppStore(createDAppStore(() => new InMemoryStorage()));\n }\n return store;\n};\n\n/**\n * Initialize store with the preferred storage by passing a callback.\n * Default storage is localStorage.\n * You can pass your own storage.\n * Call this function before using store, ideally before app bootstrapping.\n * @param getStorageCallback\n * @default () => localStorage\n * @returns persistent store instance\n * @example\n * initStore(() => window.localStorage);\n * initStore(() => window.sessionStorage);\n * initStore(() => new InMemoryStorage());\n * */\nexport const initStore = (getStorageCallback = defaultStorageCallback) => {\n const dappStore = createDAppStore(getStorageCallback);\n setDAppStore(dappStore);\n return dappStore;\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { loginExpiresAtSelector } from 'store/selectors/loginInfoSelectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).toHex()) {\n resetStore(state);\n }\n\n if (!isLoggedIn) {\n return;\n }\n\n if (loginTimestamp == null) {\n setLoginExpiresAt(getNewLoginExpiresTimestamp());\n return;\n }\n\n const now = Date.now();\n const isExpired = loginTimestamp - now < 0;\n\n if (isExpired) {\n // logout\n setLoginExpiresAt(null);\n getStore().setState(resetStore, false, {\n type: 'logoutMiddleware',\n // @ts-ignore\n payload: {\n value: null\n }\n });\n }\n};\n", "import { StoreType } from '../store.types';\nimport { logoutMiddleware } from './logoutMiddleware';\n\nexport const applyMiddlewares = (state: StoreType, _prevState: StoreType) => {\n logoutMiddleware(state);\n};\n", "import { ProviderType } from 'providers/types/providerFactory.types';\nimport {\n LedgerLoginType,\n WalletConnectLoginType\n} from 'store/slices/loginInfo/loginInfo.types';\nimport { getStore } from 'store/store';\nimport { TokenLoginType } from 'types/login.types';\n\nexport const setProviderType = <T extends ProviderType = ProviderType>(\n providerType: T\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.providerType = providerType;\n },\n false,\n {\n type: 'setProviderType',\n // @ts-ignore\n payload: {\n value: providerType\n }\n }\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n {\n type: 'setTokenLogin',\n // @ts-ignore\n payload: {\n value: tokenLogin\n }\n }\n );\n\nexport const setLoginToken = (loginToken: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state.tokenLogin != null) {\n state.tokenLogin.loginToken = loginToken;\n return;\n }\n state.tokenLogin = {\n loginToken\n };\n },\n false,\n {\n type: 'setLoginToken',\n // @ts-ignore\n payload: {\n value: loginToken\n }\n }\n );\n\nexport const setTokenLoginSignature = (signature: string) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n if (state?.tokenLogin != null) {\n state.tokenLogin.signature = signature;\n }\n },\n false,\n {\n type: 'setTokenLoginSignature',\n // @ts-ignore\n payload: {\n value: signature\n }\n }\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n {\n type: 'setWalletConnectLogin',\n // @ts-ignore\n payload: {\n value: walletConnectLogin\n }\n }\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n {\n type: 'setLedgerLogin',\n // @ts-ignore\n payload: {\n value: ledgerLogin\n }\n }\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n {\n type: 'setIsWalletConnectV2Initialized',\n // @ts-ignore\n payload: {\n value: isInitialized\n }\n }\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n {\n type: 'removeLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n {\n type: 'addLoginExpiresAt',\n // @ts-ignore\n payload: {\n value: expiresAt\n }\n }\n );\n"],
5
+ "mappings": "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",
6
6
  "names": ["createJSONStorage", "devtools", "persist", "immer", "createStore", "resetStore", "store", "initialState", "getNewLoginExpiresTimestamp", "setLoginExpiresAt", "expiresAt", "removeLoginExpiresAt", "addLoginExpiresAt", "logoutMiddleware", "state", "isLoggedIn", "isLoggedInSelector", "loginTimestamp", "loginExpiresAtSelector", "address", "publicKey", "accountInfoSelector", "Address", "now", "getStore", "applyMiddlewares", "state", "_prevState", "logoutMiddleware", "createDAppStore", "getStorageCallback", "store", "createStore", "devtools", "persist", "immer", "args", "networkSlice", "accountSlice", "loginInfoSlice", "configSlice", "transactionsSlice", "toastSlice", "cacheSlice", "uiSlice", "createJSONStorage", "applyMiddlewares", "setDAppStore", "_store", "getStore", "InMemoryStorage", "initStore", "defaultStorageCallback", "dappStore", "getState", "setProviderType", "providerType", "getStore", "state", "setTokenLogin", "tokenLogin", "setLoginToken", "loginToken", "setTokenLoginSignature", "signature", "setWalletConnectLogin", "walletConnectLogin", "setLedgerLogin", "ledgerLogin", "setIsWalletConnectV2Initialized", "isInitialized", "removeLoginExpiresAt", "addLoginExpiresAt", "expiresAt"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-XS32F7NC.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
2
- //# sourceMappingURL=chunk-6SJ27LTT.mjs.map
1
+ import{a as t}from"./chunk-ODNGFTW5.mjs";import{k as r}from"./chunk-PKDR5ERF.mjs";import{a as o}from"./chunk-2JKCBTYK.mjs";import m from"axios";async function c({addressToVerify:s,baseURL:a}){let e=t(a),{data:i}=await m.get(`${e}/${o}/${s}`,{timeout:r});return i}export{c as a};
2
+ //# sourceMappingURL=chunk-EB6K5LCD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-UVBK3OPF.mjs";import{a as c}from"./chunk-NGM3AVCY.mjs";import{s as m}from"./chunk-24CPBGCH.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";async function G(g){let s=g?.store??m(),n=[],a=[],y=l(s),F=c(s),C=T(s);for(let o of y.transactionToasts){let r=F[o.toastId];if(!r?.status)continue;let{status:t,transactions:P,transactionsDisplayInfo:h}=r,L=await p({transactions:P,store:s}),O=I(t),R=u(t),v=f(t),e=O||R||v,w=d(t),{startTime:x,endTime:D}=o;if(e&&a.some(b=>b.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:C,status:t,transactions:L,transactionsDisplayInfo:h,startTime:x,endTime:D});e&&a.push(i),w&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}}export{G as a};
2
- //# sourceMappingURL=chunk-RVR5IHSG.mjs.map
1
+ import{a as S}from"./chunk-QFXS7HGL.mjs";import{j as d,k as f,l as u,n as I}from"./chunk-E2GGD7D4.mjs";import{a as l}from"./chunk-XXV6KGR4.mjs";import{a as p}from"./chunk-CGBSNDVZ.mjs";import{a as c}from"./chunk-NGM3AVCY.mjs";import{s as m}from"./chunk-DZZ5M34O.mjs";import{c as T}from"./chunk-FK6DWWZF.mjs";async function G(g){let s=g?.store??m(),n=[],a=[],y=l(s),F=c(s),C=T(s);for(let o of y.transactionToasts){let r=F[o.toastId];if(!r?.status)continue;let{status:t,transactions:P,transactionsDisplayInfo:h}=r,L=await p({transactions:P,store:s}),O=I(t),R=u(t),v=f(t),e=O||R||v,w=d(t),{startTime:x,endTime:D}=o;if(e&&a.some(b=>b.toastId===o.toastId))continue;let i=S({toastId:o.toastId,address:C,status:t,transactions:L,transactionsDisplayInfo:h,startTime:x,endTime:D});e&&a.push(i),w&&n.push(i)}return{pendingTransactionToasts:n,completedTransactionToasts:a}}export{G as a};
2
+ //# sourceMappingURL=chunk-EQBGROHI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-XS32F7NC.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-BQECZ57V.mjs.map
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,2 +1,2 @@
1
- import{a as n}from"./chunk-BQECZ57V.mjs";import{b as r}from"./chunk-24RY7VT6.mjs";import{b as i}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-24CPBGCH.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-4V3TPITU.mjs.map
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,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-A73PXGDS.mjs";import{b as e}from"./chunk-7VHTZYM2.mjs";import{s as o}from"./chunk-24CPBGCH.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-I353LINT.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-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,2 +1,2 @@
1
- import{a as u}from"./chunk-U3UMCTU6.mjs";import{a as T}from"./chunk-I6EBU6LQ.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-GDCPUXS7.mjs.map
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,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-24CPBGCH.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,s=e.walletConnectDeepLink||o.walletConnectDeepLink;t.walletConnectConfig={...e,walletConnectDeepLink:s,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"});export{r as a,c as b,C as c,f as d,g as e};
2
- //# sourceMappingURL=chunk-B3NKDU2X.mjs.map
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,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/actions/config/configActions.ts"],
4
- "sourcesContent": ["import { fallbackWalletConnectConfigurations } from 'constants/walletConnect.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { WalletConnectConfig } from 'providers/strategies/WalletConnectProviderStrategy/types';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { IProviderSettings } from 'store/slices/config/config.types';\nimport { getStore } from 'store/store';\n\nexport const setNativeAuthConfig = (config: NativeAuthConfigType | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.nativeAuthConfig = config;\n },\n false,\n {\n type: 'setNativeAuthConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setWebsocketStatus = (status: WebsocketConnectionStatusEnum) =>\n getStore().setState(\n ({ config: state }) => {\n state.websocketStatus = status;\n },\n false,\n {\n type: 'setWebsocketStatus',\n // @ts-ignore\n payload: {\n value: status\n }\n }\n );\n\nexport const setWalletConnectConfig = (config: WalletConnectConfig | null) =>\n getStore().setState(\n ({ config: state }) => {\n if (config) {\n const walletConnectV2RelayAddress =\n config.walletConnectV2RelayAddress ||\n fallbackWalletConnectConfigurations.walletConnectV2RelayAddress;\n const walletConnectDeepLink =\n config.walletConnectDeepLink ||\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n state.walletConnectConfig = {\n ...config,\n walletConnectDeepLink,\n walletConnectV2RelayAddress\n };\n } else {\n state.walletConnectConfig = null;\n }\n },\n false,\n {\n type: 'setWalletConnectConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setProviderSettings = (settings: IProviderSettings | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.settings = settings;\n },\n false,\n {\n type: 'setProviderSettings',\n // @ts-ignore\n payload: {\n value: settings\n }\n }\n );\n\nexport const setIsSigningUiEnabled = (isEnabled: boolean) =>\n getStore().setState(\n ({ config: state }) => {\n if (!state.settings) {\n state.settings = {};\n }\n state.settings.isSigningUiEnabled = isEnabled;\n },\n false,\n {\n type: 'setIsSigningUiEnabled'\n }\n );\n"],
5
- "mappings": "kFAOO,IAAMA,EAAuBC,GAClCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,iBAAmBF,CAC3B,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWG,EAAsBC,GACjCH,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,gBAAkBE,CAC1B,EACA,GACA,CACE,KAAM,qBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAA0BL,GACrCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,GAAIF,EAAQ,CACV,IAAMM,EACJN,EAAO,6BACPO,EAAoC,4BAChCC,EACJR,EAAO,uBACPO,EAAoC,sBAEtCL,EAAM,oBAAsB,CAC1B,GAAGF,EACH,sBAAAQ,EACA,4BAAAF,CACF,CACF,MACEJ,EAAM,oBAAsB,IAEhC,EACA,GACA,CACE,KAAM,yBAEN,QAAS,CACP,MAAOF,CACT,CACF,CACF,EAEWS,EAAuBC,GAClCT,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,SAAWQ,CACnB,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAAyBC,GACpCX,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CAChBA,EAAM,WACTA,EAAM,SAAW,CAAC,GAEpBA,EAAM,SAAS,mBAAqBU,CACtC,EACA,GACA,CACE,KAAM,uBACR,CACF",
4
+ "sourcesContent": ["import { fallbackWalletConnectConfigurations } from 'constants/walletConnect.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { WalletConnectConfig } from 'providers/strategies/WalletConnectProviderStrategy/types';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { IProviderSettings } from 'store/slices/config/config.types';\nimport { getStore } from 'store/store';\n\nexport const setNativeAuthConfig = (config: NativeAuthConfigType | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.nativeAuthConfig = config;\n },\n false,\n {\n type: 'setNativeAuthConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setWebsocketStatus = (status: WebsocketConnectionStatusEnum) =>\n getStore().setState(\n ({ config: state }) => {\n state.websocketStatus = status;\n },\n false,\n {\n type: 'setWebsocketStatus',\n // @ts-ignore\n payload: {\n value: status\n }\n }\n );\n\nexport const setWalletConnectConfig = (config: WalletConnectConfig | null) =>\n getStore().setState(\n ({ config: state }) => {\n if (config) {\n const walletConnectV2RelayAddress =\n config.walletConnectV2RelayAddress ||\n fallbackWalletConnectConfigurations.walletConnectV2RelayAddress;\n const walletConnectDeepLink =\n config.walletConnectDeepLink ||\n fallbackWalletConnectConfigurations.walletConnectDeepLink;\n\n state.walletConnectConfig = {\n ...config,\n walletConnectDeepLink,\n walletConnectV2RelayAddress\n };\n } else {\n state.walletConnectConfig = null;\n }\n },\n false,\n {\n type: 'setWalletConnectConfig',\n // @ts-ignore\n payload: {\n value: config\n }\n }\n );\n\nexport const setProviderSettings = (settings: IProviderSettings | null) =>\n getStore().setState(\n ({ config: state }) => {\n state.settings = settings;\n },\n false,\n {\n type: 'setProviderSettings',\n // @ts-ignore\n payload: {\n value: settings\n }\n }\n );\n\nexport const setIsSigningUiEnabled = (isEnabled: boolean) =>\n getStore().setState(\n ({ config: state }) => {\n if (!state.settings) {\n state.settings = {};\n }\n state.settings.isSigningUiEnabled = isEnabled;\n },\n false,\n {\n type: 'setIsSigningUiEnabled',\n // @ts-ignore\n payload: {\n value: isEnabled\n }\n }\n );\n"],
5
+ "mappings": "kFAOO,IAAMA,EAAuBC,GAClCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,iBAAmBF,CAC3B,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWG,EAAsBC,GACjCH,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,gBAAkBE,CAC1B,EACA,GACA,CACE,KAAM,qBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAA0BL,GACrCC,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrB,GAAIF,EAAQ,CACV,IAAMM,EACJN,EAAO,6BACPO,EAAoC,4BAChCC,EACJR,EAAO,uBACPO,EAAoC,sBAEtCL,EAAM,oBAAsB,CAC1B,GAAGF,EACH,sBAAAQ,EACA,4BAAAF,CACF,CACF,MACEJ,EAAM,oBAAsB,IAEhC,EACA,GACA,CACE,KAAM,yBAEN,QAAS,CACP,MAAOF,CACT,CACF,CACF,EAEWS,EAAuBC,GAClCT,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CACrBA,EAAM,SAAWQ,CACnB,EACA,GACA,CACE,KAAM,sBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF,EAEWC,EAAyBC,GACpCX,EAAS,EAAE,SACT,CAAC,CAAE,OAAQC,CAAM,IAAM,CAChBA,EAAM,WACTA,EAAM,SAAW,CAAC,GAEpBA,EAAM,SAAS,mBAAqBU,CACtC,EACA,GACA,CACE,KAAM,wBAEN,QAAS,CACP,MAAOA,CACT,CACF,CACF",
6
6
  "names": ["setNativeAuthConfig", "config", "getStore", "state", "setWebsocketStatus", "status", "setWalletConnectConfig", "walletConnectV2RelayAddress", "fallbackWalletConnectConfigurations", "walletConnectDeepLink", "setProviderSettings", "settings", "setIsSigningUiEnabled", "isEnabled"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-6SJ27LTT.mjs";import{a as l}from"./chunk-AIQMA75E.mjs";import{a as p}from"./chunk-OMT62YRR.mjs";import{a as I}from"./chunk-S5XV2COC.mjs";import{b as g}from"./chunk-5UL4FBN6.mjs";import{c as T}from"./chunk-PWAP64SN.mjs";var r={};function M({egldLabel:y,apiAddress:s,sender:t,address:e,parsedTransactionsByDataField:u}){return async o=>{if(o==null)return;let S=!t||t===e?null:await g({address:t,baseURL:s}),{transaction:a,multiTxData:A,transactionIndex:D}=o,c=T(a.data.toString()??""),d=p({data:c,multiTransactionData:A,parsedTransactionsByDataField:u}),{tokenId:f}=d,n=a.receiver.toBech32();if(t&&t!==e&&!l(S,e))throw console.error("You cannot sign transactions from a different account"),"You cannot sign transactions from a different account";let k=e!==n,x=n in r;if(n&&k&&!x){let i=await m({addressToVerify:n,baseURL:s});r={...r,...i?.scamInfo?{[n]:i.scamInfo}:{}}}let V=!!(f&&I({tokenId:f,egldLabel:y}));return{transaction:a,receiverScamInfo:r[n]?.info||null,transactionTokenInfo:d,isTokenTransaction:V,dataField:c,transactionIndex:D,needsSigning:o.needsSigning}}}export{M as a};
2
- //# sourceMappingURL=chunk-QSJQYXYK.mjs.map
1
+ import{a as m}from"./chunk-EB6K5LCD.mjs";import{a as l}from"./chunk-AIQMA75E.mjs";import{a as p}from"./chunk-OMT62YRR.mjs";import{a as I}from"./chunk-S5XV2COC.mjs";import{b as g}from"./chunk-HIDRVWOQ.mjs";import{c as T}from"./chunk-PWAP64SN.mjs";var r={};function M({egldLabel:y,apiAddress:s,sender:t,address:e,parsedTransactionsByDataField:u}){return async o=>{if(o==null)return;let S=!t||t===e?null:await g({address:t,baseURL:s}),{transaction:a,multiTxData:A,transactionIndex:D}=o,c=T(a.data.toString()??""),d=p({data:c,multiTransactionData:A,parsedTransactionsByDataField:u}),{tokenId:f}=d,n=a.receiver.toBech32();if(t&&t!==e&&!l(S,e))throw console.error("You cannot sign transactions from a different account"),"You cannot sign transactions from a different account";let k=e!==n,x=n in r;if(n&&k&&!x){let i=await m({addressToVerify:n,baseURL:s});r={...r,...i?.scamInfo?{[n]:i.scamInfo}:{}}}let V=!!(f&&I({tokenId:f,egldLabel:y}));return{transaction:a,receiverScamInfo:r[n]?.info||null,transactionTokenInfo:d,isTokenTransaction:V,dataField:c,transactionIndex:D,needsSigning:o.needsSigning}}}export{M as a};
2
+ //# sourceMappingURL=chunk-FVVRPNSD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-BSA3IGL6.mjs";import{a as l}from"./chunk-QFB7J2WW.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-YUWDAJJR.mjs.map
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,2 +1,2 @@
1
- import{a as n}from"./chunk-HS5VQCLV.mjs";import{a as s}from"./chunk-LJX4MW7B.mjs";import{a as e,b as o}from"./chunk-JSMKFORN.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-UNQALHBG.mjs.map
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