@multiversx/sdk-dapp 5.0.0-alpha.17 → 5.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (469) hide show
  1. package/out/__chunks__/{chunk-2RTSC7PZ.mjs → chunk-2MEGFYNZ.mjs} +2 -2
  2. package/out/__chunks__/{chunk-HT5DZIND.mjs → chunk-2NAZHJRU.mjs} +2 -2
  3. package/out/__chunks__/{chunk-PZJGJAWU.mjs → chunk-3BT33727.mjs} +2 -2
  4. package/out/__chunks__/chunk-3EXA3UOG.mjs +2 -0
  5. package/out/__chunks__/{chunk-RPLCGVHU.mjs → chunk-3JNW6YTC.mjs} +2 -2
  6. package/out/__chunks__/chunk-3LI6SQT4.mjs +2 -0
  7. package/out/__chunks__/chunk-3LI6SQT4.mjs.map +7 -0
  8. package/out/__chunks__/{chunk-XU5ALACG.mjs → chunk-3OYMKYIU.mjs} +2 -2
  9. package/out/__chunks__/chunk-3YU2TPWN.mjs +2 -0
  10. package/out/__chunks__/{chunk-6HNXEUEX.mjs → chunk-45MZYR5R.mjs} +2 -2
  11. package/out/__chunks__/chunk-45RXOKQM.mjs +2 -0
  12. package/out/__chunks__/chunk-45RXOKQM.mjs.map +7 -0
  13. package/out/__chunks__/{chunk-6BE7ZR56.mjs → chunk-4EZSRRIM.mjs} +2 -2
  14. package/out/__chunks__/{chunk-F6Y3GEEQ.mjs → chunk-4QFG3VIF.mjs} +2 -2
  15. package/out/__chunks__/{chunk-IXAT2U5R.mjs → chunk-5MU2SE7Z.mjs} +2 -2
  16. package/out/__chunks__/{chunk-RHOHTVC7.mjs → chunk-5UPVGC4J.mjs} +2 -2
  17. package/out/__chunks__/{chunk-CA5AC6SG.mjs → chunk-62FT4SLW.mjs} +2 -2
  18. package/out/__chunks__/chunk-67TGXYFM.mjs +2 -0
  19. package/out/__chunks__/chunk-6JM4DPOH.mjs +2 -0
  20. package/out/__chunks__/{chunk-IEJTMYFW.mjs.map → chunk-6JM4DPOH.mjs.map} +3 -3
  21. package/out/__chunks__/chunk-74AXZS6G.mjs +2 -0
  22. package/out/__chunks__/{chunk-ZZC5SQOQ.mjs.map → chunk-74AXZS6G.mjs.map} +2 -2
  23. package/out/__chunks__/{chunk-ARULSK25.mjs → chunk-7D4V6RXN.mjs} +2 -2
  24. package/out/__chunks__/{chunk-A5AK7XRL.mjs → chunk-AFGDJKG6.mjs} +2 -2
  25. package/out/__chunks__/{chunk-B5IYIF42.mjs → chunk-AMRBTMHW.mjs} +2 -2
  26. package/out/__chunks__/{chunk-OXU2ZOST.mjs → chunk-ANIU4M7Y.mjs} +2 -2
  27. package/out/__chunks__/chunk-AX6BBS6A.mjs +2 -0
  28. package/out/__chunks__/chunk-BDC5R6IE.mjs +2 -0
  29. package/out/__chunks__/{chunk-IIBVDR56.mjs → chunk-CWKPRAO5.mjs} +2 -2
  30. package/out/__chunks__/chunk-CYCS3K6Q.mjs +2 -0
  31. package/out/__chunks__/{chunk-SUN3MVLZ.mjs.map → chunk-CYCS3K6Q.mjs.map} +2 -2
  32. package/out/__chunks__/{chunk-QVIO2WRO.mjs → chunk-DE6Q5PXE.mjs} +2 -2
  33. package/out/__chunks__/{chunk-ATH4WYTD.mjs → chunk-E2JGSUPU.mjs} +2 -2
  34. package/out/__chunks__/{chunk-MAQPZJET.mjs → chunk-E5BQL4Q3.mjs} +2 -2
  35. package/out/__chunks__/{chunk-ZEYTUYGU.mjs → chunk-ERVVPCGS.mjs} +2 -2
  36. package/out/__chunks__/{chunk-C23YOFAN.mjs → chunk-FIX5T67V.mjs} +2 -2
  37. package/out/__chunks__/{chunk-ZVOPHS4O.mjs → chunk-FOTDHFWB.mjs} +2 -2
  38. package/out/__chunks__/{chunk-MKKFM4TT.mjs → chunk-FTHSBLOK.mjs} +2 -2
  39. package/out/__chunks__/chunk-FX2KOFY6.mjs +2 -0
  40. package/out/__chunks__/chunk-FX2KOFY6.mjs.map +7 -0
  41. package/out/__chunks__/{chunk-MKYZXRIA.mjs → chunk-GEAOPSQB.mjs} +2 -2
  42. package/out/__chunks__/chunk-GEJULV2G.mjs +2 -0
  43. package/out/__chunks__/{chunk-CC3JG6SH.mjs → chunk-GHDVAXLU.mjs} +2 -2
  44. package/out/__chunks__/{chunk-F6Y3SXC4.mjs → chunk-H3C4BQA6.mjs} +2 -2
  45. package/out/__chunks__/{chunk-QHLQKNEW.mjs → chunk-HZT7AJ5C.mjs} +2 -2
  46. package/out/__chunks__/{chunk-TTFKQZLJ.mjs → chunk-IGEBPOVA.mjs} +2 -2
  47. package/out/__chunks__/chunk-IMPOALRX.mjs +2 -0
  48. package/out/__chunks__/{chunk-RHN3VD44.mjs.map → chunk-IMPOALRX.mjs.map} +2 -2
  49. package/out/__chunks__/{chunk-RVW2IVLQ.mjs → chunk-ISZH3V4I.mjs} +2 -2
  50. package/out/__chunks__/{chunk-VOS5UP5O.mjs → chunk-JDWBSDE5.mjs} +2 -2
  51. package/out/__chunks__/{chunk-KJT6AKOF.mjs → chunk-KLLWGVIT.mjs} +2 -2
  52. package/out/__chunks__/chunk-KQ24L3OO.mjs +2 -0
  53. package/out/__chunks__/{chunk-5DP2QBUG.mjs → chunk-LJ5JGAYL.mjs} +2 -2
  54. package/out/__chunks__/chunk-MBZIXGFI.mjs +2 -0
  55. package/out/__chunks__/chunk-MBZIXGFI.mjs.map +7 -0
  56. package/out/__chunks__/chunk-MC6J543Y.mjs +2 -0
  57. package/out/__chunks__/{chunk-3XRUVLQ2.mjs → chunk-MCSCPREN.mjs} +2 -2
  58. package/out/__chunks__/{chunk-VJAAWEHK.mjs → chunk-MHE64JHO.mjs} +2 -2
  59. package/out/__chunks__/{chunk-2R3GW4DI.mjs → chunk-MLHMW3I3.mjs} +2 -2
  60. package/out/__chunks__/{chunk-3T632N3C.mjs → chunk-MWGHNZJL.mjs} +2 -2
  61. package/out/__chunks__/chunk-N36FEJCN.mjs +2 -0
  62. package/out/__chunks__/chunk-NFRXXEHO.mjs +2 -0
  63. package/out/__chunks__/chunk-NOU5UTAM.mjs +2 -0
  64. package/out/__chunks__/{chunk-HT5S5AYG.mjs → chunk-NSNN4OR2.mjs} +2 -2
  65. package/out/__chunks__/{chunk-LUIDT6E6.mjs → chunk-OJQGQWTP.mjs} +2 -2
  66. package/out/__chunks__/{chunk-VKBWECUS.mjs → chunk-OSQDRTVG.mjs} +2 -2
  67. package/out/__chunks__/{chunk-4P67TGYO.mjs → chunk-P7GSCIBQ.mjs} +2 -2
  68. package/out/__chunks__/{chunk-D7SNMDI5.mjs → chunk-PDS22RLQ.mjs} +2 -2
  69. package/out/__chunks__/{chunk-KUBMPJIS.mjs → chunk-PNC7TD5F.mjs} +2 -2
  70. package/out/__chunks__/{chunk-IHOOASQ4.mjs → chunk-PWG5UZDN.mjs} +2 -2
  71. package/out/__chunks__/{chunk-LOKAGN2M.mjs → chunk-Q62HFS5T.mjs} +2 -2
  72. package/out/__chunks__/{chunk-RAG4YNTC.mjs → chunk-QBJ4RADD.mjs} +2 -2
  73. package/out/__chunks__/{chunk-4ZRZMRUQ.mjs → chunk-QISM5BVI.mjs} +2 -2
  74. package/out/__chunks__/chunk-QYEJD5BG.mjs +2 -0
  75. package/out/__chunks__/{chunk-SL7W4MV6.mjs → chunk-RNREPTUP.mjs} +2 -2
  76. package/out/__chunks__/chunk-S7HUKPJR.mjs +2 -0
  77. package/out/__chunks__/{chunk-BR4N3QPJ.mjs → chunk-TLBSFFRH.mjs} +2 -2
  78. package/out/__chunks__/{chunk-Q3DOWDRB.mjs → chunk-TW7SSATI.mjs} +2 -2
  79. package/out/__chunks__/{chunk-JXUTUO6K.mjs → chunk-U2GG3DTS.mjs} +2 -2
  80. package/out/__chunks__/chunk-UF3MLLO5.mjs +2 -0
  81. package/out/__chunks__/{chunk-T227HNYP.mjs → chunk-V3TLPRH6.mjs} +2 -2
  82. package/out/__chunks__/{chunk-JJFKKKLP.mjs → chunk-V4I75UWZ.mjs} +2 -2
  83. package/out/__chunks__/chunk-VJUYSDM6.mjs +2 -0
  84. package/out/__chunks__/{chunk-BEKALCDX.mjs → chunk-VYPXDZRI.mjs} +2 -2
  85. package/out/__chunks__/chunk-W52QH7YK.mjs +2 -0
  86. package/out/__chunks__/chunk-W52QH7YK.mjs.map +7 -0
  87. package/out/__chunks__/chunk-WM4UEJI2.mjs +2 -0
  88. package/out/__chunks__/{chunk-CA2JFJCS.mjs.map → chunk-WM4UEJI2.mjs.map} +1 -1
  89. package/out/__chunks__/{chunk-PKIAC4UI.mjs → chunk-WMV76PRF.mjs} +2 -2
  90. package/out/__chunks__/{chunk-EVP54VPS.mjs → chunk-YMGDLBW2.mjs} +2 -2
  91. package/out/__chunks__/chunk-YULS4KES.mjs +2 -0
  92. package/out/__chunks__/{chunk-X4URPB2S.mjs → chunk-Z4KM6PIV.mjs} +2 -2
  93. package/out/__chunks__/{chunk-BDKYHP5K.mjs → chunk-ZH7TT42M.mjs} +2 -2
  94. package/out/__chunks__/chunk-ZLZ2IMT7.mjs +2 -0
  95. package/out/__chunks__/chunk-ZSBGQPS7.mjs +2 -0
  96. package/out/__chunks__/{chunk-JPJXXLTL.mjs.map → chunk-ZSBGQPS7.mjs.map} +3 -3
  97. package/out/__chunks__/{chunk-QRLEYILE.mjs → chunk-ZWXNKJVI.mjs} +2 -2
  98. package/out/__mocks__/data/index.mjs +1 -1
  99. package/out/__mocks__/index.mjs +1 -1
  100. package/out/__mocks__/server.mjs +1 -1
  101. package/out/__mocks__/utils/index.mjs +1 -1
  102. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  103. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  104. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  105. package/out/apiCalls/index.mjs +1 -1
  106. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  107. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  108. package/out/apiCalls/tokens/index.mjs +1 -1
  109. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  110. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  111. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  112. package/out/constants/browser.constants.mjs +1 -1
  113. package/out/constants/index.mjs +1 -1
  114. package/out/constants/storage.constants.mjs +1 -1
  115. package/out/constants/window.constants.mjs +1 -1
  116. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  117. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  118. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  119. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  120. package/out/index.mjs +1 -1
  121. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  122. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.d.ts +2 -1
  123. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js +13 -3
  124. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.js.map +1 -1
  125. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  126. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  127. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  128. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  129. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  130. package/out/managers/TransactionManager/index.mjs +1 -1
  131. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  132. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  133. package/out/managers/index.mjs +1 -1
  134. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  135. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  136. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  137. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  138. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  139. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  140. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  141. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  142. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  143. package/out/managers/internal/ToastManager/ToastManager.d.ts +2 -2
  144. package/out/managers/internal/ToastManager/ToastManager.js +22 -16
  145. package/out/managers/internal/ToastManager/ToastManager.js.map +1 -1
  146. package/out/managers/internal/ToastManager/ToastManager.mjs +1 -1
  147. package/out/managers/internal/ToastManager/helpers/LifetimeManager.js +1 -1
  148. package/out/managers/internal/ToastManager/helpers/LifetimeManager.js.map +1 -1
  149. package/out/managers/internal/ToastManager/helpers/LifetimeManager.mjs +1 -1
  150. package/out/managers/internal/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  151. package/out/managers/internal/ToastManager/helpers/createTransactionToast.mjs +1 -1
  152. package/out/managers/internal/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  153. package/out/managers/internal/ToastManager/types/index.mjs +1 -1
  154. package/out/managers/internal/ToastManager/types/toast.types.d.ts +3 -1
  155. package/out/managers/internal/ToastManager/types/toast.types.js +2 -0
  156. package/out/managers/internal/ToastManager/types/toast.types.js.map +1 -1
  157. package/out/managers/internal/ToastManager/types/toast.types.mjs +1 -1
  158. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  159. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  160. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  161. package/out/managers/internal/index.mjs +1 -1
  162. package/out/methods/account/getAccount.mjs +1 -1
  163. package/out/methods/account/getAccountInfo.mjs +1 -1
  164. package/out/methods/account/getAddress.mjs +1 -1
  165. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  166. package/out/methods/account/getLatestNonce.mjs +1 -1
  167. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  168. package/out/methods/initApp/initApp.js +0 -3
  169. package/out/methods/initApp/initApp.js.map +1 -1
  170. package/out/methods/initApp/initApp.mjs +1 -1
  171. package/out/methods/initApp/initApp.mjs.map +3 -3
  172. package/out/methods/initApp/initApp.types.d.ts +0 -2
  173. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  174. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  175. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  176. package/out/methods/network/getEgldLabel.mjs +1 -1
  177. package/out/methods/network/getExplorerAddress.mjs +1 -1
  178. package/out/methods/network/getNetworkConfig.mjs +1 -1
  179. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +1 -1
  180. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  181. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  182. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +1 -1
  183. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  184. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  185. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  186. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  187. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  188. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  189. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  190. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  191. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  192. package/out/providers/DappProvider/DappProvider.js +4 -0
  193. package/out/providers/DappProvider/DappProvider.js.map +1 -1
  194. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  195. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  196. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  197. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  198. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  199. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  200. package/out/providers/DappProvider/helpers/logout/logout.js +0 -5
  201. package/out/providers/DappProvider/helpers/logout/logout.js.map +1 -1
  202. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  203. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  204. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.js +0 -5
  205. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.js.map +1 -1
  206. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  207. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  208. package/out/providers/DappProvider/index.mjs +1 -1
  209. package/out/providers/ProviderFactory.js +5 -2
  210. package/out/providers/ProviderFactory.js.map +1 -1
  211. package/out/providers/ProviderFactory.mjs +1 -1
  212. package/out/providers/helpers/accountProvider.mjs +1 -1
  213. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  214. package/out/providers/helpers/clearInitiatedLogins.js +2 -1
  215. package/out/providers/helpers/clearInitiatedLogins.js.map +1 -1
  216. package/out/providers/helpers/clearInitiatedLogins.mjs +1 -1
  217. package/out/providers/helpers/restoreProvider.mjs +1 -1
  218. package/out/providers/index.mjs +1 -1
  219. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  220. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.d.ts +0 -1
  221. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js +0 -15
  222. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.js.map +1 -1
  223. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  224. package/out/providers/strategies/CrossWindowProviderStrategy/index.d.ts +0 -1
  225. package/out/providers/strategies/CrossWindowProviderStrategy/index.js +0 -1
  226. package/out/providers/strategies/CrossWindowProviderStrategy/index.js.map +1 -1
  227. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  228. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  229. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  230. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  231. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  232. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  233. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  234. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  235. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  236. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  237. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  238. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  239. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  240. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  241. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  242. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  243. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  244. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  245. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  246. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  247. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  248. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  249. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  250. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  251. package/out/providers/strategies/helpers/index.mjs +1 -1
  252. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  253. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  254. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  255. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  256. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  257. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.js +0 -1
  258. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.js.map +1 -1
  259. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  260. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  261. package/out/providers/strategies/index.mjs +1 -1
  262. package/out/react/account/useGetAccount.mjs +1 -1
  263. package/out/react/account/useGetAccountInfo.mjs +1 -1
  264. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  265. package/out/react/account/useGetLatestNonce.mjs +1 -1
  266. package/out/react/index.mjs +1 -1
  267. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  268. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  269. package/out/react/store/getReactStore.mjs +1 -1
  270. package/out/react/store/useSelector.mjs +1 -1
  271. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  272. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  273. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  274. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  275. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  276. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  277. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  278. package/out/services/index.mjs +1 -1
  279. package/out/services/nativeAuth/index.mjs +1 -1
  280. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  281. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  282. package/out/services/nativeAuth/methods/index.mjs +1 -1
  283. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  284. package/out/store/actions/account/accountActions.mjs +1 -1
  285. package/out/store/actions/account/index.mjs +1 -1
  286. package/out/store/actions/cache/cacheActions.mjs +1 -1
  287. package/out/store/actions/cache/index.mjs +1 -1
  288. package/out/store/actions/config/configActions.d.ts +0 -2
  289. package/out/store/actions/config/configActions.js +1 -5
  290. package/out/store/actions/config/configActions.js.map +1 -1
  291. package/out/store/actions/config/configActions.mjs +1 -1
  292. package/out/store/actions/config/index.mjs +1 -1
  293. package/out/store/actions/index.mjs +1 -1
  294. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  295. package/out/store/actions/network/index.mjs +1 -1
  296. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  297. package/out/store/actions/network/networkActions.mjs +1 -1
  298. package/out/store/actions/sharedActions/index.mjs +1 -1
  299. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  300. package/out/store/actions/toasts/index.mjs +1 -1
  301. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  302. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  303. package/out/store/actions/ui/index.mjs +1 -1
  304. package/out/store/actions/ui/uiActions.mjs +1 -1
  305. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  306. package/out/store/middleware/index.mjs +1 -1
  307. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  308. package/out/store/selectors/configSelectors.d.ts +0 -1
  309. package/out/store/selectors/configSelectors.js +1 -5
  310. package/out/store/selectors/configSelectors.js.map +1 -1
  311. package/out/store/selectors/configSelectors.mjs +1 -1
  312. package/out/store/selectors/index.mjs +1 -1
  313. package/out/store/slices/config/config.types.d.ts +0 -2
  314. package/out/store/slices/config/configSlice.js +0 -1
  315. package/out/store/slices/config/configSlice.js.map +1 -1
  316. package/out/store/slices/config/configSlice.mjs +1 -1
  317. package/out/store/slices/config/index.mjs +1 -1
  318. package/out/store/slices/index.mjs +1 -1
  319. package/out/store/storage/index.mjs +1 -1
  320. package/out/store/storage/storageCallback.mjs +1 -1
  321. package/out/store/store.mjs +1 -1
  322. package/out/utils/ComponentFactory.mjs +1 -1
  323. package/out/utils/account/index.mjs +1 -1
  324. package/out/utils/account/refreshAccount.mjs +1 -1
  325. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  326. package/out/utils/index.mjs +1 -1
  327. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  328. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  329. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  330. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  331. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  332. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  333. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  334. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  335. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  336. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  337. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  338. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  339. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  340. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  341. package/out/utils/transactions/index.mjs +1 -1
  342. package/out/utils/visual/index.mjs +1 -1
  343. package/out/utils/visual/switchTheme.mjs +1 -1
  344. package/out/utils/window/getIsInIframe.mjs +1 -1
  345. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  346. package/out/utils/window/index.mjs +1 -1
  347. package/package.json +11 -11
  348. package/out/__chunks__/chunk-2GSNHNKW.mjs +0 -1
  349. package/out/__chunks__/chunk-2GSNHNKW.mjs.map +0 -7
  350. package/out/__chunks__/chunk-45VUJAFY.mjs +0 -2
  351. package/out/__chunks__/chunk-4IUSIUL5.mjs +0 -2
  352. package/out/__chunks__/chunk-C2LIMWMH.mjs +0 -2
  353. package/out/__chunks__/chunk-C2LIMWMH.mjs.map +0 -7
  354. package/out/__chunks__/chunk-C7N7SMQU.mjs +0 -2
  355. package/out/__chunks__/chunk-CA2JFJCS.mjs +0 -2
  356. package/out/__chunks__/chunk-DJMZEN3G.mjs +0 -2
  357. package/out/__chunks__/chunk-DQTYHRUO.mjs +0 -2
  358. package/out/__chunks__/chunk-FLC6QSZB.mjs +0 -1
  359. package/out/__chunks__/chunk-FLC6QSZB.mjs.map +0 -7
  360. package/out/__chunks__/chunk-HKYS3MAS.mjs +0 -2
  361. package/out/__chunks__/chunk-HM5GQ2WF.mjs +0 -2
  362. package/out/__chunks__/chunk-HM5GQ2WF.mjs.map +0 -7
  363. package/out/__chunks__/chunk-HXHKPIMW.mjs +0 -2
  364. package/out/__chunks__/chunk-IEJTMYFW.mjs +0 -2
  365. package/out/__chunks__/chunk-IXBOK5RG.mjs +0 -2
  366. package/out/__chunks__/chunk-J6CUEKO2.mjs +0 -2
  367. package/out/__chunks__/chunk-JPJXXLTL.mjs +0 -2
  368. package/out/__chunks__/chunk-MAGQLOT2.mjs +0 -2
  369. package/out/__chunks__/chunk-NSSJOXSU.mjs +0 -2
  370. package/out/__chunks__/chunk-NSSJOXSU.mjs.map +0 -7
  371. package/out/__chunks__/chunk-RHN3VD44.mjs +0 -2
  372. package/out/__chunks__/chunk-SBFDOVKK.mjs +0 -2
  373. package/out/__chunks__/chunk-SUN3MVLZ.mjs +0 -2
  374. package/out/__chunks__/chunk-TR4XGBZR.mjs +0 -2
  375. package/out/__chunks__/chunk-TR4XGBZR.mjs.map +0 -7
  376. package/out/__chunks__/chunk-V6JLSLC4.mjs +0 -2
  377. package/out/__chunks__/chunk-V6STR476.mjs +0 -2
  378. package/out/__chunks__/chunk-WCOPQ7L7.mjs +0 -2
  379. package/out/__chunks__/chunk-WCOPQ7L7.mjs.map +0 -7
  380. package/out/__chunks__/chunk-WWY2ESAK.mjs +0 -2
  381. package/out/__chunks__/chunk-XGR6W4AU.mjs +0 -2
  382. package/out/__chunks__/chunk-ZGXYSDXQ.mjs +0 -2
  383. package/out/__chunks__/chunk-ZJQDEYHR.mjs +0 -2
  384. package/out/__chunks__/chunk-ZZC5SQOQ.mjs +0 -2
  385. package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.d.ts +0 -6
  386. package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.js +0 -3
  387. package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.js.map +0 -1
  388. package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.mjs +0 -2
  389. package/out/providers/strategies/CrossWindowProviderStrategy/types/crossWindow.types.mjs.map +0 -7
  390. package/out/providers/strategies/CrossWindowProviderStrategy/types/index.d.ts +0 -1
  391. package/out/providers/strategies/CrossWindowProviderStrategy/types/index.js +0 -18
  392. package/out/providers/strategies/CrossWindowProviderStrategy/types/index.js.map +0 -1
  393. package/out/providers/strategies/CrossWindowProviderStrategy/types/index.mjs +0 -2
  394. package/out/providers/strategies/CrossWindowProviderStrategy/types/index.mjs.map +0 -7
  395. /package/out/__chunks__/{chunk-2RTSC7PZ.mjs.map → chunk-2MEGFYNZ.mjs.map} +0 -0
  396. /package/out/__chunks__/{chunk-HT5DZIND.mjs.map → chunk-2NAZHJRU.mjs.map} +0 -0
  397. /package/out/__chunks__/{chunk-PZJGJAWU.mjs.map → chunk-3BT33727.mjs.map} +0 -0
  398. /package/out/__chunks__/{chunk-DJMZEN3G.mjs.map → chunk-3EXA3UOG.mjs.map} +0 -0
  399. /package/out/__chunks__/{chunk-RPLCGVHU.mjs.map → chunk-3JNW6YTC.mjs.map} +0 -0
  400. /package/out/__chunks__/{chunk-XU5ALACG.mjs.map → chunk-3OYMKYIU.mjs.map} +0 -0
  401. /package/out/__chunks__/{chunk-DQTYHRUO.mjs.map → chunk-3YU2TPWN.mjs.map} +0 -0
  402. /package/out/__chunks__/{chunk-6HNXEUEX.mjs.map → chunk-45MZYR5R.mjs.map} +0 -0
  403. /package/out/__chunks__/{chunk-6BE7ZR56.mjs.map → chunk-4EZSRRIM.mjs.map} +0 -0
  404. /package/out/__chunks__/{chunk-F6Y3GEEQ.mjs.map → chunk-4QFG3VIF.mjs.map} +0 -0
  405. /package/out/__chunks__/{chunk-IXAT2U5R.mjs.map → chunk-5MU2SE7Z.mjs.map} +0 -0
  406. /package/out/__chunks__/{chunk-RHOHTVC7.mjs.map → chunk-5UPVGC4J.mjs.map} +0 -0
  407. /package/out/__chunks__/{chunk-CA5AC6SG.mjs.map → chunk-62FT4SLW.mjs.map} +0 -0
  408. /package/out/__chunks__/{chunk-ZJQDEYHR.mjs.map → chunk-67TGXYFM.mjs.map} +0 -0
  409. /package/out/__chunks__/{chunk-ARULSK25.mjs.map → chunk-7D4V6RXN.mjs.map} +0 -0
  410. /package/out/__chunks__/{chunk-A5AK7XRL.mjs.map → chunk-AFGDJKG6.mjs.map} +0 -0
  411. /package/out/__chunks__/{chunk-B5IYIF42.mjs.map → chunk-AMRBTMHW.mjs.map} +0 -0
  412. /package/out/__chunks__/{chunk-OXU2ZOST.mjs.map → chunk-ANIU4M7Y.mjs.map} +0 -0
  413. /package/out/__chunks__/{chunk-XGR6W4AU.mjs.map → chunk-AX6BBS6A.mjs.map} +0 -0
  414. /package/out/__chunks__/{chunk-HXHKPIMW.mjs.map → chunk-BDC5R6IE.mjs.map} +0 -0
  415. /package/out/__chunks__/{chunk-IIBVDR56.mjs.map → chunk-CWKPRAO5.mjs.map} +0 -0
  416. /package/out/__chunks__/{chunk-QVIO2WRO.mjs.map → chunk-DE6Q5PXE.mjs.map} +0 -0
  417. /package/out/__chunks__/{chunk-ATH4WYTD.mjs.map → chunk-E2JGSUPU.mjs.map} +0 -0
  418. /package/out/__chunks__/{chunk-MAQPZJET.mjs.map → chunk-E5BQL4Q3.mjs.map} +0 -0
  419. /package/out/__chunks__/{chunk-ZEYTUYGU.mjs.map → chunk-ERVVPCGS.mjs.map} +0 -0
  420. /package/out/__chunks__/{chunk-C23YOFAN.mjs.map → chunk-FIX5T67V.mjs.map} +0 -0
  421. /package/out/__chunks__/{chunk-ZVOPHS4O.mjs.map → chunk-FOTDHFWB.mjs.map} +0 -0
  422. /package/out/__chunks__/{chunk-MKKFM4TT.mjs.map → chunk-FTHSBLOK.mjs.map} +0 -0
  423. /package/out/__chunks__/{chunk-MKYZXRIA.mjs.map → chunk-GEAOPSQB.mjs.map} +0 -0
  424. /package/out/__chunks__/{chunk-SBFDOVKK.mjs.map → chunk-GEJULV2G.mjs.map} +0 -0
  425. /package/out/__chunks__/{chunk-CC3JG6SH.mjs.map → chunk-GHDVAXLU.mjs.map} +0 -0
  426. /package/out/__chunks__/{chunk-F6Y3SXC4.mjs.map → chunk-H3C4BQA6.mjs.map} +0 -0
  427. /package/out/__chunks__/{chunk-QHLQKNEW.mjs.map → chunk-HZT7AJ5C.mjs.map} +0 -0
  428. /package/out/__chunks__/{chunk-TTFKQZLJ.mjs.map → chunk-IGEBPOVA.mjs.map} +0 -0
  429. /package/out/__chunks__/{chunk-RVW2IVLQ.mjs.map → chunk-ISZH3V4I.mjs.map} +0 -0
  430. /package/out/__chunks__/{chunk-VOS5UP5O.mjs.map → chunk-JDWBSDE5.mjs.map} +0 -0
  431. /package/out/__chunks__/{chunk-KJT6AKOF.mjs.map → chunk-KLLWGVIT.mjs.map} +0 -0
  432. /package/out/__chunks__/{chunk-C7N7SMQU.mjs.map → chunk-KQ24L3OO.mjs.map} +0 -0
  433. /package/out/__chunks__/{chunk-5DP2QBUG.mjs.map → chunk-LJ5JGAYL.mjs.map} +0 -0
  434. /package/out/__chunks__/{chunk-45VUJAFY.mjs.map → chunk-MC6J543Y.mjs.map} +0 -0
  435. /package/out/__chunks__/{chunk-3XRUVLQ2.mjs.map → chunk-MCSCPREN.mjs.map} +0 -0
  436. /package/out/__chunks__/{chunk-VJAAWEHK.mjs.map → chunk-MHE64JHO.mjs.map} +0 -0
  437. /package/out/__chunks__/{chunk-2R3GW4DI.mjs.map → chunk-MLHMW3I3.mjs.map} +0 -0
  438. /package/out/__chunks__/{chunk-3T632N3C.mjs.map → chunk-MWGHNZJL.mjs.map} +0 -0
  439. /package/out/__chunks__/{chunk-V6JLSLC4.mjs.map → chunk-N36FEJCN.mjs.map} +0 -0
  440. /package/out/__chunks__/{chunk-4IUSIUL5.mjs.map → chunk-NFRXXEHO.mjs.map} +0 -0
  441. /package/out/__chunks__/{chunk-IXBOK5RG.mjs.map → chunk-NOU5UTAM.mjs.map} +0 -0
  442. /package/out/__chunks__/{chunk-HT5S5AYG.mjs.map → chunk-NSNN4OR2.mjs.map} +0 -0
  443. /package/out/__chunks__/{chunk-LUIDT6E6.mjs.map → chunk-OJQGQWTP.mjs.map} +0 -0
  444. /package/out/__chunks__/{chunk-VKBWECUS.mjs.map → chunk-OSQDRTVG.mjs.map} +0 -0
  445. /package/out/__chunks__/{chunk-4P67TGYO.mjs.map → chunk-P7GSCIBQ.mjs.map} +0 -0
  446. /package/out/__chunks__/{chunk-D7SNMDI5.mjs.map → chunk-PDS22RLQ.mjs.map} +0 -0
  447. /package/out/__chunks__/{chunk-KUBMPJIS.mjs.map → chunk-PNC7TD5F.mjs.map} +0 -0
  448. /package/out/__chunks__/{chunk-IHOOASQ4.mjs.map → chunk-PWG5UZDN.mjs.map} +0 -0
  449. /package/out/__chunks__/{chunk-LOKAGN2M.mjs.map → chunk-Q62HFS5T.mjs.map} +0 -0
  450. /package/out/__chunks__/{chunk-RAG4YNTC.mjs.map → chunk-QBJ4RADD.mjs.map} +0 -0
  451. /package/out/__chunks__/{chunk-4ZRZMRUQ.mjs.map → chunk-QISM5BVI.mjs.map} +0 -0
  452. /package/out/__chunks__/{chunk-HKYS3MAS.mjs.map → chunk-QYEJD5BG.mjs.map} +0 -0
  453. /package/out/__chunks__/{chunk-SL7W4MV6.mjs.map → chunk-RNREPTUP.mjs.map} +0 -0
  454. /package/out/__chunks__/{chunk-ZGXYSDXQ.mjs.map → chunk-S7HUKPJR.mjs.map} +0 -0
  455. /package/out/__chunks__/{chunk-BR4N3QPJ.mjs.map → chunk-TLBSFFRH.mjs.map} +0 -0
  456. /package/out/__chunks__/{chunk-Q3DOWDRB.mjs.map → chunk-TW7SSATI.mjs.map} +0 -0
  457. /package/out/__chunks__/{chunk-JXUTUO6K.mjs.map → chunk-U2GG3DTS.mjs.map} +0 -0
  458. /package/out/__chunks__/{chunk-J6CUEKO2.mjs.map → chunk-UF3MLLO5.mjs.map} +0 -0
  459. /package/out/__chunks__/{chunk-T227HNYP.mjs.map → chunk-V3TLPRH6.mjs.map} +0 -0
  460. /package/out/__chunks__/{chunk-JJFKKKLP.mjs.map → chunk-V4I75UWZ.mjs.map} +0 -0
  461. /package/out/__chunks__/{chunk-WWY2ESAK.mjs.map → chunk-VJUYSDM6.mjs.map} +0 -0
  462. /package/out/__chunks__/{chunk-BEKALCDX.mjs.map → chunk-VYPXDZRI.mjs.map} +0 -0
  463. /package/out/__chunks__/{chunk-PKIAC4UI.mjs.map → chunk-WMV76PRF.mjs.map} +0 -0
  464. /package/out/__chunks__/{chunk-EVP54VPS.mjs.map → chunk-YMGDLBW2.mjs.map} +0 -0
  465. /package/out/__chunks__/{chunk-V6STR476.mjs.map → chunk-YULS4KES.mjs.map} +0 -0
  466. /package/out/__chunks__/{chunk-X4URPB2S.mjs.map → chunk-Z4KM6PIV.mjs.map} +0 -0
  467. /package/out/__chunks__/{chunk-BDKYHP5K.mjs.map → chunk-ZH7TT42M.mjs.map} +0 -0
  468. /package/out/__chunks__/{chunk-MAGQLOT2.mjs.map → chunk-ZLZ2IMT7.mjs.map} +0 -0
  469. /package/out/__chunks__/{chunk-QRLEYILE.mjs.map → chunk-ZWXNKJVI.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-VOS5UP5O.mjs";import{e as a}from"./chunk-QJSB5NX4.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-2RTSC7PZ.mjs.map
1
+ import{a as u}from"./chunk-TQA3JDNV.mjs";import{u as s}from"./chunk-JDWBSDE5.mjs";import{e as a}from"./chunk-QJSB5NX4.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-2MEGFYNZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-KJT6AKOF.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
- //# sourceMappingURL=chunk-HT5DZIND.mjs.map
1
+ import{a}from"./chunk-KLLWGVIT.mjs";var i=e=>{let t=a();return{origin:e?.origin??t.origin,blockHashShard:e?.blockHashShard,expirySeconds:e?.expirySeconds??t.expirySeconds,apiAddress:e?.apiAddress??t.apiAddress,tokenExpirationToastWarningSeconds:e?.tokenExpirationToastWarningSeconds??t.tokenExpirationToastWarningSeconds,extraInfo:e?.extraInfo??{},gatewayUrl:e?.gatewayUrl,extraRequestHeaders:e?.extraRequestHeaders??{}}};export{i as a};
2
+ //# sourceMappingURL=chunk-2NAZHJRU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-VOS5UP5O.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-PZJGJAWU.mjs.map
1
+ import{a as w}from"./chunk-YK7T6MBD.mjs";import{a as l}from"./chunk-KMJMQEXI.mjs";import{s as u}from"./chunk-JDWBSDE5.mjs";import{a as c}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-ULUZWP2P.mjs";var e=o=>u().setState(({network:r})=>{r.network={...r.network,...o}},!1,"initializeNetworkConfig");var y=async({customNetworkConfig:o={},environment:r})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=r&&r in i,p=n?i[r]:{},s={...c,...p,...o},t={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await w(a),f=t.roundDuration?null:await l(a);if(f!=null&&(t.roundDuration=f.erd_round_duration),m!=null){let k={...t,...m,...o};return e(k),k}}return e(t),t};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-3BT33727.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-EMIDMARK.mjs";import{s as e}from"./chunk-JDWBSDE5.mjs";var m=()=>t(e());export{m as a};
2
+ //# sourceMappingURL=chunk-3EXA3UOG.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-VOS5UP5O.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-RPLCGVHU.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-TQA3JDNV.mjs";import{u as c}from"./chunk-JDWBSDE5.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-3JNW6YTC.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-ZWXNKJVI.mjs";import{a}from"./chunk-S7HUKPJR.mjs";import{a as u}from"./chunk-TLBSFFRH.mjs";import{c as n}from"./chunk-5MU2SE7Z.mjs";import{a as s}from"./chunk-WM4UEJI2.mjs";var c=(o,t)=>{let r=`sdk-dapp-logout-event-${o}`,e=t.getItem(r);e&&o!==e||(t.setItem(r,o),t.removeItem(r))};async function L({provider:o,options:t={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}}){let r=a();t.shouldBroadcastLogoutAcrossTabs&&s.localStorage&&c(r,s.localStorage);try{return u(),n.forEach(g=>g()),n.clear(),i.closeConnectionRef?.(),await o.logout()}catch(e){return console.error("Logging out error:",e),!1}}export{L as a};
2
+ //# sourceMappingURL=chunk-3LI6SQT4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/DappProvider/helpers/logout/logout.ts"],
4
+ "sourcesContent": ["import { subscriptions } from 'constants/storage.constants';\nimport { safeWindow } from 'constants/window.constants';\nimport { getAddress } from 'methods/account/getAddress';\nimport { websocketManager } from 'methods/initApp/websocket/registerWebsocket';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { logoutAction } from 'store/actions/sharedActions/sharedActions';\n\nexport type LogoutPropsType = {\n shouldAttemptReLogin?: boolean;\n shouldBroadcastLogoutAcrossTabs?: boolean;\n /*\n * Only used for web-wallet crossWindow login\n */\n hasConsentPopup?: boolean;\n};\n\ninterface IProviderLogout {\n provider: IProvider;\n options?: LogoutPropsType;\n}\n\nconst broadcastLogoutAcrossTabs = (address: string, localStorage: Storage) => {\n const logoutEventKey = `sdk-dapp-logout-event-${address}`;\n const storedAddress = localStorage.getItem(logoutEventKey);\n\n if (storedAddress && address !== storedAddress) {\n return;\n }\n\n localStorage.setItem(logoutEventKey, address);\n localStorage.removeItem(logoutEventKey);\n};\n\nexport async function logout({\n provider,\n options = {\n shouldBroadcastLogoutAcrossTabs: true,\n hasConsentPopup: false\n }\n}: IProviderLogout): Promise<boolean> {\n let address = getAddress();\n\n if (options.shouldBroadcastLogoutAcrossTabs && safeWindow.localStorage) {\n broadcastLogoutAcrossTabs(address, safeWindow.localStorage);\n }\n try {\n logoutAction();\n\n // Clear all active subscriptions on logout\n subscriptions.forEach((unsubscribe) => unsubscribe());\n subscriptions.clear();\n websocketManager.closeConnectionRef?.();\n const isLoggedOut = await provider.logout();\n return isLoggedOut;\n } catch (err) {\n console.error('Logging out error:', err);\n return false;\n }\n}\n"],
5
+ "mappings": "wMAqBA,IAAMA,EAA4B,CAACC,EAAiBC,IAA0B,CAC5E,IAAMC,EAAiB,yBAAyBF,CAAO,GACjDG,EAAgBF,EAAa,QAAQC,CAAc,EAErDC,GAAiBH,IAAYG,IAIjCF,EAAa,QAAQC,EAAgBF,CAAO,EAC5CC,EAAa,WAAWC,CAAc,EACxC,EAEA,eAAsBE,EAAO,CAC3B,SAAAC,EACA,QAAAC,EAAU,CACR,gCAAiC,GACjC,gBAAiB,EACnB,CACF,EAAsC,CACpC,IAAIN,EAAUO,EAAW,EAErBD,EAAQ,iCAAmCE,EAAW,cACxDT,EAA0BC,EAASQ,EAAW,YAAY,EAE5D,GAAI,CACF,OAAAC,EAAa,EAGbC,EAAc,QAASC,GAAgBA,EAAY,CAAC,EACpDD,EAAc,MAAM,EACpBE,EAAiB,qBAAqB,EAClB,MAAMP,EAAS,OAAO,CAE5C,OAASQ,EAAK,CACZ,eAAQ,MAAM,qBAAsBA,CAAG,EAChC,EACT,CACF",
6
+ "names": ["broadcastLogoutAcrossTabs", "address", "localStorage", "logoutEventKey", "storedAddress", "logout", "provider", "options", "getAddress", "safeWindow", "logoutAction", "subscriptions", "unsubscribe", "websocketManager", "err"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-RAG4YNTC.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
- //# sourceMappingURL=chunk-XU5ALACG.mjs.map
1
+ import{a as t}from"./chunk-QBJ4RADD.mjs";var e=class n extends t{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_PENDING_TRANSACTIONS",uiTag:"mvx-pending-transactions-panel"});this.initialData=null;this.data=this.initialData}static getInstance(){return n.instance||(n.instance=new n),n.instance}isPendingTransactionsOpen(){return this.isOpen}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_PENDING_TRANSACTIONS",this.closeUI.bind(this))}};export{e as a};
2
+ //# sourceMappingURL=chunk-3OYMKYIU.mjs.map
@@ -0,0 +1,2 @@
1
+ import{s as n}from"./chunk-JDWBSDE5.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-3YU2TPWN.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as f}from"./chunk-NSSJOXSU.mjs";import{s as n}from"./chunk-HM5GQ2WF.mjs";import{u as t}from"./chunk-VOS5UP5O.mjs";import{d as i}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-OJV6XRG5.mjs";import{a as m}from"./chunk-6BE7ZR56.mjs";async function I(){let o=m()?e.webview:i(t());if(!o)return;let r=await f.create({type:o});if(!r)throw new Error("Provider not found");o===e.webview&&r.isInitialized()&&await r.login(),n(r)}export{I as a};
2
- //# sourceMappingURL=chunk-6HNXEUEX.mjs.map
1
+ import{d as f}from"./chunk-MBZIXGFI.mjs";import{s as n}from"./chunk-45RXOKQM.mjs";import{u as t}from"./chunk-JDWBSDE5.mjs";import{d as i}from"./chunk-VNLGNNIL.mjs";import{a as e}from"./chunk-OJV6XRG5.mjs";import{a as m}from"./chunk-4EZSRRIM.mjs";async function I(){let o=m()?e.webview:i(t());if(!o)return;let r=await f.create({type:o});if(!r)throw new Error("Provider not found");o===e.webview&&r.isInitialized()&&await r.login(),n(r)}export{I as a};
2
+ //# sourceMappingURL=chunk-45MZYR5R.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as ot}from"./chunk-N36FEJCN.mjs";import{a as ut}from"./chunk-6UZHM5LW.mjs";import{a as S}from"./chunk-VYPXDZRI.mjs";import{a as pt}from"./chunk-ISZH3V4I.mjs";import{a as b}from"./chunk-MCSCPREN.mjs";import{a as X,b as Z,g as tt,l as st}from"./chunk-CAA4VJRH.mjs";import{a as dt}from"./chunk-3LI6SQT4.mjs";import{b as w}from"./chunk-ZWXNKJVI.mjs";import{a as Tt}from"./chunk-GEJULV2G.mjs";import{a as vt}from"./chunk-4ODPAHHA.mjs";import{a as ft}from"./chunk-Z5CDCI3Y.mjs";import{a as gt}from"./chunk-FX2KOFY6.mjs";import{a as g}from"./chunk-NOU5UTAM.mjs";import{a as Q}from"./chunk-S7HUKPJR.mjs";import{a as ct}from"./chunk-QBJ4RADD.mjs";import{a as y}from"./chunk-2MEGFYNZ.mjs";import{a as C,f as mt}from"./chunk-U2GG3DTS.mjs";import{b as lt}from"./chunk-TLBSFFRH.mjs";import{d as at}from"./chunk-MHE64JHO.mjs";import{k as et,l as nt,n as it}from"./chunk-65L5EBBL.mjs";import{a as L}from"./chunk-HORSXVIV.mjs";import{a as ht}from"./chunk-MC6J543Y.mjs";import{a as J}from"./chunk-ZH7TT42M.mjs";import{a as I}from"./chunk-QTKK6OSJ.mjs";import{a as E}from"./chunk-6FXEHNGW.mjs";import{a as Et}from"./chunk-NJN53MJV.mjs";import{a as j}from"./chunk-YSCND2MX.mjs";import{a as V,b as q,s as u,u as Y}from"./chunk-JDWBSDE5.mjs";import{c as H,f as $}from"./chunk-QJSB5NX4.mjs";import{b as d}from"./chunk-VNLGNNIL.mjs";import{b as h}from"./chunk-6JM4DPOH.mjs";import{b as G,c as K,f as z}from"./chunk-R53MCZI6.mjs";import{b as It}from"./chunk-3LBQYLDY.mjs";import{a as rt}from"./chunk-TW7SSATI.mjs";import{a as v}from"./chunk-OJV6XRG5.mjs";import _ from"lodash.isequal";import yt from"lodash.isequal";var Ft="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",A=class e extends ct{constructor(){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.store=u();this.initialData={pendingTransactions:[],historicTransactions:[]};this.closeUI=async()=>{this.data.pendingTransactions.length>0?(this.unsubscribeFunctions.forEach(s=>s.forEach(o=>o())),this.unsubscribeFunctions.clear(),await this.uiElement?.closeWithAnimation()):super.closeUI()};this.data={...this.initialData}}static getInstance(){return e.instance||(e.instance=new e),e.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){l.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let o=this.store.subscribe(async({toasts:n,transactions:i},{toasts:a,transactions:c})=>{(!yt(a.transactionToasts,n.transactionToasts)||!yt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Ft,[o]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let s=l.getInstance();await this.closeUI(),await s.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:s,account:o,toasts:n,network:i}=this.store.getState(),{pendingTransactionToasts:a}=await S({toastList:n,transactionsSessions:s,account:o});this.data.pendingTransactions=a,this.data.historicTransactions=await ot.getTransactionsHistory({transactionsSessions:s,address:o.address,explorerAddress:i.network.explorerAddress,egldLabel:i.network.egldLabel}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){at(),this.resetData(),this.updateNotificationsFeed()}async updateNotificationsFeed(){this.eventBus&&(this.eventBus.publish("PENDING_TRANSACTIONS_UPDATE",this.data.pendingTransactions),this.eventBus.publish("TRANSACTIONS_HISTORY_UPDATE",this.data.historicTransactions))}};import R from"bignumber.js";var x=class e{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),s=d(t),{isExpired:o}=I(s?.nativeAuthToken);o?f().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),s=d(t),o=$(t);return!!(s?.nativeAuthToken&&o)};this.addPlannedLogout=()=>{let t=f(),s=H(this.store.getState()),o=t.getType()===v.webview;if(!s||o)return;this.addLogoutWarning();let n=d(this.store.getState()),{secondsUntilExpires:i,expiresAt:a}=I(n?.nativeAuthToken),c=new R(String(i)),r=`${s}_${a}`,p=this.plannedLogoutKey===r;if(!(i&&c.isGreaterThan(0))||p)return;this.plannedLogoutKey=r,clearTimeout(this.plannedLogoutTimeoutRef??0);let W=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{l.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"times",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},W.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},W.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=h(this.store.getState()),s=d(this.store.getState()),{secondsUntilExpires:o}=I(s?.nativeAuthToken),n=new R(String(o)),i=n.times(1e3);if(!o||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new R(t?.tokenExpirationToastWarningSeconds??0).times(1e3),r=n.times(1e3).minus(c),p=ut(i.toNumber()),m=r.isLessThanOrEqualTo(0)?0:r.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{l.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${p}!`}),this.warningLogoutTimeoutRef=null},m)}}static getInstance(){return e.instance||(e.instance=new e),e.instance}};async function B({address:e,provider:t,apiAddress:s}){let o=await E({address:e,baseURL:s});if(!o)throw new Error("Account not found");lt({address:e,providerType:t.getType()});let n={...o,username:L(o.username),nonce:y(o)};C(n),await w(e),b(),o.shard!=null&&await pt({shard:Number(o.shard),apiAddress:s})}async function Ot(e){let{network:{apiAddress:t}}=g();await e.login();let s=await e.getAddress();if(!s)throw new Error("Address not found");return await B({address:s,provider:e,apiAddress:t}),{address:s}}async function Dt({provider:e,nativeAuthConfig:t,token:s}){let{network:{apiAddress:o}}=g(),n=J(t),i=s;i||(i=await n.initialize({noCache:!0}));let{address:a,signature:c,...r}=await e.login({token:i});if(!a)return console.warn("Login cancelled."),null;if(!c)return console.error("Failed to sign login token"),null;let p=n.getToken({address:a,token:i,signature:c});q({loginToken:i,signature:c,nativeAuthToken:p});let m=await Tt({loginToken:i,extraInfoData:{multisig:r?.multisig,impersonate:r?.impersonate},address:a});return await B({address:m,provider:e,apiAddress:o}),{address:m,signature:c}}async function St(e,t){let s=h(Y());if(s)return await Dt({provider:e,nativeAuthConfig:s,token:t?.token});let{address:o}=await Ot(e);return await w(o),b(),{address:o}}var U={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${Z}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${X}-${Date.now()}`}},Rt={extensionResponse:"Unable to sign transactions","Transaction canceled":"Transaction canceled","cancelled by user":"Transaction signing cancelled by user","denied by the user":"Transaction signing denied by the user"},Bt=e=>{for(let[t,s]of Object.entries(Rt))if(e.includes(t))return s;return"Error when signing"};function k(e,t="error"){let s=e?.message,o=Bt(s),i=o!=="Error when signing"?"warning":t,a=Object.keys(U).includes(i)?U[i]:U.error,{toastId:c,iconClassName:r,title:p}=a;return N({toastId:c,duration:1e4,icon:"times",iconClassName:r,message:o,title:p}),o}async function Ct({provider:e,transactions:t,options:s={}}){await wt();let{isGuarded:o,activeGuardianAddress:n,nonce:i}=ht(),a=e.getType()===v.ledger,c=vt({latestNonce:i,transactions:t}),r=n&&o&&!s.skipGuardian?c?.map(m=>(m.version=G.withTxOptions().valueOf(),m.options=z.withOptions({guarded:!0,...a?{hashSign:!0}:{}}).valueOf(),m.guardian=K.newFromBech32(n),m)):c,p=await e.signTransactions(r)??[];return mt(i+p.length),p}var M=class{constructor(t){this.provider=t}init(){return this.provider.init()}async login(t){let s=await St(this.provider,t);return V(this.provider.getType()),bt(this),x.getInstance().init(),s}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0,hasConsentPopup:!1}){return await dt({provider:this.provider,options:t})}setShouldShowConsentPopup(t){this.provider.setShouldShowConsentPopup?.(t)}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,s){try{return await Ct({provider:this.provider,transactions:t,options:s})}catch(o){let n=k(o);throw new Error(n)}}async signMessage(t,s){try{return await gt({provider:this.provider,message:t,options:s})}catch(o){let n=k(o,"warning");throw new Error(n)}}async verifyMessage(t){return await ft(t)}cancelLogin(){this.provider.cancelLogin?.()}};var Lt=null;function bt(e){Lt=e}function f(){return Lt||new M(It)}var Ut=async()=>{try{let e=Q(),{network:t}=g();try{let s=await E({address:e,baseURL:t.apiAddress});if(s!=null){let o={...s,username:L(s.username),nonce:y(s)};return C(o),o}}catch(s){console.error("Failed getting account ",s)}}catch(e){console.error("Failed getting address ",e)}return null};async function wt(){let e=f();if(e==null)throw"Provider not initialized";try{if(!e.init)throw"Current provider does not have init() function";return await e.init()?Ut():void 0}catch(t){console.error("Failed initializing provider ",t)}}var F={},T={},kt=(e,t)=>{u().setState(({toasts:s})=>{let o=s.customToasts.length>0?Math.max(...s.customToasts.map(r=>parseInt(r.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${o+1}`,i=s.customToasts.findIndex(r=>r.toastId===n),a={...e,toastId:n};if(i!==-1){s.customToasts[i]=a;return}s.customToasts.push({...a,toastId:n})},!1,"addCustomToast")},P=e=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(s=>s.toastId!==e)},!1,"removeCustomToast")},At=()=>{u().setState(({toasts:e})=>{e.customToasts=[]},!1,"removeAllCustomToasts")},Go=()=>{u().setState(({toasts:e})=>{e.transactionToasts=[]})},xt=({toastId:e,totalDuration:t})=>{let s="";return u().setState(({toasts:o})=>{let n=o.transactionToasts.length>0?Math.max(...o.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;s=e??`transaction-toast-${n+1}`,o.transactionToasts.push({startTime:j(),endTime:Et(t),toastId:s})},!1,"addTransactionToast"),s},O=e=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(s=>s.toastId!==e)},!1,"removeTransactionToast"),delete T[e],delete F[e]},N=e=>{let{toasts:t}=u().getState(),s=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,o=e.toastId||`custom-toast-${s+1}`;return e.onClose&&(T[o]=e.onClose),e.instantiateToastElement?(F[o]=e.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(r=>r.toastId===o),a={...e,instantiateToastElement:null,toastId:o};i!==-1?n.customToasts[i]=a:n.customToasts.push(a)},!1,"createCustomToast"),o):(kt(e,o),o)};var Nt=1e4,D=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Nt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let s=setTimeout(()=>{O(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,s)};this.startWithCustomDuration=(t,s)=>{if(this.stop(t),s<=0)return;let o=setTimeout(()=>{P(t);let n=T[t];n?.()},s);this.timeoutIntervals.set(t,o)};this.stop=t=>{let s=this.timeoutIntervals.get(t);s&&(clearTimeout(s),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t||Nt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};var l=class e{constructor(){this.isCreatingElement=!1;this.toastsElement=null;this.transactionToasts=[];this.customToasts=[];this.storeToastsSubscription=()=>null;this.eventBusUnsubscribeFunctions=[];this.eventBus=null;this.store=u();this.destroy(),this.lifetimeManager=new D,this.notificationsFeedManager=A.getInstance()}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.subscribeToEventBusNotifications(),this.storeToastsSubscription=this.store.subscribe(async({toasts:s,transactions:o},{toasts:n,transactions:i})=>{(!_(n.transactionToasts,s.transactionToasts)||!_(i,o))&&await this.updateTransactionToastsList(),_(n.customToasts,s.customToasts)||await this.updateCustomToastList()})}static getInstance(){return e.instance||(e.instance=new e),e.instance}handleCompletedTransaction(t){let{transactions:s}=this.store.getState(),o=s[t];if(!o)return!1;let{status:n}=o,i=it(n),a=nt(n),c=et(n),r=a||c||i;return r?(this.successfulToastLifetime&&this.lifetimeManager.start(t),r):(this.lifetimeManager.stop(t),r)}async createTransactionToast(t,s){let o=xt({toastId:t,totalDuration:s});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),o}createCustomToast(t){let s=N(t);return this.updateCustomToastList(),s}async updateTransactionToastsList(){let{toasts:t,transactions:s,account:o}=this.store.getState(),{pendingTransactionToasts:n,completedTransactionToasts:i}=await S({toastList:t,transactionsSessions:s,account:o});this.transactionToasts=[...n,...i.filter(a=>{let c=Math.max(...a.transactions.map(m=>m.timestamp));return Date.now()/1e3<=15+c})];for(let a of t.transactionToasts)this.handleCompletedTransaction(a.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let s of t.customToasts){let n="message"in s?{...s}:{...s,instantiateToastElement:F[s.toastId]};this.customToasts.push(n),s.duration&&this.lifetimeManager.startWithCustomDuration(s.toastId,s.duration)}this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",this.customToasts)}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await rt.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}handleTransactionToastClose(t){this.handleCompletedTransaction(t)&&O(t)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.handleCloseToast.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.handleCloseToast.bind(this))}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}async showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}handleCloseToast(t){if(this.customToasts.find(o=>o.toastId===t)){this.lifetimeManager.stop(t);let o=T[t];o?.(),P(t);return}this.handleTransactionToastClose(t)}async publishTransactionToasts(){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts),this.hideToasts();return}if(!this.eventBus){let t=await this.createToastListElement();if(!t)return;this.eventBus=await t.getEventBus()}this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",this.transactionToasts)}destroy(){this.storeToastsSubscription(),this.lifetimeManager?.destroy(),this.notificationsFeedManager?.destroy(),At(),this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[]}};export{A as a,F as b,T as c,kt as d,P as e,At as f,Go as g,xt as h,O as i,N as j,D as k,l,x as m,B as n,St as o,k as p,Ct as q,M as r,bt as s,f as t,wt as u};
2
+ //# sourceMappingURL=chunk-45RXOKQM.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/internal/ToastManager/ToastManager.ts", "../../src/managers/NotificationsFeedManager/NotificationsFeedManager.ts", "../../src/managers/LogoutManager/LogoutManager.ts", "../../src/providers/DappProvider/helpers/login/helpers/accountLogin.ts", "../../src/providers/DappProvider/helpers/login/login.ts", "../../src/providers/DappProvider/helpers/signErrors/handleSignError.ts", "../../src/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.ts", "../../src/providers/DappProvider/DappProvider.ts", "../../src/providers/helpers/accountProvider.ts", "../../src/utils/account/refreshAccount.ts", "../../src/store/actions/toasts/toastsActions.ts", "../../src/managers/internal/ToastManager/helpers/LifetimeManager.ts"],
4
+ "sourcesContent": ["import isEqual from 'lodash.isequal';\nimport { DEFAULT_TOAST_LIEFTIME } from 'constants/transactions.constants';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxToastList } from 'lib/sdkDappUi';\nimport { NotificationsFeedManager } from 'managers/NotificationsFeedManager/NotificationsFeedManager';\nimport {\n customToastCloseHandlersDictionary,\n customToastComponentDictionary,\n removeAllCustomToasts,\n removeCustomToast,\n removeTransactionToast,\n addTransactionToast,\n createCustomToast\n} from 'store/actions/toasts/toastsActions';\nimport {\n getIsTransactionFailed,\n getIsTransactionSuccessful,\n getIsTransactionTimedOut\n} from 'store/actions/transactions/transactionStateByStatus';\n\nimport { CustomToastType } from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { IEventBus } from 'types/manager.types';\nimport { ProviderErrorsEnum } from 'types/provider.types';\nimport { ComponentFactory } from 'utils/ComponentFactory';\nimport { createToastsFromTransactions } from './helpers/createToastsFromTransactions';\nimport { LifetimeManager } from './helpers/LifetimeManager';\nimport { ITransactionToast, ToastEventsEnum } from './types';\n\ninterface IToastManager {\n successfulToastLifetime?: number;\n}\n\nexport class ToastManager {\n private readonly lifetimeManager: LifetimeManager;\n private isCreatingElement = false;\n private static instance: ToastManager;\n private toastsElement: MvxToastList | null = null;\n private transactionToasts: ITransactionToast[] = [];\n private customToasts: CustomToastType[] = [];\n private successfulToastLifetime?: number;\n private storeToastsSubscription: () => void = () => null;\n private readonly notificationsFeedManager: NotificationsFeedManager;\n private eventBusUnsubscribeFunctions: (() => void)[] = [];\n private eventBus: IEventBus<\n ITransactionToast[] | CustomToastType[] | null\n > | null = null;\n\n store = getStore();\n\n constructor() {\n this.destroy();\n this.lifetimeManager = new LifetimeManager();\n\n this.notificationsFeedManager = NotificationsFeedManager.getInstance();\n }\n\n public async init({\n successfulToastLifetime = DEFAULT_TOAST_LIEFTIME\n }: IToastManager = {}) {\n this.successfulToastLifetime = successfulToastLifetime;\n\n this.lifetimeManager.init({ successfulToastLifetime });\n\n await this.updateTransactionToastsList();\n await this.updateCustomToastList();\n\n await this.subscribeToEventBusNotifications();\n\n this.storeToastsSubscription = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n await this.updateTransactionToastsList();\n }\n\n if (!isEqual(prevToasts.customToasts, toasts.customToasts)) {\n await this.updateCustomToastList();\n }\n }\n );\n }\n\n public static getInstance(): ToastManager {\n if (!ToastManager.instance) {\n ToastManager.instance = new ToastManager();\n }\n return ToastManager.instance;\n }\n\n private handleCompletedTransaction(toastId: string): boolean {\n const { transactions } = this.store.getState();\n const transaction = transactions[toastId];\n\n if (!transaction) {\n return false;\n }\n\n const { status } = transaction;\n const isTimedOut = getIsTransactionTimedOut(status);\n const isFailed = getIsTransactionFailed(status);\n const isSuccessful = getIsTransactionSuccessful(status);\n const isCompleted = isFailed || isSuccessful || isTimedOut;\n\n if (isCompleted) {\n if (this.successfulToastLifetime) {\n this.lifetimeManager.start(toastId);\n }\n return isCompleted;\n }\n\n this.lifetimeManager.stop(toastId);\n return isCompleted;\n }\n\n public async createTransactionToast(\n toastId: string,\n totalDuration: number\n ): Promise<string> {\n const newToastId = addTransactionToast({\n toastId,\n totalDuration\n });\n\n this.handleCompletedTransaction(toastId);\n await this.updateTransactionToastsList();\n return newToastId;\n }\n\n public createCustomToast(toast: CustomToastType): string {\n const toastId = createCustomToast(toast);\n this.updateCustomToastList();\n return toastId;\n }\n\n private async updateTransactionToastsList() {\n const {\n toasts: toastList,\n transactions: transactionsSessions,\n account\n } = this.store.getState();\n\n const { pendingTransactionToasts, completedTransactionToasts } =\n await createToastsFromTransactions({\n toastList,\n transactionsSessions,\n account\n });\n\n this.transactionToasts = [\n ...pendingTransactionToasts,\n ...completedTransactionToasts.filter((toast) => {\n const maxTxTimestamp = Math.max(\n ...toast.transactions.map((tx) => tx.timestamp)\n );\n const now = Date.now() / 1000;\n const isRecent = now <= 15 + maxTxTimestamp;\n return isRecent; // transactions are recent\n })\n ];\n\n for (const toast of toastList.transactionToasts) {\n this.handleCompletedTransaction(toast.toastId);\n }\n\n await this.publishTransactionToasts();\n }\n\n private async updateCustomToastList() {\n const { toasts: toastList } = this.store.getState();\n this.customToasts = [];\n\n for (const toast of toastList.customToasts) {\n const isSimpleToast = 'message' in toast;\n\n const newToast: CustomToastType = isSimpleToast\n ? { ...toast }\n : {\n ...toast,\n instantiateToastElement:\n customToastComponentDictionary[toast.toastId]\n };\n this.customToasts.push(newToast);\n\n if (toast.duration) {\n this.lifetimeManager.startWithCustomDuration(\n toast.toastId,\n toast.duration\n );\n }\n }\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n this.customToasts\n );\n }\n\n private async createToastListElement(): Promise<MvxToastList | null> {\n if (this.toastsElement) {\n return this.toastsElement;\n }\n\n if (!this.isCreatingElement) {\n this.isCreatingElement = true;\n\n this.toastsElement = await ComponentFactory.create<MvxToastList>({\n name: UITagsEnum.TOAST_LIST\n });\n\n this.isCreatingElement = false;\n }\n\n return this.toastsElement;\n }\n\n private handleTransactionToastClose(toastId: string) {\n const isCompleted = this.handleCompletedTransaction(toastId);\n\n if (isCompleted) {\n removeTransactionToast(toastId);\n }\n }\n\n private async subscribeToEventBusNotifications() {\n const toastsElement = await this.createToastListElement();\n\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n if (!this.eventBus) {\n throw new Error(ProviderErrorsEnum.eventBusError);\n }\n\n this.eventBus.subscribe(\n ToastEventsEnum.CLOSE,\n this.handleCloseToast.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.CLOSE,\n this.handleCloseToast.bind(this)\n );\n });\n\n this.eventBus.subscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(\n ToastEventsEnum.OPEN_NOTIFICATIONS_FEED,\n this.handleOpenNotificationsFeed.bind(this)\n );\n });\n }\n\n public async showToasts() {\n this.eventBus?.publish(ToastEventsEnum.SHOW, null);\n\n await this.updateCustomToastList();\n await this.updateTransactionToastsList();\n }\n\n public hideToasts() {\n this.eventBus?.publish(ToastEventsEnum.HIDE, null);\n }\n\n private async handleOpenNotificationsFeed() {\n this.notificationsFeedManager.openNotificationsFeed();\n }\n\n private handleCloseToast(toastId: string) {\n const customToast = this.customToasts.find(\n (toast) => toast.toastId === toastId\n );\n\n if (customToast) {\n this.lifetimeManager.stop(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n removeCustomToast(toastId);\n return;\n }\n\n this.handleTransactionToastClose(toastId);\n }\n\n private async publishTransactionToasts() {\n if (\n this.notificationsFeedManager.isNotificationsFeedOpen() &&\n this.eventBus\n ) {\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n this.transactionToasts\n );\n\n this.hideToasts();\n return;\n }\n\n if (!this.eventBus) {\n const toastsElement = await this.createToastListElement();\n\n if (!toastsElement) {\n return;\n }\n\n this.eventBus = await toastsElement.getEventBus();\n }\n\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n this.transactionToasts\n );\n }\n\n public destroy() {\n this.storeToastsSubscription();\n this.lifetimeManager?.destroy();\n this.notificationsFeedManager?.destroy();\n removeAllCustomToasts();\n this.eventBusUnsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n this.eventBusUnsubscribeFunctions = [];\n }\n}\n", "import isEqual from 'lodash.isequal';\nimport { UITagsEnum } from 'constants/UITags.enum';\nimport { TransactionsHistoryController } from 'controllers/TransactionsHistoryController';\nimport { ITransactionListItem, MvxNotificationsFeed } from 'lib/sdkDappUi';\nimport { clearCompletedTransactions } from 'store/actions/transactions/transactionsActions';\nimport { getStore } from 'store/store';\nimport { NotificationsFeedEventsEnum } from './types';\nimport { ToastManager } from '../internal';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager/SidePanelBaseManager';\nimport { createToastsFromTransactions } from '../internal/ToastManager/helpers/createToastsFromTransactions';\nimport { ITransactionToast } from '../internal/ToastManager/types';\n\ninterface INotificationsFeedManagerData {\n pendingTransactions: ITransactionToast[];\n historicTransactions: ITransactionListItem[];\n}\n\nconst NOTIFICATIONS_FEED_STORE_SUBSCRIBE = 'NOTIFICATIONS_FEED_STORE_SUBSCRIBE';\n\nexport class NotificationsFeedManager extends SidePanelBaseManager<\n MvxNotificationsFeed,\n INotificationsFeedManagerData,\n NotificationsFeedEventsEnum | typeof NOTIFICATIONS_FEED_STORE_SUBSCRIBE\n> {\n private static instance: NotificationsFeedManager;\n private readonly store = getStore();\n\n protected initialData: INotificationsFeedManagerData = {\n pendingTransactions: [],\n historicTransactions: []\n };\n\n public static getInstance(): NotificationsFeedManager {\n if (!NotificationsFeedManager.instance) {\n NotificationsFeedManager.instance = new NotificationsFeedManager();\n }\n return NotificationsFeedManager.instance;\n }\n\n constructor() {\n super({\n uiDataUpdateEvent: NotificationsFeedEventsEnum.OPEN,\n uiTag: UITagsEnum.NOTIFICATIONS_FEED\n });\n this.data = { ...this.initialData };\n }\n\n public isNotificationsFeedOpen(): boolean {\n return this.isOpen;\n }\n\n /**\n * Open the notifications feed and toggle off the toast manager.\n */\n public async openNotificationsFeed(): Promise<void> {\n const toastManager = ToastManager.getInstance();\n toastManager.hideToasts();\n await this.openUI();\n await this.updateDataAndNotifications();\n\n const storeToastsUnsubscribe = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n if (\n !isEqual(prevToasts.transactionToasts, toasts.transactionToasts) ||\n !isEqual(prevTransactions, transactions)\n ) {\n await this.updateDataAndNotifications();\n }\n }\n );\n this.unsubscribeFunctions.set(NOTIFICATIONS_FEED_STORE_SUBSCRIBE, [\n storeToastsUnsubscribe\n ]);\n\n this.eventBus?.publish(NotificationsFeedEventsEnum.OPEN);\n await this.updateDataAndNotifications();\n }\n\n closeUI = async () => {\n if (this.data.pendingTransactions.length > 0) {\n this.unsubscribeFunctions.forEach((unsubList) =>\n unsubList.forEach((unsubscribe) => unsubscribe())\n );\n this.unsubscribeFunctions.clear();\n await this.uiElement?.closeWithAnimation();\n } else {\n super.closeUI();\n }\n };\n\n /**\n * Close the notifications feed and toggle on the toast manager.\n */\n protected async handleCloseUI() {\n const toastManager = ToastManager.getInstance();\n await this.closeUI();\n await toastManager.showToasts();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLOSE,\n this.handleCloseUI.bind(this)\n );\n\n this.subscribeToEventBus(\n NotificationsFeedEventsEnum.CLEAR,\n this.handleClearNotificationsFeedHistory.bind(this)\n );\n }\n\n protected async updateDataAndNotifications() {\n const { transactions, account, toasts, network } = this.store.getState();\n\n const { pendingTransactionToasts } = await createToastsFromTransactions({\n toastList: toasts,\n transactionsSessions: transactions,\n account\n });\n\n this.data.pendingTransactions = pendingTransactionToasts;\n\n this.data.historicTransactions =\n await TransactionsHistoryController.getTransactionsHistory({\n transactionsSessions: transactions,\n address: account.address,\n explorerAddress: network.network.explorerAddress,\n egldLabel: network.network.egldLabel\n });\n\n await this.updateNotificationsFeed();\n }\n\n private handleClearNotificationsFeedHistory() {\n clearCompletedTransactions();\n this.resetData();\n this.updateNotificationsFeed();\n }\n\n private async updateNotificationsFeed() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.PENDING_TRANSACTIONS_UPDATE,\n this.data.pendingTransactions\n );\n\n this.eventBus.publish(\n NotificationsFeedEventsEnum.TRANSACTIONS_HISTORY_UPDATE,\n this.data.historicTransactions\n );\n }\n}\n", "import BigNumber from 'bignumber.js';\nimport { ToastIconsEnum } from 'managers/internal/ToastManager/helpers/getToastDataStateByStatus';\nimport { ToastManager } from 'managers/internal/ToastManager/ToastManager';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { ProviderTypeEnum } from 'providers/types/providerFactory.types';\nimport { getTokenExpiration } from 'services/nativeAuth/methods/getTokenExpiration';\nimport {\n addressSelector,\n isLoggedInSelector\n} from 'store/selectors/accountSelectors';\nimport { nativeAuthConfigSelector } from 'store/selectors/configSelectors';\nimport { tokenLoginSelector } from 'store/selectors/loginInfoSelectors';\nimport { getStore } from 'store/store';\nimport { getHumanReadableTokenExpirationTime } from './helpers/getHumanReadableTokenExpirationTime';\n\nexport class LogoutManager {\n private static instance: LogoutManager;\n private store = getStore();\n private warningLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private actualLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutTimeoutRef: ReturnType<typeof setInterval> | null = null;\n private plannedLogoutKey: string | null = null;\n\n public static getInstance(): LogoutManager {\n if (!LogoutManager.instance) {\n LogoutManager.instance = new LogoutManager();\n }\n return LogoutManager.instance;\n }\n\n private constructor() {}\n\n public init = async () => {\n if (!this.shouldStart()) {\n return;\n }\n\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n\n const { isExpired: isNativeAuthTokenExpired } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n if (isNativeAuthTokenExpired) {\n const provider = getAccountProvider();\n provider.logout();\n } else {\n this.addPlannedLogout();\n }\n };\n\n public stop = () => {\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n clearTimeout(this.actualLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = null;\n this.plannedLogoutTimeoutRef = null;\n this.actualLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n };\n\n private readonly shouldStart = (): boolean => {\n const state = this.store.getState();\n const tokenLogin = tokenLoginSelector(state);\n const isLoggedIn = isLoggedInSelector(state);\n return Boolean(tokenLogin?.nativeAuthToken && isLoggedIn);\n };\n\n private addPlannedLogout = () => {\n const provider = getAccountProvider();\n const address = addressSelector(this.store.getState());\n const isWebviewLogin = provider.getType() === ProviderTypeEnum.webview;\n\n // prevent unexpected logout if webview login\n if (!address || isWebviewLogin) {\n return;\n }\n\n this.addLogoutWarning();\n\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires, expiresAt } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n // Handle the actual logout functionality.\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const plannedLogoutKey = `${address}_${expiresAt}`;\n const plannedLogoutSet = this.plannedLogoutKey === plannedLogoutKey;\n\n const isValidInterval =\n secondsUntilExpires && secondsUntilExpiresBN.isGreaterThan(0);\n\n if (!isValidInterval || plannedLogoutSet) {\n return;\n }\n\n this.plannedLogoutKey = plannedLogoutKey;\n\n clearTimeout(this.plannedLogoutTimeoutRef ?? 0);\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n this.actualLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-logout',\n iconClassName: 'warning',\n title: 'Logging out',\n icon: ToastIconsEnum.times,\n message: 'Your session has expired!'\n });\n this.actualLogoutTimeoutRef = null;\n }, millisecondsUntilLogout.toNumber() - 3000);\n\n this.plannedLogoutTimeoutRef = setTimeout(() => {\n provider.logout();\n this.plannedLogoutTimeoutRef = null;\n this.plannedLogoutKey = null;\n }, millisecondsUntilLogout.toNumber());\n };\n\n private readonly addLogoutWarning = () => {\n if (this.warningLogoutTimeoutRef) {\n return;\n }\n\n const nativeAuthConfig = nativeAuthConfigSelector(this.store.getState());\n const tokenLogin = tokenLoginSelector(this.store.getState());\n\n const { secondsUntilExpires } = getTokenExpiration(\n tokenLogin?.nativeAuthToken\n );\n\n const secondsUntilExpiresBN = new BigNumber(String(secondsUntilExpires));\n const millisecondsUntilLogout = secondsUntilExpiresBN.times(1000);\n\n if (\n !secondsUntilExpires ||\n secondsUntilExpiresBN.isLessThanOrEqualTo(0) ||\n !nativeAuthConfig?.tokenExpirationToastWarningSeconds\n ) {\n return;\n }\n\n const logoutWarningOffsetSeconds = new BigNumber(\n nativeAuthConfig?.tokenExpirationToastWarningSeconds ?? 0\n );\n\n const logoutWarningOffsetMilliseconds =\n logoutWarningOffsetSeconds.times(1000);\n\n const millisecondsUntilLogoutWarning = secondsUntilExpiresBN\n .times(1000)\n .minus(logoutWarningOffsetMilliseconds);\n\n const readableMinutesUntilLogout = getHumanReadableTokenExpirationTime(\n millisecondsUntilLogout.toNumber()\n );\n\n const timeoutUntilLogoutWarning =\n millisecondsUntilLogoutWarning.isLessThanOrEqualTo(0)\n ? 0\n : millisecondsUntilLogoutWarning.toNumber();\n\n clearTimeout(this.warningLogoutTimeoutRef ?? 0);\n\n this.warningLogoutTimeoutRef = setTimeout(() => {\n ToastManager.getInstance().createCustomToast({\n toastId: 'native-auth-expired',\n iconClassName: 'warning',\n title: 'Session Expiration Warning',\n icon: ToastIconsEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { setGasStationMetadata } from 'methods/initApp/gastStationMetadata/setGasStationMetadata';\nimport { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { loginAction } from 'store/actions';\nimport { setAccount } from 'store/actions/account';\nimport { AccountType } from 'types/account.types';\nimport { fetchAccount } from 'utils/account/fetchAccount';\nimport { trimUsernameDomain } from 'utils/account/trimUsernameDomain';\n\ninterface IAccountLoginProps {\n address: string;\n provider: IProvider;\n apiAddress: string;\n}\n\nexport async function accountLogin({\n address,\n provider,\n apiAddress\n}: IAccountLoginProps) {\n const account = await fetchAccount({\n address,\n baseURL: apiAddress\n });\n\n if (!account) {\n throw new Error('Account not found');\n }\n\n loginAction({\n address,\n providerType: provider.getType()\n });\n\n const newAccount: AccountType = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(newAccount);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n if (account.shard != null) {\n await setGasStationMetadata({\n shard: Number(account.shard),\n apiAddress\n });\n }\n}\n", "import { registerWebsocketListener } from 'methods/initApp/websocket/registerWebsocket';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { trackTransactions } from 'methods/trackTransactions/trackTransactions';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { nativeAuth } from 'services/nativeAuth';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\nimport { setTokenLogin } from 'store/actions/loginInfo/loginInfoActions';\nimport { nativeAuthConfigSelector } from 'store/selectors';\nimport { getState } from 'store/store';\nimport { accountLogin } from './helpers/accountLogin';\nimport { extractAddressFromToken } from './helpers/extractAddressFromToken';\n\nasync function loginWithoutNativeToken(provider: IProvider) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n await provider.login();\n\n const address = await provider.getAddress();\n\n if (!address) {\n throw new Error('Address not found');\n }\n\n await accountLogin({ address, provider, apiAddress });\n\n return {\n address\n };\n}\n\nasync function loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token\n}: {\n provider: IProvider;\n nativeAuthConfig: NativeAuthConfigType;\n token?: string;\n}) {\n const {\n network: { apiAddress }\n } = getNetworkConfig();\n\n const nativeAuthClient = nativeAuth(nativeAuthConfig);\n let loginToken = token;\n\n if (!loginToken) {\n loginToken = await nativeAuthClient.initialize({\n noCache: true\n });\n }\n\n const { address, signature, ...loginResult } = await provider.login({\n token: loginToken\n });\n\n if (!address) {\n console.warn('Login cancelled.');\n return null;\n }\n\n if (!signature) {\n console.error('Failed to sign login token');\n return null;\n }\n\n const nativeAuthToken = nativeAuthClient.getToken({\n address,\n token: loginToken,\n signature\n });\n\n setTokenLogin({\n loginToken,\n signature,\n nativeAuthToken\n });\n\n const extractedAddress = await extractAddressFromToken({\n loginToken,\n extraInfoData: {\n multisig: loginResult?.multisig,\n impersonate: loginResult?.impersonate\n },\n address\n });\n\n await accountLogin({\n address: extractedAddress,\n provider,\n apiAddress\n });\n\n return {\n address: extractedAddress,\n signature\n };\n}\n\nexport async function login(provider: IProvider, options?: { token?: string }) {\n const nativeAuthConfig = nativeAuthConfigSelector(getState());\n\n if (nativeAuthConfig) {\n const data = await loginWithNativeToken({\n provider,\n nativeAuthConfig,\n token: options?.token\n });\n return data;\n }\n\n const { address } = await loginWithoutNativeToken(provider);\n\n await registerWebsocketListener(address);\n trackTransactions();\n\n return { address };\n}\n", "import {\n CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n CANCEL_TRANSACTION_TOAST_ID,\n ERROR_SIGNING_TOAST_ID\n} from 'constants/transactions.constants';\nimport { ToastIconsEnum } from 'managers/internal/ToastManager/helpers/getToastDataStateByStatus';\nimport { createCustomToast } from 'store/actions';\nimport { SigningErrorsEnum, SigningWarningsEnum } from 'types/enums.types';\n\nconst states = {\n error: {\n title: SigningErrorsEnum.errorSigning.toString(),\n iconClassName: 'danger',\n toastId: `${ERROR_SIGNING_TOAST_ID}-${Date.now()}`\n },\n warning: {\n title: SigningWarningsEnum.cancelled.toString(),\n iconClassName: 'warning',\n toastId: `${CANCEL_TRANSACTION_TOAST_ID}-${Date.now()}`\n }\n};\n\nconst errorsMap = {\n extensionResponse: 'Unable to sign transactions', // extension\n 'Transaction canceled': 'Transaction canceled', // web wallet\n 'cancelled by user': 'Transaction signing cancelled by user', // custom\n 'denied by the user': 'Transaction signing denied by the user' // ledger\n};\n\nconst getUserError = (error: string) => {\n for (const [key, value] of Object.entries(errorsMap)) {\n if (error.includes(key)) {\n return value;\n }\n }\n return SigningErrorsEnum.errorSigning;\n};\n\nexport function handleSignError(\n error: unknown,\n type: 'error' | 'warning' = 'error'\n) {\n const originalError = (error as Error)?.message;\n const errorMessage = getUserError(originalError);\n\n const isKnownError = errorMessage !== SigningErrorsEnum.errorSigning;\n\n const errorType = isKnownError ? 'warning' : type;\n\n const state = Object.keys(states).includes(errorType)\n ? states[errorType]\n : states.error;\n\n const { toastId, iconClassName, title } = state;\n\n createCustomToast({\n toastId,\n duration: CANCEL_TRANSACTION_TOAST_DEFAULT_DURATION,\n icon: ToastIconsEnum.times,\n iconClassName,\n message: errorMessage,\n title\n });\n\n return errorMessage;\n}\n", "import {\n Address,\n Transaction,\n TransactionOptions,\n TransactionVersion\n} from 'lib/sdkCore';\nimport { getAccount } from 'methods/account/getAccount';\nimport {\n IProvider,\n ProviderTypeEnum\n} from 'providers/types/providerFactory.types';\nimport { setAccountNonce } from 'store/actions';\nimport { refreshAccount } from 'utils';\nimport { computeNonces } from '../computeNonces/computeNonces';\n\nexport type SignTransactionsOptionsType = {\n skipGuardian?: boolean;\n};\n\ntype SignTransactionsType = {\n provider: IProvider;\n transactions: Transaction[];\n options?: SignTransactionsOptionsType;\n};\n\nexport async function signTransactionsWithProvider({\n provider,\n transactions,\n options = {}\n}: SignTransactionsType): Promise<Transaction[]> {\n await refreshAccount();\n const { isGuarded, activeGuardianAddress, nonce } = getAccount();\n const isLedger = provider.getType() === ProviderTypeEnum.ledger;\n\n const transactionsWithComputedNonce = computeNonces({\n latestNonce: nonce,\n transactions\n });\n\n const transactionsToSign =\n activeGuardianAddress && isGuarded && !options.skipGuardian\n ? transactionsWithComputedNonce?.map((transaction) => {\n transaction.version = TransactionVersion.withTxOptions().valueOf();\n transaction.options = TransactionOptions.withOptions({\n guarded: true,\n ...(isLedger ? { hashSign: true } : {})\n }).valueOf();\n\n transaction.guardian = Address.newFromBech32(activeGuardianAddress);\n\n return transaction;\n })\n : transactionsWithComputedNonce;\n\n const signedTransactions: Transaction[] =\n (await provider.signTransactions(transactionsToSign)) ?? [];\n\n setAccountNonce(nonce + signedTransactions.length);\n\n return signedTransactions;\n}\n", "import { Message, Transaction } from 'lib/sdkCore';\nimport { LogoutManager } from 'managers/LogoutManager/LogoutManager';\nimport { setAccountProvider } from 'providers/helpers/accountProvider';\nimport { setProviderType } from 'store/actions/loginInfo/loginInfoActions';\nimport { IProvider } from '../types/providerFactory.types';\nimport { login } from './helpers/login/login';\nimport { logout } from './helpers/logout/logout';\nimport { handleSignError } from './helpers/signErrors/handleSignError';\nimport { signMessageWithProvider } from './helpers/signMessage/signMessageWithProvider';\nimport {\n verifyMessage,\n VerifyMessageReturnType\n} from './helpers/signMessage/verifyMessage';\nimport {\n signTransactionsWithProvider,\n SignTransactionsOptionsType\n} from './helpers/signTransactions/signTransactionsWithProvider';\n\nexport class DappProvider {\n private provider: IProvider;\n\n constructor(provider: IProvider) {\n this.provider = provider;\n }\n\n init(): Promise<boolean> {\n return this.provider.init();\n }\n\n async login(options?: { token?: string }) {\n const data = await login(this.provider, options);\n setProviderType(this.provider.getType());\n setAccountProvider(this);\n LogoutManager.getInstance().init();\n return data;\n }\n\n isInitialized(): boolean {\n return this.provider.isInitialized();\n }\n\n async logout(\n options = {\n shouldBroadcastLogoutAcrossTabs: true,\n hasConsentPopup: false\n }\n ): Promise<boolean> {\n return await logout({ provider: this.provider, options });\n }\n\n setShouldShowConsentPopup(shouldShow: boolean): void {\n this.provider.setShouldShowConsentPopup?.(shouldShow);\n }\n\n getType() {\n return this.provider.getType();\n }\n\n /**\n * @returns The original provider instance.\n */\n getProvider() {\n return this.provider;\n }\n\n async signTransactions(\n transactions: Transaction[],\n options?: SignTransactionsOptionsType\n ): Promise<Transaction[]> {\n try {\n const signedTransactions = await signTransactionsWithProvider({\n provider: this.provider,\n transactions,\n options\n });\n return signedTransactions;\n } catch (error) {\n const errorMessage = handleSignError(error);\n throw new Error(errorMessage);\n }\n }\n\n async signMessage(\n message: Message,\n options?: {\n hasConsentPopup?: boolean;\n }\n ): Promise<Message | null> {\n try {\n const signedMessage = await signMessageWithProvider({\n provider: this.provider,\n message,\n options\n });\n return signedMessage;\n } catch (error) {\n const errorMessage = handleSignError(error, 'warning');\n throw new Error(errorMessage);\n }\n }\n\n /**\n * @param signedMessage - The signed message to verify in form of a JSON string with `address`, `message` and `signature` properties.\n * @returns The verification result with `isVerified`, `message` and `address` properties.\n */\n async verifyMessage(signedMessage: string): Promise<VerifyMessageReturnType> {\n return await verifyMessage(signedMessage);\n }\n\n cancelLogin(): void {\n this.provider.cancelLogin?.();\n }\n}\n", "import { IProvider } from 'providers/types/providerFactory.types';\nimport { DappProvider } from '../DappProvider';\nimport { emptyProvider } from './emptyProvider';\n\nexport type ProvidersType = IProvider;\n\nlet accountProvider: DappProvider | null = null;\n\nexport function setAccountProvider<TProvider extends DappProvider | null>(\n provider: TProvider\n) {\n accountProvider = provider;\n}\n\nexport function getAccountProvider(): DappProvider {\n return accountProvider || new DappProvider(emptyProvider);\n}\n", "import { getAddress } from 'methods/account/getAddress';\nimport { getLatestNonce } from 'methods/account/getLatestNonce';\nimport { getNetworkConfig } from 'methods/network/getNetworkConfig';\nimport { getAccountProvider } from 'providers/helpers/accountProvider';\nimport { setAccount } from 'store/actions';\nimport { fetchAccount } from './fetchAccount';\nimport { trimUsernameDomain } from './trimUsernameDomain';\n\nconst setNewAccount = async () => {\n try {\n const address = getAddress();\n const { network } = getNetworkConfig();\n\n try {\n const account = await fetchAccount({\n address,\n baseURL: network.apiAddress\n });\n\n if (account != null) {\n const accountData = {\n ...account,\n username: trimUsernameDomain(account.username),\n nonce: getLatestNonce(account)\n };\n\n setAccount(accountData);\n\n return accountData;\n }\n } catch (e) {\n console.error('Failed getting account ', e);\n }\n } catch (e) {\n console.error('Failed getting address ', e);\n }\n\n return null;\n};\n\nexport async function refreshAccount() {\n const provider = getAccountProvider();\n\n if (provider == null) {\n throw 'Provider not initialized';\n }\n\n try {\n if (!provider.init) {\n throw 'Current provider does not have init() function';\n }\n\n const initialized = await provider.init();\n\n if (!initialized) {\n return;\n }\n\n return setNewAccount();\n } catch (e) {\n console.error('Failed initializing provider ', e);\n }\n\n return undefined;\n}\n", "import {\n CustomToastType,\n IComponentToast\n} from 'store/slices/toast/toastSlice.types';\nimport { getStore } from 'store/store';\nimport { getUnixTimestamp, getUnixTimestampWithAddedMilliseconds } from 'utils';\n\nexport const customToastComponentDictionary: Record<\n string,\n IComponentToast['instantiateToastElement']\n> = {};\nexport const customToastCloseHandlersDictionary: Record<string, () => void> =\n {};\n\nexport const addCustomToast = (\n customToast: CustomToastType,\n currentToastId?: string\n) => {\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.customToasts.length > 0\n ? Math.max(\n ...state.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n const toastId = currentToastId ?? `custom-toast-${lastToastIndex + 1}`;\n\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const newToast: CustomToastType = {\n ...customToast,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = newToast;\n return;\n }\n\n state.customToasts.push({\n ...newToast,\n toastId\n });\n },\n false,\n 'addCustomToast'\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n 'removeCustomToast'\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n 'removeAllCustomToasts'\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(({ toasts: state }) => {\n state.transactionToasts = [];\n });\n};\n\nexport const addTransactionToast = ({\n toastId,\n totalDuration\n}: {\n toastId: string;\n totalDuration: number;\n}): string => {\n let newToastId: string = '';\n getStore().setState(\n ({ toasts: state }) => {\n const lastToastIndex =\n state.transactionToasts.length > 0\n ? Math.max(\n ...state.transactionToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n newToastId = toastId ?? `transaction-toast-${lastToastIndex + 1}`;\n\n state.transactionToasts.push({\n startTime: getUnixTimestamp(),\n endTime: getUnixTimestampWithAddedMilliseconds(totalDuration),\n toastId: newToastId\n });\n },\n false,\n 'addTransactionToast'\n );\n\n return newToastId;\n};\n\nexport const removeTransactionToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.transactionToasts = state.transactionToasts.filter((toast) => {\n return toast.toastId !== toastId;\n });\n },\n false,\n 'removeTransactionToast'\n );\n\n delete customToastCloseHandlersDictionary[toastId];\n delete customToastComponentDictionary[toastId];\n};\n\nexport const createCustomToast = (props: CustomToastType) => {\n const { toasts } = getStore().getState();\n\n const lastToastIndex =\n toasts.customToasts.length > 0\n ? Math.max(\n ...toasts.customToasts.map((toast) =>\n parseInt(toast.toastId.split('-').pop() ?? '0')\n )\n )\n : 0;\n\n const toastId = props.toastId || `custom-toast-${lastToastIndex + 1}`;\n\n if (props.onClose) {\n customToastCloseHandlersDictionary[toastId] = props.onClose;\n }\n\n if (props.instantiateToastElement) {\n customToastComponentDictionary[toastId] = props.instantiateToastElement;\n\n getStore().setState(\n ({ toasts: state }) => {\n const existingToastIndex = state.customToasts.findIndex(\n (toast) => toast.toastId === toastId\n );\n\n const toast: CustomToastType = {\n ...props,\n instantiateToastElement: null,\n toastId\n };\n\n const isToastFound = existingToastIndex !== -1;\n\n if (isToastFound) {\n state.customToasts[existingToastIndex] = toast;\n } else {\n state.customToasts.push(toast);\n }\n },\n false,\n 'createCustomToast'\n );\n\n return toastId;\n }\n\n addCustomToast(props, toastId);\n return toastId;\n};\n", "import {\n customToastCloseHandlersDictionary,\n removeCustomToast,\n removeTransactionToast\n} from 'store/actions/toasts/toastsActions';\n\ninterface IToastProgressManagerParams {\n successfulToastLifetime?: number;\n}\n\nconst DEFAULT_SUCCESSFUL_TOAST_LIFETIME = 10_000;\n\nexport class LifetimeManager {\n private timeoutIntervals: Map<string, ReturnType<typeof setTimeout>> =\n new Map();\n private successfulToastLifetime: number = DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n\n constructor() {}\n\n public init({ successfulToastLifetime }: IToastProgressManagerParams) {\n this.successfulToastLifetime =\n successfulToastLifetime || DEFAULT_SUCCESSFUL_TOAST_LIFETIME;\n }\n\n public start = (toastId: string) => {\n this.stop(toastId);\n\n if (this.successfulToastLifetime <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeTransactionToast(toastId);\n }, this.successfulToastLifetime);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public startWithCustomDuration = (toastId: string, duration: number) => {\n this.stop(toastId);\n\n if (duration <= 0) {\n return;\n }\n\n const timeout = setTimeout(() => {\n removeCustomToast(toastId);\n const handleClose = customToastCloseHandlersDictionary[toastId];\n handleClose?.();\n }, duration);\n\n this.timeoutIntervals.set(toastId, timeout);\n };\n\n public stop = (toastId: string) => {\n const timeout = this.timeoutIntervals.get(toastId);\n if (timeout) {\n clearTimeout(timeout);\n this.timeoutIntervals.delete(toastId);\n }\n };\n\n public destroy() {\n this.timeoutIntervals.forEach((interval) => clearTimeout(interval));\n this.timeoutIntervals.clear();\n }\n}\n"],
5
+ "mappings": "ogDAAA,OAAOA,MAAa,iBCApB,OAAOC,OAAa,iBAiBpB,IAAMC,GAAqC,qCAE9BC,EAAN,MAAMC,UAAiCC,EAI5C,CAgBA,aAAc,CACZ,MAAM,CACJ,4CACA,8BACF,CAAC,EAlBH,KAAiB,MAAQC,EAAS,EAElC,KAAU,YAA6C,CACrD,oBAAqB,CAAC,EACtB,qBAAsB,CAAC,CACzB,EAmDA,aAAU,SAAY,CAChB,KAAK,KAAK,oBAAoB,OAAS,GACzC,KAAK,qBAAqB,QAASC,GACjCA,EAAU,QAASC,GAAgBA,EAAY,CAAC,CAClD,EACA,KAAK,qBAAqB,MAAM,EAChC,MAAM,KAAK,WAAW,mBAAmB,GAEzC,MAAM,QAAQ,CAElB,EA/CE,KAAK,KAAO,CAAE,GAAG,KAAK,WAAY,CACpC,CAbA,OAAc,aAAwC,CACpD,OAAKJ,EAAyB,WAC5BA,EAAyB,SAAW,IAAIA,GAEnCA,EAAyB,QAClC,CAUO,yBAAmC,CACxC,OAAO,KAAK,MACd,CAKA,MAAa,uBAAuC,CAC7BK,EAAa,YAAY,EACjC,WAAW,EACxB,MAAM,KAAK,OAAO,EAClB,MAAM,KAAK,2BAA2B,EAEtC,IAAMC,EAAyB,KAAK,MAAM,UACxC,MACE,CAAE,OAAAC,EAAQ,aAAAC,CAAa,EACvB,CAAE,OAAQC,EAAY,aAAcC,CAAiB,IAClD,EAED,CAACC,GAAQF,EAAW,kBAAmBF,EAAO,iBAAiB,GAC/D,CAACI,GAAQD,EAAkBF,CAAY,IAEvC,MAAM,KAAK,2BAA2B,CAE1C,CACF,EACA,KAAK,qBAAqB,IAAIV,GAAoC,CA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,CAClB,KAAK,UAAU,0BAA8B,IAAI,CACnD,CAEA,MAAc,6BAA8B,CAC1C,KAAK,yBAAyB,sBAAsB,CACtD,CAEQ,iBAAiB3B,EAAiB,CAKxC,GAJoB,KAAK,aAAa,KACnCa,GAAUA,EAAM,UAAYb,CAC/B,EAEiB,CACf,KAAK,gBAAgB,KAAKA,CAAO,EACjC,IAAM4B,EAAcC,EAAmC7B,CAAO,EAC9D4B,IAAc,EACdE,EAAkB9B,CAAO,EACzB,MACF,CAEA,KAAK,4BAA4BA,CAAO,CAC1C,CAEA,MAAc,0BAA2B,CACvC,GACE,KAAK,yBAAyB,wBAAwB,GACtD,KAAK,SACL,CACA,KAAK,SAAS,wCAEZ,KAAK,iBACP,EAEA,KAAK,WAAW,EAChB,MACF,CAEA,GAAI,CAAC,KAAK,SAAU,CAClB,IAAM2B,EAAgB,MAAM,KAAK,uBAAuB,EAExD,GAAI,CAACA,EACH,OAGF,KAAK,SAAW,MAAMA,EAAc,YAAY,CAClD,CAEA,KAAK,SAAS,wCAEZ,KAAK,iBACP,CACF,CAEO,SAAU,CACf,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,QAAQ,EAC9B,KAAK,0BAA0B,QAAQ,EACvCI,GAAsB,EACtB,KAAK,6BAA6B,QAASC,GAAgBA,EAAY,CAAC,EACxE,KAAK,6BAA+B,CAAC,CACvC,CACF",
6
+ "names": ["isEqual", "isEqual", "NOTIFICATIONS_FEED_STORE_SUBSCRIBE", "NotificationsFeedManager", "_NotificationsFeedManager", "SidePanelBaseManager", "getStore", "unsubList", "unsubscribe", "ToastManager", "storeToastsUnsubscribe", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastManager", "account", "network", "pendingTransactionToasts", "createToastsFromTransactions", "TransactionsHistoryController", "clearCompletedTransactions", "BigNumber", "LogoutManager", "_LogoutManager", "getStore", "state", "tokenLogin", "tokenLoginSelector", "isNativeAuthTokenExpired", "getTokenExpiration", "getAccountProvider", "isLoggedIn", "isLoggedInSelector", "provider", "address", "addressSelector", "isWebviewLogin", "ProviderTypeEnum", "secondsUntilExpires", "expiresAt", "secondsUntilExpiresBN", "BigNumber", "plannedLogoutKey", "plannedLogoutSet", "millisecondsUntilLogout", "ToastManager", "nativeAuthConfig", "nativeAuthConfigSelector", "logoutWarningOffsetMilliseconds", "millisecondsUntilLogoutWarning", "readableMinutesUntilLogout", "getHumanReadableTokenExpirationTime", "timeoutUntilLogoutWarning", "accountLogin", "address", "provider", "apiAddress", "account", "fetchAccount", "loginAction", "newAccount", "trimUsernameDomain", "getLatestNonce", "setAccount", "registerWebsocketListener", "trackTransactions", "setGasStationMetadata", "loginWithoutNativeToken", "provider", "apiAddress", "getNetworkConfig", "address", "accountLogin", "loginWithNativeToken", "nativeAuthConfig", "token", "nativeAuthClient", "nativeAuth", "loginToken", "signature", "loginResult", "nativeAuthToken", "setTokenLogin", "extractedAddress", "extractAddressFromToken", "login", "options", "nativeAuthConfigSelector", "getState", "registerWebsocketListener", "trackTransactions", "states", "ERROR_SIGNING_TOAST_ID", "CANCEL_TRANSACTION_TOAST_ID", "errorsMap", "getUserError", "error", "key", "value", "handleSignError", "type", "originalError", "errorMessage", "errorType", "state", "toastId", "iconClassName", "title", "createCustomToast", "signTransactionsWithProvider", "provider", "transactions", "options", "refreshAccount", "isGuarded", "activeGuardianAddress", "nonce", "getAccount", "isLedger", "ProviderTypeEnum", "transactionsWithComputedNonce", "computeNonces", "transactionsToSign", "transaction", "TransactionVersion", "TransactionOptions", "Address", "signedTransactions", "setAccountNonce", "DappProvider", "provider", "options", "data", "login", "setProviderType", "setAccountProvider", "LogoutManager", "logout", "shouldShow", "transactions", "signTransactionsWithProvider", "error", "errorMessage", "handleSignError", "message", "signMessageWithProvider", "signedMessage", "verifyMessage", "accountProvider", "setAccountProvider", "provider", "getAccountProvider", "DappProvider", "emptyProvider", "setNewAccount", "address", "getAddress", "network", "getNetworkConfig", "account", "fetchAccount", "accountData", "trimUsernameDomain", "getLatestNonce", "setAccount", "e", "refreshAccount", "provider", "getAccountProvider", "customToastComponentDictionary", "customToastCloseHandlersDictionary", "addCustomToast", "customToast", "currentToastId", "getStore", "state", "lastToastIndex", "toast", "toastId", "existingToastIndex", "newToast", "removeCustomToast", "removeAllCustomToasts", "removeAllTransactionToasts", "addTransactionToast", "totalDuration", "newToastId", "getUnixTimestamp", "getUnixTimestampWithAddedMilliseconds", "removeTransactionToast", "createCustomToast", "props", "toasts", "DEFAULT_SUCCESSFUL_TOAST_LIFETIME", "LifetimeManager", "toastId", "timeout", "removeTransactionToast", "duration", "removeCustomToast", "handleClose", "customToastCloseHandlersDictionary", "successfulToastLifetime", "interval", "ToastManager", "_ToastManager", "getStore", "LifetimeManager", "NotificationsFeedManager", "successfulToastLifetime", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastId", "transaction", "status", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "totalDuration", "newToastId", "addTransactionToast", "toast", "createCustomToast", "toastList", "transactionsSessions", "account", "pendingTransactionToasts", "completedTransactionToasts", "createToastsFromTransactions", "maxTxTimestamp", "tx", "newToast", "customToastComponentDictionary", "ComponentFactory", "removeTransactionToast", "toastsElement", "handleClose", "customToastCloseHandlersDictionary", "removeCustomToast", "removeAllCustomToasts", "unsubscribe"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-QVIO2WRO.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-6BE7ZR56.mjs.map
1
+ import{a as e}from"./chunk-DE6Q5PXE.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-4EZSRRIM.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-SL7W4MV6.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-F6Y3GEEQ.mjs.map
1
+ import{a as t}from"./chunk-RNREPTUP.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-4QFG3VIF.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-CA2JFJCS.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
2
- //# sourceMappingURL=chunk-IXAT2U5R.mjs.map
1
+ import{a as e}from"./chunk-WM4UEJI2.mjs";import{createJSONStorage as o}from"zustand/middleware";var r={persistReducersStorageType:"localStorage"},i=e?o(()=>e[r.persistReducersStorageType]):void 0,p=new Map;export{r as a,i as b,p as c};
2
+ //# sourceMappingURL=chunk-5MU2SE7Z.mjs.map
@@ -1,2 +1,2 @@
1
- import{t as n}from"./chunk-HM5GQ2WF.mjs";import{a as i}from"./chunk-OJV6XRG5.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-RHOHTVC7.mjs.map
1
+ import{t as n}from"./chunk-45RXOKQM.mjs";import{a as i}from"./chunk-OJV6XRG5.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-5UPVGC4J.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-IIBVDR56.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-CA5AC6SG.mjs.map
1
+ import{a as i}from"./chunk-CWKPRAO5.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-62FT4SLW.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as e}from"./chunk-JDWBSDE5.mjs";import{b as r}from"./chunk-SAAOQW7P.mjs";function d(t=e()){return r(t).explorerAddress}export{d as a};
2
+ //# sourceMappingURL=chunk-67TGXYFM.mjs.map
@@ -0,0 +1,2 @@
1
+ var t=({config:e})=>e,o=({config:e})=>e.nativeAuthConfig,n=({config:e})=>e.walletConnectConfig;export{t as a,o as b,n as c};
2
+ //# sourceMappingURL=chunk-6JM4DPOH.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/selectors/configSelectors.ts"],
4
- "sourcesContent": ["import { StoreType } from 'store/store.types';\n\nexport const configSelector = ({ config }: StoreType) => config;\n\nexport const nativeAuthConfigSelector = ({ config }: StoreType) =>\n config.nativeAuthConfig;\n\nexport const walletConnectConfigSelector = ({ config }: StoreType) => {\n return config.walletConnectConfig;\n};\n\nexport const crossWindowConfigSelector = ({ config }: StoreType) => {\n return config.crossWindowConfig;\n};\n"],
5
- "mappings": "AAEO,IAAMA,EAAiB,CAAC,CAAE,OAAAC,CAAO,IAAiBA,EAE5CC,EAA2B,CAAC,CAAE,OAAAD,CAAO,IAChDA,EAAO,iBAEIE,EAA8B,CAAC,CAAE,OAAAF,CAAO,IAC5CA,EAAO,oBAGHG,EAA4B,CAAC,CAAE,OAAAH,CAAO,IAC1CA,EAAO",
6
- "names": ["configSelector", "config", "nativeAuthConfigSelector", "walletConnectConfigSelector", "crossWindowConfigSelector"]
4
+ "sourcesContent": ["import { StoreType } from 'store/store.types';\n\nexport const configSelector = ({ config }: StoreType) => config;\n\nexport const nativeAuthConfigSelector = ({ config }: StoreType) =>\n config.nativeAuthConfig;\n\nexport const walletConnectConfigSelector = ({ config }: StoreType) => {\n return config.walletConnectConfig;\n};\n"],
5
+ "mappings": "AAEO,IAAMA,EAAiB,CAAC,CAAE,OAAAC,CAAO,IAAiBA,EAE5CC,EAA2B,CAAC,CAAE,OAAAD,CAAO,IAChDA,EAAO,iBAEIE,EAA8B,CAAC,CAAE,OAAAF,CAAO,IAC5CA,EAAO",
6
+ "names": ["configSelector", "config", "nativeAuthConfigSelector", "walletConnectConfigSelector"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-M3YL36ZL.mjs";import{a as o}from"./chunk-QJGFIK7H.mjs";import{a as r}from"./chunk-OJV6XRG5.mjs";var p=t=>(Object.values(r).forEach(i=>{if(i!==t?.skipLoginMethod)switch(i){case r.crossWindow:{let e=o.getInstance();e.isInitialized()&&e.onDestroy();break}case r.metamask:case r.passkey:{let e=s.getInstance();e.isInitialized()&&e.dispose();break}default:break}}),null);export{p as a};
2
+ //# sourceMappingURL=chunk-74AXZS6G.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/providers/helpers/clearInitiatedLogins.ts"],
4
- "sourcesContent": ["import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { IframeProvider } from 'lib/sdkWebWalletIframeProvider';\nimport { ProviderTypeEnum, ProviderType } from '../types/providerFactory.types';\n\nexport const clearInitiatedLogins = (\n props?: {\n skipLoginMethod: ProviderType;\n } | null\n) => {\n Object.values(ProviderTypeEnum).forEach((method) => {\n if (method === props?.skipLoginMethod) {\n return;\n }\n\n switch (method) {\n case ProviderTypeEnum.crossWindow: {\n const crossWindowProvider = CrossWindowProvider.getInstance();\n if (crossWindowProvider.isInitialized()) {\n crossWindowProvider.dispose();\n }\n break;\n }\n\n case ProviderTypeEnum.metamask:\n case ProviderTypeEnum.passkey: {\n const iframeProvider = IframeProvider.getInstance();\n if (iframeProvider.isInitialized()) {\n iframeProvider.dispose();\n }\n break;\n }\n\n default:\n break;\n }\n });\n\n return null;\n};\n"],
5
- "mappings": "2HAIO,IAAMA,EACXC,IAIA,OAAO,OAAOC,CAAgB,EAAE,QAASC,GAAW,CAClD,GAAIA,IAAWF,GAAO,gBAItB,OAAQE,EAAQ,CACd,KAAKD,EAAiB,YAAa,CACjC,IAAME,EAAsBC,EAAoB,YAAY,EACxDD,EAAoB,cAAc,GACpCA,EAAoB,QAAQ,EAE9B,KACF,CAEA,KAAKF,EAAiB,SACtB,KAAKA,EAAiB,QAAS,CAC7B,IAAMI,EAAiBC,EAAe,YAAY,EAC9CD,EAAe,cAAc,GAC/BA,EAAe,QAAQ,EAEzB,KACF,CAEA,QACE,KACJ,CACF,CAAC,EAEM",
4
+ "sourcesContent": ["import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider';\nimport { IframeProvider } from 'lib/sdkWebWalletIframeProvider';\nimport { ProviderTypeEnum, ProviderType } from '../types/providerFactory.types';\n\nexport const clearInitiatedLogins = (\n props?: {\n skipLoginMethod: ProviderType;\n } | null\n) => {\n Object.values(ProviderTypeEnum).forEach((method) => {\n if (method === props?.skipLoginMethod) {\n return;\n }\n\n switch (method) {\n case ProviderTypeEnum.crossWindow: {\n const crossWindowProvider = CrossWindowProvider.getInstance();\n if (crossWindowProvider.isInitialized()) {\n // Clean up the crossWindowProvider state without triggering a full logout.\n crossWindowProvider.onDestroy();\n }\n break;\n }\n\n case ProviderTypeEnum.metamask:\n case ProviderTypeEnum.passkey: {\n const iframeProvider = IframeProvider.getInstance();\n if (iframeProvider.isInitialized()) {\n iframeProvider.dispose();\n }\n break;\n }\n\n default:\n break;\n }\n });\n\n return null;\n};\n"],
5
+ "mappings": "2HAIO,IAAMA,EACXC,IAIA,OAAO,OAAOC,CAAgB,EAAE,QAASC,GAAW,CAClD,GAAIA,IAAWF,GAAO,gBAItB,OAAQE,EAAQ,CACd,KAAKD,EAAiB,YAAa,CACjC,IAAME,EAAsBC,EAAoB,YAAY,EACxDD,EAAoB,cAAc,GAEpCA,EAAoB,UAAU,EAEhC,KACF,CAEA,KAAKF,EAAiB,SACtB,KAAKA,EAAiB,QAAS,CAC7B,IAAMI,EAAiBC,EAAe,YAAY,EAC9CD,EAAe,cAAc,GAC/BA,EAAe,QAAQ,EAEzB,KACF,CAEA,QACE,KACJ,CACF,CAAC,EAEM",
6
6
  "names": ["clearInitiatedLogins", "props", "ProviderTypeEnum", "method", "crossWindowProvider", "CrossWindowProvider", "iframeProvider", "IframeProvider"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-IIBVDR56.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-ARULSK25.mjs.map
1
+ import{a as e}from"./chunk-CWKPRAO5.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-7D4V6RXN.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-CA2JFJCS.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-A5AK7XRL.mjs.map
1
+ import{a as o}from"./chunk-WM4UEJI2.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-AFGDJKG6.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-VOS5UP5O.mjs";import{a as n}from"./chunk-QJSB5NX4.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-B5IYIF42.mjs.map
1
+ import{a as S}from"./chunk-EAJBSX6Y.mjs";import{a as s}from"./chunk-DT6YLEPL.mjs";import{c as r,d as a}from"./chunk-CAA4VJRH.mjs";import{u as e}from"./chunk-JDWBSDE5.mjs";import{a as n}from"./chunk-QJSB5NX4.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-AMRBTMHW.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-C23YOFAN.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
- //# sourceMappingURL=chunk-OXU2ZOST.mjs.map
1
+ import{a as e}from"./chunk-FIX5T67V.mjs";var i=async a=>{let r=a.map(s=>s.hash),n=await e(r);return a.map(s=>{let t=n.find(o=>o?.txHash===s.hash);return{...s,status:t?.status,invalidTransaction:t==null,results:t?.results??[],previousStatus:s.status?.toString()||"",hasStatusChanged:!!(t&&t.status!==s.status)}})};export{i as a};
2
+ //# sourceMappingURL=chunk-ANIU4M7Y.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-WM4UEJI2.mjs";var o=()=>a.localStorage;export{o as a};
2
+ //# sourceMappingURL=chunk-AX6BBS6A.mjs.map
@@ -0,0 +1,2 @@
1
+ import{u as o}from"./chunk-JDWBSDE5.mjs";import{b as t}from"./chunk-QJSB5NX4.mjs";function c(r=o()){return t(r)}export{c as a};
2
+ //# sourceMappingURL=chunk-BDC5R6IE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-Q3DOWDRB.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-IIBVDR56.mjs.map
1
+ import{a as s}from"./chunk-TW7SSATI.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-CWKPRAO5.mjs.map
@@ -0,0 +1,2 @@
1
+ var t={nativeAuthConfig:null,walletConnectConfig:null,websocketStatus:"not_initialized"};function o(){return()=>t}var i=o();export{i as a};
2
+ //# sourceMappingURL=chunk-CYCS3K6Q.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/slices/config/configSlice.ts"],
4
- "sourcesContent": ["import { StateCreator } from 'zustand/vanilla';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { StoreType, MutatorsIn } from 'store/store.types';\nimport { ConfigSliceType } from './config.types';\n\n// Do not export initial state for the config slice.\n// This will be permanently defined by the dApp at dApp initialization.\n// The config should be changed by using the `setNativeAuthConfig` action in some specific cases.\n// Preferably, the config should be set at the dApp initialization and not changed during the dApp lifecycle. (e.g. when the user logs in/log out)\nconst initialState: ConfigSliceType = {\n nativeAuthConfig: null,\n walletConnectConfig: null,\n crossWindowConfig: null,\n websocketStatus: WebsocketConnectionStatusEnum.NOT_INITIALIZED\n};\n\nfunction getConfigSlice(): StateCreator<\n StoreType,\n MutatorsIn,\n [],\n ConfigSliceType\n> {\n return () => initialState;\n}\n\nexport const configSlice = getConfigSlice();\n"],
5
- "mappings": "AASA,IAAMA,EAAgC,CACpC,iBAAkB,KAClB,oBAAqB,KACrB,kBAAmB,KACnB,iCACF,EAEA,SAASC,GAKP,CACA,MAAO,IAAMD,CACf,CAEO,IAAME,EAAcD,EAAe",
4
+ "sourcesContent": ["import { StateCreator } from 'zustand/vanilla';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { StoreType, MutatorsIn } from 'store/store.types';\nimport { ConfigSliceType } from './config.types';\n\n// Do not export initial state for the config slice.\n// This will be permanently defined by the dApp at dApp initialization.\n// The config should be changed by using the `setNativeAuthConfig` action in some specific cases.\n// Preferably, the config should be set at the dApp initialization and not changed during the dApp lifecycle. (e.g. when the user logs in/log out)\nconst initialState: ConfigSliceType = {\n nativeAuthConfig: null,\n walletConnectConfig: null,\n websocketStatus: WebsocketConnectionStatusEnum.NOT_INITIALIZED\n};\n\nfunction getConfigSlice(): StateCreator<\n StoreType,\n MutatorsIn,\n [],\n ConfigSliceType\n> {\n return () => initialState;\n}\n\nexport const configSlice = getConfigSlice();\n"],
5
+ "mappings": "AASA,IAAMA,EAAgC,CACpC,iBAAkB,KAClB,oBAAqB,KACrB,iCACF,EAEA,SAASC,GAKP,CACA,MAAO,IAAMD,CACf,CAEO,IAAME,EAAcD,EAAe",
6
6
  "names": ["initialState", "getConfigSlice", "configSlice"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-CA2JFJCS.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
- //# sourceMappingURL=chunk-QVIO2WRO.mjs.map
1
+ import{a as e}from"./chunk-WM4UEJI2.mjs";function t(){if(!e)return"";try{if(e.document.referrer)return new URL(e.document.referrer).origin;let r=e.location.ancestorOrigins;return r.length<1?"":new URL(r[r.length-1]).origin}catch(r){return console.error(r),""}}export{t as a};
2
+ //# sourceMappingURL=chunk-DE6Q5PXE.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-T227HNYP.mjs";import{a as e}from"./chunk-ZGXYSDXQ.mjs";import{a as i}from"./chunk-REI3WYXH.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-ATH4WYTD.mjs.map
1
+ import{a as s}from"./chunk-V3TLPRH6.mjs";import{a as e}from"./chunk-S7HUKPJR.mjs";import{a as i}from"./chunk-REI3WYXH.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-E2JGSUPU.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-J6CUEKO2.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-HM5GQ2WF.mjs";import{u as n}from"./chunk-VOS5UP5O.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
- //# sourceMappingURL=chunk-MAQPZJET.mjs.map
1
+ import{a as g}from"./chunk-UF3MLLO5.mjs";import{a as f}from"./chunk-FRDR4A7Z.mjs";import{t as c}from"./chunk-45RXOKQM.mjs";import{u as n}from"./chunk-JDWBSDE5.mjs";import{g as a}from"./chunk-QJSB5NX4.mjs";import{e as l}from"./chunk-VNLGNNIL.mjs";import{HWProvider as m}from"@multiversx/sdk-hw-provider";async function A(u){let v=g(),d=u?.shouldInitProvider||!v,o=l(n()),t=a(n()),r=c(),i=new m,I=async()=>{let e=o?.index!=null;if(r instanceof m&&r.isInitialized())return e&&await r.setAddressIndex(o.index),r;if(d&&!await i.init())throw new Error("Failed to initialize Ledger Provider");return e&&await i.setAddressIndex(o.index),i};try{if(!d&&t)return{ledgerProvider:i,ledgerConfig:{version:t.version,dataEnabled:t.hasContractDataEnabled}};let e=await I(),s=await f(e);return{ledgerProvider:e,ledgerConfig:s}}catch(e){throw console.error("Could not initialize ledger app",e),e}}export{A as a};
2
+ //# sourceMappingURL=chunk-E5BQL4Q3.mjs.map
@@ -1,2 +1,2 @@
1
- import{s as a}from"./chunk-VOS5UP5O.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-ZEYTUYGU.mjs.map
1
+ import{s as a}from"./chunk-JDWBSDE5.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-ERVVPCGS.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as e}from"./chunk-VOS5UP5O.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-C23YOFAN.mjs.map
1
+ import{u as e}from"./chunk-JDWBSDE5.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-FIX5T67V.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-C2LIMWMH.mjs";import{d as C,e as I}from"./chunk-JXUTUO6K.mjs";import{s as p}from"./chunk-VOS5UP5O.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-ZVOPHS4O.mjs.map
1
+ import{a as N}from"./chunk-Q2Q4XN4M.mjs";import{b}from"./chunk-W52QH7YK.mjs";import{d as C,e as I}from"./chunk-U2GG3DTS.mjs";import{s as p}from"./chunk-JDWBSDE5.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-FOTDHFWB.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-MAQPZJET.mjs";import{a as c}from"./chunk-J6CUEKO2.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-MKKFM4TT.mjs.map
1
+ import{a as l}from"./chunk-E5BQL4Q3.mjs";import{a as c}from"./chunk-UF3MLLO5.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-FTHSBLOK.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-S7HUKPJR.mjs";import{c as e,g as s}from"./chunk-R53MCZI6.mjs";async function m({message:r,provider:a,options:n}){let g=o(),i=new s({address:new e(g),data:r.data});return await a.signMessage(i,n)}export{m as a};
2
+ //# sourceMappingURL=chunk-FX2KOFY6.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/DappProvider/helpers/signMessage/signMessageWithProvider.ts"],
4
+ "sourcesContent": ["import { Message, Address } from 'lib/sdkCore';\nimport { getAddress } from 'methods/account/getAddress';\nimport { IProvider } from 'providers/types/providerFactory.types';\n\nexport type SignMessageType = {\n provider: IProvider;\n message: Message;\n options?: {\n hasConsentPopup?: boolean;\n };\n};\n\nexport async function signMessageWithProvider({\n message,\n provider,\n options\n}: SignMessageType): Promise<Message | null> {\n const address = getAddress();\n\n const messageToSign = new Message({\n address: new Address(address),\n data: message.data\n });\n\n const signedMessage = await provider.signMessage(messageToSign, options);\n\n return signedMessage;\n}\n"],
5
+ "mappings": "yFAYA,eAAsBA,EAAwB,CAC5C,QAAAC,EACA,SAAAC,EACA,QAAAC,CACF,EAA6C,CAC3C,IAAMC,EAAUC,EAAW,EAErBC,EAAgB,IAAIC,EAAQ,CAChC,QAAS,IAAIC,EAAQJ,CAAO,EAC5B,KAAMH,EAAQ,IAChB,CAAC,EAID,OAFsB,MAAMC,EAAS,YAAYI,EAAeH,CAAO,CAGzE",
6
+ "names": ["signMessageWithProvider", "message", "provider", "options", "address", "getAddress", "messageToSign", "Message", "Address"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-CA5AC6SG.mjs";import{a as s}from"./chunk-CC3JG6SH.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-ZJQDEYHR.mjs";import{b as A}from"./chunk-JXUTUO6K.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-VOS5UP5O.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-OJV6XRG5.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-MKYZXRIA.mjs.map
1
+ import{a as h}from"./chunk-62FT4SLW.mjs";import{a as s}from"./chunk-GHDVAXLU.mjs";import{a as k}from"./chunk-B2RDSGON.mjs";import{a as L}from"./chunk-67TGXYFM.mjs";import{b as A}from"./chunk-U2GG3DTS.mjs";import{a as I}from"./chunk-BRJNX4JF.mjs";import{g as p}from"./chunk-JDWBSDE5.mjs";import{a as f}from"./chunk-KD2IQ32V.mjs";import{a as x}from"./chunk-OJV6XRG5.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-GEAOPSQB.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-4QFG3VIF.mjs";import{c as n}from"./chunk-JDWBSDE5.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-GEJULV2G.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-IXBOK5RG.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
- //# sourceMappingURL=chunk-CC3JG6SH.mjs.map
1
+ import{a as w}from"./chunk-QXC4D3AC.mjs";import{a as g}from"./chunk-YGI3KXMZ.mjs";import{a as b}from"./chunk-NOU5UTAM.mjs";import{a as f}from"./chunk-6FXEHNGW.mjs";import{f as m}from"./chunk-J4CPYFK6.mjs";import x from"bignumber.js";var v=async({manager:e,provider:d})=>{if(!e||!d)throw new Error("Provider is not initialized.");let{network:u}=b(),n=e.getAccountScreenData()?.startIndex||0,r=e.getAllAccounts(),a=await w({baseURL:u.apiAddress}),l=c=>c.index>=n&&c.index<n+e.addressesPerPage,I=r.reduce((c,s)=>Object.assign(c,{[s.index]:s}),{}),A=r.filter(l),y=!!I[n];if(e.updateAccountScreen({isLoading:!y}),A.length>0){e.updateAccountScreen({accounts:A});return}try{let c=await d.getAccounts(n,e.addressesPerPage),s=c.map((t,o)=>({address:t,balance:"...",index:o+n})),L=[...r,...s],j=c.map(t=>f({address:t,baseURL:u.apiAddress})),O=await Promise.all(j),i=L.reduce((t,o)=>Object.assign(t,{[o.address]:o}),{});O.forEach(t=>{if(!t||!a||!a.price)return;let o=new x(t.balance),U=o.dividedBy(x(10).pow(18)).toFormat(4).toString();if(o.isNaN())return;let h=g({amount:m({input:t.balance}),usd:a?.price});i[t.address].balance=U,i[t.address].usdValue=h});let p=Object.values(i).sort((t,o)=>t.index-o.index),S=p.filter(l);e.updateAllAccounts(p),e.updateAccountScreen({accounts:S,isLoading:!1})}catch(c){console.error("Failed to fetch accounts:",c)}};export{v as a};
2
+ //# sourceMappingURL=chunk-GHDVAXLU.mjs.map
@@ -1,2 +1,2 @@
1
- import{u as r}from"./chunk-VOS5UP5O.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-F6Y3SXC4.mjs.map
1
+ import{u as r}from"./chunk-JDWBSDE5.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-H3C4BQA6.mjs.map