@multiversx/sdk-dapp 5.2.9 → 5.2.11

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 (597) hide show
  1. package/out/__chunks__/{chunk-FRYGY7OL.mjs → chunk-22ELCCFJ.mjs} +1 -1
  2. package/out/__chunks__/chunk-22ELCCFJ.mjs.map +7 -0
  3. package/out/__chunks__/{chunk-RN6VVJPM.mjs → chunk-2GWRGSHX.mjs} +2 -2
  4. package/out/__chunks__/chunk-3PAZABVI.mjs +2 -0
  5. package/out/__chunks__/chunk-3PAZABVI.mjs.map +7 -0
  6. package/out/__chunks__/{chunk-FUCSXJMR.mjs → chunk-3Z2CWDRX.mjs} +2 -2
  7. package/out/__chunks__/{chunk-KWE3DU6Z.mjs → chunk-4SS6EY66.mjs} +2 -2
  8. package/out/__chunks__/{chunk-LWRBWWET.mjs → chunk-5KCP7UJT.mjs} +2 -2
  9. package/out/__chunks__/{chunk-IPVALLAK.mjs → chunk-5STPHU5I.mjs} +2 -2
  10. package/out/__chunks__/{chunk-SBTMAYW7.mjs → chunk-5UEYQ2KL.mjs} +2 -2
  11. package/out/__chunks__/{chunk-VJK5HQFF.mjs → chunk-66X6B32V.mjs} +2 -2
  12. package/out/__chunks__/chunk-66X6B32V.mjs.map +7 -0
  13. package/out/__chunks__/{chunk-KFBY5KJV.mjs → chunk-6F3EV2Y4.mjs} +2 -2
  14. package/out/__chunks__/{chunk-TIJEFUI3.mjs → chunk-6NWGAFI5.mjs} +2 -2
  15. package/out/__chunks__/{chunk-XEGTQTFK.mjs → chunk-73NTM43N.mjs} +2 -2
  16. package/out/__chunks__/chunk-7CT7RHSK.mjs +2 -0
  17. package/out/__chunks__/chunk-7CT7RHSK.mjs.map +7 -0
  18. package/out/__chunks__/{chunk-M42UYGCH.mjs → chunk-7Z26MA4H.mjs} +2 -2
  19. package/out/__chunks__/{chunk-VRLS225Q.mjs → chunk-ABBDCZHP.mjs} +1 -1
  20. package/out/__chunks__/{chunk-VRLS225Q.mjs.map → chunk-ABBDCZHP.mjs.map} +1 -1
  21. package/out/__chunks__/{chunk-LJVBVKNW.mjs → chunk-AU76TGKZ.mjs} +2 -2
  22. package/out/__chunks__/{chunk-NJWQNAUZ.mjs → chunk-BDZ33IMP.mjs} +2 -2
  23. package/out/__chunks__/{chunk-HFY2UB7E.mjs → chunk-BHLMFKLS.mjs} +2 -2
  24. package/out/__chunks__/{chunk-6AC63JD5.mjs → chunk-BOJYDCZ5.mjs} +2 -2
  25. package/out/__chunks__/chunk-BOJYDCZ5.mjs.map +7 -0
  26. package/out/__chunks__/chunk-BQS32EX5.mjs +2 -0
  27. package/out/__chunks__/chunk-BQS32EX5.mjs.map +7 -0
  28. package/out/__chunks__/{chunk-SNZWFOV6.mjs → chunk-BWBYU7R4.mjs} +2 -2
  29. package/out/__chunks__/chunk-BWBYU7R4.mjs.map +7 -0
  30. package/out/__chunks__/{chunk-76YR7YQD.mjs → chunk-BXQLGIN7.mjs} +2 -2
  31. package/out/__chunks__/{chunk-LUG3RRVN.mjs → chunk-C2LXUREL.mjs} +2 -2
  32. package/out/__chunks__/chunk-C7S2TI5Y.mjs +2 -0
  33. package/out/__chunks__/{chunk-FUFSHVR2.mjs → chunk-CG2SW6XW.mjs} +2 -2
  34. package/out/__chunks__/{chunk-QJ3Y35H5.mjs → chunk-CMFJB4UN.mjs} +2 -2
  35. package/out/__chunks__/chunk-CP36QS3V.mjs +2 -0
  36. package/out/__chunks__/{chunk-Q3DHKVPY.mjs → chunk-D52CJHAM.mjs} +2 -2
  37. package/out/__chunks__/chunk-D5UNIS2B.mjs +2 -0
  38. package/out/__chunks__/chunk-DJOKOGGV.mjs +2 -0
  39. package/out/__chunks__/chunk-DJOKOGGV.mjs.map +7 -0
  40. package/out/__chunks__/{chunk-QQIPTRF4.mjs → chunk-DRPJ3IFU.mjs} +1 -1
  41. package/out/__chunks__/{chunk-QQIPTRF4.mjs.map → chunk-DRPJ3IFU.mjs.map} +1 -1
  42. package/out/__chunks__/chunk-DSC7OKM6.mjs +2 -0
  43. package/out/__chunks__/{chunk-7KWGOZI4.mjs → chunk-EEZK3T5O.mjs} +2 -2
  44. package/out/__chunks__/{chunk-GRQOTJQA.mjs → chunk-ENBZNLXA.mjs} +2 -2
  45. package/out/__chunks__/{chunk-T6GTSLQD.mjs → chunk-EZOGRX23.mjs} +2 -2
  46. package/out/__chunks__/{chunk-DMI2O4KV.mjs → chunk-F5JYH2GE.mjs} +2 -2
  47. package/out/__chunks__/chunk-FCIYC4FM.mjs +2 -0
  48. package/out/__chunks__/chunk-FEP3SR47.mjs +2 -0
  49. package/out/__chunks__/chunk-FEYKZZ67.mjs +2 -0
  50. package/out/__chunks__/chunk-FEYKZZ67.mjs.map +7 -0
  51. package/out/__chunks__/{chunk-PIFEYU34.mjs → chunk-FJAJCSAI.mjs} +2 -2
  52. package/out/__chunks__/chunk-FL33O3CM.mjs +2 -0
  53. package/out/__chunks__/chunk-FL33O3CM.mjs.map +7 -0
  54. package/out/__chunks__/{chunk-HX72KRC4.mjs → chunk-FPKFAJNW.mjs} +2 -2
  55. package/out/__chunks__/{chunk-ERE5BVRC.mjs → chunk-G26FRQE7.mjs} +2 -2
  56. package/out/__chunks__/{chunk-F24X6WMA.mjs → chunk-G7FYMZJO.mjs} +2 -2
  57. package/out/__chunks__/{chunk-FLOLQ4JL.mjs → chunk-GC3EGW65.mjs} +2 -2
  58. package/out/__chunks__/chunk-GO33UPCG.mjs +2 -0
  59. package/out/__chunks__/chunk-H5OF5YQF.mjs +2 -0
  60. package/out/__chunks__/{chunk-ZVFOG6LB.mjs.map → chunk-H5OF5YQF.mjs.map} +2 -2
  61. package/out/__chunks__/chunk-HD6AKORP.mjs +2 -0
  62. package/out/__chunks__/{chunk-L2GQHTCM.mjs.map → chunk-HD6AKORP.mjs.map} +2 -2
  63. package/out/__chunks__/{chunk-ZGMIL4MG.mjs → chunk-HMAL7GVA.mjs} +2 -2
  64. package/out/__chunks__/{chunk-7W4P5SLS.mjs → chunk-HWI2QO32.mjs} +2 -2
  65. package/out/__chunks__/chunk-I6JLRP5Y.mjs +2 -0
  66. package/out/__chunks__/chunk-IECHAN5Y.mjs +2 -0
  67. package/out/__chunks__/chunk-IJTXME3Q.mjs +2 -0
  68. package/out/__chunks__/{chunk-TDUG36NZ.mjs.map → chunk-IJTXME3Q.mjs.map} +3 -3
  69. package/out/__chunks__/{chunk-H6V6JDWW.mjs → chunk-J4GRXGQI.mjs} +2 -2
  70. package/out/__chunks__/{chunk-S2PH3P53.mjs → chunk-J5MXSFGF.mjs} +2 -2
  71. package/out/__chunks__/{chunk-ALOBJ2YK.mjs → chunk-JFWHJ7VA.mjs} +2 -2
  72. package/out/__chunks__/chunk-JLDDNS5Y.mjs +2 -0
  73. package/out/__chunks__/chunk-JOXEQBHW.mjs +2 -0
  74. package/out/__chunks__/{chunk-XQESHZ2X.mjs → chunk-JUX7RQED.mjs} +2 -2
  75. package/out/__chunks__/{chunk-2MRPKTZ3.mjs → chunk-KSC3RFHN.mjs} +2 -2
  76. package/out/__chunks__/chunk-LAOAFA7S.mjs +2 -0
  77. package/out/__chunks__/chunk-LAOAFA7S.mjs.map +7 -0
  78. package/out/__chunks__/{chunk-GGXK3235.mjs → chunk-LBFTX44W.mjs} +2 -2
  79. package/out/__chunks__/{chunk-SP4B7UYK.mjs → chunk-LQ3UGB46.mjs} +2 -2
  80. package/out/__chunks__/{chunk-DVWQ3NWJ.mjs → chunk-MODSKR2X.mjs} +2 -2
  81. package/out/__chunks__/chunk-NI7XCWV5.mjs +2 -0
  82. package/out/__chunks__/chunk-NKZX4KJF.mjs +2 -0
  83. package/out/__chunks__/{chunk-B2YXNEOP.mjs → chunk-NWJYEKI2.mjs} +1 -1
  84. package/out/__chunks__/{chunk-B2YXNEOP.mjs.map → chunk-NWJYEKI2.mjs.map} +1 -1
  85. package/out/__chunks__/{chunk-52A7HOT5.mjs → chunk-O4PUBLYW.mjs} +2 -2
  86. package/out/__chunks__/{chunk-QNBPNTH7.mjs → chunk-OHK76MFX.mjs} +2 -2
  87. package/out/__chunks__/{chunk-4SNEBLCL.mjs → chunk-OR3D6ZH4.mjs} +2 -2
  88. package/out/__chunks__/{chunk-4SNEBLCL.mjs.map → chunk-OR3D6ZH4.mjs.map} +1 -1
  89. package/out/__chunks__/{chunk-KDWLSBQB.mjs → chunk-PMHRZ5Y7.mjs} +1 -1
  90. package/out/__chunks__/{chunk-KDWLSBQB.mjs.map → chunk-PMHRZ5Y7.mjs.map} +1 -1
  91. package/out/__chunks__/chunk-Q7KYVZUM.mjs +2 -0
  92. package/out/__chunks__/{chunk-DSPRERV6.mjs → chunk-Q7TZ6C22.mjs} +2 -2
  93. package/out/__chunks__/{chunk-HF4QPAWD.mjs → chunk-QAAOGNH4.mjs} +2 -2
  94. package/out/__chunks__/{chunk-CCBYPSXO.mjs → chunk-QG4NGBHS.mjs} +2 -2
  95. package/out/__chunks__/chunk-QG4NGBHS.mjs.map +7 -0
  96. package/out/__chunks__/{chunk-7Y3FYVL4.mjs → chunk-QN2SFLFO.mjs} +2 -2
  97. package/out/__chunks__/chunk-QOP5T5R4.mjs +2 -0
  98. package/out/__chunks__/chunk-QOP5T5R4.mjs.map +7 -0
  99. package/out/__chunks__/{chunk-BPOW3DAB.mjs → chunk-R6UWDERK.mjs} +2 -2
  100. package/out/__chunks__/{chunk-5QUMAPUC.mjs → chunk-RDTT74OC.mjs} +2 -2
  101. package/out/__chunks__/{chunk-5AVHNKDZ.mjs → chunk-REYJ4EFS.mjs} +2 -2
  102. package/out/__chunks__/chunk-SERW2VL6.mjs +2 -0
  103. package/out/__chunks__/{chunk-IGA3PYLZ.mjs → chunk-SINQBCBO.mjs} +2 -2
  104. package/out/__chunks__/{chunk-BC4ZQOAE.mjs → chunk-SQ3EODA7.mjs} +2 -2
  105. package/out/__chunks__/{chunk-MHF7JB3Y.mjs → chunk-STNUKKSC.mjs} +2 -2
  106. package/out/__chunks__/chunk-SVR3TUOY.mjs +1 -0
  107. package/out/__chunks__/{chunk-SORO3SMC.mjs → chunk-U6FDF6V4.mjs} +2 -2
  108. package/out/__chunks__/{chunk-KBTIQKEL.mjs → chunk-UWUJKOLU.mjs} +2 -2
  109. package/out/__chunks__/chunk-UXPWG7TI.mjs +2 -0
  110. package/out/__chunks__/{chunk-GWFOJPML.mjs.map → chunk-UXPWG7TI.mjs.map} +1 -1
  111. package/out/__chunks__/{chunk-42P7WSDZ.mjs → chunk-VFY6KWJ2.mjs} +2 -2
  112. package/out/__chunks__/{chunk-TLSLNBIX.mjs → chunk-W3L462S3.mjs} +2 -2
  113. package/out/__chunks__/{chunk-UOD2UO27.mjs → chunk-WCEZVGFB.mjs} +2 -2
  114. package/out/__chunks__/{chunk-G5TDTAQH.mjs → chunk-WNJKPQDV.mjs} +2 -2
  115. package/out/__chunks__/{chunk-7HH5AHJM.mjs → chunk-WPNLIPMJ.mjs} +2 -2
  116. package/out/__chunks__/{chunk-U2TDA5B2.mjs → chunk-XGW74YF7.mjs} +2 -2
  117. package/out/__chunks__/chunk-XGW74YF7.mjs.map +7 -0
  118. package/out/__chunks__/chunk-XJ4DOOWN.mjs +2 -0
  119. package/out/__chunks__/chunk-XUUR76YU.mjs +2 -0
  120. package/out/__chunks__/{chunk-YHLBPZNN.mjs → chunk-XVPO7ZMT.mjs} +2 -2
  121. package/out/__chunks__/{chunk-ACMDU3QF.mjs → chunk-YGMSU5HA.mjs} +2 -2
  122. package/out/__chunks__/chunk-YJCTRUJT.mjs +2 -0
  123. package/out/__chunks__/{chunk-BRJNX4JF.mjs.map → chunk-YJCTRUJT.mjs.map} +2 -2
  124. package/out/__chunks__/chunk-ZD74AW3C.mjs +2 -0
  125. package/out/__chunks__/chunk-ZNPHUPAP.mjs +2 -0
  126. package/out/__chunks__/{chunk-YB5TSLJV.mjs → chunk-ZQEBGI5N.mjs} +2 -2
  127. package/out/__chunks__/{chunk-MWVWSB7G.mjs → chunk-ZRN5QF4U.mjs} +2 -2
  128. package/out/__chunks__/{chunk-PJBXLDBG.mjs → chunk-ZVF3CROB.mjs} +2 -2
  129. package/out/apiCalls/account/getAccountFromApi.mjs +1 -1
  130. package/out/apiCalls/account/getScamAddressData.mjs +1 -1
  131. package/out/apiCalls/account/index.mjs +1 -1
  132. package/out/apiCalls/configuration/getCleanApiAddress.mjs +1 -1
  133. package/out/apiCalls/configuration/getGasStationMetadata.mjs +1 -1
  134. package/out/apiCalls/index.mjs +1 -1
  135. package/out/apiCalls/tokens/getPersistedToken.mjs +1 -1
  136. package/out/apiCalls/tokens/getPersistedTokenDetails.mjs +1 -1
  137. package/out/apiCalls/tokens/getTokenDetails.mjs +1 -1
  138. package/out/apiCalls/tokens/index.mjs +1 -1
  139. package/out/apiCalls/transactions/getServerTransactionsByHashes.mjs +1 -1
  140. package/out/apiCalls/transactions/getTransactionByHash.mjs +1 -1
  141. package/out/apiCalls/transactions/getTransactionsByHashes.cjs +1 -1
  142. package/out/apiCalls/transactions/getTransactionsByHashes.cjs.map +2 -2
  143. package/out/apiCalls/transactions/getTransactionsByHashes.mjs +1 -1
  144. package/out/constants/browser.constants.mjs +1 -1
  145. package/out/constants/index.mjs +1 -1
  146. package/out/constants/network.constants.mjs +1 -1
  147. package/out/constants/storage.constants.mjs +1 -1
  148. package/out/constants/window.constants.cjs +1 -1
  149. package/out/constants/window.constants.cjs.map +1 -1
  150. package/out/constants/window.constants.mjs +1 -1
  151. package/out/controllers/TransactionsHistoryController/TransactionsHistoryController.mjs +1 -1
  152. package/out/controllers/TransactionsHistoryController/index.mjs +1 -1
  153. package/out/controllers/TransactionsTableController/TransactionsTableController.cjs.map +2 -2
  154. package/out/controllers/TransactionsTableController/TransactionsTableController.mjs +1 -1
  155. package/out/controllers/TransactionsTableController/index.mjs +1 -1
  156. package/out/index.mjs +1 -1
  157. package/out/lib/sdkDappUI.components.cjs +2 -0
  158. package/out/lib/sdkDappUI.components.cjs.map +7 -0
  159. package/out/lib/sdkDappUI.components.d.ts +1 -0
  160. package/out/lib/sdkDappUI.components.mjs +2 -0
  161. package/out/lib/sdkDappUI.components.mjs.map +7 -0
  162. package/out/lib/sdkDappUi.cjs +1 -1
  163. package/out/lib/sdkDappUi.cjs.map +3 -3
  164. package/out/lib/sdkDappUi.d.ts +0 -1
  165. package/out/lib/sdkDappUi.mjs +1 -1
  166. package/out/managers/LogoutManager/LogoutManager.cjs +1 -1
  167. package/out/managers/LogoutManager/LogoutManager.cjs.map +3 -3
  168. package/out/managers/LogoutManager/LogoutManager.mjs +1 -1
  169. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs +1 -1
  170. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.cjs.map +3 -3
  171. package/out/managers/NotificationsFeedManager/NotificationsFeedManager.mjs +1 -1
  172. package/out/managers/NotificationsFeedManager/index.mjs +1 -1
  173. package/out/managers/ToastManager/ToastManager.cjs +1 -1
  174. package/out/managers/ToastManager/ToastManager.cjs.map +2 -2
  175. package/out/managers/ToastManager/ToastManager.mjs +1 -1
  176. package/out/managers/ToastManager/ToastUICoordinator.mjs +1 -1
  177. package/out/managers/ToastManager/helpers/LifetimeManager.mjs +1 -1
  178. package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs +1 -1
  179. package/out/managers/ToastManager/helpers/createToastsFromTransactions.cjs.map +3 -3
  180. package/out/managers/ToastManager/helpers/createToastsFromTransactions.d.ts +1 -3
  181. package/out/managers/ToastManager/helpers/createToastsFromTransactions.mjs +1 -1
  182. package/out/managers/ToastManager/helpers/createTransactionToast.mjs +1 -1
  183. package/out/managers/ToastManager/helpers/getToastDataStateByStatus.mjs +1 -1
  184. package/out/managers/ToastManager/helpers/getToastTransactionsStatus.mjs +1 -1
  185. package/out/managers/ToastManager/helpers/tests/mocks/transactions.d.ts +0 -20
  186. package/out/managers/ToastManager/index.mjs +1 -1
  187. package/out/managers/ToastManager/tests/helpers/createStoreStub.d.ts +2 -0
  188. package/out/managers/TransactionManager/TransactionManager.mjs +1 -1
  189. package/out/managers/TransactionManager/helpers/getAreTransactionsCorssShards.mjs +1 -1
  190. package/out/managers/TransactionManager/helpers/getToastDuration.mjs +1 -1
  191. package/out/managers/TransactionManager/helpers/getTransactionsStatus.mjs +1 -1
  192. package/out/managers/TransactionManager/index.mjs +1 -1
  193. package/out/managers/UnlockPanelManager/UnlockPanelManager.mjs +1 -1
  194. package/out/managers/UnlockPanelManager/index.mjs +1 -1
  195. package/out/managers/index.mjs +1 -1
  196. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.cjs.map +1 -1
  197. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.d.ts +1 -1
  198. package/out/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.mjs +1 -1
  199. package/out/managers/internal/LedgerConnectStateManager/index.mjs +1 -1
  200. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.cjs +1 -1
  201. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.cjs.map +3 -3
  202. package/out/managers/internal/LedgerIdleStateManager/LedgerIdleStateManager.mjs +1 -1
  203. package/out/managers/internal/PendingTransactionsStateManager/PendingTransactionsStateManager.mjs +1 -1
  204. package/out/managers/internal/PendingTransactionsStateManager/index.mjs +1 -1
  205. package/out/managers/internal/SidePanelBaseManager/SidePanelBaseManager.mjs +1 -1
  206. package/out/managers/internal/SidePanelBaseManager/index.mjs +1 -1
  207. package/out/managers/internal/SignTransactionsStateManager/SignTransactionsStateManager.mjs +1 -1
  208. package/out/managers/internal/SignTransactionsStateManager/index.mjs +1 -1
  209. package/out/managers/internal/UIBaseManager/UIBaseManager.mjs +1 -1
  210. package/out/managers/internal/WalletConnectStateManager/WalletConnectStateManager.mjs +1 -1
  211. package/out/managers/internal/WalletConnectStateManager/index.mjs +1 -1
  212. package/out/managers/internal/index.mjs +1 -1
  213. package/out/methods/account/getAccount.mjs +1 -1
  214. package/out/methods/account/getAccountInfo.mjs +1 -1
  215. package/out/methods/account/getAddress.mjs +1 -1
  216. package/out/methods/account/getIsLoggedIn.mjs +1 -1
  217. package/out/methods/account/getLatestNonce.mjs +1 -1
  218. package/out/methods/initApp/gastStationMetadata/setGasStationMetadata.mjs +1 -1
  219. package/out/methods/initApp/initApp.mjs +1 -1
  220. package/out/methods/initApp/initApp.mjs.map +1 -1
  221. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs +1 -1
  222. package/out/methods/initApp/websocket/initializeWebsocketConnection.cjs.map +1 -1
  223. package/out/methods/initApp/websocket/initializeWebsocketConnection.mjs +1 -1
  224. package/out/methods/initApp/websocket/registerWebsocket.mjs +1 -1
  225. package/out/methods/loginInfo/getLoginInfo.mjs +1 -1
  226. package/out/methods/network/getEgldLabel.mjs +1 -1
  227. package/out/methods/network/getExplorerAddress.mjs +1 -1
  228. package/out/methods/network/getNetworkConfig.mjs +1 -1
  229. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.cjs +1 -1
  230. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.cjs.map +3 -3
  231. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.mjs +1 -1
  232. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.cjs +2 -0
  233. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.cjs.map +7 -0
  234. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{checkBatch.d.ts → helpers/checkBatch/checkBatch.d.ts} +1 -1
  235. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.mjs +2 -0
  236. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{runSessionCallbacks.cjs → helpers/checkBatch/helpers/runSessionCallbacks.cjs} +1 -1
  237. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{runSessionCallbacks.cjs.map → helpers/checkBatch/helpers/runSessionCallbacks.cjs.map} +1 -1
  238. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{runSessionCallbacks.d.ts → helpers/checkBatch/helpers/runSessionCallbacks.d.ts} +1 -1
  239. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runSessionCallbacks.mjs +2 -0
  240. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.cjs +2 -0
  241. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.cjs.map +7 -0
  242. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.d.ts +5 -0
  243. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionFailure.mjs +2 -0
  244. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.cjs +2 -0
  245. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.cjs.map +7 -0
  246. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.d.ts +13 -0
  247. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs +2 -0
  248. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{updateTransactionAndSessionStatus.cjs → helpers/checkBatch/helpers/updateTransactionAndSessionStatus.cjs} +1 -1
  249. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{updateTransactionAndSessionStatus.cjs.map → helpers/checkBatch/helpers/updateTransactionAndSessionStatus.cjs.map} +3 -3
  250. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.d.ts +3 -0
  251. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs +2 -0
  252. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.cjs +2 -0
  253. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.cjs.map +7 -0
  254. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.d.ts +1 -0
  255. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs +2 -0
  256. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/index.mjs.map +7 -0
  257. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{getPendingTransactions.cjs → helpers/getPendingTransactions.cjs} +1 -1
  258. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{getPendingTransactions.cjs.map → helpers/getPendingTransactions.cjs.map} +1 -1
  259. package/out/methods/trackTransactions/helpers/checkTransactionStatus/{getPendingTransactions.d.ts → helpers/getPendingTransactions.d.ts} +1 -1
  260. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/getPendingTransactions.mjs +2 -0
  261. package/out/methods/trackTransactions/helpers/checkTransactionStatus/helpers/getPendingTransactions.mjs.map +7 -0
  262. package/out/methods/trackTransactions/helpers/checkTransactionStatus/index.mjs +1 -1
  263. package/out/methods/trackTransactions/helpers/getPollingInterval.mjs +1 -1
  264. package/out/methods/trackTransactions/trackTransactions.cjs +1 -1
  265. package/out/methods/trackTransactions/trackTransactions.cjs.map +3 -3
  266. package/out/methods/trackTransactions/trackTransactions.mjs +1 -1
  267. package/out/methods/transactions/getFailedTransactions.mjs +1 -1
  268. package/out/methods/transactions/getFailedTransactionsSessions.mjs +1 -1
  269. package/out/methods/transactions/getPendingTransactions.mjs +1 -1
  270. package/out/methods/transactions/getPendingTransactionsSessions.mjs +1 -1
  271. package/out/methods/transactions/getSuccessfulTransactions.mjs +1 -1
  272. package/out/methods/transactions/getSuccessfulTransactionsSessions.mjs +1 -1
  273. package/out/methods/transactions/getTransactionSessions.mjs +1 -1
  274. package/out/providers/DappProvider/DappProvider.mjs +1 -1
  275. package/out/providers/DappProvider/helpers/login/helpers/accountLogin.mjs +1 -1
  276. package/out/providers/DappProvider/helpers/login/helpers/extractAddressFromToken.mjs +1 -1
  277. package/out/providers/DappProvider/helpers/login/helpers/getAccountFromToken.mjs +1 -1
  278. package/out/providers/DappProvider/helpers/login/helpers/getModifiedLoginToken.mjs +1 -1
  279. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.cjs +2 -0
  280. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.cjs.map +7 -0
  281. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.d.ts +7 -0
  282. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs +2 -0
  283. package/out/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.mjs.map +7 -0
  284. package/out/providers/DappProvider/helpers/login/login.cjs +1 -1
  285. package/out/providers/DappProvider/helpers/login/login.cjs.map +3 -3
  286. package/out/providers/DappProvider/helpers/login/login.mjs +1 -1
  287. package/out/providers/DappProvider/helpers/logout/logout.cjs +1 -1
  288. package/out/providers/DappProvider/helpers/logout/logout.cjs.map +2 -2
  289. package/out/providers/DappProvider/helpers/logout/logout.mjs +1 -1
  290. package/out/providers/DappProvider/helpers/signErrors/handleSignError.cjs.map +2 -2
  291. package/out/providers/DappProvider/helpers/signErrors/handleSignError.mjs +1 -1
  292. package/out/providers/DappProvider/helpers/signMessage/signMessageWithProvider.mjs +1 -1
  293. package/out/providers/DappProvider/helpers/signTransactions/signTransactionsWithProvider.mjs +1 -1
  294. package/out/providers/DappProvider/index.mjs +1 -1
  295. package/out/providers/ProviderFactory.mjs +1 -1
  296. package/out/providers/helpers/accountProvider.mjs +1 -1
  297. package/out/providers/helpers/cancelCrossWindowAction.mjs +1 -1
  298. package/out/providers/helpers/restoreProvider.mjs +1 -1
  299. package/out/providers/index.mjs +1 -1
  300. package/out/providers/strategies/BaseProviderStrategy/BaseProviderStrategy.mjs +1 -1
  301. package/out/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.mjs +1 -1
  302. package/out/providers/strategies/CrossWindowProviderStrategy/index.mjs +1 -1
  303. package/out/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.mjs +1 -1
  304. package/out/providers/strategies/ExtensionProviderStrategy/index.mjs +1 -1
  305. package/out/providers/strategies/IframeProviderStrategy/IframeProviderStrategy.mjs +1 -1
  306. package/out/providers/strategies/IframeProviderStrategy/index.mjs +1 -1
  307. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs +1 -1
  308. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.cjs.map +3 -3
  309. package/out/providers/strategies/LedgerProviderStrategy/LedgerProviderStrategy.mjs +1 -1
  310. package/out/providers/strategies/LedgerProviderStrategy/helpers/authenticateLedgerAccount.mjs +1 -1
  311. package/out/providers/strategies/LedgerProviderStrategy/helpers/getAuthTokenText.mjs +1 -1
  312. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerConfiguration.mjs +1 -1
  313. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerProvider.mjs +1 -1
  314. package/out/providers/strategies/LedgerProviderStrategy/helpers/getLedgerVersionOptions.mjs +1 -1
  315. package/out/providers/strategies/LedgerProviderStrategy/helpers/index.mjs +1 -1
  316. package/out/providers/strategies/LedgerProviderStrategy/helpers/initializeLedgerProvider.mjs +1 -1
  317. package/out/providers/strategies/LedgerProviderStrategy/helpers/signLedgerMessage.mjs +1 -1
  318. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/index.mjs +1 -1
  319. package/out/providers/strategies/LedgerProviderStrategy/helpers/updateAccountsList/updateAccountsList.mjs +1 -1
  320. package/out/providers/strategies/LedgerProviderStrategy/index.mjs +1 -1
  321. package/out/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.mjs +1 -1
  322. package/out/providers/strategies/WalletConnectProviderStrategy/index.mjs +1 -1
  323. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/WebviewClient.mjs +1 -1
  324. package/out/providers/strategies/WebviewProviderStrategy/WebviewClient/index.mjs +1 -1
  325. package/out/providers/strategies/WebviewProviderStrategy/WebviewProviderStrategy.mjs +1 -1
  326. package/out/providers/strategies/WebviewProviderStrategy/index.mjs +1 -1
  327. package/out/providers/strategies/helpers/getPendingTransactionsHandlers.mjs +1 -1
  328. package/out/providers/strategies/helpers/index.mjs +1 -1
  329. package/out/providers/strategies/helpers/signMessage/signMessage.mjs +1 -1
  330. package/out/providers/strategies/helpers/signTransactions/helpers/calculateFeeLimit.mjs +1 -1
  331. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/getCommonData.mjs +1 -1
  332. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/decodeDataField.mjs +1 -1
  333. package/out/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getExtractTransactionsInfo.mjs +1 -1
  334. package/out/providers/strategies/helpers/signTransactions/helpers/getFeeData.mjs +1 -1
  335. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/getMultiEsdtTransferData.mjs +1 -1
  336. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/getTokenFromData.mjs +1 -1
  337. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferData.mjs +1 -1
  338. package/out/providers/strategies/helpers/signTransactions/helpers/getMultiEsdtTransferData/helpers/parseMultiEsdtTransferDataForMultipleTransactions.mjs +1 -1
  339. package/out/providers/strategies/helpers/signTransactions/helpers/guardTransactions/guardTransactions.mjs +1 -1
  340. package/out/providers/strategies/helpers/signTransactions/signTransactions.mjs +1 -1
  341. package/out/providers/strategies/index.mjs +1 -1
  342. package/out/react/account/useGetAccount.mjs +1 -1
  343. package/out/react/account/useGetAccountInfo.mjs +1 -1
  344. package/out/react/account/useGetIsLoggedIn.mjs +1 -1
  345. package/out/react/account/useGetLatestNonce.mjs +1 -1
  346. package/out/react/index.mjs +1 -1
  347. package/out/react/loginInfo/useGetLoginInfo.mjs +1 -1
  348. package/out/react/network/useGetNetworkConfig.mjs +1 -1
  349. package/out/react/store/getReactStore.mjs +1 -1
  350. package/out/react/store/useSelector.mjs +1 -1
  351. package/out/react/transactions/useGetFailedTransactions.mjs +1 -1
  352. package/out/react/transactions/useGetFailedTransactionsSessions.mjs +1 -1
  353. package/out/react/transactions/useGetPendingTransactions.mjs +1 -1
  354. package/out/react/transactions/useGetPendingTransactionsSessions.mjs +1 -1
  355. package/out/react/transactions/useGetSuccessfulTransactions.mjs +1 -1
  356. package/out/react/transactions/useGetSuccessfulTransactionsSessions.mjs +1 -1
  357. package/out/react/transactions/useGetTransactionSessions.mjs +1 -1
  358. package/out/services/index.mjs +1 -1
  359. package/out/services/nativeAuth/index.mjs +1 -1
  360. package/out/services/nativeAuth/methods/buildNativeAuthConfig.mjs +1 -1
  361. package/out/services/nativeAuth/methods/getDefaultNativeAuthConfig.mjs +1 -1
  362. package/out/services/nativeAuth/methods/index.mjs +1 -1
  363. package/out/services/nativeAuth/nativeAuth.mjs +1 -1
  364. package/out/store/actions/account/accountActions.mjs +1 -1
  365. package/out/store/actions/account/index.mjs +1 -1
  366. package/out/store/actions/cache/cacheActions.mjs +1 -1
  367. package/out/store/actions/cache/index.mjs +1 -1
  368. package/out/store/actions/config/configActions.mjs +1 -1
  369. package/out/store/actions/config/index.mjs +1 -1
  370. package/out/store/actions/index.mjs +1 -1
  371. package/out/store/actions/loginInfo/loginInfoActions.mjs +1 -1
  372. package/out/store/actions/network/index.mjs +1 -1
  373. package/out/store/actions/network/initializeNetwork.mjs +1 -1
  374. package/out/store/actions/network/networkActions.mjs +1 -1
  375. package/out/store/actions/sharedActions/index.mjs +1 -1
  376. package/out/store/actions/sharedActions/sharedActions.mjs +1 -1
  377. package/out/store/actions/toasts/index.mjs +1 -1
  378. package/out/store/actions/toasts/toastsActions.mjs +1 -1
  379. package/out/store/actions/transactions/transactionStateByStatus.mjs +1 -1
  380. package/out/store/actions/transactions/transactionsActions.mjs +1 -1
  381. package/out/store/actions/ui/index.mjs +1 -1
  382. package/out/store/actions/ui/uiActions.mjs +1 -1
  383. package/out/store/middleware/applyMiddlewares.mjs +1 -1
  384. package/out/store/middleware/index.mjs +1 -1
  385. package/out/store/middleware/logoutMiddleware.mjs +1 -1
  386. package/out/store/selectors/transactionsSelector.mjs +1 -1
  387. package/out/store/storage/index.mjs +1 -1
  388. package/out/store/storage/storageCallback.mjs +1 -1
  389. package/out/store/store.mjs +1 -1
  390. package/out/types/enums.types.cjs.map +1 -1
  391. package/out/types/enums.types.mjs +1 -1
  392. package/out/types/index.mjs +1 -1
  393. package/out/types/serverTransactions.types.cjs.map +1 -1
  394. package/out/types/serverTransactions.types.mjs +1 -1
  395. package/out/types/transactions.types.cjs.map +2 -2
  396. package/out/types/transactions.types.d.ts +1 -0
  397. package/out/types/transactions.types.mjs.map +2 -2
  398. package/out/utils/ComponentFactory.mjs +1 -1
  399. package/out/utils/account/fetchAccount.mjs +1 -1
  400. package/out/utils/account/index.mjs +1 -1
  401. package/out/utils/account/refreshAccount.mjs +1 -1
  402. package/out/utils/account/refreshNativeAuthTokenLogin.mjs +1 -1
  403. package/out/utils/index.mjs +1 -1
  404. package/out/utils/transactions/getActiveTransactionsStatus.mjs +1 -1
  405. package/out/utils/transactions/getDecodedDataField/getDecodedDataField.mjs +1 -1
  406. package/out/utils/transactions/getDecodedDataField/helpers/decodeByMethod.mjs +1 -1
  407. package/out/utils/transactions/getDecodedDataField/helpers/decodeHighlight.mjs +1 -1
  408. package/out/utils/transactions/getDecodedDataField/helpers/getDecodedParts.mjs +1 -1
  409. package/out/utils/transactions/getDecodedDataField/helpers/getDisplayValueAndValidationWarnings.mjs +1 -1
  410. package/out/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.mjs +1 -1
  411. package/out/utils/transactions/getDecodedDataField/helpers/index.mjs +1 -1
  412. package/out/utils/transactions/getDecodedDataField/index.mjs +1 -1
  413. package/out/utils/transactions/getExplorerLink.cjs +1 -1
  414. package/out/utils/transactions/getExplorerLink.cjs.map +2 -2
  415. package/out/utils/transactions/getExplorerLink.mjs +1 -1
  416. package/out/utils/transactions/getInterpretedTransaction/getInterpretedTransaction.mjs +1 -1
  417. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/constants.mjs +1 -1
  418. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/getTransactionValue.mjs +1 -1
  419. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getValueFromOperations.mjs +1 -1
  420. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/getVisibleOperations.mjs +1 -1
  421. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/helpers/index.mjs +1 -1
  422. package/out/utils/transactions/getInterpretedTransaction/getTransactionValue/index.mjs +1 -1
  423. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.cjs +1 -1
  424. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.cjs.map +2 -2
  425. package/out/utils/transactions/getInterpretedTransaction/helpers/getLockedAccountName.mjs +1 -1
  426. package/out/utils/transactions/getInterpretedTransaction/helpers/getReceiptMessage.mjs +1 -1
  427. package/out/utils/transactions/getInterpretedTransaction/helpers/getShardText.mjs +1 -1
  428. package/out/utils/transactions/getInterpretedTransaction/helpers/getTokenFromData.mjs +1 -1
  429. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.cjs +1 -1
  430. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.cjs.map +3 -3
  431. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.d.ts +1 -1
  432. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.mjs +1 -1
  433. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMessages.mjs +1 -1
  434. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionMethod.mjs +1 -1
  435. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionStatus.mjs +1 -1
  436. package/out/utils/transactions/getInterpretedTransaction/helpers/getTransactionTransferType.mjs +1 -1
  437. package/out/utils/transactions/getInterpretedTransaction/helpers/index.mjs +1 -1
  438. package/out/utils/transactions/getInterpretedTransaction/index.mjs +1 -1
  439. package/out/utils/transactions/getTransactionsHistory/getTransactionsHistory.mjs +1 -1
  440. package/out/utils/transactions/getTransactionsHistory/helpers/getCachedTransactionListItem.mjs +1 -1
  441. package/out/utils/transactions/getTransactionsHistory/helpers/getIsTransactionInvalidOrFailed.mjs +1 -1
  442. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.cjs.map +2 -2
  443. package/out/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.mjs +1 -1
  444. package/out/utils/transactions/getTransactionsHistory/helpers/index.mjs +1 -1
  445. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.cjs +1 -1
  446. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.cjs.map +3 -3
  447. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.d.ts +1 -2
  448. package/out/utils/transactions/getTransactionsHistory/helpers/mapServerTransactionsToListItems.mjs +1 -1
  449. package/out/utils/transactions/getTransactionsHistory/helpers/mapTransactionToListItem.mjs +1 -1
  450. package/out/utils/transactions/getTransactionsHistory/index.mjs +1 -1
  451. package/out/utils/transactions/index.mjs +1 -1
  452. package/out/utils/transactions/isGuardianTx.mjs +1 -1
  453. package/out/utils/validation/index.mjs +1 -1
  454. package/out/utils/validation/isContract.mjs +1 -1
  455. package/out/utils/visual/index.mjs +1 -1
  456. package/out/utils/visual/switchTheme.mjs +1 -1
  457. package/out/utils/window/getIsInIframe.mjs +1 -1
  458. package/out/utils/window/getWindowParentOrigin.mjs +1 -1
  459. package/out/utils/window/index.mjs +1 -1
  460. package/package.json +2 -2
  461. package/out/__chunks__/chunk-2KZRLV26.mjs +0 -2
  462. package/out/__chunks__/chunk-3HELNSCN.mjs +0 -2
  463. package/out/__chunks__/chunk-4JSUKPMM.mjs +0 -2
  464. package/out/__chunks__/chunk-5F4SUYA5.mjs +0 -2
  465. package/out/__chunks__/chunk-5JK6P55K.mjs +0 -2
  466. package/out/__chunks__/chunk-6AC63JD5.mjs.map +0 -7
  467. package/out/__chunks__/chunk-7D6YECRB.mjs +0 -2
  468. package/out/__chunks__/chunk-7I3NCMED.mjs +0 -2
  469. package/out/__chunks__/chunk-7NURHXG3.mjs +0 -2
  470. package/out/__chunks__/chunk-7NURHXG3.mjs.map +0 -7
  471. package/out/__chunks__/chunk-BRJNX4JF.mjs +0 -2
  472. package/out/__chunks__/chunk-CCBYPSXO.mjs.map +0 -7
  473. package/out/__chunks__/chunk-D2CVYS4M.mjs +0 -2
  474. package/out/__chunks__/chunk-D2CVYS4M.mjs.map +0 -7
  475. package/out/__chunks__/chunk-DNFQGY4T.mjs +0 -2
  476. package/out/__chunks__/chunk-E7DBXV7R.mjs +0 -2
  477. package/out/__chunks__/chunk-FMU4NEUE.mjs +0 -2
  478. package/out/__chunks__/chunk-FO4U4FCJ.mjs +0 -1
  479. package/out/__chunks__/chunk-FRYGY7OL.mjs.map +0 -7
  480. package/out/__chunks__/chunk-FXGVROUI.mjs +0 -2
  481. package/out/__chunks__/chunk-GHUX5LY3.mjs +0 -2
  482. package/out/__chunks__/chunk-GHUX5LY3.mjs.map +0 -7
  483. package/out/__chunks__/chunk-GWFOJPML.mjs +0 -2
  484. package/out/__chunks__/chunk-JJCS7HDI.mjs +0 -2
  485. package/out/__chunks__/chunk-KIBWVS7T.mjs +0 -2
  486. package/out/__chunks__/chunk-KIBWVS7T.mjs.map +0 -7
  487. package/out/__chunks__/chunk-KYW2F6YX.mjs +0 -2
  488. package/out/__chunks__/chunk-L2GQHTCM.mjs +0 -2
  489. package/out/__chunks__/chunk-LRF2DQLC.mjs +0 -2
  490. package/out/__chunks__/chunk-LRZTZ4MT.mjs +0 -2
  491. package/out/__chunks__/chunk-LRZTZ4MT.mjs.map +0 -7
  492. package/out/__chunks__/chunk-MJC6B645.mjs +0 -2
  493. package/out/__chunks__/chunk-NJL7IL6P.mjs +0 -2
  494. package/out/__chunks__/chunk-SNZWFOV6.mjs.map +0 -7
  495. package/out/__chunks__/chunk-TDUG36NZ.mjs +0 -2
  496. package/out/__chunks__/chunk-U2TDA5B2.mjs.map +0 -7
  497. package/out/__chunks__/chunk-UIWCJ3CV.mjs +0 -2
  498. package/out/__chunks__/chunk-VJK5HQFF.mjs.map +0 -7
  499. package/out/__chunks__/chunk-WRBX7MBT.mjs +0 -2
  500. package/out/__chunks__/chunk-ZC3VYZDT.mjs +0 -2
  501. package/out/__chunks__/chunk-ZVFOG6LB.mjs +0 -2
  502. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs +0 -2
  503. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.cjs.map +0 -7
  504. package/out/methods/trackTransactions/helpers/checkTransactionStatus/checkBatch.mjs +0 -2
  505. package/out/methods/trackTransactions/helpers/checkTransactionStatus/getPendingTransactions.mjs +0 -2
  506. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.cjs +0 -2
  507. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.cjs.map +0 -7
  508. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.d.ts +0 -6
  509. package/out/methods/trackTransactions/helpers/checkTransactionStatus/manageFailedTransactions.mjs +0 -2
  510. package/out/methods/trackTransactions/helpers/checkTransactionStatus/runSessionCallbacks.mjs +0 -2
  511. package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.d.ts +0 -3
  512. package/out/methods/trackTransactions/helpers/checkTransactionStatus/updateTransactionAndSessionStatus.mjs +0 -2
  513. /package/out/__chunks__/{chunk-RN6VVJPM.mjs.map → chunk-2GWRGSHX.mjs.map} +0 -0
  514. /package/out/__chunks__/{chunk-FUCSXJMR.mjs.map → chunk-3Z2CWDRX.mjs.map} +0 -0
  515. /package/out/__chunks__/{chunk-KWE3DU6Z.mjs.map → chunk-4SS6EY66.mjs.map} +0 -0
  516. /package/out/__chunks__/{chunk-LWRBWWET.mjs.map → chunk-5KCP7UJT.mjs.map} +0 -0
  517. /package/out/__chunks__/{chunk-IPVALLAK.mjs.map → chunk-5STPHU5I.mjs.map} +0 -0
  518. /package/out/__chunks__/{chunk-SBTMAYW7.mjs.map → chunk-5UEYQ2KL.mjs.map} +0 -0
  519. /package/out/__chunks__/{chunk-KFBY5KJV.mjs.map → chunk-6F3EV2Y4.mjs.map} +0 -0
  520. /package/out/__chunks__/{chunk-TIJEFUI3.mjs.map → chunk-6NWGAFI5.mjs.map} +0 -0
  521. /package/out/__chunks__/{chunk-XEGTQTFK.mjs.map → chunk-73NTM43N.mjs.map} +0 -0
  522. /package/out/__chunks__/{chunk-M42UYGCH.mjs.map → chunk-7Z26MA4H.mjs.map} +0 -0
  523. /package/out/__chunks__/{chunk-LJVBVKNW.mjs.map → chunk-AU76TGKZ.mjs.map} +0 -0
  524. /package/out/__chunks__/{chunk-NJWQNAUZ.mjs.map → chunk-BDZ33IMP.mjs.map} +0 -0
  525. /package/out/__chunks__/{chunk-HFY2UB7E.mjs.map → chunk-BHLMFKLS.mjs.map} +0 -0
  526. /package/out/__chunks__/{chunk-76YR7YQD.mjs.map → chunk-BXQLGIN7.mjs.map} +0 -0
  527. /package/out/__chunks__/{chunk-LUG3RRVN.mjs.map → chunk-C2LXUREL.mjs.map} +0 -0
  528. /package/out/__chunks__/{chunk-ZC3VYZDT.mjs.map → chunk-C7S2TI5Y.mjs.map} +0 -0
  529. /package/out/__chunks__/{chunk-FUFSHVR2.mjs.map → chunk-CG2SW6XW.mjs.map} +0 -0
  530. /package/out/__chunks__/{chunk-QJ3Y35H5.mjs.map → chunk-CMFJB4UN.mjs.map} +0 -0
  531. /package/out/__chunks__/{chunk-DNFQGY4T.mjs.map → chunk-CP36QS3V.mjs.map} +0 -0
  532. /package/out/__chunks__/{chunk-Q3DHKVPY.mjs.map → chunk-D52CJHAM.mjs.map} +0 -0
  533. /package/out/__chunks__/{chunk-2KZRLV26.mjs.map → chunk-D5UNIS2B.mjs.map} +0 -0
  534. /package/out/__chunks__/{chunk-7D6YECRB.mjs.map → chunk-DSC7OKM6.mjs.map} +0 -0
  535. /package/out/__chunks__/{chunk-7KWGOZI4.mjs.map → chunk-EEZK3T5O.mjs.map} +0 -0
  536. /package/out/__chunks__/{chunk-GRQOTJQA.mjs.map → chunk-ENBZNLXA.mjs.map} +0 -0
  537. /package/out/__chunks__/{chunk-T6GTSLQD.mjs.map → chunk-EZOGRX23.mjs.map} +0 -0
  538. /package/out/__chunks__/{chunk-DMI2O4KV.mjs.map → chunk-F5JYH2GE.mjs.map} +0 -0
  539. /package/out/__chunks__/{chunk-FMU4NEUE.mjs.map → chunk-FCIYC4FM.mjs.map} +0 -0
  540. /package/out/__chunks__/{chunk-NJL7IL6P.mjs.map → chunk-FEP3SR47.mjs.map} +0 -0
  541. /package/out/__chunks__/{chunk-PIFEYU34.mjs.map → chunk-FJAJCSAI.mjs.map} +0 -0
  542. /package/out/__chunks__/{chunk-HX72KRC4.mjs.map → chunk-FPKFAJNW.mjs.map} +0 -0
  543. /package/out/__chunks__/{chunk-ERE5BVRC.mjs.map → chunk-G26FRQE7.mjs.map} +0 -0
  544. /package/out/__chunks__/{chunk-F24X6WMA.mjs.map → chunk-G7FYMZJO.mjs.map} +0 -0
  545. /package/out/__chunks__/{chunk-FLOLQ4JL.mjs.map → chunk-GC3EGW65.mjs.map} +0 -0
  546. /package/out/__chunks__/{chunk-JJCS7HDI.mjs.map → chunk-GO33UPCG.mjs.map} +0 -0
  547. /package/out/__chunks__/{chunk-ZGMIL4MG.mjs.map → chunk-HMAL7GVA.mjs.map} +0 -0
  548. /package/out/__chunks__/{chunk-7W4P5SLS.mjs.map → chunk-HWI2QO32.mjs.map} +0 -0
  549. /package/out/__chunks__/{chunk-3HELNSCN.mjs.map → chunk-I6JLRP5Y.mjs.map} +0 -0
  550. /package/out/__chunks__/{chunk-5JK6P55K.mjs.map → chunk-IECHAN5Y.mjs.map} +0 -0
  551. /package/out/__chunks__/{chunk-H6V6JDWW.mjs.map → chunk-J4GRXGQI.mjs.map} +0 -0
  552. /package/out/__chunks__/{chunk-S2PH3P53.mjs.map → chunk-J5MXSFGF.mjs.map} +0 -0
  553. /package/out/__chunks__/{chunk-ALOBJ2YK.mjs.map → chunk-JFWHJ7VA.mjs.map} +0 -0
  554. /package/out/__chunks__/{chunk-LRF2DQLC.mjs.map → chunk-JLDDNS5Y.mjs.map} +0 -0
  555. /package/out/__chunks__/{chunk-WRBX7MBT.mjs.map → chunk-JOXEQBHW.mjs.map} +0 -0
  556. /package/out/__chunks__/{chunk-XQESHZ2X.mjs.map → chunk-JUX7RQED.mjs.map} +0 -0
  557. /package/out/__chunks__/{chunk-2MRPKTZ3.mjs.map → chunk-KSC3RFHN.mjs.map} +0 -0
  558. /package/out/__chunks__/{chunk-GGXK3235.mjs.map → chunk-LBFTX44W.mjs.map} +0 -0
  559. /package/out/__chunks__/{chunk-SP4B7UYK.mjs.map → chunk-LQ3UGB46.mjs.map} +0 -0
  560. /package/out/__chunks__/{chunk-DVWQ3NWJ.mjs.map → chunk-MODSKR2X.mjs.map} +0 -0
  561. /package/out/__chunks__/{chunk-4JSUKPMM.mjs.map → chunk-NI7XCWV5.mjs.map} +0 -0
  562. /package/out/__chunks__/{chunk-E7DBXV7R.mjs.map → chunk-NKZX4KJF.mjs.map} +0 -0
  563. /package/out/__chunks__/{chunk-52A7HOT5.mjs.map → chunk-O4PUBLYW.mjs.map} +0 -0
  564. /package/out/__chunks__/{chunk-QNBPNTH7.mjs.map → chunk-OHK76MFX.mjs.map} +0 -0
  565. /package/out/__chunks__/{chunk-5F4SUYA5.mjs.map → chunk-Q7KYVZUM.mjs.map} +0 -0
  566. /package/out/__chunks__/{chunk-DSPRERV6.mjs.map → chunk-Q7TZ6C22.mjs.map} +0 -0
  567. /package/out/__chunks__/{chunk-HF4QPAWD.mjs.map → chunk-QAAOGNH4.mjs.map} +0 -0
  568. /package/out/__chunks__/{chunk-7Y3FYVL4.mjs.map → chunk-QN2SFLFO.mjs.map} +0 -0
  569. /package/out/__chunks__/{chunk-BPOW3DAB.mjs.map → chunk-R6UWDERK.mjs.map} +0 -0
  570. /package/out/__chunks__/{chunk-5QUMAPUC.mjs.map → chunk-RDTT74OC.mjs.map} +0 -0
  571. /package/out/__chunks__/{chunk-5AVHNKDZ.mjs.map → chunk-REYJ4EFS.mjs.map} +0 -0
  572. /package/out/__chunks__/{chunk-7I3NCMED.mjs.map → chunk-SERW2VL6.mjs.map} +0 -0
  573. /package/out/__chunks__/{chunk-IGA3PYLZ.mjs.map → chunk-SINQBCBO.mjs.map} +0 -0
  574. /package/out/__chunks__/{chunk-BC4ZQOAE.mjs.map → chunk-SQ3EODA7.mjs.map} +0 -0
  575. /package/out/__chunks__/{chunk-MHF7JB3Y.mjs.map → chunk-STNUKKSC.mjs.map} +0 -0
  576. /package/out/__chunks__/{chunk-FO4U4FCJ.mjs.map → chunk-SVR3TUOY.mjs.map} +0 -0
  577. /package/out/__chunks__/{chunk-SORO3SMC.mjs.map → chunk-U6FDF6V4.mjs.map} +0 -0
  578. /package/out/__chunks__/{chunk-KBTIQKEL.mjs.map → chunk-UWUJKOLU.mjs.map} +0 -0
  579. /package/out/__chunks__/{chunk-42P7WSDZ.mjs.map → chunk-VFY6KWJ2.mjs.map} +0 -0
  580. /package/out/__chunks__/{chunk-TLSLNBIX.mjs.map → chunk-W3L462S3.mjs.map} +0 -0
  581. /package/out/__chunks__/{chunk-UOD2UO27.mjs.map → chunk-WCEZVGFB.mjs.map} +0 -0
  582. /package/out/__chunks__/{chunk-G5TDTAQH.mjs.map → chunk-WNJKPQDV.mjs.map} +0 -0
  583. /package/out/__chunks__/{chunk-7HH5AHJM.mjs.map → chunk-WPNLIPMJ.mjs.map} +0 -0
  584. /package/out/__chunks__/{chunk-FXGVROUI.mjs.map → chunk-XJ4DOOWN.mjs.map} +0 -0
  585. /package/out/__chunks__/{chunk-MJC6B645.mjs.map → chunk-XUUR76YU.mjs.map} +0 -0
  586. /package/out/__chunks__/{chunk-YHLBPZNN.mjs.map → chunk-XVPO7ZMT.mjs.map} +0 -0
  587. /package/out/__chunks__/{chunk-ACMDU3QF.mjs.map → chunk-YGMSU5HA.mjs.map} +0 -0
  588. /package/out/__chunks__/{chunk-KYW2F6YX.mjs.map → chunk-ZD74AW3C.mjs.map} +0 -0
  589. /package/out/__chunks__/{chunk-UIWCJ3CV.mjs.map → chunk-ZNPHUPAP.mjs.map} +0 -0
  590. /package/out/__chunks__/{chunk-YB5TSLJV.mjs.map → chunk-ZQEBGI5N.mjs.map} +0 -0
  591. /package/out/__chunks__/{chunk-MWVWSB7G.mjs.map → chunk-ZRN5QF4U.mjs.map} +0 -0
  592. /package/out/__chunks__/{chunk-PJBXLDBG.mjs.map → chunk-ZVF3CROB.mjs.map} +0 -0
  593. /package/out/methods/trackTransactions/helpers/checkTransactionStatus/{checkBatch.mjs.map → helpers/checkBatch/checkBatch.mjs.map} +0 -0
  594. /package/out/methods/trackTransactions/helpers/checkTransactionStatus/{runSessionCallbacks.mjs.map → helpers/checkBatch/helpers/runSessionCallbacks.mjs.map} +0 -0
  595. /package/out/methods/trackTransactions/helpers/checkTransactionStatus/{getPendingTransactions.mjs.map → helpers/checkBatch/helpers/runTransactionFailure.mjs.map} +0 -0
  596. /package/out/methods/trackTransactions/helpers/checkTransactionStatus/{manageFailedTransactions.mjs.map → helpers/checkBatch/helpers/runTransactionStatusUpdate.mjs.map} +0 -0
  597. /package/out/methods/trackTransactions/helpers/checkTransactionStatus/{updateTransactionAndSessionStatus.mjs.map → helpers/checkBatch/helpers/updateTransactionAndSessionStatus.mjs.map} +0 -0
