@multiversx/sdk-dapp 5.0.11 → 5.0.13

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 (429) hide show
  1. package/out/__chunks__/chunk-3F3QCMGL.mjs +2 -0
  2. package/out/__chunks__/{chunk-MFYHPHET.mjs.map → chunk-3F3QCMGL.mjs.map} +2 -2
  3. package/out/__chunks__/{chunk-YRUQIWQX.mjs → chunk-3L6GBV7L.mjs} +2 -2
  4. package/out/__chunks__/{chunk-24XAM2VT.mjs → chunk-3WNAFMEK.mjs} +2 -2
  5. package/out/__chunks__/{chunk-JSFAGVXL.mjs → chunk-3YBH7N5W.mjs} +2 -2
  6. package/out/__chunks__/{chunk-FE3NXNR6.mjs → chunk-44IN6A4I.mjs} +2 -2
  7. package/out/__chunks__/chunk-4IS7AY5Q.mjs +2 -0
  8. package/out/__chunks__/{chunk-QET2OLJT.mjs.map → chunk-4IS7AY5Q.mjs.map} +1 -1
  9. package/out/__chunks__/{chunk-WDFZXGVF.mjs → chunk-534QBNPX.mjs} +2 -2
  10. package/out/__chunks__/{chunk-B7VHGVIW.mjs → chunk-57AGUNU6.mjs} +2 -2
  11. package/out/__chunks__/{chunk-QEEQRZS6.mjs → chunk-5DEHHVDS.mjs} +2 -2
  12. package/out/__chunks__/{chunk-NA5BUERU.mjs → chunk-5JYNGKVQ.mjs} +2 -2
  13. package/out/__chunks__/{chunk-M3S3XSZ7.mjs → chunk-6BJS5QNF.mjs} +2 -2
  14. package/out/__chunks__/{chunk-GJYL4HXE.mjs → chunk-6RRVRDXX.mjs} +2 -2
  15. package/out/__chunks__/chunk-73MKFMKP.mjs +2 -0
  16. package/out/__chunks__/chunk-76PSW6FH.mjs +2 -0
  17. package/out/__chunks__/chunk-76PSW6FH.mjs.map +7 -0
  18. package/out/__chunks__/{chunk-OEBWA3U7.mjs → chunk-7HGOYM67.mjs} +2 -2
  19. package/out/__chunks__/{chunk-6WVBN32G.mjs → chunk-7TUX3TKQ.mjs} +2 -2
  20. package/out/__chunks__/{chunk-R7SGU5J2.mjs → chunk-AL5D2VEW.mjs} +2 -2
  21. package/out/__chunks__/{chunk-FVHDVMP6.mjs → chunk-BDOJEJNA.mjs} +2 -2
  22. package/out/__chunks__/{chunk-DJY24BHS.mjs → chunk-BDXSVYER.mjs} +2 -2
  23. package/out/__chunks__/{chunk-TPKK34YE.mjs → chunk-BEPW7QRT.mjs} +2 -2
  24. package/out/__chunks__/{chunk-YXC4NJUD.mjs → chunk-BIIJSMXB.mjs} +2 -2
  25. package/out/__chunks__/chunk-BUHXFBUA.mjs +2 -0
  26. package/out/__chunks__/{chunk-6MXUKZB3.mjs → chunk-CIVS2YDU.mjs} +2 -2
  27. package/out/__chunks__/{chunk-ADE33SZY.mjs → chunk-CJYTBE3E.mjs} +2 -2
  28. package/out/__chunks__/{chunk-B5QFFY63.mjs → chunk-D5DHIEIM.mjs} +2 -2
  29. package/out/__chunks__/chunk-DTEI5SBP.mjs +2 -0
  30. package/out/__chunks__/{chunk-QIBUEZS3.mjs → chunk-DX6OA75E.mjs} +2 -2
  31. package/out/__chunks__/{chunk-SGGAZCOK.mjs → chunk-EC3CUSWI.mjs} +2 -2
  32. package/out/__chunks__/{chunk-7RLXMK3R.mjs → chunk-EJV4GLIF.mjs} +2 -2
  33. package/out/__chunks__/chunk-ETSUQ2R4.mjs +2 -0
  34. package/out/__chunks__/{chunk-IZMXB463.mjs → chunk-FFUT67H3.mjs} +2 -2
  35. package/out/__chunks__/chunk-FM6JYAAR.mjs +2 -0
  36. package/out/__chunks__/chunk-FQNOEYHK.mjs +2 -0
  37. package/out/__chunks__/chunk-FQNOEYHK.mjs.map +7 -0
  38. package/out/__chunks__/chunk-FZ72N7LX.mjs +2 -0
  39. package/out/__chunks__/{chunk-EVS2OAVI.mjs → chunk-GQOTAVAR.mjs} +2 -2
  40. package/out/__chunks__/chunk-H3PQUL5M.mjs +2 -0
  41. package/out/__chunks__/{chunk-PGY32PLX.mjs → chunk-HCGAZMW2.mjs} +2 -2
  42. package/out/__chunks__/chunk-HFEXCIZ2.mjs +2 -0
  43. package/out/__chunks__/{chunk-BNDFXYBM.mjs → chunk-HPC5WEQQ.mjs} +2 -2
  44. package/out/__chunks__/{chunk-RZNOYCZT.mjs → chunk-HWO7E325.mjs} +2 -2
  45. package/out/__chunks__/{chunk-QGUSK75W.mjs → chunk-IFWUP3FX.mjs} +2 -2
  46. package/out/__chunks__/{chunk-YFO4VEZA.mjs → chunk-IOTYH724.mjs} +2 -2
  47. package/out/__chunks__/{chunk-TRQA733J.mjs → chunk-JIF5QHA5.mjs} +2 -2
  48. package/out/__chunks__/{chunk-7CFPPCWC.mjs → chunk-JIXJ3S3H.mjs} +2 -2
  49. package/out/__chunks__/{chunk-Z2M3TCDN.mjs → chunk-JUSK5MVD.mjs} +2 -2
  50. package/out/__chunks__/{chunk-YZZYAO7Z.mjs → chunk-JUXIROQH.mjs} +2 -2
  51. package/out/__chunks__/{chunk-EHWT3WER.mjs → chunk-KASFKR36.mjs} +2 -2
  52. package/out/__chunks__/{chunk-EHWT3WER.mjs.map → chunk-KASFKR36.mjs.map} +2 -2
  53. package/out/__chunks__/{chunk-YKUDEXLD.mjs → chunk-KEUKJKQV.mjs} +2 -2
  54. package/out/__chunks__/{chunk-JJ23PMQB.mjs → chunk-LYUN4G56.mjs} +2 -2
  55. package/out/__chunks__/chunk-M7BM6QPB.mjs +2 -0
  56. package/out/__chunks__/{chunk-X4XULIVT.mjs.map → chunk-M7BM6QPB.mjs.map} +2 -2
  57. package/out/__chunks__/{chunk-RRRK4J56.mjs → chunk-N7UPPFCH.mjs} +2 -2
  58. package/out/__chunks__/{chunk-F2UXV2DY.mjs → chunk-NDUDQZDL.mjs} +2 -2
  59. package/out/__chunks__/{chunk-KU45KIR2.mjs → chunk-NLZHVYZR.mjs} +2 -2
  60. package/out/__chunks__/{chunk-JPGDRR3A.mjs → chunk-NNBLC3DP.mjs} +2 -2
  61. package/out/__chunks__/{chunk-TAWCCADM.mjs → chunk-O2ZZO4AS.mjs} +2 -2
  62. package/out/__chunks__/{chunk-2DS6LYYY.mjs → chunk-OINVR4SF.mjs} +2 -2
  63. package/out/__chunks__/{chunk-23TMKZFJ.mjs → chunk-OIWRUY4C.mjs} +2 -2
  64. package/out/__chunks__/{chunk-MD5HYIJO.mjs → chunk-OMSCPNRR.mjs} +2 -2
  65. package/out/__chunks__/chunk-OTHNSSYN.mjs +2 -0
  66. package/out/__chunks__/chunk-P6PCRGOG.mjs +2 -0
  67. package/out/__chunks__/chunk-PFMOMLPA.mjs +2 -0
  68. package/out/__chunks__/{chunk-YU6ZFE62.mjs.map → chunk-PFMOMLPA.mjs.map} +3 -3
  69. package/out/__chunks__/{chunk-SZOPMJSG.mjs → chunk-QO2DNBMF.mjs} +2 -2
  70. package/out/__chunks__/chunk-RFBR7WI3.mjs +2 -0
  71. package/out/__chunks__/{chunk-RHZYJH4K.mjs → chunk-ROH2QHUK.mjs} +2 -2
  72. package/out/__chunks__/chunk-RVCCJBPE.mjs +2 -0
  73. package/out/__chunks__/{chunk-KT6OP6QC.mjs → chunk-T3FY4DQE.mjs} +2 -2
  74. package/out/__chunks__/{chunk-3HNDMSWW.mjs → chunk-TOGQL2M5.mjs} +2 -2
  75. package/out/__chunks__/{chunk-66WRMAXV.mjs → chunk-TSETF6SY.mjs} +2 -2
  76. package/out/__chunks__/{chunk-ZRKEA6YR.mjs → chunk-TVXFF2PG.mjs} +2 -2
  77. package/out/__chunks__/{chunk-2ZU7DAXN.mjs → chunk-UQ6DOBYK.mjs} +2 -2
  78. package/out/__chunks__/chunk-V73SALVM.mjs +2 -0
  79. package/out/__chunks__/chunk-VTF5A3OJ.mjs +2 -0
  80. package/out/__chunks__/chunk-VVHC6HV6.mjs +2 -0
  81. package/out/__chunks__/{chunk-ZWOEWFL2.mjs → chunk-WBEMK5QL.mjs} +2 -2
  82. package/out/__chunks__/{chunk-MMLP7K73.mjs → chunk-WJHF6NNO.mjs} +2 -2
  83. package/out/__chunks__/{chunk-5HBROJL7.mjs → chunk-WSBN47MX.mjs} +2 -2
  84. package/out/__chunks__/{chunk-X5KTEL7F.mjs → chunk-WXCST3O7.mjs} +2 -2
  85. package/out/__chunks__/{chunk-PAT5TWYK.mjs → chunk-X4CDTS57.mjs} +2 -2
  86. package/out/__chunks__/chunk-YARUDMWQ.mjs +2 -0
  87. package/out/__chunks__/chunk-ZHOATTZ2.mjs +2 -0
  88. package/out/__chunks__/{chunk-WM2ARQV6.mjs.map → chunk-ZHOATTZ2.mjs.map} +2 -2
  89. package/out/__chunks__/{chunk-LST3XXIJ.mjs → chunk-ZIMECN23.mjs} +2 -2
  90. package/out/__chunks__/{chunk-QYUEIE7N.mjs → chunk-ZLS3BN2I.mjs} +2 -2
  91. package/out/__chunks__/chunk-ZTQR4O4A.mjs +2 -0
  92. package/out/__chunks__/chunk-ZTQR4O4A.mjs.map +7 -0
  93. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  94. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  95. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  96. package/out/apiCalls/index.mjs +1 -1
  97. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  98. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  99. package/out/apiCalls/tokens/index.mjs +1 -1
  100. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  101. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  102. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  103. package/out/constants/browser.constants.mjs +1 -1
  104. package/out/constants/index.mjs +1 -1
  105. package/out/constants/storage.constants.cjs +3 -0
  106. package/out/constants/storage.constants.cjs.map +2 -2
  107. package/out/constants/storage.constants.d.ts +1 -0
  108. package/out/constants/storage.constants.mjs +1 -1
  109. package/out/constants/window.constants.cjs +1 -1
  110. package/out/constants/window.constants.cjs.map +1 -1
  111. package/out/constants/window.constants.mjs +1 -1
  112. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  113. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  114. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  115. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  116. package/out/index.mjs +1 -1
  117. package/out/lib/sdkDappUi.mjs +1 -1
  118. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  119. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  120. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  121. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  122. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  123. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  124. package/out/managers/TransactionManager/index.mjs +1 -1
  125. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  126. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  127. package/out/managers/index.mjs +1 -1
  128. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  129. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  130. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  131. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  132. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  133. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.cjs +7 -2
  134. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.cjs.map +2 -2
  135. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.d.ts +1 -1
  136. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  137. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  138. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  139. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  140. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  141. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  142. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  143. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs +1 -1
  144. package/out/managers/internal/UIBaseManager/UIBaseManager.cjs.map +2 -2
  145. package/out/managers/internal/UIBaseManager/UIBaseManager.d.ts +1 -1
  146. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  147. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  148. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  149. package/out/managers/internal/index.mjs +1 -1
  150. package/out/methods/account/getAccount.mjs +1 -1
  151. package/out/methods/account/getAccountInfo.mjs +1 -1
  152. package/out/methods/account/getAddress.mjs +1 -1
  153. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  154. package/out/methods/account/getLatestNonce.cjs +2 -1
  155. package/out/methods/account/getLatestNonce.cjs.map +2 -2
  156. package/out/methods/account/getLatestNonce.mjs +1 -1
  157. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  158. package/out/methods/initApp/initApp.cjs +22 -1
  159. package/out/methods/initApp/initApp.cjs.map +2 -2
  160. package/out/methods/initApp/initApp.mjs +1 -1
  161. package/out/methods/initApp/initApp.mjs.map +3 -3
  162. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  163. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  164. package/out/methods/loginInfo/getLoginInfo.d.ts +0 -5
  165. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  166. package/out/methods/network/getEgldLabel.mjs +1 -1
  167. package/out/methods/network/getExplorerAddress.mjs +1 -1
  168. package/out/methods/network/getNetworkConfig.mjs +1 -1
  169. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  170. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  171. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  172. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  173. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  174. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  175. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  176. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  177. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  178. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  179. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  180. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  181. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs.map +1 -1
  182. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  183. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  184. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  185. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  186. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  187. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  188. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  189. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  190. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  191. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  192. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  193. package/out/providers/DappProvider/index.mjs +1 -1
  194. package/out/providers/ProviderFactory.mjs +1 -1
  195. package/out/providers/helpers/accountProvider.mjs +1 -1
  196. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  197. package/out/providers/helpers/restoreProvider.mjs +1 -1
  198. package/out/providers/index.mjs +1 -1
  199. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  200. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  201. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  202. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  203. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  204. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  205. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  206. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  207. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  208. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  209. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  210. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  211. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  212. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  213. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  214. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  215. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  216. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  217. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  218. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  219. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  220. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  221. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  222. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  223. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  224. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  225. package/out/providers/strategies/helpers/index.mjs +1 -1
  226. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  227. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  228. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  229. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  230. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  231. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  232. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs +1 -0
  233. package/out/providers/strategies/helpers/signTransactions/signTransactions.cjs.map +2 -2
  234. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  235. package/out/providers/strategies/index.mjs +1 -1
  236. package/out/react/account/useGetAccount.mjs +1 -1
  237. package/out/react/account/useGetAccountInfo.mjs +1 -1
  238. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  239. package/out/react/account/useGetLatestNonce.mjs +1 -1
  240. package/out/react/index.mjs +1 -1
  241. package/out/react/loginInfo/useGetLoginInfo.d.ts +0 -5
  242. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  243. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  244. package/out/react/store/getReactStore.mjs +1 -1
  245. package/out/react/store/useSelector.mjs +1 -1
  246. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  247. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  248. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  249. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  250. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  251. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  252. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  253. package/out/services/index.mjs +1 -1
  254. package/out/services/nativeAuth/index.mjs +1 -1
  255. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  256. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  257. package/out/services/nativeAuth/methods/index.mjs +1 -1
  258. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  259. package/out/store/actions/account/accountActions.mjs +1 -1
  260. package/out/store/actions/account/index.mjs +1 -1
  261. package/out/store/actions/cache/cacheActions.mjs +1 -1
  262. package/out/store/actions/cache/index.mjs +1 -1
  263. package/out/store/actions/config/configActions.mjs +1 -1
  264. package/out/store/actions/config/index.mjs +1 -1
  265. package/out/store/actions/index.mjs +1 -1
  266. package/out/store/actions/loginInfo/loginInfoActions.cjs +2 -20
  267. package/out/store/actions/loginInfo/loginInfoActions.cjs.map +2 -2
  268. package/out/store/actions/loginInfo/loginInfoActions.d.ts +1 -3
  269. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  270. package/out/store/actions/network/index.mjs +1 -1
  271. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  272. package/out/store/actions/network/networkActions.mjs +1 -1
  273. package/out/store/actions/sharedActions/index.mjs +1 -1
  274. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  275. package/out/store/actions/toasts/index.mjs +1 -1
  276. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  277. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  278. package/out/store/actions/ui/index.mjs +1 -1
  279. package/out/store/actions/ui/uiActions.mjs +1 -1
  280. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  281. package/out/store/middleware/index.mjs +1 -1
  282. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  283. package/out/store/slices/index.mjs +1 -1
  284. package/out/store/slices/loginInfo/index.mjs +1 -1
  285. package/out/store/slices/loginInfo/loginInfo.types.cjs.map +1 -1
  286. package/out/store/slices/loginInfo/loginInfo.types.d.ts +0 -9
  287. package/out/store/slices/loginInfo/loginInfoSlice.cjs +0 -4
  288. package/out/store/slices/loginInfo/loginInfoSlice.cjs.map +2 -2
  289. package/out/store/slices/loginInfo/loginInfoSlice.mjs +1 -1
  290. package/out/store/storage/index.mjs +1 -1
  291. package/out/store/storage/storageCallback.mjs +1 -1
  292. package/out/store/store.cjs +3 -1
  293. package/out/store/store.cjs.map +2 -2
  294. package/out/store/store.d.ts +19 -1
  295. package/out/store/store.mjs +1 -1
  296. package/out/utils/ComponentFactory.mjs +1 -1
  297. package/out/utils/account/index.mjs +1 -1
  298. package/out/utils/account/refreshAccount.mjs +1 -1
  299. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  300. package/out/utils/index.mjs +1 -1
  301. package/out/utils/tests/getElementByDataTestIdDeep.jest.d.ts +9 -0
  302. package/out/utils/tests/getElementByDataTestIdDeep.playwright.d.ts +9 -0
  303. package/out/utils/tests/getElementByDataTestIdDeep.puppeteer.d.ts +9 -0
  304. package/out/utils/tests/shadowDomTraversal.d.ts +17 -0
  305. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  306. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  307. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  308. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  309. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  310. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  311. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  312. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  313. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  314. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  315. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  316. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  317. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  318. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  319. package/out/utils/transactions/index.mjs +1 -1
  320. package/out/utils/visual/index.mjs +1 -1
  321. package/out/utils/visual/switchTheme.mjs +1 -1
  322. package/out/utils/window/getIsInIframe.mjs +1 -1
  323. package/out/utils/window/getWindowParentOrigin.cjs +5 -8
  324. package/out/utils/window/getWindowParentOrigin.cjs.map +2 -2
  325. package/out/utils/window/getWindowParentOrigin.d.ts +1 -1
  326. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  327. package/out/utils/window/index.mjs +1 -1
  328. package/package.json +1 -1
  329. package/out/__chunks__/chunk-2AIOZ7AI.mjs +0 -2
  330. package/out/__chunks__/chunk-3BAZ5IKF.mjs +0 -2
  331. package/out/__chunks__/chunk-3BAZ5IKF.mjs.map +0 -7
  332. package/out/__chunks__/chunk-4IYHEFEY.mjs +0 -2
  333. package/out/__chunks__/chunk-4LT5LGQC.mjs +0 -2
  334. package/out/__chunks__/chunk-5MLAF3LT.mjs +0 -2
  335. package/out/__chunks__/chunk-6KY5GEWL.mjs +0 -2
  336. package/out/__chunks__/chunk-7KFLWTDT.mjs +0 -2
  337. package/out/__chunks__/chunk-BMFKD76W.mjs +0 -2
  338. package/out/__chunks__/chunk-BRWXITGZ.mjs +0 -2
  339. package/out/__chunks__/chunk-BRWXITGZ.mjs.map +0 -7
  340. package/out/__chunks__/chunk-CZYRFACG.mjs +0 -2
  341. package/out/__chunks__/chunk-HHGGPCIT.mjs +0 -2
  342. package/out/__chunks__/chunk-HRTYNOPV.mjs +0 -2
  343. package/out/__chunks__/chunk-IQNEWWWL.mjs +0 -2
  344. package/out/__chunks__/chunk-MFYHPHET.mjs +0 -2
  345. package/out/__chunks__/chunk-NSF7L6H7.mjs +0 -2
  346. package/out/__chunks__/chunk-OCT3B7SK.mjs +0 -2
  347. package/out/__chunks__/chunk-P6XFODV4.mjs +0 -2
  348. package/out/__chunks__/chunk-QET2OLJT.mjs +0 -2
  349. package/out/__chunks__/chunk-SBJ5SNMG.mjs +0 -2
  350. package/out/__chunks__/chunk-WEQQ52VT.mjs +0 -2
  351. package/out/__chunks__/chunk-WEQQ52VT.mjs.map +0 -7
  352. package/out/__chunks__/chunk-WM2ARQV6.mjs +0 -2
  353. package/out/__chunks__/chunk-WZLGCBPM.mjs +0 -2
  354. package/out/__chunks__/chunk-X4XULIVT.mjs +0 -2
  355. package/out/__chunks__/chunk-YU6ZFE62.mjs +0 -2
  356. /package/out/__chunks__/{chunk-YRUQIWQX.mjs.map → chunk-3L6GBV7L.mjs.map} +0 -0
  357. /package/out/__chunks__/{chunk-24XAM2VT.mjs.map → chunk-3WNAFMEK.mjs.map} +0 -0
  358. /package/out/__chunks__/{chunk-JSFAGVXL.mjs.map → chunk-3YBH7N5W.mjs.map} +0 -0
  359. /package/out/__chunks__/{chunk-FE3NXNR6.mjs.map → chunk-44IN6A4I.mjs.map} +0 -0
  360. /package/out/__chunks__/{chunk-WDFZXGVF.mjs.map → chunk-534QBNPX.mjs.map} +0 -0
  361. /package/out/__chunks__/{chunk-B7VHGVIW.mjs.map → chunk-57AGUNU6.mjs.map} +0 -0
  362. /package/out/__chunks__/{chunk-QEEQRZS6.mjs.map → chunk-5DEHHVDS.mjs.map} +0 -0
  363. /package/out/__chunks__/{chunk-NA5BUERU.mjs.map → chunk-5JYNGKVQ.mjs.map} +0 -0
  364. /package/out/__chunks__/{chunk-M3S3XSZ7.mjs.map → chunk-6BJS5QNF.mjs.map} +0 -0
  365. /package/out/__chunks__/{chunk-GJYL4HXE.mjs.map → chunk-6RRVRDXX.mjs.map} +0 -0
  366. /package/out/__chunks__/{chunk-5MLAF3LT.mjs.map → chunk-73MKFMKP.mjs.map} +0 -0
  367. /package/out/__chunks__/{chunk-OEBWA3U7.mjs.map → chunk-7HGOYM67.mjs.map} +0 -0
  368. /package/out/__chunks__/{chunk-6WVBN32G.mjs.map → chunk-7TUX3TKQ.mjs.map} +0 -0
  369. /package/out/__chunks__/{chunk-R7SGU5J2.mjs.map → chunk-AL5D2VEW.mjs.map} +0 -0
  370. /package/out/__chunks__/{chunk-FVHDVMP6.mjs.map → chunk-BDOJEJNA.mjs.map} +0 -0
  371. /package/out/__chunks__/{chunk-DJY24BHS.mjs.map → chunk-BDXSVYER.mjs.map} +0 -0
  372. /package/out/__chunks__/{chunk-TPKK34YE.mjs.map → chunk-BEPW7QRT.mjs.map} +0 -0
  373. /package/out/__chunks__/{chunk-YXC4NJUD.mjs.map → chunk-BIIJSMXB.mjs.map} +0 -0
  374. /package/out/__chunks__/{chunk-NSF7L6H7.mjs.map → chunk-BUHXFBUA.mjs.map} +0 -0
  375. /package/out/__chunks__/{chunk-6MXUKZB3.mjs.map → chunk-CIVS2YDU.mjs.map} +0 -0
  376. /package/out/__chunks__/{chunk-ADE33SZY.mjs.map → chunk-CJYTBE3E.mjs.map} +0 -0
  377. /package/out/__chunks__/{chunk-B5QFFY63.mjs.map → chunk-D5DHIEIM.mjs.map} +0 -0
  378. /package/out/__chunks__/{chunk-2AIOZ7AI.mjs.map → chunk-DTEI5SBP.mjs.map} +0 -0
  379. /package/out/__chunks__/{chunk-QIBUEZS3.mjs.map → chunk-DX6OA75E.mjs.map} +0 -0
  380. /package/out/__chunks__/{chunk-SGGAZCOK.mjs.map → chunk-EC3CUSWI.mjs.map} +0 -0
  381. /package/out/__chunks__/{chunk-7RLXMK3R.mjs.map → chunk-EJV4GLIF.mjs.map} +0 -0
  382. /package/out/__chunks__/{chunk-BMFKD76W.mjs.map → chunk-ETSUQ2R4.mjs.map} +0 -0
  383. /package/out/__chunks__/{chunk-IZMXB463.mjs.map → chunk-FFUT67H3.mjs.map} +0 -0
  384. /package/out/__chunks__/{chunk-P6XFODV4.mjs.map → chunk-FM6JYAAR.mjs.map} +0 -0
  385. /package/out/__chunks__/{chunk-CZYRFACG.mjs.map → chunk-FZ72N7LX.mjs.map} +0 -0
  386. /package/out/__chunks__/{chunk-EVS2OAVI.mjs.map → chunk-GQOTAVAR.mjs.map} +0 -0
  387. /package/out/__chunks__/{chunk-6KY5GEWL.mjs.map → chunk-H3PQUL5M.mjs.map} +0 -0
  388. /package/out/__chunks__/{chunk-PGY32PLX.mjs.map → chunk-HCGAZMW2.mjs.map} +0 -0
  389. /package/out/__chunks__/{chunk-HHGGPCIT.mjs.map → chunk-HFEXCIZ2.mjs.map} +0 -0
  390. /package/out/__chunks__/{chunk-BNDFXYBM.mjs.map → chunk-HPC5WEQQ.mjs.map} +0 -0
  391. /package/out/__chunks__/{chunk-RZNOYCZT.mjs.map → chunk-HWO7E325.mjs.map} +0 -0
  392. /package/out/__chunks__/{chunk-QGUSK75W.mjs.map → chunk-IFWUP3FX.mjs.map} +0 -0
  393. /package/out/__chunks__/{chunk-YFO4VEZA.mjs.map → chunk-IOTYH724.mjs.map} +0 -0
  394. /package/out/__chunks__/{chunk-TRQA733J.mjs.map → chunk-JIF5QHA5.mjs.map} +0 -0
  395. /package/out/__chunks__/{chunk-7CFPPCWC.mjs.map → chunk-JIXJ3S3H.mjs.map} +0 -0
  396. /package/out/__chunks__/{chunk-Z2M3TCDN.mjs.map → chunk-JUSK5MVD.mjs.map} +0 -0
  397. /package/out/__chunks__/{chunk-YZZYAO7Z.mjs.map → chunk-JUXIROQH.mjs.map} +0 -0
  398. /package/out/__chunks__/{chunk-YKUDEXLD.mjs.map → chunk-KEUKJKQV.mjs.map} +0 -0
  399. /package/out/__chunks__/{chunk-JJ23PMQB.mjs.map → chunk-LYUN4G56.mjs.map} +0 -0
  400. /package/out/__chunks__/{chunk-RRRK4J56.mjs.map → chunk-N7UPPFCH.mjs.map} +0 -0
  401. /package/out/__chunks__/{chunk-F2UXV2DY.mjs.map → chunk-NDUDQZDL.mjs.map} +0 -0
  402. /package/out/__chunks__/{chunk-KU45KIR2.mjs.map → chunk-NLZHVYZR.mjs.map} +0 -0
  403. /package/out/__chunks__/{chunk-JPGDRR3A.mjs.map → chunk-NNBLC3DP.mjs.map} +0 -0
  404. /package/out/__chunks__/{chunk-TAWCCADM.mjs.map → chunk-O2ZZO4AS.mjs.map} +0 -0
  405. /package/out/__chunks__/{chunk-2DS6LYYY.mjs.map → chunk-OINVR4SF.mjs.map} +0 -0
  406. /package/out/__chunks__/{chunk-23TMKZFJ.mjs.map → chunk-OIWRUY4C.mjs.map} +0 -0
  407. /package/out/__chunks__/{chunk-MD5HYIJO.mjs.map → chunk-OMSCPNRR.mjs.map} +0 -0
  408. /package/out/__chunks__/{chunk-HRTYNOPV.mjs.map → chunk-OTHNSSYN.mjs.map} +0 -0
  409. /package/out/__chunks__/{chunk-IQNEWWWL.mjs.map → chunk-P6PCRGOG.mjs.map} +0 -0
  410. /package/out/__chunks__/{chunk-SZOPMJSG.mjs.map → chunk-QO2DNBMF.mjs.map} +0 -0
  411. /package/out/__chunks__/{chunk-4LT5LGQC.mjs.map → chunk-RFBR7WI3.mjs.map} +0 -0
  412. /package/out/__chunks__/{chunk-RHZYJH4K.mjs.map → chunk-ROH2QHUK.mjs.map} +0 -0
  413. /package/out/__chunks__/{chunk-WZLGCBPM.mjs.map → chunk-RVCCJBPE.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-KT6OP6QC.mjs.map → chunk-T3FY4DQE.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-3HNDMSWW.mjs.map → chunk-TOGQL2M5.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-66WRMAXV.mjs.map → chunk-TSETF6SY.mjs.map} +0 -0
  417. /package/out/__chunks__/{chunk-ZRKEA6YR.mjs.map → chunk-TVXFF2PG.mjs.map} +0 -0
  418. /package/out/__chunks__/{chunk-2ZU7DAXN.mjs.map → chunk-UQ6DOBYK.mjs.map} +0 -0
  419. /package/out/__chunks__/{chunk-OCT3B7SK.mjs.map → chunk-V73SALVM.mjs.map} +0 -0
  420. /package/out/__chunks__/{chunk-4IYHEFEY.mjs.map → chunk-VTF5A3OJ.mjs.map} +0 -0
  421. /package/out/__chunks__/{chunk-SBJ5SNMG.mjs.map → chunk-VVHC6HV6.mjs.map} +0 -0
  422. /package/out/__chunks__/{chunk-ZWOEWFL2.mjs.map → chunk-WBEMK5QL.mjs.map} +0 -0
  423. /package/out/__chunks__/{chunk-MMLP7K73.mjs.map → chunk-WJHF6NNO.mjs.map} +0 -0
  424. /package/out/__chunks__/{chunk-5HBROJL7.mjs.map → chunk-WSBN47MX.mjs.map} +0 -0
  425. /package/out/__chunks__/{chunk-X5KTEL7F.mjs.map → chunk-WXCST3O7.mjs.map} +0 -0
  426. /package/out/__chunks__/{chunk-PAT5TWYK.mjs.map → chunk-X4CDTS57.mjs.map} +0 -0
  427. /package/out/__chunks__/{chunk-7KFLWTDT.mjs.map → chunk-YARUDMWQ.mjs.map} +0 -0
  428. /package/out/__chunks__/{chunk-LST3XXIJ.mjs.map → chunk-ZIMECN23.mjs.map} +0 -0
  429. /package/out/__chunks__/{chunk-QYUEIE7N.mjs.map → chunk-ZLS3BN2I.mjs.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-TQA3JDNV.mjs";import{s}from"./chunk-76PSW6FH.mjs";import{e as a}from"./chunk-UERJ6AKK.mjs";function x(n){let e=s(),o=u(e),c=a(e),t=Object.keys(o).map(Number).reduce((r,m)=>{let i=o[m]?.transactions||[];return Math.max(r,...i.map(l=>l.nonce),0)},0);return t>0&&(t+=1),n==null?Math.max(t,c):Math.max(t,n.nonce,c)}export{x as a};
2
+ //# sourceMappingURL=chunk-3F3QCMGL.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/methods/account/getLatestNonce.ts"],
4
- "sourcesContent": ["import { accountNonceSelector } from '../../store/selectors/accountSelectors';\nimport { transactionsSliceSelector } from '../../store/selectors/transactionsSelector';\nimport { getState } from '../../store/store';\nimport { AccountType } from '../../types/account.types';\n\nexport function getLatestNonce(apiAccount: AccountType | null) {\n const state = getState();\n const transactionsSessions = transactionsSliceSelector(state);\n const currentAccountNonce = accountNonceSelector(state);\n\n // Get the max transactions nonce\n let lastTransactionNonce = Object.keys(transactionsSessions)\n .map(Number) // Convert keys to numbers (timestamps)\n .reduce((maxNonce, timestamp) => {\n const transactions = transactionsSessions[timestamp]?.transactions || [];\n return Math.max(maxNonce, ...transactions.map((tx) => tx.nonce), 0);\n }, 0);\n\n if (lastTransactionNonce > 0) {\n lastTransactionNonce += 1; // Increment only if there's at least one pending transaction\n }\n\n if (apiAccount == null) {\n const currentStoreNonce = Math.max(\n lastTransactionNonce,\n currentAccountNonce\n );\n return currentStoreNonce;\n }\n\n const currentNonce = Math.max(\n lastTransactionNonce || apiAccount.nonce,\n currentAccountNonce\n );\n\n return currentNonce;\n}\n"],
5
- "mappings": "2HAKO,SAASA,EAAeC,EAAgC,CAC7D,IAAMC,EAAQC,EAAS,EACjBC,EAAuBC,EAA0BH,CAAK,EACtDI,EAAsBC,EAAqBL,CAAK,EAGlDM,EAAuB,OAAO,KAAKJ,CAAoB,EACxD,IAAI,MAAM,EACV,OAAO,CAACK,EAAUC,IAAc,CAC/B,IAAMC,EAAeP,EAAqBM,CAAS,GAAG,cAAgB,CAAC,EACvE,OAAO,KAAK,IAAID,EAAU,GAAGE,EAAa,IAAKC,GAAOA,EAAG,KAAK,EAAG,CAAC,CACpE,EAAG,CAAC,EAMN,OAJIJ,EAAuB,IACzBA,GAAwB,GAGtBP,GAAc,KACU,KAAK,IAC7BO,EACAF,CACF,EAImB,KAAK,IACxBE,GAAwBP,EAAW,MACnCK,CACF,CAGF",
4
+ "sourcesContent": ["import { accountNonceSelector } from '../../store/selectors/accountSelectors';\nimport { transactionsSliceSelector } from '../../store/selectors/transactionsSelector';\nimport { getState } from '../../store/store';\nimport { AccountType } from '../../types/account.types';\n\nexport function getLatestNonce(apiAccount: AccountType | null) {\n const state = getState();\n const transactionsSessions = transactionsSliceSelector(state);\n const currentAccountNonce = accountNonceSelector(state);\n\n // Get the max transactions nonce\n let lastTransactionNonce = Object.keys(transactionsSessions)\n .map(Number) // Convert keys to numbers (timestamps)\n .reduce((maxNonce, timestamp) => {\n const transactions = transactionsSessions[timestamp]?.transactions || [];\n return Math.max(maxNonce, ...transactions.map((tx) => tx.nonce), 0);\n }, 0);\n\n if (lastTransactionNonce > 0) {\n lastTransactionNonce += 1; // Increment only if there's at least one pending transaction\n }\n\n if (apiAccount == null) {\n const currentStoreNonce = Math.max(\n lastTransactionNonce,\n currentAccountNonce\n );\n return currentStoreNonce;\n }\n\n const currentNonce = Math.max(\n lastTransactionNonce,\n apiAccount.nonce,\n currentAccountNonce\n );\n\n return currentNonce;\n}\n"],
5
+ "mappings": "sHAKO,SAASA,EAAeC,EAAgC,CAC7D,IAAMC,EAAQC,EAAS,EACjBC,EAAuBC,EAA0BH,CAAK,EACtDI,EAAsBC,EAAqBL,CAAK,EAGlDM,EAAuB,OAAO,KAAKJ,CAAoB,EACxD,IAAI,MAAM,EACV,OAAO,CAACK,EAAUC,IAAc,CAC/B,IAAMC,EAAeP,EAAqBM,CAAS,GAAG,cAAgB,CAAC,EACvE,OAAO,KAAK,IAAID,EAAU,GAAGE,EAAa,IAAKC,GAAOA,EAAG,KAAK,EAAG,CAAC,CACpE,EAAG,CAAC,EAMN,OAJIJ,EAAuB,IACzBA,GAAwB,GAGtBP,GAAc,KACU,KAAK,IAC7BO,EACAF,CACF,EAImB,KAAK,IACxBE,EACAP,EAAW,MACXK,CACF,CAGF",
6
6
  "names": ["getLatestNonce", "apiAccount", "state", "getState", "transactionsSessions", "transactionsSliceSelector", "currentAccountNonce", "accountNonceSelector", "lastTransactionNonce", "maxNonce", "timestamp", "transactions", "tx"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{d as s}from"./chunk-KT6OP6QC.mjs";import{a as u}from"./chunk-WM2ARQV6.mjs";import{u as c}from"./chunk-3BAZ5IKF.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:a})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:a})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:a}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(o).filter(n=>![o.none,o.webview,o.passkey].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
2
- //# sourceMappingURL=chunk-YRUQIWQX.mjs.map
1
+ import{d as s}from"./chunk-T3FY4DQE.mjs";import{a as u}from"./chunk-ZHOATTZ2.mjs";import{s as c}from"./chunk-76PSW6FH.mjs";import{b as d}from"./chunk-SAAOQW7P.mjs";import{a as v}from"./chunk-CDQ2BNUD.mjs";import{a as o}from"./chunk-PLUWBWJ2.mjs";var i=class i extends u{constructor(){super({uiTag:"mvx-unlock-panel",uiDataUpdateEvent:"OPEN"});this.initialData={providers:null,walletAddress:null};this.openUnlockPanel=async()=>{let{walletAddress:e}=d(c());this.data={providers:this.getProvidersList(),walletAddress:e},await this.openUI(),this.notifyDataUpdate()};this.setupEventListeners=async()=>{this.eventBus&&(this.subscribeToEventBus("LOGIN",this.handleLogin),this.subscribeToEventBus("CANCEL_LOGIN",this.handleCancelLogin),this.subscribeToEventBus("CLOSE",this.handleCloseUI))};this.handleCloseUI=async e=>{!e?.isLoginFinished&&i.onClose&&i.onClose(),this.closeUI()};this.handleLogin=async({type:e,anchor:a})=>{if(!i.loginHandler)throw new Error("Login callback not initialized. Please call `init()` first.");try{this.isSimpleLoginCallback(i.loginHandler)?(await(await s.create({type:e,anchor:a})).login(),i.loginHandler()):i.loginHandler({type:e,anchor:a}),await this.handleCloseUI({isLoginFinished:!0})}catch(t){console.error(t),this.eventBus?.publish("CANCEL_IN_PROVIDER",this.data)}};this.handleCancelLogin=async()=>{await s.destroy()};this.isSimpleLoginCallback=e=>e.length===0;this.data=this.initialData}static getInstance(){return i.instance||(i.instance=new i),i.instance}static init(e){return this.loginHandler=e.loginHandler,this.allowedProviders=e.allowedProviders,e.onClose&&(this.onClose=e.onClose),this.getInstance()}getProvidersList(){let e=s.customProviders,t=[...Object.values(o).filter(n=>![o.none,o.webview,o.passkey].includes(n)),...e.map(n=>n.type)],P=e.reduce((n,r)=>(n[r.type]=r.name,n),{}),l={...v,...P};return(i.allowedProviders?i?.allowedProviders.filter(n=>t.includes(n)):t).map(n=>{let r=e.find(g=>g.type===n);return r||{name:n in l?l[n]:n,type:n}})}};i.loginHandler=null,i.onClose=null,i.allowedProviders=null;var p=i;export{p as a};
2
+ //# sourceMappingURL=chunk-3L6GBV7L.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-YNXPGS77.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-3BAZ5IKF.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
- //# sourceMappingURL=chunk-24XAM2VT.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-YNXPGS77.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{s as e}from"./chunk-76PSW6FH.mjs";import{a as n}from"./chunk-UERJ6AKK.mjs";var u=t=>{let o=0,i=n(e())?.shard;return S(t)?(t.forEach(c=>{let m=s(c,i);o+=m?5*6e3:6e3}),o):(o=s(t,i)?5*6e3:6e3,o)};export{u as a};
2
+ //# sourceMappingURL=chunk-3WNAFMEK.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-66WRMAXV.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
- //# sourceMappingURL=chunk-JSFAGVXL.mjs.map
1
+ import{a as l}from"./chunk-QTKK6OSJ.mjs";import{a as h}from"./chunk-TSETF6SY.mjs";import{a as g}from"./chunk-3S57OP4Z.mjs";import{NativeAuthClient as y}from"@multiversx/sdk-native-auth-client";var H=f=>{let{origin:o,apiAddress:i,expirySeconds:r,blockHashShard:s,extraInfo:u,gatewayUrl:d,extraRequestHeaders:k}=h(f),e=new y({origin:o,apiUrl:i,expirySeconds:r,blockHashShard:s,gatewayUrl:d,extraRequestHeaders:k});return{initialize:async t=>{if(!i||!o)return"";let a=()=>e.getCurrentBlockHash(),n=t?.latestBlockInfo;n??=await g({apiAddress:i,blockHashShard:s,getBlockHash:a,noCache:t?.noCache});let{hash:p,timestamp:c}=n,m=e.encodeValue(JSON.stringify({...t?.extraInfo??u,...c?{timestamp:c}:{}}));return`${e.encodeValue(o)}.${p}.${r}.${m}`},getToken:({address:t,token:a,signature:n})=>e.getToken(t,a,n),getTokenExpiration:l}};export{H as a};
2
+ //# sourceMappingURL=chunk-3YBH7N5W.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-L3MWDI6J.mjs";import{s as i}from"./chunk-3BAZ5IKF.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
- //# sourceMappingURL=chunk-FE3NXNR6.mjs.map
1
+ import{a as u}from"./chunk-L3MWDI6J.mjs";import{q as i}from"./chunk-76PSW6FH.mjs";var g=({transactions:s,transactionsDisplayInfo:a,status:e,sessionInformation:t})=>{let o=Date.now().toString();return i().setState(({transactions:n})=>{n[o]={transactions:s,status:e,transactionsDisplayInfo:a,interpretedTransactions:{},sessionInformation:t}},!1,"createTransactionsSession"),o},T=({sessionId:s,status:a,errorMessage:e})=>{i().setState(({transactions:t})=>{t[s].status=a,t[s].errorMessage=e},!1,"updateTransactionsSession")},y=({sessionId:s,transaction:a})=>{let e=null;return i().setState(({transactions:t})=>{let o=t[s]?.transactions;if(o!=null){t[s].transactions=o.map(r=>r.hash===a.hash?{...r,...a??{}}:r);let n=u([...t[s].transactions]);n&&(T({sessionId:s,status:n}),e=n)}},!1,"updateTransactionStatus"),e},h=()=>{i().setState(({transactions:s,toasts:a})=>{let t=Object.keys(s).filter(n=>{let r=s[n];if(!r)return!1;let{status:c}=r;return!(c==="pending"||c==="signed"||c==="sent")});t.forEach(n=>{delete s[n]});let o=a.transactionToasts.filter(n=>!t.includes(n.toastId));a.transactionToasts=o},!1,"clearCompletedTransactions")};export{g as a,T as b,y as c,h as d};
2
+ //# sourceMappingURL=chunk-44IN6A4I.mjs.map
@@ -0,0 +1,2 @@
1
+ var o=typeof window<"u"?window:{},n="5.0.13";export{o as a,n as b};
2
+ //# sourceMappingURL=chunk-4IS7AY5Q.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/window.constants.ts"],
4
- "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.11'; // will be replaced at build time\n"],
4
+ "sourcesContent": ["export const safeWindow: Window =\n typeof window !== 'undefined' ? window : ({} as Window);\n\nexport const version = '5.0.13'; // will be replaced at build time\n"],
5
5
  "mappings": "AAAO,IAAMA,EACX,OAAO,OAAW,IAAc,OAAU,CAAC,EAEhCC,EAAU",
6
6
  "names": ["safeWindow", "version"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-EHWT3WER.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
- //# sourceMappingURL=chunk-WDFZXGVF.mjs.map
1
+ import{a as i}from"./chunk-KASFKR36.mjs";var c=class n extends i{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-ledger-connect"});this.addressesPerPage=10;this.allAccounts=[];this.initialConnectScreenData={};this.connectScreenData={...this.initialConnectScreenData};this.initialAccountScreenData={accounts:this.allAccounts,startIndex:0,addressesPerPage:this.addressesPerPage,isLoading:!0};this.accountScreenData={...this.initialAccountScreenData};this.initialConfirmScreenData={selectedAddress:"",explorerLink:""};this.confirmScreenData={...this.initialConfirmScreenData};this.initialData={connectScreenData:this.initialConnectScreenData,accountScreenData:this.initialAccountScreenData,confirmScreenData:this.initialConfirmScreenData};this.data=this.getInitialData()}static getInstance(){return n.instance||(n.instance=new n),n.instance}updateAllAccounts(e){this.allAccounts=e,this.accountScreenData.accounts=e}updateStartIndex(e){this.accountScreenData.startIndex=e}updateConnectScreen(e){this.connectScreenData={...this.connectScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=null,this.data.connectScreenData=this.connectScreenData,this.notifyDataUpdate()}updateAccountScreen(e){this.accountScreenData={...this.accountScreenData,...e},this.data.confirmScreenData=null,this.data.accountScreenData=this.accountScreenData,this.notifyDataUpdate()}updateConfirmScreen(e){this.confirmScreenData={...this.confirmScreenData,...e},this.data.accountScreenData=null,this.data.confirmScreenData=this.confirmScreenData,this.notifyDataUpdate()}getAccountScreenData(){return this.data.accountScreenData}getConfirmScreenData(){return this.data.confirmScreenData}getAllAccounts(){return this.allAccounts}subscribeToProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.subscribe("CONNECT_DEVICE",e),this.eventBus.subscribe("CLOSE",t),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}unsubscribeFromProviderInit({handleRetry:e,handleCancel:t}){this.eventBus&&(this.eventBus.unsubscribe("CONNECT_DEVICE",e),this.eventBus.unsubscribe("CLOSE",t),this.eventBus.unsubscribe("UI_DISCONNECTED",this.destroy.bind(this)))}subscribeToAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.subscribe("CLOSE",e),this.eventBus.subscribe("ACCESS_WALLET",t),this.eventBus.subscribe("GO_TO_PAGE",a))}unsubscribeFromAuthEvents({handleCancel:e,handleAccessWallet:t,handleGoToPage:a}){this.eventBus&&(this.eventBus.unsubscribe("CLOSE",e),this.eventBus.unsubscribe("ACCESS_WALLET",t),this.eventBus.unsubscribe("GO_TO_PAGE",a))}handleClose(){this.anchor?this.anchor?.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy()}resetData(){this.accountScreenData={...this.initialAccountScreenData},this.confirmScreenData={...this.initialConfirmScreenData},this.connectScreenData={...this.initialConnectScreenData},super.resetData()}async setupEventListeners(){this.eventBus&&this.eventBus.subscribe("CLOSE",this.handleClose.bind(this))}};export{c as a};
2
+ //# sourceMappingURL=chunk-534QBNPX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-EHWT3WER.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
- //# sourceMappingURL=chunk-B7VHGVIW.mjs.map
1
+ import{a as e}from"./chunk-KASFKR36.mjs";var n=class t extends e{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE",uiTag:"mvx-wallet-connect"});this.initialData={wcURI:"",walletConnectDeepLink:""};this.data={...this.initialData}}static getInstance(){return t.instance||(t.instance=new t),t.instance}handleClose(a){a?.isLoginFinished||(this.anchor?this.anchor.dispatchEvent(new CustomEvent("ANCHOR_CLOSE",{composed:!1,bubbles:!1})):this.destroy())}async setupEventListeners(){this.eventBus&&(this.eventBus.subscribe("CLOSE",this.handleClose.bind(this)),this.eventBus.subscribe("UI_DISCONNECTED",this.destroy.bind(this)))}};export{n as a};
2
+ //# sourceMappingURL=chunk-57AGUNU6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-QET2OLJT.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-QEEQRZS6.mjs.map
1
+ import{a as e}from"./chunk-4IS7AY5Q.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-5DEHHVDS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-BETSOJFK.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-TPKK34YE.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-QYUEIE7N.mjs";import{a as L}from"./chunk-4LT5LGQC.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-QET2OLJT.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
- //# sourceMappingURL=chunk-NA5BUERU.mjs.map
1
+ import{a as V}from"./chunk-7Z7IX367.mjs";import{a as B}from"./chunk-VCQBYNNS.mjs";import{a as $}from"./chunk-LN5UXO64.mjs";import{a as _}from"./chunk-PHOF3Z5D.mjs";import{a as U}from"./chunk-RBZC4PEU.mjs";import{a as R}from"./chunk-ROZAXUMC.mjs";import{a as M}from"./chunk-BETSOJFK.mjs";import{a as w}from"./chunk-URJQWHBM.mjs";import{a as O}from"./chunk-YGI3KXMZ.mjs";import{a as x}from"./chunk-BEPW7QRT.mjs";import{a as v}from"./chunk-RYIJWGFA.mjs";import{t as G}from"./chunk-ZLS3BN2I.mjs";import{a as L}from"./chunk-RFBR7WI3.mjs";import{a as h}from"./chunk-BRJNX4JF.mjs";import{a as b,c as C,f as u}from"./chunk-PJWJZHIS.mjs";import{a as P}from"./chunk-KD2IQ32V.mjs";import{c as f}from"./chunk-TI37DKBT.mjs";import{k as A}from"./chunk-LHEH7L4L.mjs";import{a as F}from"./chunk-4IS7AY5Q.mjs";import{BigNumber as yt}from"bignumber.js";async function Kt({allTransactions:T,currentScreenIndex:m,egldLabel:o,network:e,gasPriceData:c,price:S,address:p,username:z,shard:j,signedIndexes:i,parsedTransactionsByDataField:q}){let t=T[m],H=t?.transaction?.sender.toString(),K=t?.transaction,D=null,y=null,W=R({egldLabel:o,sender:H,apiAddress:e.apiAddress,address:p,parsedTransactionsByDataField:q}),a=t.transaction.toPlainObject(),n=await W(t),d=!n?.transactionTokenInfo?.tokenId,{tokenId:g,nonce:l,amount:I=""}=n?.transactionTokenInfo??{},Z=g&&l&&l.length>0?`${g}-${l}`:g,J=await x({tokenId:Z}),{esdtPrice:Q,tokenDecimals:X,type:r,identifier:s,tokenImageUrl:Y}=J;if(r==="SemiFungibleESDT"||r==="NonFungibleESDT")y={type:r,identifier:s,amount:I,imageURL:Y};else{let E=({addCommas:Dt})=>u({input:d?t.transaction.value.toString():I,decimals:d?Number(e.decimals):X,digits:Number(e.digits),showLastNonZeroDecimal:!1,addCommas:Dt}),ut=E({addCommas:!0}),ft=E({addCommas:!1}),Tt=Number(d?S:Q),St=O({amount:ft,usd:Tt,addEqualSign:!0});D={identifier:(s===A?o:s)??o,amount:ut,usdValue:St}}let{feeLimitFormatted:tt,feeInFiatLimit:nt}=w({transaction:K,price:S}),ot=$({shard:j,initialGasPrice:c.initialGasPrice,transaction:a,gasStationMetadata:e.gasStationMetadata}),et=_({transaction:a,gasPriceData:c}),it=G().getType(),at=v(it),N=T.length,rt=i.length>0?i[i.length-1]+1:0,st=f(t.transaction.data.toString()??""),k=U(n?.transactionTokenInfo),mt=M({data:st,identifier:s,highlight:k}),ct=L(),pt=h({to:`/${P}/${p}`,explorerAddress:ct}),dt=N===1||n?.needsSigning&&!i.includes(m),gt=u({input:et.toString(),decimals:C,addCommas:!0,digits:b}),lt=new yt(a.gasLimit).toFormat({decimalSeparator:",",groupSeparator:".",groupSize:3});return{commonData:{receiver:a.receiver.toString(),data:f(t.transaction.data.toString()??""),decodedData:mt,gasPrice:gt,gasLimit:lt,explorerLink:pt,ppu:c.ppu,ppuOptions:ot,egldLabel:o,tokenType:V(r),feeLimit:tt,feeInFiatLimit:nt,transactionsCount:N,currentIndex:m,currentIndexToSign:rt,highlight:k,scCall:B(n?.transactionTokenInfo),needsSigning:dt,isEditable:n?.needsSigning,providerName:at,address:p,username:z,origin:F.location?.origin},tokenTransaction:D,fungibleTransaction:y}}export{Kt as a};
2
+ //# sourceMappingURL=chunk-5JYNGKVQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-4TBVQD27.mjs";import{s as n}from"./chunk-3BAZ5IKF.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
- //# sourceMappingURL=chunk-M3S3XSZ7.mjs.map
1
+ import{a as o}from"./chunk-4TBVQD27.mjs";import{q as n}from"./chunk-76PSW6FH.mjs";var c=t=>n().setState(({config:e})=>{e.nativeAuthConfig=t},!1,"setNativeAuthConfig"),C=t=>n().setState(({config:e})=>{e.websocketStatus=t},!1,"setWebsocketStatus"),f=t=>n().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||o.walletConnectV2RelayAddress,s=t.walletConnectDeepLink||o.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:s,walletConnectV2RelayAddress:a}},!1,"setWalletConnectConfig");export{c as a,C as b,f as c};
2
+ //# sourceMappingURL=chunk-6BJS5QNF.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as a}from"./chunk-3BAZ5IKF.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
- //# sourceMappingURL=chunk-GJYL4HXE.mjs.map
1
+ import{q as a}from"./chunk-76PSW6FH.mjs";var r=({key:e,value:t})=>{a().setState(({cache:c})=>{c[e]=t},!1,"saveToCache")},s=e=>{a().setState(({cache:t})=>{delete t[e]},!1,"removeFromCache")},h=()=>{a().setState(({cache:e})=>{Object.keys(e).forEach(t=>{delete e[t]})},!1,"clearCache")};export{r as a,s as b,h as c};
2
+ //# sourceMappingURL=chunk-6RRVRDXX.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./chunk-76PSW6FH.mjs";import{f as t}from"./chunk-UERJ6AKK.mjs";function n(o=e()){return t(o)}export{n as a};
2
+ //# sourceMappingURL=chunk-73MKFMKP.mjs.map
@@ -0,0 +1,2 @@
1
+ import{b as s,f as a}from"./chunk-UERJ6AKK.mjs";import{f as p}from"./chunk-VNLGNNIL.mjs";import{a as d,b as L}from"./chunk-NLRDRI7Q.mjs";import{a as k}from"./chunk-P6PCRGOG.mjs";import{a as v}from"./chunk-KRWR77QE.mjs";import{b as y}from"./chunk-A7FTKX2A.mjs";import{a as c,b as g}from"./chunk-WZGG2YKQ.mjs";import{a as m,b as f}from"./chunk-M7BM6QPB.mjs";import{a as T}from"./chunk-CYCS3K6Q.mjs";import{a as S,b as u}from"./chunk-VKEESSBI.mjs";import{a as x}from"./chunk-2DNGCNYM.mjs";import{a as I}from"./chunk-NB7A4C7L.mjs";import{c as l}from"./chunk-NTEMINYA.mjs";import{createJSONStorage as O,devtools as V,persist as H}from"zustand/middleware";import{immer as N}from"zustand/middleware/immer";import{createStore as J}from"zustand/vanilla";var A=e=>{e.account=c,e.loginInfo=m,e.transactions=d,e.toasts=S};function h(){return new Date().setHours(new Date().getHours()+24)}function w(e){if(e==null){E();return}b(e)}var C=e=>{let t=a(e),n=p(e),{address:i,publicKey:M}=s(e);if(i&&M!==new l(i).hex()&&A(e),!t)return;if(n==null){w(h());return}let P=Date.now();n-P<0&&(w(null),o().setState(A))};var z=(e,t)=>{C(e)};var W=e=>{let t=J(V(H(N((...n)=>({network:x(...n),account:g(...n),loginInfo:f(...n),config:T(...n),transactions:L(...n),toasts:u(...n),cache:y(...n),ui:I(...n)})),{name:"sdk-dapp-store",storage:O(e)})));return t.subscribe(z),t},r,D=e=>{r=e},o=()=>(r||D(W(()=>new v)),r),pe=(e=k)=>{let t=W(e);return D(t),t},le=()=>o().getState();var me=e=>o().setState(({loginInfo:t})=>{t.providerType=e},!1,"setProviderType"),fe=e=>o().setState(({loginInfo:t})=>{t.tokenLogin=e},!1,"setTokenLogin"),Se=e=>o().setState(({loginInfo:t})=>{if(t.tokenLogin!=null){t.tokenLogin.loginToken=e;return}t.tokenLogin={loginToken:e}},!1,"setLoginToken"),ue=e=>o().setState(({loginInfo:t})=>{t?.tokenLogin!=null&&(t.tokenLogin.signature=e)},!1,"setTokenLoginSignature"),de=e=>o().setState(({loginInfo:t})=>{t.walletConnectLogin=e},!1,"setWalletConnectLogin"),Le=e=>o().setState(({loginInfo:t})=>{t.ledgerLogin=e},!1,"setLedgerLogin"),xe=e=>o().setState(({loginInfo:t})=>{t.isWalletConnectV2Initialized=e},!1,"setIsWalletConnectV2Initialized"),E=()=>o().setState(({loginInfo:e})=>{e.loginExpiresAt=null},!1,"removeLoginExpiresAt"),b=e=>o().setState(({loginInfo:t})=>{t.loginExpiresAt=e},!1,"addLoginExpiresAt");export{me as a,fe as b,Se as c,ue as d,de as e,Le as f,xe as g,E as h,b as i,A as j,h as k,w as l,C as m,z as n,W as o,D as p,o as q,pe as r,le as s};
2
+ //# sourceMappingURL=chunk-76PSW6FH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/store.ts", "../../src/store/middleware/logoutMiddleware.ts", "../../src/store/middleware/applyMiddlewares.ts", "../../src/store/actions/loginInfo/loginInfoActions.ts"],
4
+ "sourcesContent": ["import { createJSONStorage, devtools, persist } from 'zustand/middleware';\nimport { immer } from 'zustand/middleware/immer';\nimport { createStore } from 'zustand/vanilla';\nimport { applyMiddlewares } from './middleware';\nimport {\n networkSlice,\n accountSlice,\n loginInfoSlice,\n configSlice,\n toastSlice,\n cacheSlice,\n uiSlice\n} from './slices';\nimport { transactionsSlice } from './slices/transactions';\nimport {\n InMemoryStorage,\n defaultStorageCallback,\n StorageCallback\n} from './storage';\nimport { StoreType } from './store.types';\n\nexport type MutatorsIn = [\n ['zustand/devtools', never],\n ['zustand/persist', unknown],\n ['zustand/immer', never]\n];\n\nexport type MutatorsOut = [\n ['zustand/devtools', never],\n ['zustand/persist', StoreType],\n ['zustand/immer', never]\n];\n\nexport const createDAppStore = (getStorageCallback: StorageCallback) => {\n const store = createStore<StoreType, MutatorsOut>(\n devtools(\n persist(\n immer((...args) => ({\n network: networkSlice(...args),\n account: accountSlice(...args),\n loginInfo: loginInfoSlice(...args),\n config: configSlice(...args),\n transactions: transactionsSlice(...args),\n toasts: toastSlice(...args),\n cache: cacheSlice(...args),\n ui: uiSlice(...args)\n })),\n {\n name: 'sdk-dapp-store',\n storage: createJSONStorage(getStorageCallback)\n }\n )\n )\n );\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 store = createDAppStore(getStorageCallback);\n setDAppStore(store);\n return store;\n};\n\nexport const getState = () => getStore().getState();\n", "import { WritableDraft } from 'immer';\nimport { Address } from 'lib/sdkCore';\nimport {\n addLoginExpiresAt,\n removeLoginExpiresAt\n} from 'store/actions/loginInfo/loginInfoActions';\nimport {\n accountInfoSelector,\n isLoggedInSelector,\n loginExpiresAtSelector\n} from 'store/selectors';\nimport { initialState as initialAccountState } from 'store/slices/account/accountSlice';\nimport { initialState as initialLoginInfoState } from 'store/slices/loginInfo/loginInfoSlice';\nimport { initialState as initialToastState } from 'store/slices/toast/toastSlice';\nimport { initialState as initialTransactionsState } from 'store/slices/transactions/transactionsSlice';\nimport { getStore } from 'store/store';\nimport { StoreType } from '../store.types';\n\nexport const resetStore = (store: WritableDraft<StoreType>) => {\n store.account = initialAccountState;\n store.loginInfo = initialLoginInfoState;\n store.transactions = initialTransactionsState;\n store.toasts = initialToastState;\n};\n\nexport function getNewLoginExpiresTimestamp() {\n return new Date().setHours(new Date().getHours() + 24);\n}\n\nexport function setLoginExpiresAt(expiresAt: number | null) {\n if (expiresAt == null) {\n removeLoginExpiresAt();\n return;\n }\n addLoginExpiresAt(expiresAt);\n}\n\nexport const logoutMiddleware = (state: StoreType) => {\n const isLoggedIn = isLoggedInSelector(state);\n const loginTimestamp = loginExpiresAtSelector(state);\n const { address, publicKey } = accountInfoSelector(state);\n\n if (address && publicKey !== new Address(address).hex()) {\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 'setProviderType'\n );\n\nexport const setTokenLogin = (tokenLogin: TokenLoginType) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.tokenLogin = tokenLogin;\n },\n false,\n 'setTokenLogin'\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 'setLoginToken'\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 'setTokenLoginSignature'\n );\n\nexport const setWalletConnectLogin = (\n walletConnectLogin: WalletConnectLoginType | null\n) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.walletConnectLogin = walletConnectLogin;\n },\n false,\n 'setWalletConnectLogin'\n );\n\nexport const setLedgerLogin = (ledgerLogin: LedgerLoginType | null) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.ledgerLogin = ledgerLogin;\n },\n false,\n 'setLedgerLogin'\n );\n\nexport const setIsWalletConnectV2Initialized = (isInitialized: boolean) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.isWalletConnectV2Initialized = isInitialized;\n },\n false,\n 'setIsWalletConnectV2Initialized'\n );\n\nexport const removeLoginExpiresAt = () =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = null;\n },\n false,\n 'removeLoginExpiresAt'\n );\n\nexport const addLoginExpiresAt = (expiresAt: number) =>\n getStore().setState(\n ({ loginInfo: state }) => {\n state.loginExpiresAt = expiresAt;\n },\n false,\n 'addLoginExpiresAt'\n );\n"],
5
+ "mappings": "wjBAAA,OAAS,qBAAAA,EAAmB,YAAAC,EAAU,WAAAC,MAAe,qBACrD,OAAS,SAAAC,MAAa,2BACtB,OAAS,eAAAC,MAAmB,kBCgBrB,IAAMC,EAAcC,GAAoC,CAC7DA,EAAM,QAAUC,EAChBD,EAAM,UAAYC,EAClBD,EAAM,aAAeC,EACrBD,EAAM,OAASC,CACjB,EAEO,SAASC,GAA8B,CAC5C,OAAO,IAAI,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,EAAI,EAAE,CACvD,CAEO,SAASC,EAAkBC,EAA0B,CAC1D,GAAIA,GAAa,KAAM,CACrBC,EAAqB,EACrB,MACF,CACAC,EAAkBF,CAAS,CAC7B,CAEO,IAAMG,EAAoBC,GAAqB,CACpD,IAAMC,EAAaC,EAAmBF,CAAK,EACrCG,EAAiBC,EAAuBJ,CAAK,EAC7C,CAAE,QAAAK,EAAS,UAAAC,CAAU,EAAIC,EAAoBP,CAAK,EAMxD,GAJIK,GAAWC,IAAc,IAAIE,EAAQH,CAAO,EAAE,IAAI,GACpDd,EAAWS,CAAK,EAGd,CAACC,EACH,OAGF,GAAIE,GAAkB,KAAM,CAC1BR,EAAkBD,EAA4B,CAAC,EAC/C,MACF,CAEA,IAAMe,EAAM,KAAK,IAAI,EACHN,EAAiBM,EAAM,IAIvCd,EAAkB,IAAI,EACtBe,EAAS,EAAE,SAASnB,CAAU,EAElC,EC5DO,IAAMoB,EAAmB,CAACC,EAAkBC,IAA0B,CAC3EC,EAAiBF,CAAK,CACxB,EF4BO,IAAMG,EAAmBC,GAAwC,CACtE,IAAMC,EAAQC,EACZC,EACEC,EACEC,EAAM,IAAIC,KAAU,CAClB,QAASC,EAAa,GAAGD,CAAI,EAC7B,QAASE,EAAa,GAAGF,CAAI,EAC7B,UAAWG,EAAe,GAAGH,CAAI,EACjC,OAAQI,EAAY,GAAGJ,CAAI,EAC3B,aAAcK,EAAkB,GAAGL,CAAI,EACvC,OAAQM,EAAW,GAAGN,CAAI,EAC1B,MAAOO,EAAW,GAAGP,CAAI,EACzB,GAAIQ,EAAQ,GAAGR,CAAI,CACrB,EAAE,EACF,CACE,KAAM,iBACN,QAASS,EAAkBf,CAAkB,CAC/C,CACF,CACF,CACF,EACA,OAAAC,EAAM,UAAUe,CAAgB,EACzBf,CACT,EAIIA,EAESgB,EAAgBC,GAAqB,CAChDjB,EAAQiB,CACV,EAEaC,EAAW,KACjBlB,GACHgB,EAAalB,EAAgB,IAAM,IAAIqB,CAAiB,CAAC,EAEpDnB,GAgBIoB,GAAY,CAACrB,EAAqBsB,IAA2B,CACxE,IAAMrB,EAAQF,EAAgBC,CAAkB,EAChD,OAAAiB,EAAahB,CAAK,EACXA,CACT,EAEasB,GAAW,IAAMJ,EAAS,EAAE,SAAS,EGpF3C,IAAMK,GACXC,GAEAC,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,aAAeF,CACvB,EACA,GACA,iBACF,EAEWG,GAAiBC,GAC5BH,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,WAAaE,CACrB,EACA,GACA,eACF,EAEWC,GAAiBC,GAC5BL,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxB,GAAIA,EAAM,YAAc,KAAM,CAC5BA,EAAM,WAAW,WAAaI,EAC9B,MACF,CACAJ,EAAM,WAAa,CACjB,WAAAI,CACF,CACF,EACA,GACA,eACF,EAEWC,GAA0BC,GACrCP,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACpBA,GAAO,YAAc,OACvBA,EAAM,WAAW,UAAYM,EAEjC,EACA,GACA,wBACF,EAEWC,GACXC,GAEAT,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,mBAAqBQ,CAC7B,EACA,GACA,uBACF,EAEWC,GAAkBC,GAC7BX,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,YAAcU,CACtB,EACA,GACA,gBACF,EAEWC,GAAmCC,GAC9Cb,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,6BAA+BY,CACvC,EACA,GACA,iCACF,EAEWC,EAAuB,IAClCd,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiB,IACzB,EACA,GACA,sBACF,EAEWc,EAAqBC,GAChChB,EAAS,EAAE,SACT,CAAC,CAAE,UAAWC,CAAM,IAAM,CACxBA,EAAM,eAAiBe,CACzB,EACA,GACA,mBACF",
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", "getState", "setProviderType", "providerType", "getStore", "state", "setTokenLogin", "tokenLogin", "setLoginToken", "loginToken", "setTokenLoginSignature", "signature", "setWalletConnectLogin", "walletConnectLogin", "setLedgerLogin", "ledgerLogin", "setIsWalletConnectV2Initialized", "isInitialized", "removeLoginExpiresAt", "addLoginExpiresAt", "expiresAt"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{u as r}from"./chunk-3BAZ5IKF.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
- //# sourceMappingURL=chunk-OEBWA3U7.mjs.map
1
+ import{s as r}from"./chunk-76PSW6FH.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";var d=s=>{let o=e(r()),t=s??o.apiAddress;return t.endsWith("/")?t.slice(0,-1):t};export{d as a};
2
+ //# sourceMappingURL=chunk-7HGOYM67.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-WM2ARQV6.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-6WVBN32G.mjs.map
1
+ import{a as s}from"./chunk-ZHOATTZ2.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-7TUX3TKQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-F2UXV2DY.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-FNYBJAH3.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-UK5MEKBE.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link: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:c.valueDecimal,valueInteger:c.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:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
- //# sourceMappingURL=chunk-R7SGU5J2.mjs.map
1
+ import{a as k}from"./chunk-NDUDQZDL.mjs";import{a as T}from"./chunk-XCVEFI4B.mjs";import{a as i}from"./chunk-W5MTQBQF.mjs";import{a as m}from"./chunk-FNYBJAH3.mjs";import{a as l}from"./chunk-U3UMCTU6.mjs";import{c as d}from"./chunk-PJWJZHIS.mjs";import{a as o}from"./chunk-UK5MEKBE.mjs";var p=class{static async processTransactions({address:u,egldLabel:v,explorerAddress:g,transactions:L}){let f=L.map(e=>m({address:u,explorerAddress:g,transaction:e}));return await Promise.all(f.map(async e=>{let s=e.receiverAssets?.name.replace(/\p{Emoji}/gu,""),a=e.senderAssets?.name.replace(/\p{Emoji}/gu,""),{senderLockedAccount:h,receiverLockedAccount:D}=await k({receiver:e.receiver,sender:e.sender,tokenId:e.tokenIdentifier}),{egldValueData:t,tokenValueData:n,nftValueData:r}=T({transaction:e}),x=r?.token.type==="MetaESDT"?void 0:r?.badgeText,c=l.getData({input:t?.value??n?.value??r?.value??"",decimals:t?.decimals??n?.decimals??r?.decimals??d,digits:2}),y={badge:x??void 0,collection:n?.token.collection??r?.token.collection,egldLabel:t?v:"",link: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:c.valueDecimal,valueInteger:c.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:!!D,link:e.links.receiverLink??"",shard:w,shardLink:e.links.receiverLink,showLink:e.transactionDetails.direction!=="In"},sender:{address:e.sender,name:a??"",description:`${a??e.sender} (${e.sender})`,isContract:o(e.sender),isTokenLocked:!!h,link:e.links.senderLink??"",shard:A,shardLink:e.links.senderShardLink,showLink:e.transactionDetails.direction!=="Out"},value:y}}))}};export{p as a};
2
+ //# sourceMappingURL=chunk-AL5D2VEW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-FE3NXNR6.mjs";async function l({results:e,hash:i,sessionId:t}){let a=e?.find(o=>o?.returnMessage!=="");r({sessionId:t,transaction:{...a,hash:i,status:"fail",inTransit:!1}}),s({sessionId:t,status:"fail",errorMessage:a?.returnMessage}),await n({sessionId:t,status:"fail"})}export{l as a};
2
- //# sourceMappingURL=chunk-FVHDVMP6.mjs.map
1
+ import{a as n}from"./chunk-FMQYLMTU.mjs";import{b as s,c as r}from"./chunk-44IN6A4I.mjs";async function l({results:e,hash:i,sessionId:t}){let a=e?.find(o=>o?.returnMessage!=="");r({sessionId:t,transaction:{...a,hash:i,status:"fail",inTransit:!1}}),s({sessionId:t,status:"fail",errorMessage:a?.returnMessage}),await n({sessionId:t,status:"fail"})}export{l as a};
2
+ //# sourceMappingURL=chunk-BDOJEJNA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-WZLGCBPM.mjs";import{a as f}from"./chunk-JSFAGVXL.mjs";import{a as g}from"./chunk-Z2M3TCDN.mjs";import{b as a}from"./chunk-3BAZ5IKF.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
- //# sourceMappingURL=chunk-DJY24BHS.mjs.map
1
+ import{a as u}from"./chunk-RVCCJBPE.mjs";import{a as f}from"./chunk-3YBH7N5W.mjs";import{a as g}from"./chunk-JUSK5MVD.mjs";import{b as a}from"./chunk-76PSW6FH.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
+ //# sourceMappingURL=chunk-BDXSVYER.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-HBQQS6GA.mjs";import{u as m}from"./chunk-3BAZ5IKF.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
- //# sourceMappingURL=chunk-TPKK34YE.mjs.map
1
+ import{a as g}from"./chunk-HBQQS6GA.mjs";import{s as m}from"./chunk-76PSW6FH.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as s,u as o}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function I({tokenId:n}){let t=a(m()),r={tokenDecimals:Number(t.decimals),tokenLabel:"",tokenImageUrl:""},{isNft:k}=c(n),i=n,p=k?s:o;if(!i)return r;try{let e=await g(`${t.apiAddress}/${p}/${i}`),l=e?e?.decimals:Number(t.decimals),f=e?e?.name:"",T=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:l,tokenLabel:f,type:e?.type,tokenImageUrl:T,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{...r,error:`${e}`}}}export{I as a};
2
+ //# sourceMappingURL=chunk-BEPW7QRT.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-3BAZ5IKF.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
- //# sourceMappingURL=chunk-YXC4NJUD.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{s as c}from"./chunk-76PSW6FH.mjs";function b(){let t=c(),l=r(t),u=i(t),T=a(t),d=o(t),e=Object.keys(d)?.length>0,n=!e&&Object.keys(l)?.length>0,s=!e&&!n&&Object.keys(u)?.length>0,f=!e&&!n&&!s&&Object.keys(T).length>0;return{pending:e,timedOut:n,fail:s,success:f}}export{b as a};
2
+ //# sourceMappingURL=chunk-BIIJSMXB.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-HWO7E325.mjs";import{c as n}from"./chunk-76PSW6FH.mjs";async function c({loginToken:r,extraInfoData:i,address:e}){let o=await t({originalLoginToken:r,extraInfoData:i,address:e});return o.modifiedLoginToken&&n(o.modifiedLoginToken),o.address}export{c as a};
2
+ //# sourceMappingURL=chunk-BUHXFBUA.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-WEQQ52VT.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
- //# sourceMappingURL=chunk-6MXUKZB3.mjs.map
1
+ import{a as e}from"./chunk-ZTQR4O4A.mjs";import{a as r}from"./chunk-B2UIPHJ3.mjs";var o=()=>{try{return!r()||!e()?!1:window.self!==window.top}catch{return!0}};export{o as a};
2
+ //# sourceMappingURL=chunk-CIVS2YDU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-MMLP7K73.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-ADE33SZY.mjs.map
1
+ import{a as e}from"./chunk-WJHF6NNO.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-CJYTBE3E.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-QET2OLJT.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
- //# sourceMappingURL=chunk-B5QFFY63.mjs.map
1
+ import{a as o}from"./chunk-4IS7AY5Q.mjs";var i=String(o?.navigator?.userAgent),t=/^((?!chrome|android).)*safari/i.test(i),r=/firefox/i.test(i)&&/windows/i.test(i),n=t||r;export{t as a,n as b};
2
+ //# sourceMappingURL=chunk-D5DHIEIM.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as e}from"./chunk-76PSW6FH.mjs";var o=t=>e().setState(({ui:n})=>{n.isSidePanelOpen=t},!1,"setIsSidePanelOpen");export{o as a};
2
+ //# sourceMappingURL=chunk-DTEI5SBP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-KU45KIR2.mjs";import{a as c}from"./chunk-5MLAF3LT.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
- //# sourceMappingURL=chunk-QIBUEZS3.mjs.map
1
+ import{a as l}from"./chunk-NLZHVYZR.mjs";import{a as c}from"./chunk-73MKFMKP.mjs";import{a}from"./chunk-YUFPUG5O.mjs";var p="Check if the MultiversX App is open on Ledger";async function v({manager:e,resolve:n,reject:d,shouldInitProvider:s}){let i=!c(),t=()=>v({manager:e,resolve:n,reject:d,shouldInitProvider:s}),o=()=>d("Device unavailable");try{e?.updateAccountScreen({isLoading:!0}),e&&i&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o});let r=await l({shouldInitProvider:s});e&&i&&e.unsubscribeFromProviderInit({handleRetry:t,handleCancel:o}),n(r)}catch(r){if(!i)throw r;let{errorMessage:u,defaultErrorMessage:g}=a(r);e?.updateConnectScreen({error:u??g??p}),e&&e.subscribeToProviderInit({handleRetry:t,handleCancel:o})}}export{v as a};
2
+ //# sourceMappingURL=chunk-DX6OA75E.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-2DS6LYYY.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
- //# sourceMappingURL=chunk-SGGAZCOK.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-OINVR4SF.mjs";import e from"lodash.isempty";var p=async({transactionsSessions:t,address:i,explorerAddress:a,egldLabel:o})=>{if(e(t))return[];let n=s(t);return r({transactions:n,address:i,explorerAddress:a,egldLabel:o})};export{p as a};
2
+ //# sourceMappingURL=chunk-EC3CUSWI.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-M3S3XSZ7.mjs";import{d as C,e as I}from"./chunk-LST3XXIJ.mjs";import{s as p}from"./chunk-3BAZ5IKF.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
- //# sourceMappingURL=chunk-7RLXMK3R.mjs.map
1
+ import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-6BJS5QNF.mjs";import{d as C,e as I}from"./chunk-ZIMECN23.mjs";import{q as p}from"./chunk-76PSW6FH.mjs";import{b as E}from"./chunk-SAAOQW7P.mjs";import{a as y}from"./chunk-MGQ373AO.mjs";import{b as t}from"./chunk-GGBMHKR4.mjs";import{io as L}from"socket.io-client";var U=3e3,d=3,k=500,W=1e3,M=1e3,S="batchUpdated",w="connect",O="connect_error",A="disconnect";async function K(l){let{apiAddress:_,websocketUrl:g}=E(p().getState());if(!l)throw new Error("Websocket could not be initialized: address missing");let o=null,n=null,c=e=>{t.status=e,b(e)},R=e=>{o&&clearTimeout(o),o=setTimeout(()=>{C(e)},W)},h=e=>{n&&clearTimeout(n),n=setTimeout(()=>{I(e)},W)},D=()=>{let e=t.instance;e&&(e.off(O),e.off(w),e.off(S),e.off(A),e.close(),console.log("Websocket disconnected.")),c("not_initialized"),t.instance=null,o&&clearTimeout(o),n&&clearTimeout(n)},m=y(async()=>{let e=async(i=d,a=k)=>{let f=0,r=null,s=null,T=async()=>{if(f>=i){console.warn("WebSocket reconnection failed after max attempts."),c("not_initialized");return}f++,t.instance?.off(),t.instance?.close(),t.instance=null;try{await m(),r=setTimeout(()=>{t.instance?.connected||(s=setTimeout(T,a))},M)}catch{s=setTimeout(T,a)}};return T(),()=>{r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null)}};c("pending");let u=g??await N(_);if(!u){c("not_initialized");return}t.instance=L(u,{forceNew:!0,reconnection:!0,reconnectionAttempts:d,timeout:U,query:{address:l}}),t.instance.onAny(R),t.instance.on(S,h),t.instance.on(w,()=>{console.log("Websocket connected."),c("completed")}),t.instance.on(O,async i=>{console.warn("Websocket connect error: ",i.message),(await e())()}),t.instance.on(A,async()=>{console.warn("Websocket disconnected. Trying to reconnect..."),(await e())()})},{retries:2,delay:k});return t.status==="not_initialized"&&!t.instance?.active&&await m(),{closeConnection:D}}export{K as a};
2
+ //# sourceMappingURL=chunk-EJV4GLIF.mjs.map
@@ -0,0 +1,2 @@
1
+ import{q as n}from"./chunk-76PSW6FH.mjs";import{b as t}from"./chunk-UTWIKUIK.mjs";var c=a=>t(`transaction-${a}`)(n().getState())??null;export{c as a};
2
+ //# sourceMappingURL=chunk-ETSUQ2R4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-7RLXMK3R.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
- //# sourceMappingURL=chunk-IZMXB463.mjs.map
1
+ import{a as e}from"./chunk-EJV4GLIF.mjs";var t={closeConnectionRef:void 0};async function c(n){let{closeConnection:o}=await e(n);t.closeConnectionRef=o}export{t as a,c as b};
2
+ //# sourceMappingURL=chunk-FFUT67H3.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as o}from"./chunk-76PSW6FH.mjs";import{b as t}from"./chunk-UERJ6AKK.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-FM6JYAAR.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as B}from"./chunk-FM6JYAAR.mjs";import{a as b}from"./chunk-GQOTAVAR.mjs";import{a as k}from"./chunk-QXC4D3AC.mjs";import{a as R}from"./chunk-OD4ANAAQ.mjs";import{a as D}from"./chunk-5JYNGKVQ.mjs";import{a as I}from"./chunk-PHOF3Z5D.mjs";import{a as j}from"./chunk-URJQWHBM.mjs";import{a as _}from"./chunk-WSBN47MX.mjs";import{a as A}from"./chunk-7TUX3TKQ.mjs";import{a as O}from"./chunk-HFEXCIZ2.mjs";import{s as x}from"./chunk-76PSW6FH.mjs";import{b as v}from"./chunk-SAAOQW7P.mjs";import{a as G,c as U,f as F}from"./chunk-PJWJZHIS.mjs";import{a as w}from"./chunk-NTEMINYA.mjs";import{c as N}from"./chunk-MGFIOCA4.mjs";async function Dn({transactions:z=[],handleSign:H,guardTransactions:K=_}){let{account:{address:y,shard:h,username:E}}=B(),g=v(x()),C=O(),{allTransactions:r,parsedTransactionsByDataField:L}=R(z),p=[],n=A.getInstance();if(await n.openUI(),!n)throw new Error("Unable to establish connection with sign screens");let W=async()=>{await b(),n.closeUI()};return n.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",W),new Promise(async(X,M)=>{let d=[],Y=await k({baseURL:g.apiAddress});n.notifyDataUpdate(),n.initializeGasPriceMap(r.map(a=>a.transaction));let l=Y?.price,t=0,T=async()=>{let c=r[t]?.transaction,i=Number(c.nonce);try{n.updateIsLoading(!0);let{commonData:o,tokenTransaction:e,fungibleTransaction:s}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});e&&n.updateTokenTransaction(e),s&&n.updateNonFungibleTransaction(s.type,s),n.updateCommonData(o)}catch(o){throw console.error(`Error fetching common data for transaction at index ${t}:`,o),o}finally{n.updateIsLoading(!1)}},$=()=>{t>0&&(t--,T())},q=(a=0)=>{let i=r[t].transaction,o=Number(i.nonce);n.updateGasPriceMap({nonce:o,ppu:a}),n.updateCommonData({ppu:a});let e=i.toPlainObject(),s=I({transaction:e,gasPriceData:n.ppuMap[o]}),P=w.newFromPlainObject({...e,gasPrice:s}),u=j({transaction:P,price:l}),m=F({input:s.toString(),decimals:U,addCommas:!0,digits:G});n.updateCommonData({feeLimit:u.feeLimitFormatted,feeInFiatLimit:u.feeInFiatLimit,gasPrice:m,ppu:a})},J=async()=>{M(new Error("Transaction signing cancelled by user")),await b(),n.closeUI()},f=()=>{t<n.transactionsCount-1&&(t++,T())},Q=async()=>{let c=r[t].transaction,i=Number(c.nonce),{commonData:o}=await D({allTransactions:r,currentScreenIndex:t,egldLabel:C,network:g,gasPriceData:n.ppuMap[i],price:l,address:y,username:E,shard:h,signedIndexes:p,parsedTransactionsByDataField:L});if(!o.needsSigning)return p.push(t),f();let e=c.toPlainObject(),s=e.nonce,P=I({transaction:e,gasPriceData:n.ppuMap[s]}),u=w.newFromPlainObject({...e,gasPrice:P});try{let m=await H([u]);m&&(p.push(t),d.push(m[0]));let nn=t===r.length-1,tn=r.filter(S=>S.needsSigning),an=d.length===tn.length;if(nn&&an){let S=await K(d);return n.closeUI(),X(S)}f()}catch(m){n.closeUI(),M(m)}},V=new Map([["NEXT_SIGN_TRANSACTIONS",f],["CONFIRM_SIGN_TRANSACTIONS",Q],["CLOSE_SIGN_TRANSACTIONS",J],["BACK_SIGN_TRANSACTIONS",$],["SET_PPU_SIGN_TRANSACTIONS",q]]);function Z(){for(let[a,c]of V)n.subscribeToEventBus(a,c)}Z(),await T()})}export{Dn as a};
2
+ //# sourceMappingURL=chunk-FQNOEYHK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/strategies/helpers/signTransactions/signTransactions.ts"],
4
+ "sourcesContent": ["import { getEconomics } from 'apiCalls/economics/getEconomics';\nimport { EMPTY_PPU } from 'constants/placeholders.constants';\nimport { Transaction } from 'lib/sdkCore';\nimport { DECIMALS, DIGITS, formatAmount } from 'lib/sdkDappUtils';\nimport { SignTransactionsStateManager } from 'managers/internal/SignTransactionsStateManager/SignTransactionsStateManager';\nimport {\n ISignTransactionsPanelCommonData,\n SignEventsEnum\n} from 'managers/internal/SignTransactionsStateManager/types';\nimport { getAccountInfo } from 'methods/account/getAccountInfo';\nimport { getEgldLabel } from 'methods/network/getEgldLabel';\nimport { cancelCrossWindowAction } from 'providers/helpers/cancelCrossWindowAction';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { networkSelector } from 'store/selectors/networkSelectors';\nimport { getState } from 'store/store';\nimport { getCommonData } from './helpers/getCommonData/getCommonData';\nimport { getRecommendedGasPrice } from './helpers/getCommonData/helpers/getRecommendedGasPrice';\nimport { getFeeData } from './helpers/getFeeData';\nimport { getMultiEsdtTransferData } from './helpers/getMultiEsdtTransferData/getMultiEsdtTransferData';\nimport { guardTransactions as getGuardedTransactions } from './helpers/guardTransactions/guardTransactions';\n\ntype SignTransactionsParamsType = {\n transactions?: Transaction[];\n handleSign: IProvider['signTransactions'];\n guardTransactions?: typeof getGuardedTransactions;\n};\n\nexport async function signTransactions({\n transactions = [],\n handleSign,\n guardTransactions = getGuardedTransactions\n}: SignTransactionsParamsType): Promise<Transaction[]> {\n const {\n account: { address, shard, username }\n } = getAccountInfo();\n const network = networkSelector(getState());\n\n const egldLabel = getEgldLabel();\n\n const { allTransactions, parsedTransactionsByDataField } =\n getMultiEsdtTransferData(transactions);\n\n let signedIndexes: number[] = [];\n\n const manager = SignTransactionsStateManager.getInstance();\n await manager.openUI();\n\n if (!manager) {\n throw new Error('Unable to establish connection with sign screens');\n }\n\n const handleCancel = async () => {\n await cancelCrossWindowAction();\n manager.closeUI();\n };\n\n manager.subscribeToEventBus(SignEventsEnum.CLOSE, handleCancel);\n\n return new Promise<Transaction[]>(async (resolve, reject) => {\n const signedTransactions: Transaction[] = [];\n const economics = await getEconomics({ baseURL: network.apiAddress });\n\n manager.notifyDataUpdate();\n\n manager.initializeGasPriceMap(allTransactions.map((tx) => tx.transaction));\n const price = economics?.price;\n\n let currentScreenIndex = 0;\n\n const updateScreen = async () => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction?.transaction;\n\n const currentNonce = Number(transaction.nonce);\n\n try {\n manager.updateIsLoading(true);\n\n const { commonData, tokenTransaction, fungibleTransaction } =\n await getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData: manager.ppuMap[currentNonce],\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n });\n\n if (tokenTransaction) {\n manager.updateTokenTransaction(tokenTransaction);\n }\n\n if (fungibleTransaction) {\n manager.updateNonFungibleTransaction(\n fungibleTransaction.type,\n fungibleTransaction\n );\n }\n\n manager.updateCommonData(commonData);\n } catch (error) {\n console.error(\n `Error fetching common data for transaction at index ${currentScreenIndex}:`,\n error\n );\n\n throw error;\n } finally {\n manager.updateIsLoading(false);\n }\n };\n\n const onBack = () => {\n if (currentScreenIndex > 0) {\n currentScreenIndex--;\n updateScreen();\n }\n };\n\n const onSetPpu = (\n ppu: ISignTransactionsPanelCommonData['ppu'] = EMPTY_PPU\n ) => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction.transaction;\n const currentNonce = Number(transaction.nonce);\n\n manager.updateGasPriceMap({\n nonce: currentNonce,\n ppu\n });\n\n manager.updateCommonData({ ppu });\n\n const plainTransaction = transaction.toPlainObject();\n const newGasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData: manager.ppuMap[currentNonce]\n });\n\n const newTransaction = Transaction.newFromPlainObject({\n ...plainTransaction,\n gasPrice: newGasPrice\n });\n\n const feeData = getFeeData({\n transaction: newTransaction,\n price\n });\n\n const formattedGasPrice = formatAmount({\n input: newGasPrice.toString(),\n decimals: DECIMALS,\n addCommas: true,\n digits: DIGITS\n });\n\n manager.updateCommonData({\n feeLimit: feeData.feeLimitFormatted,\n feeInFiatLimit: feeData.feeInFiatLimit,\n gasPrice: formattedGasPrice,\n ppu\n });\n };\n\n const onCancel = async () => {\n reject(new Error('Transaction signing cancelled by user'));\n await cancelCrossWindowAction();\n manager.closeUI();\n };\n\n const onNext = () => {\n if (currentScreenIndex < manager.transactionsCount - 1) {\n currentScreenIndex++;\n updateScreen();\n }\n };\n\n const onSign = async () => {\n const currentTransaction = allTransactions[currentScreenIndex];\n const transaction = currentTransaction.transaction;\n const currentNonce = Number(transaction.nonce);\n\n const { commonData } = await getCommonData({\n allTransactions,\n currentScreenIndex,\n egldLabel,\n network,\n gasPriceData: manager.ppuMap[currentNonce],\n price,\n address,\n username,\n shard,\n signedIndexes,\n parsedTransactionsByDataField\n });\n\n if (!commonData.needsSigning) {\n signedIndexes.push(currentScreenIndex);\n return onNext();\n }\n\n const plainTransaction = transaction.toPlainObject();\n const txNonce = plainTransaction.nonce;\n\n const newGasPrice = getRecommendedGasPrice({\n transaction: plainTransaction,\n gasPriceData: manager.ppuMap[txNonce]\n });\n\n const transactionToSign = Transaction.newFromPlainObject({\n ...plainTransaction,\n gasPrice: newGasPrice\n });\n\n try {\n const signedTxs = await handleSign([transactionToSign]);\n if (signedTxs) {\n signedIndexes.push(currentScreenIndex);\n signedTransactions.push(signedTxs[0]);\n }\n\n const isLastScreen = currentScreenIndex === allTransactions.length - 1;\n const allSignableTransactions = allTransactions.filter(\n (tx) => tx.needsSigning\n );\n\n const areAllTransactionsSigned =\n signedTransactions.length === allSignableTransactions.length;\n\n if (isLastScreen && areAllTransactionsSigned) {\n const optionallyGuardedTransactions =\n await guardTransactions(signedTransactions);\n manager.closeUI();\n return resolve(optionallyGuardedTransactions);\n }\n\n onNext();\n } catch (error) {\n manager.closeUI();\n reject(error);\n }\n };\n\n const eventHandlersMap = new Map([\n [SignEventsEnum.NEXT, onNext],\n [SignEventsEnum.CONFIRM, onSign],\n [SignEventsEnum.CLOSE, onCancel],\n [SignEventsEnum.BACK, onBack],\n [SignEventsEnum.SET_PPU, onSetPpu]\n ]);\n\n function setupEventListeners() {\n for (const [event, handler] of eventHandlersMap) {\n manager.subscribeToEventBus(event, handler);\n }\n }\n\n setupEventListeners();\n await updateScreen();\n });\n}\n"],
5
+ "mappings": "qnBA2BA,eAAsBA,GAAiB,CACrC,aAAAC,EAAe,CAAC,EAChB,WAAAC,EACA,kBAAAC,EAAoBA,CACtB,EAAuD,CACrD,GAAM,CACJ,QAAS,CAAE,QAAAC,EAAS,MAAAC,EAAO,SAAAC,CAAS,CACtC,EAAIC,EAAe,EACbC,EAAUC,EAAgBC,EAAS,CAAC,EAEpCC,EAAYC,EAAa,EAEzB,CAAE,gBAAAC,EAAiB,8BAAAC,CAA8B,EACrDC,EAAyBd,CAAY,EAEnCe,EAA0B,CAAC,EAEzBC,EAAUC,EAA6B,YAAY,EAGzD,GAFA,MAAMD,EAAQ,OAAO,EAEjB,CAACA,EACH,MAAM,IAAI,MAAM,kDAAkD,EAGpE,IAAME,EAAe,SAAY,CAC/B,MAAMC,EAAwB,EAC9BH,EAAQ,QAAQ,CAClB,EAEA,OAAAA,EAAQ,8CAA0CE,CAAY,EAEvD,IAAI,QAAuB,MAAOE,EAASC,IAAW,CAC3D,IAAMC,EAAoC,CAAC,EACrCC,EAAY,MAAMC,EAAa,CAAE,QAASjB,EAAQ,UAAW,CAAC,EAEpES,EAAQ,iBAAiB,EAEzBA,EAAQ,sBAAsBJ,EAAgB,IAAKa,GAAOA,EAAG,WAAW,CAAC,EACzE,IAAMC,EAAQH,GAAW,MAErBI,EAAqB,EAEnBC,EAAe,SAAY,CAE/B,IAAMC,EADqBjB,EAAgBe,CAAkB,GACrB,YAElCG,EAAe,OAAOD,EAAY,KAAK,EAE7C,GAAI,CACFb,EAAQ,gBAAgB,EAAI,EAE5B,GAAM,CAAE,WAAAe,EAAY,iBAAAC,EAAkB,oBAAAC,CAAoB,EACxD,MAAMC,EAAc,CAClB,gBAAAtB,EACA,mBAAAe,EACA,UAAAjB,EACA,QAAAH,EACA,aAAcS,EAAQ,OAAOc,CAAY,EACzC,MAAAJ,EACA,QAAAvB,EACA,SAAAE,EACA,MAAAD,EACA,cAAAW,EACA,8BAAAF,CACF,CAAC,EAECmB,GACFhB,EAAQ,uBAAuBgB,CAAgB,EAG7CC,GACFjB,EAAQ,6BACNiB,EAAoB,KACpBA,CACF,EAGFjB,EAAQ,iBAAiBe,CAAU,CACrC,OAASI,EAAO,CACd,cAAQ,MACN,uDAAuDR,CAAkB,IACzEQ,CACF,EAEMA,CACR,QAAE,CACAnB,EAAQ,gBAAgB,EAAK,CAC/B,CACF,EAEMoB,EAAS,IAAM,CACfT,EAAqB,IACvBA,IACAC,EAAa,EAEjB,EAEMS,EAAW,CACfC,EAA+C,IAC5C,CAEH,IAAMT,EADqBjB,EAAgBe,CAAkB,EACtB,YACjCG,EAAe,OAAOD,EAAY,KAAK,EAE7Cb,EAAQ,kBAAkB,CACxB,MAAOc,EACP,IAAAQ,CACF,CAAC,EAEDtB,EAAQ,iBAAiB,CAAE,IAAAsB,CAAI,CAAC,EAEhC,IAAMC,EAAmBV,EAAY,cAAc,EAC7CW,EAAcC,EAAuB,CACzC,YAAaF,EACb,aAAcvB,EAAQ,OAAOc,CAAY,CAC3C,CAAC,EAEKY,EAAiBC,EAAY,mBAAmB,CACpD,GAAGJ,EACH,SAAUC,CACZ,CAAC,EAEKI,EAAUC,EAAW,CACzB,YAAaH,EACb,MAAAhB,CACF,CAAC,EAEKoB,EAAoBC,EAAa,CACrC,MAAOP,EAAY,SAAS,EAC5B,SAAUQ,EACV,UAAW,GACX,OAAQC,CACV,CAAC,EAEDjC,EAAQ,iBAAiB,CACvB,SAAU4B,EAAQ,kBAClB,eAAgBA,EAAQ,eACxB,SAAUE,EACV,IAAAR,CACF,CAAC,CACH,EAEMY,EAAW,SAAY,CAC3B7B,EAAO,IAAI,MAAM,uCAAuC,CAAC,EACzD,MAAMF,EAAwB,EAC9BH,EAAQ,QAAQ,CAClB,EAEMmC,EAAS,IAAM,CACfxB,EAAqBX,EAAQ,kBAAoB,IACnDW,IACAC,EAAa,EAEjB,EAEMwB,EAAS,SAAY,CAEzB,IAAMvB,EADqBjB,EAAgBe,CAAkB,EACtB,YACjCG,EAAe,OAAOD,EAAY,KAAK,EAEvC,CAAE,WAAAE,CAAW,EAAI,MAAMG,EAAc,CACzC,gBAAAtB,EACA,mBAAAe,EACA,UAAAjB,EACA,QAAAH,EACA,aAAcS,EAAQ,OAAOc,CAAY,EACzC,MAAAJ,EACA,QAAAvB,EACA,SAAAE,EACA,MAAAD,EACA,cAAAW,EACA,8BAAAF,CACF,CAAC,EAED,GAAI,CAACkB,EAAW,aACd,OAAAhB,EAAc,KAAKY,CAAkB,EAC9BwB,EAAO,EAGhB,IAAMZ,EAAmBV,EAAY,cAAc,EAC7CwB,EAAUd,EAAiB,MAE3BC,EAAcC,EAAuB,CACzC,YAAaF,EACb,aAAcvB,EAAQ,OAAOqC,CAAO,CACtC,CAAC,EAEKC,EAAoBX,EAAY,mBAAmB,CACvD,GAAGJ,EACH,SAAUC,CACZ,CAAC,EAED,GAAI,CACF,IAAMe,EAAY,MAAMtD,EAAW,CAACqD,CAAiB,CAAC,EAClDC,IACFxC,EAAc,KAAKY,CAAkB,EACrCL,EAAmB,KAAKiC,EAAU,CAAC,CAAC,GAGtC,IAAMC,GAAe7B,IAAuBf,EAAgB,OAAS,EAC/D6C,GAA0B7C,EAAgB,OAC7Ca,GAAOA,EAAG,YACb,EAEMiC,GACJpC,EAAmB,SAAWmC,GAAwB,OAExD,GAAID,IAAgBE,GAA0B,CAC5C,IAAMC,EACJ,MAAMzD,EAAkBoB,CAAkB,EAC5C,OAAAN,EAAQ,QAAQ,EACTI,EAAQuC,CAA6B,CAC9C,CAEAR,EAAO,CACT,OAAShB,EAAO,CACdnB,EAAQ,QAAQ,EAChBK,EAAOc,CAAK,CACd,CACF,EAEMyB,EAAmB,IAAI,IAAI,CAC/B,0BAAsBT,CAAM,EAC5B,6BAAyBC,CAAM,EAC/B,2BAAuBF,CAAQ,EAC/B,0BAAsBd,CAAM,EAC5B,6BAAyBC,CAAQ,CACnC,CAAC,EAED,SAASwB,GAAsB,CAC7B,OAAW,CAACC,EAAOC,CAAO,IAAKH,EAC7B5C,EAAQ,oBAAoB8C,EAAOC,CAAO,CAE9C,CAEAF,EAAoB,EACpB,MAAMjC,EAAa,CACrB,CAAC,CACH",
6
+ "names": ["signTransactions", "transactions", "handleSign", "guardTransactions", "address", "shard", "username", "getAccountInfo", "network", "networkSelector", "getState", "egldLabel", "getEgldLabel", "allTransactions", "parsedTransactionsByDataField", "getMultiEsdtTransferData", "signedIndexes", "manager", "SignTransactionsStateManager", "handleCancel", "cancelCrossWindowAction", "resolve", "reject", "signedTransactions", "economics", "getEconomics", "tx", "price", "currentScreenIndex", "updateScreen", "transaction", "currentNonce", "commonData", "tokenTransaction", "fungibleTransaction", "getCommonData", "error", "onBack", "onSetPpu", "ppu", "plainTransaction", "newGasPrice", "getRecommendedGasPrice", "newTransaction", "Transaction", "feeData", "getFeeData", "formattedGasPrice", "formatAmount", "DECIMALS", "DIGITS", "onCancel", "onNext", "onSign", "txNonce", "transactionToSign", "signedTxs", "isLastScreen", "allSignableTransactions", "areAllTransactionsSigned", "optionallyGuardedTransactions", "eventHandlersMap", "setupEventListeners", "event", "handler"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EC3CUSWI.mjs";var o={async getTransactionsHistory(s){return await t(s)}};export{o as a};
2
+ //# sourceMappingURL=chunk-FZ72N7LX.mjs.map
@@ -1,2 +1,2 @@
1
- import{t as n}from"./chunk-QYUEIE7N.mjs";import{a as i}from"./chunk-PLUWBWJ2.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
- //# sourceMappingURL=chunk-EVS2OAVI.mjs.map
1
+ import{t as n}from"./chunk-ZLS3BN2I.mjs";import{a as i}from"./chunk-PLUWBWJ2.mjs";var e=async()=>{let o=n();if(o.getType()===i.crossWindow){let r=o;await r.cancelAction(),await r.dispose()}};export{e as a};
2
+ //# sourceMappingURL=chunk-GQOTAVAR.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-76PSW6FH.mjs";import{c as r}from"./chunk-UERJ6AKK.mjs";function m(e=t()){return r(e)}export{m as a};
2
+ //# sourceMappingURL=chunk-H3PQUL5M.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-3BAZ5IKF.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
- //# sourceMappingURL=chunk-PGY32PLX.mjs.map
1
+ import{s as e}from"./chunk-76PSW6FH.mjs";import{b as t}from"./chunk-SAAOQW7P.mjs";import{x as r}from"./chunk-KD2IQ32V.mjs";import i from"axios";var T=async o=>{let{apiAddress:s}=t(e()),{data:a}=await i.get(`${s}/${r}`,{params:{hashes:o.join(","),withScResults:!0}});return a};export{T as a};
2
+ //# sourceMappingURL=chunk-HCGAZMW2.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as t}from"./chunk-76PSW6FH.mjs";import{b as e}from"./chunk-SAAOQW7P.mjs";function g(r=t()){return e(r).egldLabel}export{g as a};
2
+ //# sourceMappingURL=chunk-HFEXCIZ2.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-ADE33SZY.mjs";import{a as e}from"./chunk-6KY5GEWL.mjs";import{a as i}from"./chunk-CDQ2BNUD.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
- //# sourceMappingURL=chunk-BNDFXYBM.mjs.map
1
+ import{a as s}from"./chunk-CJYTBE3E.mjs";import{a as e}from"./chunk-H3PQUL5M.mjs";import{a as i}from"./chunk-CDQ2BNUD.mjs";var a=class{constructor(o){this.address="";this._login=null;this.loginAbortController=null;this.cancelLogin=()=>{this.loginAbortController&&this.loginAbortController.abort(),this.cancelAction?.(),this.loginAbortController=null};this.loginOperation=async o=>{if(!this._login)throw new Error("Provider is not initialized.");let r=await this._login(o);if(!r?.address)throw new Error("Provider is not initialized.");return{...r,address:r.address,signature:r.signature??""}};this.initializeAddress=()=>{if(this.address)return;let o=e();o&&(this.address=o)};this.cancelAction=void 0;this.address=o??""}getAccount(){throw new Error("Method not implemented.")}signTransaction(o,r){throw new Error("Method not implemented.")}async login(o){if(!this._login)throw new Error("Provider is not initialized.");this.loginAbortController&&this.loginAbortController.abort();let r=new AbortController;this.loginAbortController=r;let t=r.signal;try{let n=new Promise((p,c)=>{t.addEventListener("abort",()=>{c(new Error("Login cancelled"))})}),l=await Promise.race([this.loginOperation(o),n]);return this.loginAbortController=null,l}catch(n){throw this.loginAbortController=null,n}}async initSignState(){let{onClose:o,manager:r}=await s({cancelAction:this.cancelAction?.bind(this)}),t=this.getType();return r.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",o),r.updateData({name:i[t],type:t}),{onClose:o,manager:r}}};export{a};
2
+ //# sourceMappingURL=chunk-HPC5WEQQ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-RRRK4J56.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-RZNOYCZT.mjs.map
1
+ import{a as t}from"./chunk-N7UPPFCH.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-HWO7E325.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as A}from"./chunk-24XAM2VT.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-QYUEIE7N.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-FE3NXNR6.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-WZLGCBPM.mjs";import{u as m}from"./chunk-3BAZ5IKF.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
- //# sourceMappingURL=chunk-QGUSK75W.mjs.map
1
+ import{a as A}from"./chunk-3WNAFMEK.mjs";import{a as I}from"./chunk-EAJBSX6Y.mjs";import{a as b}from"./chunk-Y3BNMQFP.mjs";import{h as f}from"./chunk-ZLS3BN2I.mjs";import{h as u}from"./chunk-CAA4VJRH.mjs";import{b as S}from"./chunk-3ZEUVYQF.mjs";import{a as y}from"./chunk-44IN6A4I.mjs";import{a as g}from"./chunk-L3MWDI6J.mjs";import{a as h}from"./chunk-RVCCJBPE.mjs";import{s as m}from"./chunk-76PSW6FH.mjs";import{b as T}from"./chunk-SAAOQW7P.mjs";import w from"axios";var r=class r{constructor(){this.setCallbacks=({onSuccess:a,onFail:t})=>{S({onSuccess:a,onFail:t})};this.send=async a=>{if(a.length===0)throw new Error("No transactions to send");try{if(!I(a))return await this.sendSignedTransactions(a);let t=await this.sendSignedBatchTransactions(a);if(!t.data||t.data.error)throw new Error(t.data?.error??"Failed to send transactions");return t.data.transactions}catch(t){throw t.response?.data?.message??t.message}};this.track=async(a,t={disableToasts:!1})=>{let n=this.sequentialToFlatArray(a).map(e=>({...e,status:e.status??"pending"})),o=g(n),s=y({transactions:n,transactionsDisplayInfo:t.transactionsDisplayInfo,status:o??"sent",sessionInformation:t.sessionInformation});if(t.disableToasts===!0)return s;let i=A(a);return f({toastId:s,totalDuration:i}),s};this.sendSignedTransactions=async a=>{let{apiAddress:t,apiTimeout:n}=T(m());return await Promise.all(a.map(async s=>{let i=await w.post(`${t}/transactions`,s.toPlainObject(),{timeout:Number(n)}),e=i.data.txHash;return{...s.toPlainObject(),...i.data,status:"pending",hash:e}}))};this.sendSignedBatchTransactions=async a=>{let{address:t}=h(),{apiAddress:n,apiTimeout:o}=T(m());if(!t)return{error:"Invalid address provided. You need to be logged in to send transactions"};let s=this.buildBatchId(t),e={transactions:a.map(p=>p.map(c=>c.toPlainObject())),id:s},{data:l}=await w.post(`${n}/batch`,e,{timeout:Number(o)}),B=l.transactions.map(p=>p.map(c=>{let d={...c,status:"pending",hash:c.hash};return b({data:d.data})&&(delete d.senderUsername,delete d.receiverUsername),d}));return{data:{...l,transactions:B}}};this.buildBatchId=a=>`${Date.now().toString()}${u}${a}`;this.sequentialToFlatArray=(a=[])=>this.getIsSequential(a)?a.flat():a;this.getIsSequential=a=>a?.every(t=>Array.isArray(t))}static getInstance(){return r.instance||(r.instance=new r),r.instance}};r.instance=null;var v=r;export{v as a};
2
+ //# sourceMappingURL=chunk-IFWUP3FX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-QET2OLJT.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
- //# sourceMappingURL=chunk-YFO4VEZA.mjs.map
1
+ import{a as t}from"./chunk-4IS7AY5Q.mjs";import{MvxLedgerConnect as r}from"@multiversx/sdk-dapp-ui/web-components/mvx-ledger-connect";async function i(n){if(!(typeof t.navigator<"u"&&t.navigator.product==="ReactNative"))try{(await import("@multiversx/sdk-dapp-ui")).defineCustomElements(n)}catch(e){console.warn("@multiversx/sdk-dapp-ui not found"+e)}}export{i as a,r as b};
2
+ //# sourceMappingURL=chunk-IOTYH724.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-X6MN67NW.mjs";import{u as m}from"./chunk-3BAZ5IKF.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
- //# sourceMappingURL=chunk-TRQA733J.mjs.map
1
+ import{a as s}from"./chunk-X6MN67NW.mjs";import{s as m}from"./chunk-76PSW6FH.mjs";import{b as a}from"./chunk-SAAOQW7P.mjs";import{o as r,u as i}from"./chunk-KD2IQ32V.mjs";import{a as c}from"./chunk-3FXHIV6O.mjs";async function b({tokenId:o}){let t=a(m()),{isNft:k}=c(o),n=o,p=k?r:i;if(!n)return{tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:""};try{let{data:e}=await s.get(`${t.apiAddress}/${p}/${n}`),f=e?e?.decimals:Number(t.decimals),l=e?e?.name:"",d=e?e?.assets?.svgUrl??e?.media?.[0]?.thumbnailUrl:"";return{tokenDecimals:f,tokenLabel:l,type:e?.type,tokenAvatar:d,identifier:e?.identifier,assets:e?.assets,esdtPrice:e?.price,ticker:e?.ticker,name:e?.name}}catch(e){return{error:`Error fetching token ${n}: ${e.toString()}`,tokenDecimals:Number(t.decimals),tokenLabel:"",tokenAvatar:"",identifier:n}}}export{b as a};
2
+ //# sourceMappingURL=chunk-JIF5QHA5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-WDFZXGVF.mjs";import{a as s}from"./chunk-JPGDRR3A.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-4LT5LGQC.mjs";import{b as A}from"./chunk-LST3XXIJ.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-3BAZ5IKF.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
- //# sourceMappingURL=chunk-7CFPPCWC.mjs.map
1
+ import{a as h}from"./chunk-534QBNPX.mjs";import{a as s}from"./chunk-NNBLC3DP.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-RFBR7WI3.mjs";import{b as A}from"./chunk-ZIMECN23.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{f as p}from"./chunk-76PSW6FH.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-PLUWBWJ2.mjs";import{BigNumber as C}from"bignumber.js";async function M({options:d,config:i,provider:a,login:c}){let e=h.getInstance(),T=L(),b=k({loginToken:d?.token,version:i.version}),o={manager:e,provider:a};await s(o);let t=await new Promise(async function(E,w){async function g(r){let n=e?e.addressesPerPage??1:1,l=new C(r-1).times(n);e?.updateStartIndex(Math.max(0,parseInt(l.toString()))),await s(o)}async function u(r){if(!(!a||!c)){e?.updateConfirmScreen({...b,selectedAddress:r.selectedAddress,explorerLink:I({to:`/${f}/${r.selectedAddress}`,explorerAddress:T})});try{let n=d?.token?await a.tokenLogin({token:Buffer.from(`${d?.token}{}`),addressIndex:r.addressIndex}):await c({addressIndex:r.addressIndex});E({address:n.address,signature:n.signature?n.signature.toString("hex"):"",addressIndex:r.addressIndex})}catch(n){console.error("User rejected login:",n),!!e?.getConfirmScreenData()&&await s(o)}}}async function m(){await s(o),e.unsubscribeFromAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g}),w("User cancelled login")}e.subscribeToAuthEvents({handleCancel:m,handleAccessWallet:u,handleGoToPage:g})}),{version:P,dataEnabled:v}=i;return p({index:t.addressIndex,loginType:x.ledger}),A({address:t.address,index:t.addressIndex,version:P,hasContractDataEnabled:v}),{address:t.address,signature:t.signature}}export{M as a};
2
+ //# sourceMappingURL=chunk-JIXJ3S3H.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-3BAZ5IKF.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
- //# sourceMappingURL=chunk-Z2M3TCDN.mjs.map
1
+ import{s as e}from"./chunk-76PSW6FH.mjs";import{b as o}from"./chunk-SAAOQW7P.mjs";import{a as i}from"./chunk-CKTFPRJS.mjs";var n="https://api.multiversx.com",s=60*60*24,a=5*60,d=t=>{let r=o(e());return{origin:t?.origin||i().origin,apiAddress:t?.apiAddress||r.apiAddress||n,expirySeconds:t?.expirySeconds||s,tokenExpirationToastWarningSeconds:t?.tokenExpirationToastWarningSeconds||a}};export{d as a};
2
+ //# sourceMappingURL=chunk-JUSK5MVD.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-KT6OP6QC.mjs";import{s as n}from"./chunk-QYUEIE7N.mjs";import{u as m}from"./chunk-3BAZ5IKF.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-PLUWBWJ2.mjs";import{a as f}from"./chunk-6MXUKZB3.mjs";async function u(){let i=s(),o=f()||i?e.webview:t(m());if(!o)return;let r=await p.create({type:o});if(!r)throw new Error("Provider not found");(i||o===e.webview&&r.isInitialized())&&await r.login(),n(r)}export{u as a};
2
- //# sourceMappingURL=chunk-YZZYAO7Z.mjs.map
1
+ import{a as s}from"./chunk-DLWDO7M6.mjs";import{d as p}from"./chunk-T3FY4DQE.mjs";import{s as n}from"./chunk-ZLS3BN2I.mjs";import{s as m}from"./chunk-76PSW6FH.mjs";import{d as t}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-PLUWBWJ2.mjs";import{a as f}from"./chunk-CIVS2YDU.mjs";async function u(){let i=s(),o=f()||i?e.webview:t(m());if(!o)return;let r=await p.create({type:o});if(!r)throw new Error("Provider not found");(i||o===e.webview&&r.isInitialized())&&await r.login(),n(r)}export{u as a};
2
+ //# sourceMappingURL=chunk-JUXIROQH.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-23TMKZFJ.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
- //# sourceMappingURL=chunk-EHWT3WER.mjs.map
1
+ import{a as s}from"./chunk-OIWRUY4C.mjs";var a=class{constructor({uiDataUpdateEvent:t,uiTag:e}){this.eventBus=null;this.uiElement=null;this.isCreatingElement=!1;this.unsubscribeFunctions=new Map;this.uiDataUpdateEvent=t,this.uiTag=e,this.data=this.getInitialData()}async init(t){this.anchor=t,await this.createUIElement(t),await this.setupEventListeners()}updateData(t){this.data={...this.data,...t},this.notifyDataUpdate()}subscribeToEventBus(t,e){if(!this.eventBus)throw new Error("eventBus is not initialized");let i=this.eventBus?.subscribe(t,e);if(i){let n=this.unsubscribeFunctions.get(t)||[];n.push(i),this.unsubscribeFunctions.set(t,n)}}notifyDataUpdate(){this.eventBus?.publish(this.uiDataUpdateEvent,this.data)}destroy(){this.unsubscribeFunctions.forEach(t=>t.forEach(e=>e())),this.unsubscribeFunctions.clear(),this.eventBus=null,this.uiElement?.remove?.(),this.uiElement=null}getInitialData(){return this.initialData}resetData(){this.data=this.getInitialData()}async createUIElement(t=this.anchor){if(this.isCreatingElement||this.uiElement)return this.uiElement;if(this.isCreatingElement=!0,this.uiElement=await s.create({name:this.uiTag,anchor:t}),this.isCreatingElement=!1,!this.uiElement)throw new Error(`Failed to create ${this.uiTag} element`);if(this.eventBus||(this.eventBus=await this.uiElement.getEventBus()),!this.eventBus)throw new Error("eventBus is not initialized");return this.uiElement}};export{a};
2
+ //# sourceMappingURL=chunk-KASFKR36.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/managers/internal/UIBaseManager/UIBaseManager.ts"],
4
- "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { IEventBus } from 'lib/sdkDappUi';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport {\n ComponentFactory,\n CreateEventBusUIElementType\n} from 'utils/ComponentFactory';\n\nexport abstract class UIBaseManager<\n TElement extends CreateEventBusUIElementType,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> {\n protected eventBus: IEventBus | null = null;\n protected uiElement: TElement | null = null;\n protected isCreatingElement = false;\n protected anchor?: HTMLElement;\n protected uiTag: UITagsEnum;\n protected uiDataUpdateEvent: TEventEnum;\n protected unsubscribeFunctions: Map<TEventEnum, (() => void)[]> = new Map();\n protected abstract initialData: TData;\n protected data: TData;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n this.uiDataUpdateEvent = uiDataUpdateEvent;\n this.uiTag = uiTag;\n this.data = this.getInitialData();\n }\n\n public async init(anchor?: HTMLElement) {\n this.anchor = anchor;\n await this.createUIElement(anchor);\n await this.setupEventListeners();\n }\n\n public updateData(newData: Partial<TData>) {\n this.data = { ...this.data, ...newData };\n this.notifyDataUpdate();\n }\n\n public subscribeToEventBus(event: TEventEnum, callback: Function) {\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n const unsubscribe = this.eventBus?.subscribe(event, callback);\n if (unsubscribe) {\n const existing = this.unsubscribeFunctions.get(event) || [];\n existing.push(unsubscribe);\n this.unsubscribeFunctions.set(event, existing);\n }\n }\n\n public notifyDataUpdate() {\n this.eventBus?.publish(this.uiDataUpdateEvent, this.data);\n }\n\n protected destroy() {\n this.unsubscribeFunctions.forEach((unsubList) =>\n unsubList.forEach((unsubscribe) => unsubscribe())\n );\n this.unsubscribeFunctions.clear();\n this.eventBus = null;\n this.uiElement?.remove();\n this.uiElement = null;\n }\n\n protected getInitialData(): TData {\n return this.initialData;\n }\n\n protected resetData() {\n this.data = this.getInitialData();\n }\n\n protected abstract setupEventListeners(): Promise<void>;\n\n private async createUIElement(\n anchor: HTMLElement | undefined = this.anchor\n ): Promise<TElement | null> {\n if (this.isCreatingElement || this.uiElement) {\n return this.uiElement;\n }\n\n this.isCreatingElement = true;\n\n this.uiElement = await ComponentFactory.create<TElement>({\n name: this.uiTag,\n anchor\n });\n\n this.isCreatingElement = false;\n\n if (!this.uiElement) {\n throw new Error(`Failed to create ${this.uiTag} element`);\n }\n\n if (!this.eventBus) {\n this.eventBus = await this.uiElement.getEventBus();\n }\n\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n return this.uiElement;\n }\n}\n"],
5
- "mappings": "yCAQO,IAAeA,EAAf,KAIL,CAWA,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CAhBH,KAAU,SAA6B,KACvC,KAAU,UAA6B,KACvC,KAAU,kBAAoB,GAI9B,KAAU,qBAAwD,IAAI,IAWpE,KAAK,kBAAoBD,EACzB,KAAK,MAAQC,EACb,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,KAAKC,EAAsB,CACtC,KAAK,OAASA,EACd,MAAM,KAAK,gBAAgBA,CAAM,EACjC,MAAM,KAAK,oBAAoB,CACjC,CAEO,WAAWC,EAAyB,CACzC,KAAK,KAAO,CAAE,GAAG,KAAK,KAAM,GAAGA,CAAQ,EACvC,KAAK,iBAAiB,CACxB,CAEO,oBAAoBC,EAAmBC,EAAoB,CAChE,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,IAAMC,EAAc,KAAK,UAAU,UAAUF,EAAOC,CAAQ,EAC5D,GAAIC,EAAa,CACf,IAAMC,EAAW,KAAK,qBAAqB,IAAIH,CAAK,GAAK,CAAC,EAC1DG,EAAS,KAAKD,CAAW,EACzB,KAAK,qBAAqB,IAAIF,EAAOG,CAAQ,CAC/C,CACF,CAEO,kBAAmB,CACxB,KAAK,UAAU,QAAQ,KAAK,kBAAmB,KAAK,IAAI,CAC1D,CAEU,SAAU,CAClB,KAAK,qBAAqB,QAASC,GACjCA,EAAU,QAASF,GAAgBA,EAAY,CAAC,CAClD,EACA,KAAK,qBAAqB,MAAM,EAChC,KAAK,SAAW,KAChB,KAAK,WAAW,OAAO,EACvB,KAAK,UAAY,IACnB,CAEU,gBAAwB,CAChC,OAAO,KAAK,WACd,CAEU,WAAY,CACpB,KAAK,KAAO,KAAK,eAAe,CAClC,CAIA,MAAc,gBACZJ,EAAkC,KAAK,OACb,CAC1B,GAAI,KAAK,mBAAqB,KAAK,UACjC,OAAO,KAAK,UAYd,GATA,KAAK,kBAAoB,GAEzB,KAAK,UAAY,MAAMO,EAAiB,OAAiB,CACvD,KAAM,KAAK,MACX,OAAAP,CACF,CAAC,EAED,KAAK,kBAAoB,GAErB,CAAC,KAAK,UACR,MAAM,IAAI,MAAM,oBAAoB,KAAK,KAAK,UAAU,EAO1D,GAJK,KAAK,WACR,KAAK,SAAW,MAAM,KAAK,UAAU,YAAY,GAG/C,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,OAAO,KAAK,SACd,CACF",
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\nimport { IEventBus } from 'lib/sdkDappUi';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport {\n ComponentFactory,\n CreateEventBusUIElementType\n} from 'utils/ComponentFactory';\n\nexport abstract class UIBaseManager<\n TElement extends CreateEventBusUIElementType,\n TData extends Record<string, any> | null,\n TEventEnum extends string\n> {\n protected eventBus: IEventBus | null = null;\n protected uiElement: TElement | null = null;\n protected isCreatingElement = false;\n protected anchor?: HTMLElement;\n protected uiTag: UITagsEnum;\n protected uiDataUpdateEvent: TEventEnum;\n protected unsubscribeFunctions: Map<TEventEnum, (() => void)[]> = new Map();\n protected abstract initialData: TData;\n protected data: TData;\n\n constructor({\n uiDataUpdateEvent,\n uiTag\n }: {\n uiTag: UITagsEnum;\n uiDataUpdateEvent: TEventEnum;\n }) {\n this.uiDataUpdateEvent = uiDataUpdateEvent;\n this.uiTag = uiTag;\n this.data = this.getInitialData();\n }\n\n public async init(anchor?: HTMLElement) {\n this.anchor = anchor;\n await this.createUIElement(anchor);\n await this.setupEventListeners();\n }\n\n public updateData(newData: Partial<TData>) {\n this.data = { ...this.data, ...newData };\n this.notifyDataUpdate();\n }\n\n public subscribeToEventBus(event: TEventEnum, callback: Function) {\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n const unsubscribe = this.eventBus?.subscribe(event, callback);\n if (unsubscribe) {\n const existing = this.unsubscribeFunctions.get(event) || [];\n existing.push(unsubscribe);\n this.unsubscribeFunctions.set(event, existing);\n }\n }\n\n public notifyDataUpdate() {\n this.eventBus?.publish(this.uiDataUpdateEvent, this.data);\n }\n\n public destroy() {\n this.unsubscribeFunctions.forEach((unsubList) =>\n unsubList.forEach((unsubscribe) => unsubscribe())\n );\n this.unsubscribeFunctions.clear();\n this.eventBus = null;\n this.uiElement?.remove?.();\n this.uiElement = null;\n }\n\n protected getInitialData(): TData {\n return this.initialData;\n }\n\n protected resetData() {\n this.data = this.getInitialData();\n }\n\n protected abstract setupEventListeners(): Promise<void>;\n\n private async createUIElement(\n anchor: HTMLElement | undefined = this.anchor\n ): Promise<TElement | null> {\n if (this.isCreatingElement || this.uiElement) {\n return this.uiElement;\n }\n\n this.isCreatingElement = true;\n\n this.uiElement = await ComponentFactory.create<TElement>({\n name: this.uiTag,\n anchor\n });\n\n this.isCreatingElement = false;\n\n if (!this.uiElement) {\n throw new Error(`Failed to create ${this.uiTag} element`);\n }\n\n if (!this.eventBus) {\n this.eventBus = await this.uiElement.getEventBus();\n }\n\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n return this.uiElement;\n }\n}\n"],
5
+ "mappings": "yCAQO,IAAeA,EAAf,KAIL,CAWA,YAAY,CACV,kBAAAC,EACA,MAAAC,CACF,EAGG,CAhBH,KAAU,SAA6B,KACvC,KAAU,UAA6B,KACvC,KAAU,kBAAoB,GAI9B,KAAU,qBAAwD,IAAI,IAWpE,KAAK,kBAAoBD,EACzB,KAAK,MAAQC,EACb,KAAK,KAAO,KAAK,eAAe,CAClC,CAEA,MAAa,KAAKC,EAAsB,CACtC,KAAK,OAASA,EACd,MAAM,KAAK,gBAAgBA,CAAM,EACjC,MAAM,KAAK,oBAAoB,CACjC,CAEO,WAAWC,EAAyB,CACzC,KAAK,KAAO,CAAE,GAAG,KAAK,KAAM,GAAGA,CAAQ,EACvC,KAAK,iBAAiB,CACxB,CAEO,oBAAoBC,EAAmBC,EAAoB,CAChE,GAAI,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,IAAMC,EAAc,KAAK,UAAU,UAAUF,EAAOC,CAAQ,EAC5D,GAAIC,EAAa,CACf,IAAMC,EAAW,KAAK,qBAAqB,IAAIH,CAAK,GAAK,CAAC,EAC1DG,EAAS,KAAKD,CAAW,EACzB,KAAK,qBAAqB,IAAIF,EAAOG,CAAQ,CAC/C,CACF,CAEO,kBAAmB,CACxB,KAAK,UAAU,QAAQ,KAAK,kBAAmB,KAAK,IAAI,CAC1D,CAEO,SAAU,CACf,KAAK,qBAAqB,QAASC,GACjCA,EAAU,QAASF,GAAgBA,EAAY,CAAC,CAClD,EACA,KAAK,qBAAqB,MAAM,EAChC,KAAK,SAAW,KAChB,KAAK,WAAW,SAAS,EACzB,KAAK,UAAY,IACnB,CAEU,gBAAwB,CAChC,OAAO,KAAK,WACd,CAEU,WAAY,CACpB,KAAK,KAAO,KAAK,eAAe,CAClC,CAIA,MAAc,gBACZJ,EAAkC,KAAK,OACb,CAC1B,GAAI,KAAK,mBAAqB,KAAK,UACjC,OAAO,KAAK,UAYd,GATA,KAAK,kBAAoB,GAEzB,KAAK,UAAY,MAAMO,EAAiB,OAAiB,CACvD,KAAM,KAAK,MACX,OAAAP,CACF,CAAC,EAED,KAAK,kBAAoB,GAErB,CAAC,KAAK,UACR,MAAM,IAAI,MAAM,oBAAoB,KAAK,KAAK,UAAU,EAO1D,GAJK,KAAK,WACR,KAAK,SAAW,MAAM,KAAK,UAAU,YAAY,GAG/C,CAAC,KAAK,SACR,MAAM,IAAI,mCAAsC,EAGlD,OAAO,KAAK,SACd,CACF",
6
6
  "names": ["UIBaseManager", "uiDataUpdateEvent", "uiTag", "anchor", "newData", "event", "callback", "unsubscribe", "existing", "unsubList", "ComponentFactory"]
7
7
  }