@@ -1,2 +1,2 @@
1
1
  import{a as s}from"./chunk-RYIJWGFA.mjs";import{a as i}from"./chunk-D2ULWBRR.mjs";import{a}from"./chunk-HWJQUOPL.mjs";var h=r=>{let t=i(r),{failed:n,invalid:e,pending:c}=a(r),m=(n||e)&&t.length>0?t.join(","):"",o=`${s(r.status)} ${m}`;return n?{icon:"close",tooltip:o}:e?{icon:"ban",tooltip:o}:c?{icon:"hourglass",tooltip:o}:{tooltip:o}};export{h as a};
2
- //# sourceMappingURL=chunk-FRYGY7OL.mjs.map
2
+ //# sourceMappingURL=chunk-22ELCCFJ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/transactions/getInterpretedTransaction/helpers/getTransactionIconInfo.ts"],
4
+ "sourcesContent": ["import { IconNamesEnum } from 'types';\nimport { ServerTransactionType } from 'types/serverTransactions.types';\nimport { capitalize } from 'utils/operations/capitalize';\nimport { getTransactionMessages } from './getTransactionMessages';\nimport { getTransactionStatus } from './getTransactionStatus';\n\nexport const getTransactionIconInfo = (\n transaction: ServerTransactionType\n): { icon?: `${IconNamesEnum}`; tooltip: string } => {\n const transactionMessages = getTransactionMessages(transaction);\n\n const { failed, invalid, pending } = getTransactionStatus(transaction);\n\n const showErrorText = (failed || invalid) && transactionMessages.length > 0;\n const errorText = showErrorText ? transactionMessages.join(',') : '';\n const tooltip = `${capitalize(transaction.status)} ${errorText}`;\n\n if (failed) {\n return { icon: IconNamesEnum.close, tooltip };\n }\n\n if (invalid) {\n return { icon: IconNamesEnum.ban, tooltip };\n }\n\n if (pending) {\n return { icon: IconNamesEnum.hourglass, tooltip };\n }\n\n return { tooltip };\n};\n"],
5
+ "mappings": "sHAMO,IAAMA,EACXC,GACmD,CACnD,IAAMC,EAAsBC,EAAuBF,CAAW,EAExD,CAAE,OAAAG,EAAQ,QAAAC,EAAS,QAAAC,CAAQ,EAAIC,EAAqBN,CAAW,EAG/DO,GADiBJ,GAAUC,IAAYH,EAAoB,OAAS,EACxCA,EAAoB,KAAK,GAAG,EAAI,GAC5DO,EAAU,GAAGC,EAAWT,EAAY,MAAM,CAAC,IAAIO,CAAS,GAE9D,OAAIJ,EACK,CAAE,aAA2B,QAAAK,CAAQ,EAG1CJ,EACK,CAAE,WAAyB,QAAAI,CAAQ,EAGxCH,EACK,CAAE,iBAA+B,QAAAG,CAAQ,EAG3C,CAAE,QAAAA,CAAQ,CACnB",
6
+ "names": ["getTransactionIconInfo", "transaction", "transactionMessages", "getTransactionMessages", "failed", "invalid", "pending", "getTransactionStatus", "errorText", "tooltip", "capitalize"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-5JK6P55K.mjs";import{s as e}from"./chunk-TLSLNBIX.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
- //# sourceMappingURL=chunk-RN6VVJPM.mjs.map
1
+ import{a as s}from"./chunk-SUBC3H4J.mjs";import{a as t}from"./chunk-U64LDJTG.mjs";import{a as n}from"./chunk-IECHAN5Y.mjs";import{s as e}from"./chunk-W3L462S3.mjs";import{b as o}from"./chunk-7VHTZYM2.mjs";var w=async r=>{let{isGuarded:i}=n();if(!s({isGuarded:i,transactions:r}))return r;let a=r[0].sender.toBech32(),{walletAddress:d}=o(e());return await(await t({address:a,walletUrl:d}))?.guardTransactions(r)||[]};export{w as a};
2
+ //# sourceMappingURL=chunk-2GWRGSHX.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-4VUMAG4J.mjs";var a={nonce:17,value:"0",receiver:e,sender:e,gasPrice:1e9,gasLimit:6e6,chainID:"D",version:1,signature:"e8e12f2c5432361b640068f8046819c02511e94cc139257dd1bf557368f4dafe7f446d0df2fe02e7f09358f84b0b2fce88b801a4eb3643ba85c989340bf7820a",txHash:"txPending\xA7\xA7\xA77cb81c945decd70678cebc5b8b919f8e3c8411f2b19ebdd6a6x",receiverShard:0,senderShard:0,status:"pending",hash:"txPending\xA7\xA7\xA77cb81c945decd70678cebc5b8b919f8e3c8411f2b19ebdd6a6x",invalidTransaction:!1,results:[],previousStatus:"pending",hasStatusChanged:!0};export{a};
2
+ //# sourceMappingURL=chunk-3PAZABVI.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/__mocks__/data/mockPendingTransaction.ts"],
4
+ "sourcesContent": ["import { testAddress } from '__mocks__/accountConfig';\n\nexport const mockPendingTransaction = {\n nonce: 17,\n value: '0',\n receiver: testAddress,\n sender: testAddress,\n gasPrice: 1000000000,\n gasLimit: 6000000,\n chainID: 'D',\n version: 1,\n signature:\n 'e8e12f2c5432361b640068f8046819c02511e94cc139257dd1bf557368f4dafe7f446d0df2fe02e7f09358f84b0b2fce88b801a4eb3643ba85c989340bf7820a',\n txHash: 'txPending\u00A7\u00A7\u00A77cb81c945decd70678cebc5b8b919f8e3c8411f2b19ebdd6a6x',\n receiverShard: 0,\n senderShard: 0,\n status: 'pending' as const,\n hash: 'txPending\u00A7\u00A7\u00A77cb81c945decd70678cebc5b8b919f8e3c8411f2b19ebdd6a6x',\n invalidTransaction: false,\n results: [],\n previousStatus: 'pending',\n hasStatusChanged: true\n};\n"],
5
+ "mappings": "yCAEO,IAAMA,EAAyB,CACpC,MAAO,GACP,MAAO,IACP,SAAUC,EACV,OAAQA,EACR,SAAU,IACV,SAAU,IACV,QAAS,IACT,QAAS,EACT,UACE,mIACF,OAAQ,2EACR,cAAe,EACf,YAAa,EACb,OAAQ,UACR,KAAM,2EACN,mBAAoB,GACpB,QAAS,CAAC,EACV,eAAgB,UAChB,iBAAkB,EACpB",
6
+ "names": ["mockPendingTransaction", "testAddress"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-LJVBVKNW.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
- //# sourceMappingURL=chunk-FUCSXJMR.mjs.map
1
+ import{a as s}from"./chunk-AU76TGKZ.mjs";import{c as e}from"./chunk-MGFIOCA4.mjs";var o=class i extends s{constructor(){super({uiDataUpdateEvent:"DATA_UPDATE_SIGN_TRANSACTIONS",uiTag:"mvx-sign-transactions-panel"});this.addressesPerPage=10;this._ppuMap={};this.initialData={commonData:{transactionsCount:0,currentIndexToSign:0,egldLabel:"",currentIndex:0,ppuOptions:[],address:"",origin:""},tokenTransaction:null,nftTransaction:null,sftTransaction:null};this.data={...this.initialData}}static getInstance(){return i.instance||(i.instance=new i),i.instance}get transactionsCount(){return this.data.commonData.transactionsCount}initializeGasPriceMap(a){let t=0;a.filter(n=>n!=null).forEach(n=>{let r=n?Number(n.gasPrice):0;this.updateGasPriceMap({nonce:Number(n.nonce),ppu:t,initialGasPrice:r})}),this.updateCommonData({ppu:t})}updateGasPriceMap({nonce:a,ppu:t,initialGasPrice:n}){this._ppuMap[a]={...this._ppuMap[a],ppu:t},n&&(this._ppuMap[a].initialGasPrice=n)}updateCommonData(a){this.data.commonData={...this.data.commonData,...a},this.notifyDataUpdate()}updateIsLoading(a){this.data.isLoading=a,this.notifyDataUpdate()}updateTokenTransaction(a){this.data.tokenTransaction=a,this.data.sftTransaction=null,this.data.nftTransaction=null,this.notifyDataUpdate()}updateNonFungibleTransaction(a,t){switch(a){case"NonFungibleESDT":this.data.nftTransaction=t,this.data.tokenTransaction=null,this.data.sftTransaction=null;break;case"SemiFungibleESDT":this.data.sftTransaction=t,this.data.nftTransaction=null,this.data.tokenTransaction=null;break;default:break}this.notifyDataUpdate()}get currentScreenIndex(){return this.data.commonData.currentIndex}get ppuMap(){return this._ppuMap}async setupEventListeners(){this.eventBus&&this.subscribeToEventBus("CLOSE_SIGN_TRANSACTIONS",this.closeUI.bind(this))}};export{o as a};
2
+ //# sourceMappingURL=chunk-3Z2CWDRX.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-ZRSYQ3MT.mjs";import{h as o}from"./chunk-QQIPTRF4.mjs";var D=({data:r,highlight:a,identifier:i})=>{let e={};return Object.values(o).forEach(t=>{let c=d({data:r,identifier:i,decodeMethod:t,highlight:a});e[t]=c}),e};export{D as a};
2
- //# sourceMappingURL=chunk-KWE3DU6Z.mjs.map
1
+ import{a as d}from"./chunk-ZRSYQ3MT.mjs";import{h as o}from"./chunk-DRPJ3IFU.mjs";var D=({data:r,highlight:a,identifier:i})=>{let e={};return Object.values(o).forEach(t=>{let c=d({data:r,identifier:i,decodeMethod:t,highlight:a});e[t]=c}),e};export{D as a};
2
+ //# sourceMappingURL=chunk-4SS6EY66.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-DVWQ3NWJ.mjs";import{a as m}from"./chunk-K4ITACAF.mjs";import{f as r}from"./chunk-PJWJZHIS.mjs";import{a as o,b as a}from"./chunk-LHEH7L4L.mjs";var d=({transaction:e,price:i})=>{let t=n({from:e.sender.toBech32(),to:e.receiver.toBech32(),gasPerDataByte:String(1500),gasPriceModifier:String(.01),gasLimit:e.gasLimit.valueOf().toString(),gasPrice:e.gasPrice.valueOf().toString(),data:e.data.toString(),chainId:e.chainID.valueOf().toString()}),c=r({input:t,showLastNonZeroDecimal:!0}),g=i?m({feeLimit:t,egldPriceInUsd:i,hideEqualSign:!0}):null;return{feeLimitFormatted:c,feeInFiatLimit:g,feeLimit:t}};export{d as a};
2
- //# sourceMappingURL=chunk-LWRBWWET.mjs.map
1
+ import{a as n}from"./chunk-MODSKR2X.mjs";import{a as m}from"./chunk-K4ITACAF.mjs";import{f as r}from"./chunk-PJWJZHIS.mjs";import{a as o,b as a}from"./chunk-LHEH7L4L.mjs";var d=({transaction:e,price:i})=>{let t=n({from:e.sender.toBech32(),to:e.receiver.toBech32(),gasPerDataByte:String(1500),gasPriceModifier:String(.01),gasLimit:e.gasLimit.valueOf().toString(),gasPrice:e.gasPrice.valueOf().toString(),data:e.data.toString(),chainId:e.chainID.valueOf().toString()}),c=r({input:t,showLastNonZeroDecimal:!0}),g=i?m({feeLimit:t,egldPriceInUsd:i,hideEqualSign:!0}):null;return{feeLimitFormatted:c,feeInFiatLimit:g,feeLimit:t}};export{d as a};
2
+ //# sourceMappingURL=chunk-5KCP7UJT.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-GWFOJPML.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
- //# sourceMappingURL=chunk-IPVALLAK.mjs.map
1
+ import{a as e}from"./chunk-UXPWG7TI.mjs";function r(t){try{if(!e)return;e.document.documentElement.dataset.mvxTheme=t}catch{console.log("Error switching the theme!")}}export{r as a};
2
+ //# sourceMappingURL=chunk-5STPHU5I.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-YK7T6MBD.mjs";import{a as u}from"./chunk-KMJMQEXI.mjs";import{q as c}from"./chunk-TLSLNBIX.mjs";import{a as w}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";var e=o=>c().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...w,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await l(a),f=r.roundDuration?null:await u(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
- //# sourceMappingURL=chunk-SBTMAYW7.mjs.map
1
+ import{a as l}from"./chunk-YK7T6MBD.mjs";import{a as u}from"./chunk-KMJMQEXI.mjs";import{q as c}from"./chunk-W3L462S3.mjs";import{a as w}from"./chunk-SQVKVA7X.mjs";import{a as i}from"./chunk-PKDR5ERF.mjs";var e=o=>c().setState(({network:t})=>{t.network={...t.network,...o}},!1,{type:"initializeNetworkConfig",payload:{value:o}});var y=async({customNetworkConfig:o={},environment:t})=>{let d=!o?.skipFetchFromServer,g=o?.apiAddress,n=t&&t in i,p=n?i[t]:{},s={...w,...p,...o},r={...s,apiTimeout:String(s.apiTimeout)},N=p?.apiAddress;if(!n&&d){let a=g||N,m=await l(a),f=r.roundDuration?null:await u(a);if(f!=null&&(r.roundDuration=f.erd_round_duration),m!=null){let k={...r,...m,...o};return e(k),k}}return e(r),r};export{y as a,e as b};
2
+ //# sourceMappingURL=chunk-5UEYQ2KL.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-54B3EIZC.mjs";import{a as T}from"./chunk-QJ7MRSGB.mjs";import{a as e}from"./chunk-2MRPKTZ3.mjs";var k=({receiver:n,sender:r,senderAssets:l,receiverAssets:u,transactionAssets:t,showDefaultState:f=!1,status:a})=>{let i=n===r,I=i?e(r):e(n),g=T({senderAssets:l,receiverAssets:u,userIsReceiver:i}),[s]=t??[],p=t.length>1,S=s?.type==="NonFungibleESDT",o=s?.type==="SemiFungibleESDT",A=t?.every(F=>s&&F.assetTicker===s.assetTicker)??!1,E=m(a),c=a==="pending";return(c||E)&&!f?{icon:c?"hourglass":"close"}:p&&!A?{icon:"coins"}:s?.assetImage?{imageUrl:s.assetImage}:S||o?{text:o?"sft":"nft"}:I?{imageUrl:g||void 0}:null};export{k as a};
2
- //# sourceMappingURL=chunk-VJK5HQFF.mjs.map
1
+ import{a as m}from"./chunk-54B3EIZC.mjs";import{a as T}from"./chunk-QJ7MRSGB.mjs";import{a as e}from"./chunk-KSC3RFHN.mjs";var k=({receiver:n,sender:r,senderAssets:l,receiverAssets:u,transactionAssets:t,showDefaultState:f=!1,status:a})=>{let i=n===r,I=i?e(r):e(n),g=T({senderAssets:l,receiverAssets:u,userIsReceiver:i}),[s]=t??[],p=t.length>1,S=s?.type==="NonFungibleESDT",o=s?.type==="SemiFungibleESDT",A=t?.every(F=>s&&F.assetTicker===s.assetTicker)??!1,E=m(a),c=a==="pending";return(c||E)&&!f?{icon:c?"hourglass":"close"}:p&&!A?{icon:"coins"}:s?.assetImage?{imageUrl:s.assetImage}:S||o?{text:o?"sft":"nft"}:I?{imageUrl:g||void 0}:null};export{k as a};
2
+ //# sourceMappingURL=chunk-66X6B32V.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/transactions/getTransactionsHistory/helpers/getTransactionAsset.ts"],
4
+ "sourcesContent": ["import { ITransactionListItemAsset } from 'lib/sdkDappUi';\nimport { AssetType } from 'types/account.types';\nimport {\n IconNamesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { TransactionIconTypeEnum } from 'types/transaction-list-item.types';\nimport { isContract } from 'utils/validation/isContract';\nimport { getIsTransactionInvalidOrFailed } from './getIsTransactionInvalidOrFailed';\nimport { ITransactionAsset } from './getTransactionAssets';\nimport { getTransactionAvatar } from './getTransactionAvatar';\n\nenum NftTypeEnum {\n NonFungibleESDT = 'NonFungibleESDT',\n SemiFungibleESDT = 'SemiFungibleESDT'\n}\n\ninterface IGetTransactionAssetParams {\n receiver: string;\n sender: string;\n receiverAssets?: AssetType;\n senderAssets?: AssetType;\n transactionAssets: ITransactionAsset[];\n showDefaultState?: boolean;\n status: TransactionServerStatusesEnum;\n}\n\nexport const getTransactionAsset = ({\n receiver,\n sender,\n senderAssets,\n receiverAssets,\n transactionAssets,\n showDefaultState = false,\n status\n}: IGetTransactionAssetParams): ITransactionListItemAsset | null => {\n const userIsReceiver = receiver === sender;\n const isContractInteraction = userIsReceiver\n ? isContract(sender)\n : isContract(receiver);\n\n const transactionAvatar = getTransactionAvatar({\n senderAssets,\n receiverAssets,\n userIsReceiver\n });\n\n const [latestAsset] = transactionAssets ?? [];\n const isMultipleAssets = transactionAssets.length > 1;\n const assetIsNft = latestAsset?.type === NftTypeEnum.NonFungibleESDT;\n const assetIsSft = latestAsset?.type === NftTypeEnum.SemiFungibleESDT;\n\n const areMultipleAssetsSameType =\n transactionAssets?.every(\n (asset) => latestAsset && asset.assetTicker === latestAsset.assetTicker\n ) ?? false;\n\n const isTransactionFailedOrInvalid = getIsTransactionInvalidOrFailed(status);\n const isTransactionPending = status === TransactionServerStatusesEnum.pending;\n\n const showDefaultTransactionIcon =\n isTransactionPending || isTransactionFailedOrInvalid;\n\n if (showDefaultTransactionIcon && !showDefaultState) {\n return {\n icon: isTransactionPending ? IconNamesEnum.hourglass : IconNamesEnum.close\n };\n }\n\n if (isMultipleAssets && !areMultipleAssetsSameType) {\n return {\n icon: IconNamesEnum.coins\n };\n }\n\n if (latestAsset?.assetImage) {\n return {\n imageUrl: latestAsset.assetImage\n };\n }\n\n if (assetIsNft || assetIsSft) {\n return {\n text: assetIsSft\n ? TransactionIconTypeEnum.SFT\n : TransactionIconTypeEnum.NFT\n };\n }\n\n if (isContractInteraction) {\n return {\n imageUrl: transactionAvatar || undefined\n };\n }\n\n return null;\n};\n"],
5
+ "mappings": "2HA2BO,IAAMA,EAAsB,CAAC,CAClC,SAAAC,EACA,OAAAC,EACA,aAAAC,EACA,eAAAC,EACA,kBAAAC,EACA,iBAAAC,EAAmB,GACnB,OAAAC,CACF,IAAoE,CAClE,IAAMC,EAAiBP,IAAaC,EAC9BO,EAAwBD,EAC1BE,EAAWR,CAAM,EACjBQ,EAAWT,CAAQ,EAEjBU,EAAoBC,EAAqB,CAC7C,aAAAT,EACA,eAAAC,EACA,eAAAI,CACF,CAAC,EAEK,CAACK,CAAW,EAAIR,GAAqB,CAAC,EACtCS,EAAmBT,EAAkB,OAAS,EAC9CU,EAAaF,GAAa,OAAS,kBACnCG,EAAaH,GAAa,OAAS,mBAEnCI,EACJZ,GAAmB,MAChBa,GAAUL,GAAeK,EAAM,cAAgBL,EAAY,WAC9D,GAAK,GAEDM,EAA+BC,EAAgCb,CAAM,EACrEc,EAAuBd,cAK7B,OAFEc,GAAwBF,IAEQ,CAACb,EAC1B,CACL,KAAMe,qBACR,EAGEP,GAAoB,CAACG,EAChB,CACL,YACF,EAGEJ,GAAa,WACR,CACL,SAAUA,EAAY,UACxB,EAGEE,GAAcC,EACT,CACL,KAAMA,aAGR,EAGEP,EACK,CACL,SAAUE,GAAqB,MACjC,EAGK,IACT",
6
+ "names": ["getTransactionAsset", "receiver", "sender", "senderAssets", "receiverAssets", "transactionAssets", "showDefaultState", "status", "userIsReceiver", "isContractInteraction", "isContract", "transactionAvatar", "getTransactionAvatar", "latestAsset", "isMultipleAssets", "assetIsNft", "assetIsSft", "areMultipleAssetsSameType", "asset", "isTransactionFailedOrInvalid", "getIsTransactionInvalidOrFailed", "isTransactionPending"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-2CG6PNPJ.mjs";import{a as i}from"./chunk-FROSOADM.mjs";import{a as g}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as p,b as e}from"./chunk-4VUMAG4J.mjs";import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as c}from"./chunk-PSJI2G34.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(i)),t.get(`${e.apiAddress}/network/config`,s(d)),t.get(`https://${o.url}/socket.io/`,s(c)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(g))],P=u(...k);export{t as a,s as b,P as c};
2
- //# sourceMappingURL=chunk-KFBY5KJV.mjs.map
1
+ import{a as r}from"./chunk-RWQNLK3I.mjs";import{a as i}from"./chunk-FROSOADM.mjs";import{a as g}from"./chunk-VJBLHJYB.mjs";import{a}from"./chunk-RRK6GTWZ.mjs";import{a as o}from"./chunk-IPMSVHGJ.mjs";import{a as c}from"./chunk-PSJI2G34.mjs";import{a as d}from"./chunk-2CG6PNPJ.mjs";import{a as p,b as e}from"./chunk-4VUMAG4J.mjs";import{rest as t}from"msw";import{setupServer as u}from"msw/node";var s=m=>(R,f,n)=>f(n.status(200),n.json(m)),k=[t.get(`${e.apiAddress}/dapp/config`,s(i)),t.get(`${e.apiAddress}/network/config`,s(d)),t.get(`https://${o.url}/socket.io/`,s(c)),t.get(`${e.apiAddress}/websocket/config`,s(o)),t.get(`${e.apiAddress}/accounts/${p}`,s(a)),t.get(`${e.apiAddress}/accounts/${r.address}`,s(r)),t.get(`${e.apiAddress}/blocks`,s(g))],P=u(...k);export{t as a,s as b,P as c};
2
+ //# sourceMappingURL=chunk-6F3EV2Y4.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-S2PH3P53.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-TIJEFUI3.mjs.map
1
+ import{a as s}from"./chunk-J5MXSFGF.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-6NWGAFI5.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-TLSLNBIX.mjs";var C=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,{type:"setNativeAuthConfig",payload:{value:t}}),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,{type:"setWebsocketStatus",payload:{value:t}}),f=t=>o().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,l=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:l,walletConnectV2RelayAddress:a}},!1,{type:"setWalletConnectConfig",payload:{value:t}});export{C as a,c as b,f as c};
2
- //# sourceMappingURL=chunk-XEGTQTFK.mjs.map
1
+ import{a as n}from"./chunk-4TBVQD27.mjs";import{q as o}from"./chunk-W3L462S3.mjs";var C=t=>o().setState(({config:e})=>{e.nativeAuthConfig=t},!1,{type:"setNativeAuthConfig",payload:{value:t}}),c=t=>o().setState(({config:e})=>{e.websocketStatus=t},!1,{type:"setWebsocketStatus",payload:{value:t}}),f=t=>o().setState(({config:e})=>{let a=t.walletConnectV2RelayAddress||n.walletConnectV2RelayAddress,l=t.walletConnectDeepLink||n.walletConnectDeepLink;e.walletConnectConfig={...t,walletConnectDeepLink:l,walletConnectV2RelayAddress:a}},!1,{type:"setWalletConnectConfig",payload:{value:t}});export{C as a,c as b,f as c};
2
+ //# sourceMappingURL=chunk-73NTM43N.mjs.map
@@ -0,0 +1,2 @@
1
+ import{a as St}from"./chunk-QG4NGBHS.mjs";import{a as dt}from"./chunk-ZD74AW3C.mjs";import{a as vt}from"./chunk-6UZHM5LW.mjs";import{a as w}from"./chunk-FL33O3CM.mjs";import{a as wt}from"./chunk-HWI2QO32.mjs";import{a as bt}from"./chunk-FCIYC4FM.mjs";import{a as It}from"./chunk-QOP5T5R4.mjs";import{a as Et}from"./chunk-CP36QS3V.mjs";import{a as Ct}from"./chunk-ABBDCZHP.mjs";import{a as Mt}from"./chunk-4ODPAHHA.mjs";import{a as Nt}from"./chunk-H5OF5YQF.mjs";import{b as x}from"./chunk-ZRN5QF4U.mjs";import{a as xt}from"./chunk-BQS32EX5.mjs";import{a as At}from"./chunk-NKZX4KJF.mjs";import{a as Pt}from"./chunk-MDVI45IV.mjs";import{a as Ot}from"./chunk-G26FRQE7.mjs";import{a as v}from"./chunk-D5UNIS2B.mjs";import{a as it}from"./chunk-GO33UPCG.mjs";import{a as ht}from"./chunk-AU76TGKZ.mjs";import{a as E}from"./chunk-BXQLGIN7.mjs";import{a as A,f as yt}from"./chunk-YGMSU5HA.mjs";import{b as L,d as gt}from"./chunk-ZVF3CROB.mjs";import{k as pt,l as lt,n as Tt}from"./chunk-E2GGD7D4.mjs";import{b as Lt}from"./chunk-QN2SFLFO.mjs";import{a as N}from"./chunk-HORSXVIV.mjs";import{a as Ft}from"./chunk-IECHAN5Y.mjs";import{a as nt}from"./chunk-O4PUBLYW.mjs";import{a as C}from"./chunk-QTKK6OSJ.mjs";import{a as et}from"./chunk-6ACLOUQ3.mjs";import{a as I}from"./chunk-G7GU37XI.mjs";import{a as st}from"./chunk-YSCND2MX.mjs";import{a as Rt}from"./chunk-NJN53MJV.mjs";import{a as rt,b as ct,g as ut,l as mt}from"./chunk-M6MN4RXG.mjs";import{b as at}from"./chunk-NGM3AVCY.mjs";import{a as tt,b as ot,q as u,s as g}from"./chunk-W3L462S3.mjs";import{c as V,d as Y,f as J}from"./chunk-UERJ6AKK.mjs";import{b as h}from"./chunk-VNLGNNIL.mjs";import{b as S}from"./chunk-6JM4DPOH.mjs";import{b as Q,c as X,f as Z}from"./chunk-NTEMINYA.mjs";import{b as kt}from"./chunk-UCRVRBTA.mjs";import{a as ft}from"./chunk-J5MXSFGF.mjs";import{c as $}from"./chunk-WPNLIPMJ.mjs";import{a as b}from"./chunk-LJX4MW7B.mjs";import K from"bignumber.js";import G from"lodash.isequal";var Bt=1e4,O=class{constructor(){this.timeoutIntervals=new Map;this.successfulToastLifetime=Bt;this.start=t=>{if(this.stop(t),this.successfulToastLifetime<=0)return;let o=setTimeout(()=>{F(t)},this.successfulToastLifetime);this.timeoutIntervals.set(t,o)};this.startWithCustomDuration=(t,o)=>{if(this.stop(t),o<=0)return;let e=setTimeout(()=>{P(t);let n=f[t];n?.()},o);this.timeoutIntervals.set(t,e)};this.stop=t=>{let o=this.timeoutIntervals.get(t);o&&(clearTimeout(o),this.timeoutIntervals.delete(t))}}init({successfulToastLifetime:t}){this.successfulToastLifetime=t??Bt}destroy(){this.timeoutIntervals.forEach(t=>clearTimeout(t)),this.timeoutIntervals.clear()}};import Dt from"lodash.isequal";var Yt="NOTIFICATIONS_FEED_STORE_SUBSCRIBE",M=class s extends ht{constructor(o){super({uiDataUpdateEvent:"OPEN_NOTIFICATIONS_FEED",uiTag:"mvx-notifications-feed"});this.initialData={pendingTransactions:[],historicTransactions:[]};this.store=o||u(),this.data={...this.initialData}}static getInstance(){return s.instance||(s.instance=new s),s.instance}isNotificationsFeedOpen(){return this.isOpen}async openNotificationsFeed(){d.getInstance().hideToasts(),await this.openUI(),await this.updateDataAndNotifications();let e=this.store.subscribe(async({toasts:n,transactions:i},{toasts:r,transactions:c})=>{(!Dt(r.transactionToasts,n.transactionToasts)||!Dt(c,i))&&await this.updateDataAndNotifications()});this.unsubscribeFunctions.set(Yt,[e]),this.eventBus?.publish("OPEN_NOTIFICATIONS_FEED"),await this.updateDataAndNotifications()}async handleCloseUI(){let o=d.getInstance();this.closeUI(),await o.showToasts()}async setupEventListeners(){this.eventBus&&(this.subscribeToEventBus("CLOSE_NOTIFICATIONS_FEED",this.handleCloseUI.bind(this)),this.subscribeToEventBus("CLEAR_NOTIFICATIONS_FEED_HISTORY",this.handleClearNotificationsFeedHistory.bind(this)))}async updateDataAndNotifications(){let{transactions:o}=this.store.getState(),{pendingTransactionToasts:e}=await w();this.data.pendingTransactions=e;let n=Object.keys(o).reduce((i,r)=>(["sent","pending"].includes(String(o[r].status))||(i[r]=o[r]),i),{});this.data.historicTransactions=await dt.getTransactionsHistory({transactionsSessions:n}),await this.updateNotificationsFeed()}handleClearNotificationsFeedHistory(){gt(),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))}};var k=class{constructor(t){this.toastsElement=null;this.eventBus=null;this.isCreatingElement=!1;this.eventBusUnsubscribeFunctions=[];this.onCloseToast=t.onCloseToast,this.store=t.store||u(),this.notificationsFeedManager=t.notificationsFeedManager||M.getInstance()}async init(){await this.subscribeToEventBusNotifications()}showToasts(){this.eventBus?.publish("SHOW_TOAST_LIST",null)}hideToasts(){this.eventBus?.publish("HIDE_TOAST_LIST",null)}async publishTransactionToasts(t){if(this.notificationsFeedManager.isNotificationsFeedOpen()&&this.eventBus){this.eventBus.publish("TRANSACTION_TOAST_DATA_UPDATE",t),this.hideToasts();return}if(!this.eventBus){let o=await this.createToastListElement();if(!o)return;this.eventBus=await o.getEventBus()}this.eventBus?.publish("TRANSACTION_TOAST_DATA_UPDATE",t)}async publishCustomToasts(t){this.eventBus?.publish("CUSTOM_TOAST_DATA_UPDATE",t)}handleOpenNotificationsFeed(){this.notificationsFeedManager.openNotificationsFeed()}destroy(){this.eventBusUnsubscribeFunctions.forEach(t=>t()),this.eventBusUnsubscribeFunctions=[],this.notificationsFeedManager?.destroy()}async createToastListElement(){return this.toastsElement?this.toastsElement:(this.isCreatingElement||(this.isCreatingElement=!0,this.toastsElement=await ft.create({name:"mvx-toast-list"}),this.isCreatingElement=!1),this.toastsElement)}async subscribeToEventBusNotifications(){let t=await this.createToastListElement();if(t){if(this.eventBus=await t.getEventBus(),!this.eventBus)throw new Error("eventBus is not initialized");this.eventBus.subscribe("CLOSE_TOAST",this.onCloseToast),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("CLOSE_TOAST",this.onCloseToast)}),this.eventBus.subscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this)),this.eventBusUnsubscribeFunctions.push(()=>{this.eventBus?.unsubscribe("OPEN_NOTIFICATIONS_FEED",this.handleOpenNotificationsFeed.bind(this))})}}};var d=class s{constructor(t){this.transactionToasts=[];this.customToasts=[];this.unsubscribeFromStore=()=>null;this.uiCoordinator=null;this.destroy(),this.store=t?.store||u(),this.lifetimeManager=t?.lifetimeManager??new O,this.uiCoordinator=t?.uiCoordinator??new k({onCloseToast:this.closeToast.bind(this)})}async init({successfulToastLifetime:t=5e3}={}){this.successfulToastLifetime=t,this.lifetimeManager.init({successfulToastLifetime:t}),await this.updateTransactionToastsList(),await this.updateCustomToastList(),await this.uiCoordinator?.init(),this.unsubscribeFromStore=this.store.subscribe(async({toasts:o,transactions:e},{toasts:n,transactions:i})=>{let r=!G(n.transactionToasts,o.transactionToasts),c=!G(i,e);(r||c)&&await this.updateTransactionToastsList(),!G(n.customToasts,o.customToasts)&&await this.updateCustomToastList()})}static getInstance(){return s.instance||(s.instance=new s),s.instance}handleCompletedTransaction(t){let{transactions:o}=this.store.getState(),e=o[t];if(!e)return!1;let{status:n}=e,i=Tt(n),r=lt(n),c=pt(n),a=r||c||i;return a?(this.successfulToastLifetime&&this.lifetimeManager.start(t),a):(this.lifetimeManager.stop(t),a)}async createTransactionToast(t,o){let e=_t({toastId:t,totalDuration:o});return this.handleCompletedTransaction(t),await this.updateTransactionToastsList(),e}async createCustomToast(t){let o=B(t);return await this.updateCustomToastList(),o}async updateTransactionToastsList(){let t=this.store.getState(),{toasts:o}=t,{pendingTransactionToasts:e,completedTransactionToasts:n}=await w({store:t});this.transactionToasts=[...e,...n];for(let i of o.transactionToasts)this.handleCompletedTransaction(i.toastId);await this.publishTransactionToasts()}async updateCustomToastList(){let{toasts:t}=this.store.getState();this.customToasts=[];for(let o of t.customToasts){let n="message"in o?{...o}:{...o,instantiateToastElement:R[o.toastId]};this.customToasts.push(n),o.duration&&this.lifetimeManager.startWithCustomDuration(o.toastId,o.duration)}await this.uiCoordinator?.publishCustomToasts(this.customToasts)}handleTransactionToastClose(t){return this.handleCompletedTransaction(t)?(F(t),!0):!1}async showToasts(){this.uiCoordinator?.showToasts(),await this.updateCustomToastList(),await this.updateTransactionToastsList()}hideToasts(){this.uiCoordinator?.hideToasts()}closeToast(t){if(this.customToasts.find(e=>e.toastId===t)){this.lifetimeManager.stop(t);let e=f[t];return e?.(),P(t),!0}return this.handleTransactionToastClose(t)}async publishTransactionToasts(){await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts)}destroy(){this.unsubscribeFromStore(),this.lifetimeManager?.destroy(),this.uiCoordinator?.destroy(),Ut()}};var D=class s{constructor(){this.store=u();this.warningLogoutTimeoutRef=null;this.actualLogoutTimeoutRef=null;this.plannedLogoutTimeoutRef=null;this.plannedLogoutKey=null;this.init=async()=>{if(!this.shouldStart())return;let t=this.store.getState(),o=h(t),{isExpired:e}=C(o?.nativeAuthToken);e?y().logout():this.addPlannedLogout()};this.stop=()=>{clearTimeout(this.warningLogoutTimeoutRef??0),clearTimeout(this.plannedLogoutTimeoutRef??0),clearTimeout(this.actualLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=null,this.plannedLogoutTimeoutRef=null,this.actualLogoutTimeoutRef=null,this.plannedLogoutKey=null};this.shouldStart=()=>{let t=this.store.getState(),o=h(t),e=J(t);return!!(o?.nativeAuthToken&&e)};this.addPlannedLogout=()=>{let t=y(),o=V(this.store.getState()),e=t.getType()===b.webview;if(!o||e)return;this.addLogoutWarning();let n=h(this.store.getState()),{secondsUntilExpires:i,expiresAt:r}=C(n?.nativeAuthToken),c=new K(String(i)),a=`${o}_${r}`,m=this.plannedLogoutKey===a;if(!(i&&c.isGreaterThan(0))||m)return;this.plannedLogoutKey=a,clearTimeout(this.plannedLogoutTimeoutRef??0);let l=c.times(1e3);this.actualLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-logout",iconClassName:"warning",title:"Logging out",icon:"close",message:"Your session has expired!"}),this.actualLogoutTimeoutRef=null},l.toNumber()-3e3),this.plannedLogoutTimeoutRef=setTimeout(()=>{t.logout(),this.plannedLogoutTimeoutRef=null,this.plannedLogoutKey=null},l.toNumber())};this.addLogoutWarning=()=>{if(this.warningLogoutTimeoutRef)return;let t=S(this.store.getState()),o=h(this.store.getState()),{secondsUntilExpires:e}=C(o?.nativeAuthToken),n=new K(String(e)),i=n.times(1e3);if(!e||n.isLessThanOrEqualTo(0)||!t?.tokenExpirationToastWarningSeconds)return;let c=new K(t?.tokenExpirationToastWarningSeconds??0).times(1e3),a=n.times(1e3).minus(c),m=vt(i.toNumber()),p=a.isLessThanOrEqualTo(0)?0:a.toNumber();clearTimeout(this.warningLogoutTimeoutRef??0),this.warningLogoutTimeoutRef=setTimeout(()=>{d.getInstance().createCustomToast({toastId:"native-auth-expired",iconClassName:"warning",title:"Session Expiration Warning",icon:"hourglass",message:`Your session will expire in ${m}!`}),this.warningLogoutTimeoutRef=null},p)}}static getInstance(){return s.instance||(s.instance=new s),s.instance}};async function Wt({sessionId:s,transactionBatch:t,isSequential:o}){try{if(t==null)return;let e=bt(),n=Ct(t),i=await St(n);for(let T of i)await It({serverTransaction:T,sessionId:s,isSequential:o});if(!i.every(T=>T.status!=="pending"))return;e&&await U();let{transactions:c}=g(),a=c?.[s];if(a.transactions.every(T=>T.status==="success"))return L({sessionId:s,status:"success"});if(a.transactions.some(T=>T.status==="fail"))return L({sessionId:s,status:"fail"});if(a.transactions.every(T=>T.status==="not executed"))return L({sessionId:s,status:"invalid"})}catch(e){console.error(e)}}async function Ht(){let s=at(g()),t=Object.entries(s);t.length!==0&&await Promise.all(t.map(([o,{transactions:e}])=>Wt({sessionId:o,transactionBatch:e})))}async function _(){let s=u(),t=Et(),o=null,e=Y(s.getState())?.timestamp??null,n=async()=>{try{await Ht()}catch(p){console.error("[trackTransactions] Error checking transaction status:",p)}},i=()=>{o||(o=setInterval(n,t))},r=()=>{o&&(clearInterval(o),o=null)},c=()=>{r();let p=s.subscribe(({account:{websocketEvent:l}})=>{l?.message&&l.timestamp!=null&&e!==l.timestamp&&(e=l.timestamp,n())});$.set("websocketEventReceived",p)};n();let a=()=>{r()},m=s.subscribe(({account:{address:p},config:{websocketStatus:l}},T)=>{if(T.config.websocketStatus!==l)switch(l){case"completed":c();break;case"pending":i();break;default:p?i():a();break}});return $.set("websocketStatusChanged",m),{stopTransactionsTracking:a}}async function j({address:s,provider:t,apiAddress:o}){let e=await I({address:s,baseURL:o});if(!e)throw new Error("Account not found");Lt({address:s,providerType:t.getType()});let n={...e,username:N(e.username),nonce:E(e)};A(n),await x(s),_(),e.shard!=null&&await wt({shard:Number(e.shard),apiAddress:o})}async function Qt(s){let{network:{apiAddress:t}}=v();await s.login();let o=await s.getAddress();if(!o)throw new Error("Address not found");return await j({address:o,provider:s,apiAddress:t}),{address:o}}async function Xt({provider:s,nativeAuthConfig:t,token:o}){let{network:{apiAddress:e}}=v(),n=nt(t),i=o;i||(i=await n.initialize({noCache:!0}));let r=await s.login({token:i}),{address:c,signature:a,...m}=r;if(!c)return console.warn("Login cancelled."),null;if(!a)return console.error("Failed to sign login token"),null;let p=et(m?.accessToken),l=await xt({loginData:r,nativeAuthConfig:t,loginToken:i}),T=p?m.accessToken:n.getToken({address:c,token:l,signature:a});ot({loginToken:i,signature:a,nativeAuthToken:T});let H=await At({loginToken:i,extraInfoData:{multisig:m?.multisig,impersonate:m?.impersonate},address:c});return await j({address:H,provider:s,apiAddress:e}),{address:H,signature:a}}async function $t(s,t){let o=S(g());if(o)return await Xt({provider:s,nativeAuthConfig:o,token:t?.token});let{address:e}=await Qt(s);return await x(e),_(),{address:e,signature:""}}var z={error:{title:"Error when signing".toString(),iconClassName:"danger",toastId:`${ct}-${Date.now()}`},warning:{title:"Signing canceled".toString(),iconClassName:"warning",toastId:`${rt}-${Date.now()}`}},Zt={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"},to=s=>{for(let[t,o]of Object.entries(Zt))if(s.includes(t))return o;return"Error when signing"};function q(s,t="error"){let o=s?.message,e=to(o),i=e!=="Error when signing"?"warning":t,r=Object.keys(z).includes(i)?z[i]:z.error,{toastId:c,iconClassName:a,title:m}=r;return B({toastId:c,duration:1e4,icon:"close",iconClassName:a,message:e,title:m}),e}async function Gt({provider:s,transactions:t,options:o={}}){await U();let{isGuarded:e,activeGuardianAddress:n,nonce:i}=Ft(),r=s.getType()===b.ledger,c=Mt({latestNonce:i,transactions:t}),a=n&&e&&!o.skipGuardian?c?.map(p=>(p.version=Q.withTxOptions().valueOf(),p.options=Z.withOptions({guarded:!0,...r?{hashSign:!0}:{}}).valueOf(),p.guardian=X.newFromBech32(n),p)):c,m=await s.signTransactions(a)??[];return yt(i+m.length),m}var W=class{constructor(t){this._isLoggingOut=!1;this.provider=t}init(){return this.provider.init()}async login(t){let o=await $t(this.provider,t);return tt(this.provider.getType()),Kt(this),D.getInstance().init(),o}isInitialized(){return this.provider.isInitialized()}async logout(t={shouldBroadcastLogoutAcrossTabs:!0}){if(this._isLoggingOut)return console.warn("Logout already in progress"),!1;this._isLoggingOut=!0;let o=await Nt({provider:this.provider,options:t});return this._isLoggingOut=!1,o}getType(){return this.provider.getType()}getProvider(){return this.provider}async signTransactions(t,o){try{return await Gt({provider:this.provider,transactions:t,options:o})}catch(e){let n=q(e);throw new Error(n)}}async signMessage(t,o){try{return await Ot({provider:this.provider,message:t,options:o})}catch(e){let n=q(e,"warning");throw new Error(n)}}async verifyMessage(t){return await Pt(t)}cancelLogin(){this.provider.cancelLogin?.()}};var jt=null;function Kt(s){jt=s}function y(){return jt||new W(kt)}var oo=async()=>{try{let s=it(),{network:t}=v();try{let o=await I({address:s,baseURL:t.apiAddress});if(o!=null){let e={...o,username:N(o.username),nonce:E(o)};return A(e),e}}catch(o){console.error("Failed getting account ",o)}}catch(s){console.error("Failed getting address ",s)}return null};async function U(){let s=y();if(s==null)throw"Provider not initialized";try{if(!s.init)throw"Current provider does not have init() function";return await s.init()?await oo():void 0}catch(t){console.error("Failed initializing provider ",t)}}var R={},f={},so=(s,t)=>{u().setState(({toasts:o})=>{let e=o.customToasts.length>0?Math.max(...o.customToasts.map(a=>parseInt(a.toastId.split("-").pop()??"0"))):0,n=t??`custom-toast-${e+1}`,i=o.customToasts.findIndex(a=>a.toastId===n),r={...s,toastId:n};if(i!==-1){o.customToasts[i]=r;return}o.customToasts.push({...r,toastId:n})},!1,{type:"addCustomToast",payload:{value:{customToast:s,currentToastId:t}}})},P=s=>{u().setState(({toasts:t})=>{t.customToasts=t.customToasts.filter(o=>o.toastId!==s)},!1,{type:"removeCustomToast",payload:{value:s}})},Ut=()=>{u().setState(({toasts:s})=>{s.customToasts=[]},!1,{type:"removeAllCustomToasts",payload:{value:null}})},an=()=>{u().setState(({toasts:s})=>{s.transactionToasts=[]})},_t=({toastId:s,totalDuration:t})=>{let o="";return u().setState(({toasts:e})=>{let n=e.transactionToasts.length>0?Math.max(...e.transactionToasts.map(i=>parseInt(i.toastId.split("-").pop()??"0"))):0;o=s??`transaction-toast-${n+1}`,e.transactionToasts.push({startTime:st(),endTime:Rt(t),toastId:o})},!1,"addTransactionToast"),o},F=s=>{u().setState(({toasts:t})=>{t.transactionToasts=t.transactionToasts.filter(o=>o.toastId!==s)},!1,"removeTransactionToast"),delete f[s],delete R[s]},B=s=>{let{toasts:t}=u().getState(),o=t.customToasts.length>0?Math.max(...t.customToasts.map(n=>parseInt(n.toastId.split("-").pop()??"0"))):0,e=s.toastId||`custom-toast-${o+1}`;return s.onClose&&(f[e]=s.onClose),s.instantiateToastElement?(R[e]=s.instantiateToastElement,u().setState(({toasts:n})=>{let i=n.customToasts.findIndex(a=>a.toastId===e),r={...s,instantiateToastElement:null,toastId:e};i!==-1?n.customToasts[i]=r:n.customToasts.push(r)},!1,"createCustomToast"),e):(so(s,e),e)};export{R as a,f as b,so as c,P as d,Ut as e,an as f,_t as g,F as h,B as i,O as j,M as k,k as l,d as m,D as n,Wt as o,Ht as p,_ as q,j as r,$t as s,q as t,Gt as u,W as v,Kt as w,y as x,U as y};
2
+ //# sourceMappingURL=chunk-7CT7RHSK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/LogoutManager/LogoutManager.ts", "../../src/managers/ToastManager/ToastManager.ts", "../../src/managers/ToastManager/helpers/LifetimeManager.ts", "../../src/managers/NotificationsFeedManager/NotificationsFeedManager.ts", "../../src/managers/ToastManager/ToastUICoordinator.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/helpers/checkBatch/checkBatch.ts", "../../src/methods/trackTransactions/helpers/checkTransactionStatus/checkTransactionStatus.ts", "../../src/methods/trackTransactions/trackTransactions.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"],
4
+ "sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { ToastManager } from 'managers/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 { IconNamesEnum } from 'types';\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: IconNamesEnum.close,\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: IconNamesEnum.hourglass,\n message: `Your session will expire in ${readableMinutesUntilLogout}!`\n });\n this.warningLogoutTimeoutRef = null;\n }, timeoutUntilLogoutWarning);\n };\n}\n", "import isEqual from 'lodash.isequal';\nimport { DEFAULT_TOAST_LIFETIME } from 'constants/transactions.constants';\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 { createToastsFromTransactions } from './helpers/createToastsFromTransactions';\nimport { LifetimeManager } from './helpers/LifetimeManager';\nimport { ToastUICoordinator } from './ToastUICoordinator';\nimport { ITransactionToast } from './types';\n\ninterface IToastManager {\n successfulToastLifetime?: number;\n}\n\nexport class ToastManager {\n private readonly lifetimeManager: LifetimeManager;\n private store: ReturnType<typeof getStore>;\n private static instance: ToastManager;\n private transactionToasts: ITransactionToast[] = [];\n private customToasts: CustomToastType[] = [];\n private successfulToastLifetime?: number;\n private unsubscribeFromStore: () => void = () => null;\n private uiCoordinator: ToastUICoordinator | null = null;\n\n constructor(props?: {\n store?: ReturnType<typeof getStore>;\n lifetimeManager?: LifetimeManager;\n uiCoordinator?: ToastUICoordinator;\n }) {\n this.destroy();\n this.store = props?.store || getStore();\n this.lifetimeManager = props?.lifetimeManager ?? new LifetimeManager();\n this.uiCoordinator =\n props?.uiCoordinator ??\n new ToastUICoordinator({\n onCloseToast: this.closeToast.bind(this)\n });\n }\n\n public async init({\n successfulToastLifetime = DEFAULT_TOAST_LIFETIME\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.uiCoordinator?.init();\n\n this.unsubscribeFromStore = this.store.subscribe(\n async (\n { toasts, transactions },\n { toasts: prevToasts, transactions: prevTransactions }\n ) => {\n const newToastsWereCreated = !isEqual(\n prevToasts.transactionToasts,\n toasts.transactionToasts\n );\n const checkBatchHasNewData = !isEqual(prevTransactions, transactions);\n\n if (newToastsWereCreated || checkBatchHasNewData) {\n await this.updateTransactionToastsList();\n }\n\n const newCustomToastsWereCreated = !isEqual(\n prevToasts.customToasts,\n toasts.customToasts\n );\n\n if (newCustomToastsWereCreated) {\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 async createCustomToast(toast: CustomToastType): Promise<string> {\n const toastId = createCustomToast(toast);\n await this.updateCustomToastList();\n return toastId;\n }\n\n private async updateTransactionToastsList() {\n const store = this.store.getState();\n const { toasts: toastList } = store;\n\n const { pendingTransactionToasts, completedTransactionToasts } =\n await createToastsFromTransactions({\n store\n });\n\n this.transactionToasts = [\n ...pendingTransactionToasts,\n ...completedTransactionToasts\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 await this.uiCoordinator?.publishCustomToasts(this.customToasts);\n }\n\n private handleTransactionToastClose(toastId: string): boolean {\n const isCompleted = this.handleCompletedTransaction(toastId);\n\n if (isCompleted) {\n removeTransactionToast(toastId);\n return true;\n }\n\n return false;\n }\n\n public async showToasts() {\n this.uiCoordinator?.showToasts();\n await this.updateCustomToastList();\n await this.updateTransactionToastsList();\n }\n\n public hideToasts() {\n this.uiCoordinator?.hideToasts();\n }\n\n public closeToast(toastId: string): boolean {\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 true;\n }\n\n return this.handleTransactionToastClose(toastId);\n }\n\n private async publishTransactionToasts() {\n await this.uiCoordinator?.publishTransactionToasts(this.transactionToasts);\n }\n\n public destroy() {\n this.unsubscribeFromStore();\n this.lifetimeManager?.destroy();\n this.uiCoordinator?.destroy();\n removeAllCustomToasts();\n }\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", "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 { TransactionsSliceType } from 'store/slices/transactions/transactionsSlice.types';\nimport { getStore } from 'store/store';\nimport { TransactionServerStatusesEnum } from 'types/enums.types';\nimport { TransactionBatchStatusesEnum } from 'types/enums.types';\nimport { NotificationsFeedEventsEnum } from './types';\nimport { SidePanelBaseManager } from '../internal/SidePanelBaseManager/SidePanelBaseManager';\nimport { ToastManager } from '../ToastManager';\nimport { createToastsFromTransactions } from '../ToastManager/helpers/createToastsFromTransactions';\nimport { ITransactionToast } from '../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: ReturnType<typeof 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(store?: ReturnType<typeof getStore>) {\n super({\n uiDataUpdateEvent: NotificationsFeedEventsEnum.OPEN,\n uiTag: UITagsEnum.NOTIFICATIONS_FEED\n });\n this.store = store || getStore();\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 /**\n * Close the notifications feed and toggle on the toast manager.\n */\n protected async handleCloseUI() {\n const toastManager = ToastManager.getInstance();\n 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 } = this.store.getState();\n\n const { pendingTransactionToasts } = await createToastsFromTransactions();\n\n this.data.pendingTransactions = pendingTransactionToasts;\n\n const transactionsSessions = Object.keys(transactions).reduce(\n (acc, key) => {\n const isPendingStatus = [\n TransactionBatchStatusesEnum.sent,\n `${TransactionServerStatusesEnum.pending}`\n ].includes(String(transactions[key].status));\n\n if (!isPendingStatus) {\n acc[key] = transactions[key];\n }\n return acc;\n },\n {} as TransactionsSliceType\n );\n\n this.data.historicTransactions =\n await TransactionsHistoryController.getTransactionsHistory({\n transactionsSessions\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 { UITagsEnum } from 'constants/UITags.enum';\nimport { MvxToastList } from 'lib/sdkDappUi';\nimport { NotificationsFeedManager } from 'managers/NotificationsFeedManager/NotificationsFeedManager';\nimport type { 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 { ToastEventsEnum } from './types';\nimport type { ITransactionToast } from './types';\n\ntype OnCloseToastType = (toastId: string) => boolean;\ntype StoreObjectType = ReturnType<typeof getStore>;\n\nexport class ToastUICoordinator {\n private toastsElement: MvxToastList | null = null;\n private eventBus: IEventBus<\n ITransactionToast[] | CustomToastType[] | null\n > | null = null;\n private isCreatingElement = false;\n private eventBusUnsubscribeFunctions: (() => void)[] = [];\n private readonly notificationsFeedManager: NotificationsFeedManager;\n private readonly store: StoreObjectType;\n private readonly onCloseToast: OnCloseToastType;\n\n constructor(props: {\n onCloseToast: OnCloseToastType;\n store?: StoreObjectType;\n notificationsFeedManager?: NotificationsFeedManager;\n }) {\n this.onCloseToast = props.onCloseToast;\n this.store = props.store || getStore();\n this.notificationsFeedManager =\n props.notificationsFeedManager || NotificationsFeedManager.getInstance();\n }\n\n public async init() {\n await this.subscribeToEventBusNotifications();\n }\n\n public showToasts() {\n this.eventBus?.publish(ToastEventsEnum.SHOW, null);\n }\n\n public hideToasts() {\n this.eventBus?.publish(ToastEventsEnum.HIDE, null);\n }\n\n public async publishTransactionToasts(toasts: ITransactionToast[]) {\n if (\n this.notificationsFeedManager.isNotificationsFeedOpen() &&\n this.eventBus\n ) {\n this.eventBus.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n this.hideToasts();\n return;\n }\n\n if (!this.eventBus) {\n const toastsElement = await this.createToastListElement();\n if (!toastsElement) {\n return;\n }\n this.eventBus = await toastsElement.getEventBus();\n }\n\n this.eventBus?.publish(\n ToastEventsEnum.TRANSACTION_TOAST_DATA_UPDATE,\n toasts\n );\n }\n\n public async publishCustomToasts(customToasts: CustomToastType[]) {\n this.eventBus?.publish(\n ToastEventsEnum.CUSTOM_TOAST_DATA_UPDATE,\n customToasts\n );\n }\n\n private handleOpenNotificationsFeed() {\n this.notificationsFeedManager.openNotificationsFeed();\n }\n\n public destroy() {\n this.eventBusUnsubscribeFunctions.forEach((unsubscribe) => unsubscribe());\n this.eventBusUnsubscribeFunctions = [];\n this.notificationsFeedManager?.destroy();\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 this.toastsElement = await ComponentFactory.create<MvxToastList>({\n name: UITagsEnum.TOAST_LIST\n });\n this.isCreatingElement = false;\n }\n\n return this.toastsElement;\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(ToastEventsEnum.CLOSE, this.onCloseToast);\n\n this.eventBusUnsubscribeFunctions.push(() => {\n this.eventBus?.unsubscribe(ToastEventsEnum.CLOSE, this.onCloseToast);\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", "import { getTransactionsByHashes } from 'apiCalls/transactions/getTransactionsByHashes';\nimport { getIsLoggedIn } from 'methods/account/getIsLoggedIn';\nimport { updateSessionStatus } from 'store/actions/transactions/transactionsActions';\nimport { getState } from 'store/store';\nimport {\n TransactionBatchStatusesEnum,\n TransactionServerStatusesEnum\n} from 'types/enums.types';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nimport { refreshAccount } from 'utils';\nimport { getPendingTransactions } from '../getPendingTransactions';\nimport { runTransactionStatusUpdate } from './helpers/runTransactionStatusUpdate';\n\nexport interface TransactionStatusTrackerPropsType {\n sessionId: string;\n transactionBatch: SignedTransactionType[];\n isSequential?: boolean;\n}\n\nexport async function checkBatch({\n sessionId,\n transactionBatch: transactions,\n isSequential\n}: TransactionStatusTrackerPropsType) {\n try {\n if (transactions == null) {\n return;\n }\n\n const isLoggedIn = getIsLoggedIn();\n\n const pendingTransactions = getPendingTransactions(transactions);\n\n const serverTransactions =\n await getTransactionsByHashes(pendingTransactions);\n\n for (const serverTransaction of serverTransactions) {\n await runTransactionStatusUpdate({\n serverTransaction,\n sessionId,\n isSequential\n });\n }\n\n const hasCompleted = serverTransactions.every(\n (tx) => tx.status !== TransactionServerStatusesEnum.pending\n );\n\n if (!hasCompleted) {\n return;\n }\n\n if (isLoggedIn) {\n await refreshAccount();\n }\n\n // Call the onSuccess or onFail callback only if the transactions are sent normally (not using batch transactions mechanism).\n // The batch transactions mechanism will call the callbacks separately.\n\n const { transactions: sessions } = getState();\n const session = sessions?.[sessionId];\n\n const isSuccessful = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.success\n );\n\n if (isSuccessful) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.success\n });\n }\n\n const isFailed = session.transactions.some(\n (tx) => tx.status === TransactionServerStatusesEnum.fail\n );\n\n if (isFailed) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.fail\n });\n }\n\n const isInvalid = session.transactions.every(\n (tx) => tx.status === TransactionServerStatusesEnum.notExecuted\n );\n\n if (isInvalid) {\n return updateSessionStatus({\n sessionId,\n status: TransactionBatchStatusesEnum.invalid\n });\n }\n } catch (error) {\n console.error(error);\n }\n}\n", "import { pendingTransactionsSessionsSelector } from 'store/selectors/transactionsSelector';\nimport { getState } from 'store/store';\nimport { checkBatch } from './helpers/checkBatch';\n\nexport async function checkTransactionStatus() {\n const pendingSessions = pendingTransactionsSessionsSelector(getState());\n\n const entries = Object.entries(pendingSessions);\n if (entries.length === 0) {\n return;\n }\n\n await Promise.all(\n entries.map(([sessionId, { transactions }]) =>\n checkBatch({\n sessionId,\n transactionBatch: transactions\n })\n )\n );\n}\n", "import { subscriptions } from 'constants/storage.constants';\nimport { WebsocketConnectionStatusEnum } from 'constants/websocket.constants';\nimport { websocketEventSelector } from 'store/selectors/accountSelectors';\nimport { getStore } from 'store/store';\nimport { SubscriptionsEnum } from 'types/subscriptions.type';\nimport { checkTransactionStatus } from './helpers/checkTransactionStatus';\nimport { getPollingInterval } from './helpers/getPollingInterval';\n\n/**\n * Tracks transactions using websocket or polling\n * @returns stopTransactionsTracking function\n */\nexport async function trackTransactions(): Promise<{\n stopTransactionsTracking: () => void;\n}> {\n const store = getStore();\n const pollingInterval = getPollingInterval();\n let pollingIntervalRef: ReturnType<typeof setTimeout> | null = null;\n let timestamp = websocketEventSelector(store.getState())?.timestamp ?? null;\n\n const recheckStatus = async (): Promise<void> => {\n try {\n await checkTransactionStatus();\n } catch (error) {\n console.error(\n '[trackTransactions] Error checking transaction status:',\n error\n );\n }\n };\n\n const startPolling = (): void => {\n // Prevent multiple polling intervals\n if (pollingIntervalRef) {\n return;\n }\n pollingIntervalRef = setInterval(recheckStatus, pollingInterval);\n };\n\n const stopPolling = (): void => {\n if (pollingIntervalRef) {\n clearInterval(pollingIntervalRef);\n pollingIntervalRef = null;\n }\n };\n\n const setupWebSocketTracking = (): void => {\n stopPolling();\n const unsubscribeWebsocketEvent = store.subscribe(\n ({ account: { websocketEvent } }) => {\n if (\n websocketEvent?.message &&\n websocketEvent.timestamp != null &&\n timestamp !== websocketEvent.timestamp\n ) {\n timestamp = websocketEvent.timestamp;\n recheckStatus();\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketEventReceived,\n unsubscribeWebsocketEvent\n );\n };\n\n // Initial execution\n recheckStatus();\n\n const stopTransactionsTracking = (): void => {\n stopPolling();\n };\n\n const unsubscribeWebsocketStatus = store.subscribe(\n ({ account: { address }, config: { websocketStatus } }, prevState) => {\n const hasStatusChange =\n prevState.config.websocketStatus !== websocketStatus;\n\n if (!hasStatusChange) {\n return;\n }\n\n switch (websocketStatus) {\n case WebsocketConnectionStatusEnum.COMPLETED:\n setupWebSocketTracking();\n break;\n case WebsocketConnectionStatusEnum.PENDING:\n startPolling();\n break;\n default:\n address ? startPolling() : stopTransactionsTracking();\n break;\n }\n }\n );\n\n subscriptions.set(\n SubscriptionsEnum.websocketStatusChanged,\n unsubscribeWebsocketStatus\n );\n return { stopTransactionsTracking };\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 { decodeNativeAuthToken } from 'services/nativeAuth/helpers/decodeNativeAuthToken';\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';\nimport { getMultisigLoginToken } from './helpers/getMultisigLoginToken';\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 loginData = await provider.login({\n token: loginToken\n });\n\n const { address, signature, ...loginResult } = loginData;\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 // nativeAuthToken received from hub login\n const decodedToken = decodeNativeAuthToken(loginResult?.accessToken);\n\n const usedLoginToken = await getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n });\n\n const nativeAuthToken = decodedToken\n ? loginResult.accessToken\n : nativeAuthClient.getToken({\n address,\n token: usedLoginToken,\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, signature: '' };\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 { createCustomToast } from 'store/actions';\nimport {\n IconNamesEnum,\n SigningErrorsEnum,\n SigningWarningsEnum\n} 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: IconNamesEnum.close,\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 private _isLoggingOut = false;\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 }\n ): Promise<boolean> {\n if (this._isLoggingOut) {\n console.warn('Logout already in progress');\n return false;\n }\n\n this._isLoggingOut = true;\n\n const isLoggedOut = await logout({ provider: this.provider, options });\n\n this._isLoggingOut = false;\n\n return isLoggedOut;\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 const account = await setNewAccount();\n\n return account;\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 {\n type: 'addCustomToast',\n // @ts-ignore\n payload: {\n value: { customToast, currentToastId }\n }\n }\n );\n};\n\nexport const removeCustomToast = (toastId: string) => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = state.customToasts.filter(\n (toast) => toast.toastId !== toastId\n );\n },\n false,\n {\n type: 'removeCustomToast',\n // @ts-ignore\n payload: {\n value: toastId\n }\n }\n );\n};\n\nexport const removeAllCustomToasts = () => {\n getStore().setState(\n ({ toasts: state }) => {\n state.customToasts = [];\n },\n false,\n {\n type: 'removeAllCustomToasts',\n // @ts-ignore\n payload: {\n value: null\n }\n }\n );\n};\n\nexport const removeAllTransactionToasts = () => {\n getStore().setState(({ 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"],
5
+ "mappings": "y2DAAA,OAAOA,MAAe,eCAtB,OAAOC,MAAa,iBCUpB,IAAMC,GAAoC,IAE7BC,EAAN,KAAsB,CAK3B,aAAc,CAJd,KAAQ,iBACN,IAAI,IACN,KAAQ,wBAAkCD,GAS1C,KAAO,MAASE,GAAoB,CAGlC,GAFA,KAAK,KAAKA,CAAO,EAEb,KAAK,yBAA2B,EAClC,OAGF,IAAMC,EAAU,WAAW,IAAM,CAC/BC,EAAuBF,CAAO,CAChC,EAAG,KAAK,uBAAuB,EAE/B,KAAK,iBAAiB,IAAIA,EAASC,CAAO,CAC5C,EAEA,KAAO,wBAA0B,CAACD,EAAiBG,IAAqB,CAGtE,GAFA,KAAK,KAAKH,CAAO,EAEbG,GAAY,EACd,OAGF,IAAMF,EAAU,WAAW,IAAM,CAC/BG,EAAkBJ,CAAO,EACzB,IAAMK,EAAcC,EAAmCN,CAAO,EAC9DK,IAAc,CAChB,EAAGF,CAAQ,EAEX,KAAK,iBAAiB,IAAIH,EAASC,CAAO,CAC5C,EAEA,KAAO,KAAQD,GAAoB,CACjC,IAAMC,EAAU,KAAK,iBAAiB,IAAID,CAAO,EAC7CC,IACF,aAAaA,CAAO,EACpB,KAAK,iBAAiB,OAAOD,CAAO,EAExC,CA3Ce,CAER,KAAK,CAAE,wBAAAO,CAAwB,EAAgC,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QAAAb,CACF,EAEqBC,IAAuB,GAG1CJ,EAAM,aAAaI,CAAkB,EAAIF,EAEzCF,EAAM,aAAa,KAAKE,CAAK,CAEjC,EACA,GACA,mBACF,EAEOC,IAGTP,GAAeoB,EAAOb,CAAO,EACtBA,EACT",
6
+ "names": ["BigNumber", "isEqual", "DEFAULT_SUCCESSFUL_TOAST_LIFETIME", "LifetimeManager", "toastId", "timeout", "removeTransactionToast", "duration", "removeCustomToast", "handleClose", "customToastCloseHandlersDictionary", "successfulToastLifetime", "interval", "isEqual", "NOTIFICATIONS_FEED_STORE_SUBSCRIBE", "NotificationsFeedManager", "_NotificationsFeedManager", "SidePanelBaseManager", "store", "getStore", "ToastManager", "storeToastsUnsubscribe", "toasts", "transactions", "prevToasts", "prevTransactions", "isEqual", "toastManager", "pendingTransactionToasts", "createToastsFromTransactions", "transactionsSessions", "acc", "key", "TransactionsHistoryController", "clearCompletedTransactions", "ToastUICoordinator", "props", "getStore", "NotificationsFeedManager", "toasts", "toastsElement", "customToasts", "unsubscribe", "ComponentFactory", "ToastManager", "_ToastManager", "props", "getStore", "LifetimeManager", "ToastUICoordinator", "successfulToastLifetime", "toasts", "transactions", "prevToasts", "prevTransactions", "newToastsWereCreated", "isEqual", "checkBatchHasNewData", "toastId", "transaction", "status", "isTimedOut", "getIsTransactionTimedOut", "isFailed", "getIsTransactionFailed", "isSuccessful", "getIsTransactionSuccessful", "isCompleted", "totalDuration", "newToastId", "addTransactionToast", "toast", "createCustomToast", "store", "toastList", "pendingTransactionToasts", "completedTransactionToasts", "createToastsFromTransactions", "newToast", "customToastComponentDictionary", "removeTransactionToast", "handleClose", "customToastCloseHandlersDictionary", "removeCustomToast", "removeAllCustomToasts", "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", "checkBatch", "sessionId", "transactions", "isSequential", "isLoggedIn", "getIsLoggedIn", "pendingTransactions", "getPendingTransactions", "serverTransactions", "getTransactionsByHashes", "serverTransaction", "runTransactionStatusUpdate", "tx", "refreshAccount", "sessions", "getState", "session", "updateSessionStatus", "error", "checkTransactionStatus", "pendingSessions", "pendingTransactionsSessionsSelector", "getState", "entries", "sessionId", "transactions", "checkBatch", "trackTransactions", "store", "getStore", "pollingInterval", "getPollingInterval", "pollingIntervalRef", "timestamp", "websocketEventSelector", "recheckStatus", "checkTransactionStatus", "error", "startPolling", "stopPolling", "setupWebSocketTracking", "unsubscribeWebsocketEvent", "websocketEvent", "subscriptions", "stopTransactionsTracking", "unsubscribeWebsocketStatus", "address", "websocketStatus", "prevState", "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", "loginData", "signature", "loginResult", "decodedToken", "decodeNativeAuthToken", "usedLoginToken", "getMultisigLoginToken", "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", "isLoggedOut", "logout", "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"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-KIBWVS7T.mjs";import a from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(a(t))return[];let i=s(t);return r({transactions:i})};export{e as a};
2
- //# sourceMappingURL=chunk-M42UYGCH.mjs.map
1
+ import{a as s}from"./chunk-55W25Q35.mjs";import{a as r}from"./chunk-FEYKZZ67.mjs";import a from"lodash.isempty";var e=async({transactionsSessions:t})=>{if(a(t))return[];let i=s(t);return r({transactions:i})};export{e as a};
2
+ //# sourceMappingURL=chunk-7Z26MA4H.mjs.map
@@ -1,2 +1,2 @@
1
1
  import{j as i}from"./chunk-E2GGD7D4.mjs";function a(r){return r.reduce((e,n)=>(n.hash!=null&&i(n.status)&&e.push(n),e),[])}export{a};
2
- //# sourceMappingURL=chunk-VRLS225Q.mjs.map
2
+ //# sourceMappingURL=chunk-ABBDCZHP.mjs.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/getPendingTransactions.ts"],
3
+ "sources": ["../../src/methods/trackTransactions/helpers/checkTransactionStatus/helpers/getPendingTransactions.ts"],
4
4
  "sourcesContent": ["import { getIsTransactionPending } from 'store/actions/transactions/transactionStateByStatus';\nimport { SignedTransactionType } from 'types/transactions.types';\n\nexport function getPendingTransactions(\n transactions: SignedTransactionType[]\n): SignedTransactionType[] {\n const pendingTransactions = transactions.reduce(\n (acc: SignedTransactionType[], transaction) => {\n if (\n transaction.hash != null &&\n getIsTransactionPending(transaction.status)\n ) {\n acc.push(transaction);\n }\n return acc;\n },\n []\n );\n return pendingTransactions;\n}\n"],
5
5
  "mappings": "yCAGO,SAASA,EACdC,EACyB,CAazB,OAZ4BA,EAAa,OACvC,CAACC,EAA8BC,KAE3BA,EAAY,MAAQ,MACpBC,EAAwBD,EAAY,MAAM,GAE1CD,EAAI,KAAKC,CAAW,EAEfD,GAET,CAAC,CACH,CAEF",
6
6
  "names": ["getPendingTransactions", "transactions", "acc", "transaction", "getIsTransactionPending"]
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-TIJEFUI3.mjs";import{a as t}from"./chunk-NJL7IL6P.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
- //# sourceMappingURL=chunk-LJVBVKNW.mjs.map
1
+ import{a as n}from"./chunk-6NWGAFI5.mjs";import{a as t}from"./chunk-FEP3SR47.mjs";var i=class extends n{constructor({uiDataUpdateEvent:e,uiTag:s}){super({uiDataUpdateEvent:e,uiTag:s});this.isOpen=!1;this.data=this.getInitialData()}async openUI(){this.isOpen&&this.uiElement||(await super.init(),this.setIsSidePanelOpen(!0))}destroy(){if(this.setIsSidePanelOpen(!1),this.uiElement?.closeWithAnimation){this.uiElement?.closeWithAnimation?.().finally(()=>{super.destroy()});return}super.destroy()}closeUI(){this.resetData(),this.destroy()}setIsSidePanelOpen(e){this.isOpen=e,t(e)}};export{i as a};
2
+ //# sourceMappingURL=chunk-AU76TGKZ.mjs.map
@@ -1,2 +1,2 @@
1
- import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-TLSLNBIX.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-NJWQNAUZ.mjs.map
1
+ import{e as o,f as a,g as i,h as r}from"./chunk-NGM3AVCY.mjs";import{s as c}from"./chunk-W3L462S3.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-BDZ33IMP.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-5JK6P55K.mjs";import{a as f}from"./chunk-52A7HOT5.mjs";import{a as g}from"./chunk-ALOBJ2YK.mjs";import{b as a}from"./chunk-TLSLNBIX.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
- //# sourceMappingURL=chunk-HFY2UB7E.mjs.map
1
+ import{a as u}from"./chunk-IECHAN5Y.mjs";import{a as f}from"./chunk-O4PUBLYW.mjs";import{a as g}from"./chunk-JFWHJ7VA.mjs";import{b as a}from"./chunk-W3L462S3.mjs";import{c as s,g as r}from"./chunk-NTEMINYA.mjs";var v=async({signMessageCallback:m,nativeAuthClientConfig:o})=>{let{address:t}=u(),c=g(),i=f(o||c),e=await i.initialize({noCache:!!o});if(!e)return null;let h=new r({address:new s(t),data:Buffer.from(`${t}${e}`)}),n=await m(h,{});if(!n?.signature)throw"Message not signed";return a({loginToken:e,signature:Buffer.from(n.signature).toString("hex")}),i.getToken({address:t,token:e,signature:Buffer.from(n.signature).toString("hex")})};export{v as a};
2
+ //# sourceMappingURL=chunk-BHLMFKLS.mjs.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-TIJEFUI3.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-6AC63JD5.mjs.map
1
+ import{a as i}from"./chunk-6NWGAFI5.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-BOJYDCZ5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/managers/internal/LedgerConnectStateManager/LedgerConnectStateManager.ts"],
4
+ "sourcesContent": ["import { UITagsEnum } from 'constants/UITags.enum';\n\nimport { MvxLedgerConnect } from 'lib/sdkDappUI.components';\nimport { UnlockPanelEventsEnum } from 'managers/UnlockPanelManager/UnlockPanelManager.types';\nimport {\n IAccountScreenData,\n ILedgerAccount,\n ILedgerConnectPanelData,\n IConnectScreenData,\n IConfirmScreenData\n} from 'providers/strategies/LedgerProviderStrategy/types/ledger.types';\nimport { LedgerConnectEventsEnum } from './types';\nimport { UIBaseManager } from '../UIBaseManager/UIBaseManager';\n\ntype AuthEventsParams = {\n handleCancel: () => Promise<void>;\n handleAccessWallet: (payload: {\n addressIndex: number;\n selectedAddress: string;\n }) => Promise<void>;\n handleGoToPage: (page: number) => Promise<void>;\n};\n\ntype ProviderInitEventsParams = {\n handleRetry: () => void;\n handleCancel: () => void;\n};\n\nexport class LedgerConnectStateManager extends UIBaseManager<\n MvxLedgerConnect,\n ILedgerConnectPanelData,\n LedgerConnectEventsEnum\n> {\n private static instance: LedgerConnectStateManager;\n\n public static getInstance(): LedgerConnectStateManager {\n if (!LedgerConnectStateManager.instance) {\n LedgerConnectStateManager.instance = new LedgerConnectStateManager();\n }\n return LedgerConnectStateManager.instance;\n }\n\n public readonly addressesPerPage = 10;\n\n private allAccounts: ILedgerAccount[] = [];\n\n // first screen data\n private initialConnectScreenData: IConnectScreenData = {};\n private connectScreenData: IConnectScreenData = {\n ...this.initialConnectScreenData\n };\n\n // second screen data\n private initialAccountScreenData: IAccountScreenData = {\n accounts: this.allAccounts,\n startIndex: 0,\n addressesPerPage: this.addressesPerPage,\n isLoading: true\n };\n\n private accountScreenData: IAccountScreenData = {\n ...this.initialAccountScreenData\n };\n\n // third screen data\n private initialConfirmScreenData: IConfirmScreenData = {\n selectedAddress: '',\n explorerLink: ''\n };\n\n private confirmScreenData: IConfirmScreenData = {\n ...this.initialConfirmScreenData\n };\n\n protected initialData: ILedgerConnectPanelData = {\n connectScreenData: this.initialConnectScreenData,\n accountScreenData: this.initialAccountScreenData,\n confirmScreenData: this.initialConfirmScreenData\n };\n\n constructor() {\n super({\n uiDataUpdateEvent: LedgerConnectEventsEnum.DATA_UPDATE,\n uiTag: UITagsEnum.LEDGER_CONNECT\n });\n this.data = this.getInitialData();\n }\n\n public updateAllAccounts(accounts: ILedgerAccount[]): void {\n this.allAccounts = accounts;\n this.accountScreenData.accounts = accounts;\n }\n\n public updateStartIndex(startIndex: number): void {\n this.accountScreenData.startIndex = startIndex;\n }\n\n public updateConnectScreen(members: Partial<IConnectScreenData>): void {\n this.connectScreenData = {\n ...this.connectScreenData,\n ...members\n };\n\n this.data.confirmScreenData = null;\n this.data.accountScreenData = null;\n this.data.connectScreenData = this.connectScreenData;\n this.notifyDataUpdate();\n }\n\n public updateAccountScreen(members: Partial<IAccountScreenData>): void {\n this.accountScreenData = {\n ...this.accountScreenData,\n ...members\n };\n this.data.confirmScreenData = null;\n this.data.accountScreenData = this.accountScreenData;\n this.notifyDataUpdate();\n }\n\n public updateConfirmScreen(members: Partial<IConfirmScreenData>): void {\n this.confirmScreenData = {\n ...this.confirmScreenData,\n ...members\n };\n this.data.accountScreenData = null;\n this.data.confirmScreenData = this.confirmScreenData;\n this.notifyDataUpdate();\n }\n\n public getAccountScreenData(): IAccountScreenData | null {\n return this.data.accountScreenData;\n }\n\n public getConfirmScreenData(): IConfirmScreenData | null {\n return this.data.confirmScreenData;\n }\n\n public getAllAccounts(): ILedgerAccount[] {\n return this.allAccounts;\n }\n\n public subscribeToProviderInit({\n handleRetry,\n handleCancel\n }: ProviderInitEventsParams): void {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.CONNECT_DEVICE,\n handleRetry\n );\n this.eventBus.subscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.UI_DISCONNECTED,\n this.destroy.bind(this)\n );\n }\n\n public unsubscribeFromProviderInit({\n handleRetry,\n handleCancel\n }: ProviderInitEventsParams): void {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.CONNECT_DEVICE,\n handleRetry\n );\n this.eventBus.unsubscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.UI_DISCONNECTED,\n this.destroy.bind(this)\n );\n }\n\n public subscribeToAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n }: AuthEventsParams) {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.ACCESS_WALLET,\n handleAccessWallet\n );\n this.eventBus.subscribe(LedgerConnectEventsEnum.GO_TO_PAGE, handleGoToPage);\n }\n public unsubscribeFromAuthEvents({\n handleCancel,\n handleAccessWallet,\n handleGoToPage\n }: AuthEventsParams) {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.unsubscribe(LedgerConnectEventsEnum.CLOSE, handleCancel);\n\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.ACCESS_WALLET,\n handleAccessWallet\n );\n this.eventBus.unsubscribe(\n LedgerConnectEventsEnum.GO_TO_PAGE,\n handleGoToPage\n );\n }\n\n public handleClose() {\n if (this.anchor) {\n this.anchor?.dispatchEvent(\n new CustomEvent(UnlockPanelEventsEnum.ANCHOR_CLOSE, {\n composed: false,\n bubbles: false\n })\n );\n } else {\n this.destroy();\n }\n }\n\n protected resetData(): void {\n this.accountScreenData = { ...this.initialAccountScreenData };\n this.confirmScreenData = { ...this.initialConfirmScreenData };\n this.connectScreenData = { ...this.initialConnectScreenData };\n super.resetData();\n }\n\n protected async setupEventListeners() {\n if (!this.eventBus) {\n return;\n }\n\n this.eventBus.subscribe(\n LedgerConnectEventsEnum.CLOSE,\n this.handleClose.bind(this)\n );\n }\n}\n"],
5
+ "mappings": "yCA4BO,IAAMA,EAAN,MAAMC,UAAkCC,CAI7C,CAgDA,aAAc,CACZ,MAAM,CACJ,gCACA,0BACF,CAAC,EA1CH,KAAgB,iBAAmB,GAEnC,KAAQ,YAAgC,CAAC,EAGzC,KAAQ,yBAA+C,CAAC,EACxD,KAAQ,kBAAwC,CAC9C,GAAG,KAAK,wBACV,EAGA,KAAQ,yBAA+C,CACrD,SAAU,KAAK,YACf,WAAY,EACZ,iBAAkB,KAAK,iBACvB,UAAW,EACb,EAEA,KAAQ,kBAAwC,CAC9C,GAAG,KAAK,wBACV,EAGA,KAAQ,yBAA+C,CACrD,gBAAiB,GACjB,aAAc,EAChB,EAEA,KAAQ,kBAAwC,CAC9C,GAAG,KAAK,wBACV,EA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aAAAC,CACF,EAAmC,CAC5B,KAAK,WAIV,KAAK,SAAS,6BAEZD,CACF,EACA,KAAK,SAAS,oBAA2CC,CAAY,EACrE,KAAK,SAAS,8BAEZ,KAAK,QAAQ,KAAK,IAAI,CACxB,EACF,CAEO,sBAAsB,CAC3B,aAAAA,EACA,mBAAAC,EACA,eAAAC,CACF,EAAqB,CACd,KAAK,WAIV,KAAK,SAAS,kBAAyCF,CAAY,EAEnE,KAAK,SAAS,0BAEZC,CACF,EACA,KAAK,SAAS,uBAA8CC,CAAc,EAC5E,CACO,0BAA0B,CAC/B,aAAAF,EACA,mBAAAC,EACA,eAAAC,CACF,EAAqB,CACd,KAAK,WAIV,KAAK,SAAS,oBAA2CF,CAAY,EAErE,KAAK,SAAS,4BAEZC,CACF,EACA,KAAK,SAAS,yBAEZC,CACF,EACF,CAEO,aAAc,CACf,KAAK,OACP,KAAK,QAAQ,cACX,IAAI,2BAAgD,CAClD,SAAU,GACV,QAAS,EACX,CAAC,CACH,EAEA,KAAK,QAAQ,CAEjB,CAEU,WAAkB,CAC1B,KAAK,kBAAoB,CAAE,GAAG,KAAK,wBAAyB,EAC5D,KAAK,kBAAoB,CAAE,GAAG,KAAK,wBAAyB,EAC5D,KAAK,kBAAoB,CAAE,GAAG,KAAK,wBAAyB,EAC5D,MAAM,UAAU,CAClB,CAEA,MAAgB,qBAAsB,CAC/B,KAAK,UAIV,KAAK,SAAS,kBAEZ,KAAK,YAAY,KAAK,IAAI,CAC5B,CACF,CACF",
6
+ "names": ["LedgerConnectStateManager", "_LedgerConnectStateManager", "UIBaseManager", "accounts", "startIndex", "members", "handleRetry", "handleCancel", "handleAccessWallet", "handleGoToPage"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as f}from"./chunk-O4PUBLYW.mjs";import{a as g}from"./chunk-WE7YOBO7.mjs";import m from"lodash.isequal";async function k({loginData:u,nativeAuthConfig:o,loginToken:r}){let{address:d,signature:l,...s}=u,a=Object.keys(s).reduce((t,e)=>{let n=s[e];return n!=null&&(t[e]=n.toString()),t},{}),i={...o};if(Object.keys(a).length>0&&(i.extraInfo=a),!m(o,i)){let t=g(r);return await f(i).initialize({noCache:!0,latestBlockInfo:{hash:t?.blockHash??"",timestamp:t?.extraInfo?.timestamp??0}})}return r}export{k as a};
2
+ //# sourceMappingURL=chunk-BQS32EX5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/providers/DappProvider/helpers/login/helpers/getMultisigLoginToken.ts"],
4
+ "sourcesContent": ["import isEqual from 'lodash.isequal';\nimport { IProvider } from 'providers/types/providerFactory.types';\nimport { decodeLoginToken } from 'services/nativeAuth/helpers/decodeLoginToken';\nimport { nativeAuth } from 'services/nativeAuth/nativeAuth';\nimport { NativeAuthConfigType } from 'services/nativeAuth/nativeAuth.types';\n\nexport async function getMultisigLoginToken({\n loginData,\n nativeAuthConfig,\n loginToken\n}: {\n loginData: Awaited<ReturnType<IProvider['login']>>;\n nativeAuthConfig: NativeAuthConfigType;\n loginToken: string;\n}): Promise<string> {\n const {\n address: _address,\n signature: _signature,\n ...loginResult\n } = loginData;\n\n const extraInfo = Object.keys(loginResult).reduce(\n (acc, key) => {\n const value = loginResult[key];\n if (value != null) {\n acc[key] = value.toString();\n }\n return acc;\n },\n {} as { [key: string]: string }\n );\n\n const modifiedNativeAuthConfig: NativeAuthConfigType = {\n ...nativeAuthConfig\n };\n\n if (Object.keys(extraInfo).length > 0) {\n modifiedNativeAuthConfig.extraInfo = extraInfo;\n }\n\n const isSameConfig = isEqual(nativeAuthConfig, modifiedNativeAuthConfig);\n\n if (!isSameConfig) {\n const existingLoginToken = decodeLoginToken(loginToken);\n const nativeAuthClient = nativeAuth(modifiedNativeAuthConfig);\n const modifiedLoginToken = await nativeAuthClient.initialize({\n noCache: true,\n latestBlockInfo: {\n hash: existingLoginToken?.blockHash ?? '',\n timestamp: existingLoginToken?.extraInfo?.timestamp ?? 0\n }\n });\n return modifiedLoginToken;\n }\n\n return loginToken;\n}\n"],
5
+ "mappings": "kFAAA,OAAOA,MAAa,iBAMpB,eAAsBC,EAAsB,CAC1C,UAAAC,EACA,iBAAAC,EACA,WAAAC,CACF,EAIoB,CAClB,GAAM,CACJ,QAASC,EACT,UAAWC,EACX,GAAGC,CACL,EAAIL,EAEEM,EAAY,OAAO,KAAKD,CAAW,EAAE,OACzC,CAACE,EAAKC,IAAQ,CACZ,IAAMC,EAAQJ,EAAYG,CAAG,EAC7B,OAAIC,GAAS,OACXF,EAAIC,CAAG,EAAIC,EAAM,SAAS,GAErBF,CACT,EACA,CAAC,CACH,EAEMG,EAAiD,CACrD,GAAGT,CACL,EAQA,GANI,OAAO,KAAKK,CAAS,EAAE,OAAS,IAClCI,EAAyB,UAAYJ,GAKnC,CAFiBK,EAAQV,EAAkBS,CAAwB,EAEpD,CACjB,IAAME,EAAqBC,EAAiBX,CAAU,EAStD,OAP2B,MADFY,EAAWJ,CAAwB,EACV,WAAW,CAC3D,QAAS,GACT,gBAAiB,CACf,KAAME,GAAoB,WAAa,GACvC,UAAWA,GAAoB,WAAW,WAAa,CACzD,CACF,CAAC,CAEH,CAEA,OAAOV,CACT",
6
+ "names": ["isEqual", "getMultisigLoginToken", "loginData", "nativeAuthConfig", "loginToken", "_address", "_signature", "loginResult", "extraInfo", "acc", "key", "value", "modifiedNativeAuthConfig", "isEqual", "existingLoginToken", "decodeLoginToken", "nativeAuth"]
7
+ }