@ledgerhq/live-common 34.49.0-nightly.5 → 34.49.0

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 (253) hide show
  1. package/lib/bridge/react/BridgeSync.d.ts.map +1 -1
  2. package/lib/bridge/react/BridgeSync.js +4 -17
  3. package/lib/bridge/react/BridgeSync.js.map +1 -1
  4. package/lib/deposit/deposit.integration.test.js +1 -60
  5. package/lib/deposit/deposit.integration.test.js.map +1 -1
  6. package/lib/e2e/data/deviceLabelsData.js +2 -2
  7. package/lib/e2e/data/deviceLabelsData.js.map +1 -1
  8. package/lib/e2e/enum/Account.d.ts +0 -1
  9. package/lib/e2e/enum/Account.d.ts.map +1 -1
  10. package/lib/e2e/enum/Account.js +1 -2
  11. package/lib/e2e/enum/Account.js.map +1 -1
  12. package/lib/e2e/enum/DeviceLabels.d.ts +9 -3
  13. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  14. package/lib/e2e/enum/DeviceLabels.js +8 -2
  15. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  16. package/lib/e2e/families/bitcoin.d.ts +0 -1
  17. package/lib/e2e/families/bitcoin.d.ts.map +1 -1
  18. package/lib/e2e/families/bitcoin.js +1 -28
  19. package/lib/e2e/families/bitcoin.js.map +1 -1
  20. package/lib/e2e/families/tezos.d.ts.map +1 -1
  21. package/lib/e2e/families/tezos.js +3 -5
  22. package/lib/e2e/families/tezos.js.map +1 -1
  23. package/lib/e2e/index.d.ts +0 -4
  24. package/lib/e2e/index.d.ts.map +1 -1
  25. package/lib/e2e/models/Swap.d.ts +0 -2
  26. package/lib/e2e/models/Swap.d.ts.map +1 -1
  27. package/lib/e2e/models/Swap.js +0 -6
  28. package/lib/e2e/models/Swap.js.map +1 -1
  29. package/lib/e2e/speculos.d.ts +0 -8
  30. package/lib/e2e/speculos.d.ts.map +1 -1
  31. package/lib/e2e/speculos.js +31 -23
  32. package/lib/e2e/speculos.js.map +1 -1
  33. package/lib/exchange/providers/swap.js +2 -2
  34. package/lib/exchange/providers/swap.js.map +1 -1
  35. package/lib/families/celo/bridge.integration.test.js +1 -4
  36. package/lib/families/celo/bridge.integration.test.js.map +1 -1
  37. package/lib/families/cosmos/datasets/axelar.integration.test.js +1 -4
  38. package/lib/families/cosmos/datasets/axelar.integration.test.js.map +1 -1
  39. package/lib/families/cosmos/datasets/desmos.integration.test.js +1 -4
  40. package/lib/families/cosmos/datasets/desmos.integration.test.js.map +1 -1
  41. package/lib/families/cosmos/datasets/onomy.integration.test.js +1 -4
  42. package/lib/families/cosmos/datasets/onomy.integration.test.js.map +1 -1
  43. package/lib/families/filecoin/bridge.integration.test.js +1 -4
  44. package/lib/families/filecoin/bridge.integration.test.js.map +1 -1
  45. package/lib/families/kaspa/bridge.integration.test.js +1 -4
  46. package/lib/families/kaspa/bridge.integration.test.js.map +1 -1
  47. package/lib/families/mina/bridge.integration.test.js +1 -4
  48. package/lib/families/mina/bridge.integration.test.js.map +1 -1
  49. package/lib/families/multiversx/synchronisation.integration.test.js +1 -4
  50. package/lib/families/multiversx/synchronisation.integration.test.js.map +1 -1
  51. package/lib/families/ton/bridge.integration.test.js +1 -4
  52. package/lib/families/ton/bridge.integration.test.js.map +1 -1
  53. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  54. package/lib/featureFlags/defaultFeatures.js +0 -2
  55. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  56. package/lib/featureFlags/useFeature.d.ts +1 -1
  57. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  58. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +0 -1
  59. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
  60. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +0 -1
  61. package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -1
  62. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +0 -1
  63. package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -1
  64. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -1
  65. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  66. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -1
  67. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  68. package/lib/notifications/ServiceStatusProvider/index.d.ts +1 -18
  69. package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  70. package/lib/notifications/ServiceStatusProvider/index.js +9 -47
  71. package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
  72. package/lib/notifications/ServiceStatusProvider/types.d.ts +1 -3
  73. package/lib/notifications/ServiceStatusProvider/types.d.ts.map +1 -1
  74. package/lib/wallet-api/react.d.ts +1 -1
  75. package/lib/wallet-api/react.d.ts.map +1 -1
  76. package/lib/wallet-api/react.js +1 -1
  77. package/lib/wallet-api/react.js.map +1 -1
  78. package/lib-es/bridge/react/BridgeSync.d.ts.map +1 -1
  79. package/lib-es/bridge/react/BridgeSync.js +4 -17
  80. package/lib-es/bridge/react/BridgeSync.js.map +1 -1
  81. package/lib-es/deposit/deposit.integration.test.js +1 -37
  82. package/lib-es/deposit/deposit.integration.test.js.map +1 -1
  83. package/lib-es/e2e/data/deviceLabelsData.js +2 -2
  84. package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
  85. package/lib-es/e2e/enum/Account.d.ts +0 -1
  86. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  87. package/lib-es/e2e/enum/Account.js +1 -2
  88. package/lib-es/e2e/enum/Account.js.map +1 -1
  89. package/lib-es/e2e/enum/DeviceLabels.d.ts +9 -3
  90. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  91. package/lib-es/e2e/enum/DeviceLabels.js +8 -2
  92. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  93. package/lib-es/e2e/families/bitcoin.d.ts +0 -1
  94. package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
  95. package/lib-es/e2e/families/bitcoin.js +1 -27
  96. package/lib-es/e2e/families/bitcoin.js.map +1 -1
  97. package/lib-es/e2e/families/tezos.d.ts.map +1 -1
  98. package/lib-es/e2e/families/tezos.js +4 -6
  99. package/lib-es/e2e/families/tezos.js.map +1 -1
  100. package/lib-es/e2e/index.d.ts +0 -4
  101. package/lib-es/e2e/index.d.ts.map +1 -1
  102. package/lib-es/e2e/models/Swap.d.ts +0 -2
  103. package/lib-es/e2e/models/Swap.d.ts.map +1 -1
  104. package/lib-es/e2e/models/Swap.js +0 -6
  105. package/lib-es/e2e/models/Swap.js.map +1 -1
  106. package/lib-es/e2e/speculos.d.ts +0 -8
  107. package/lib-es/e2e/speculos.d.ts.map +1 -1
  108. package/lib-es/e2e/speculos.js +32 -23
  109. package/lib-es/e2e/speculos.js.map +1 -1
  110. package/lib-es/exchange/providers/swap.js +2 -2
  111. package/lib-es/exchange/providers/swap.js.map +1 -1
  112. package/lib-es/families/celo/bridge.integration.test.js +1 -4
  113. package/lib-es/families/celo/bridge.integration.test.js.map +1 -1
  114. package/lib-es/families/cosmos/datasets/axelar.integration.test.js +1 -4
  115. package/lib-es/families/cosmos/datasets/axelar.integration.test.js.map +1 -1
  116. package/lib-es/families/cosmos/datasets/desmos.integration.test.js +1 -4
  117. package/lib-es/families/cosmos/datasets/desmos.integration.test.js.map +1 -1
  118. package/lib-es/families/cosmos/datasets/onomy.integration.test.js +1 -4
  119. package/lib-es/families/cosmos/datasets/onomy.integration.test.js.map +1 -1
  120. package/lib-es/families/filecoin/bridge.integration.test.js +1 -4
  121. package/lib-es/families/filecoin/bridge.integration.test.js.map +1 -1
  122. package/lib-es/families/kaspa/bridge.integration.test.js +1 -4
  123. package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -1
  124. package/lib-es/families/mina/bridge.integration.test.js +1 -4
  125. package/lib-es/families/mina/bridge.integration.test.js.map +1 -1
  126. package/lib-es/families/multiversx/synchronisation.integration.test.js +1 -4
  127. package/lib-es/families/multiversx/synchronisation.integration.test.js.map +1 -1
  128. package/lib-es/families/ton/bridge.integration.test.js +1 -4
  129. package/lib-es/families/ton/bridge.integration.test.js.map +1 -1
  130. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  131. package/lib-es/featureFlags/defaultFeatures.js +0 -2
  132. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  133. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  134. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  135. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +0 -1
  136. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
  137. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +0 -1
  138. package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -1
  139. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +0 -1
  140. package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -1
  141. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -1
  142. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  143. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -1
  144. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  145. package/lib-es/notifications/ServiceStatusProvider/index.d.ts +1 -18
  146. package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  147. package/lib-es/notifications/ServiceStatusProvider/index.js +9 -47
  148. package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
  149. package/lib-es/notifications/ServiceStatusProvider/types.d.ts +1 -3
  150. package/lib-es/notifications/ServiceStatusProvider/types.d.ts.map +1 -1
  151. package/lib-es/wallet-api/react.d.ts +1 -1
  152. package/lib-es/wallet-api/react.d.ts.map +1 -1
  153. package/lib-es/wallet-api/react.js +1 -1
  154. package/lib-es/wallet-api/react.js.map +1 -1
  155. package/package.json +69 -69
  156. package/src/bridge/react/BridgeSync.tsx +3 -17
  157. package/src/deposit/deposit.integration.test.ts +2 -41
  158. package/src/e2e/data/deviceLabelsData.ts +2 -2
  159. package/src/e2e/enum/Account.ts +0 -7
  160. package/src/e2e/enum/DeviceLabels.ts +8 -2
  161. package/src/e2e/families/bitcoin.ts +1 -33
  162. package/src/e2e/families/tezos.ts +4 -13
  163. package/src/e2e/models/Swap.ts +0 -8
  164. package/src/e2e/speculos.ts +35 -26
  165. package/src/exchange/providers/swap.ts +2 -2
  166. package/src/families/celo/__snapshots__/bridge.integration.test.ts.snap +285 -0
  167. package/src/families/celo/bridge.integration.test.ts +1 -4
  168. package/src/families/cosmos/datasets/__snapshots__/axelar.integration.test.ts.snap +45 -0
  169. package/src/families/cosmos/datasets/__snapshots__/babylon.integration.test.ts.snap +2 -2
  170. package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +4 -299
  171. package/src/families/cosmos/datasets/__snapshots__/cryptoOrg.integration.test.ts.snap +2 -2
  172. package/src/families/cosmos/datasets/__snapshots__/desmos.integration.test.ts.snap +45 -0
  173. package/src/families/cosmos/datasets/__snapshots__/injective.integration.test.ts.snap +2 -2
  174. package/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap +2 -2
  175. package/src/families/cosmos/datasets/__snapshots__/onomy.integration.test.ts.snap +45 -0
  176. package/src/families/cosmos/datasets/__snapshots__/osmosis.integration.test.ts.snap +2 -2
  177. package/src/families/cosmos/datasets/__snapshots__/persistence.integration.test.ts.snap +4 -4
  178. package/src/families/cosmos/datasets/__snapshots__/stargaze.integration.test.ts.snap +2 -2
  179. package/src/families/cosmos/datasets/__snapshots__/xion.integration.test.ts.snap +2 -2
  180. package/src/families/cosmos/datasets/axelar.integration.test.ts +1 -4
  181. package/src/families/cosmos/datasets/desmos.integration.test.ts +1 -4
  182. package/src/families/cosmos/datasets/onomy.integration.test.ts +1 -4
  183. package/src/families/filecoin/__snapshots__/bridge.integration.test.ts.snap +242 -0
  184. package/src/families/filecoin/bridge.integration.test.ts +1 -4
  185. package/src/families/internet_computer/__snapshots__/bridge.integration.test.ts.snap +3 -60
  186. package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
  187. package/src/families/kaspa/bridge.integration.test.ts +1 -4
  188. package/src/families/mina/__snapshots__/bridge.integration.test.ts.snap +169 -0
  189. package/src/families/mina/bridge.integration.test.ts +1 -4
  190. package/src/families/multiversx/synchronisation.integration.test.ts +1 -5
  191. package/src/families/polkadot/__snapshots__/bridge.integration.test.ts.snap +4 -50
  192. package/src/families/stacks/__snapshots__/bridge.integration.test.ts.snap +3 -23
  193. package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +74 -1504
  194. package/src/families/ton/__snapshots__/bridge.integration.test.ts.snap +338 -0
  195. package/src/families/ton/bridge.integration.test.ts +1 -4
  196. package/src/featureFlags/defaultFeatures.ts +0 -2
  197. package/src/notifications/ServiceStatusProvider/index.tsx +13 -61
  198. package/src/notifications/ServiceStatusProvider/types.ts +1 -4
  199. package/src/wallet-api/react.ts +3 -3
  200. package/lib/bridge/syncSessionManager/index.d.ts +0 -18
  201. package/lib/bridge/syncSessionManager/index.d.ts.map +0 -1
  202. package/lib/bridge/syncSessionManager/index.js +0 -75
  203. package/lib/bridge/syncSessionManager/index.js.map +0 -1
  204. package/lib/bridge/syncSessionManager/index.test.d.ts +0 -2
  205. package/lib/bridge/syncSessionManager/index.test.d.ts.map +0 -1
  206. package/lib/bridge/syncSessionManager/index.test.js +0 -118
  207. package/lib/bridge/syncSessionManager/index.test.js.map +0 -1
  208. package/lib/notifications/ServiceStatusProvider/entry-points.d.ts +0 -3
  209. package/lib/notifications/ServiceStatusProvider/entry-points.d.ts.map +0 -1
  210. package/lib/notifications/ServiceStatusProvider/entry-points.js +0 -3
  211. package/lib/notifications/ServiceStatusProvider/entry-points.js.map +0 -1
  212. package/lib/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
  213. package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
  214. package/lib/notifications/ServiceStatusProvider/index.test.js +0 -88
  215. package/lib/notifications/ServiceStatusProvider/index.test.js.map +0 -1
  216. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
  217. package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
  218. package/lib/notifications/ServiceStatusProvider/ledger-components.js +0 -17
  219. package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
  220. package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts +0 -154
  221. package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts.map +0 -1
  222. package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.js +0 -1192
  223. package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.js.map +0 -1
  224. package/lib-es/bridge/syncSessionManager/index.d.ts +0 -18
  225. package/lib-es/bridge/syncSessionManager/index.d.ts.map +0 -1
  226. package/lib-es/bridge/syncSessionManager/index.js +0 -68
  227. package/lib-es/bridge/syncSessionManager/index.js.map +0 -1
  228. package/lib-es/bridge/syncSessionManager/index.test.d.ts +0 -2
  229. package/lib-es/bridge/syncSessionManager/index.test.d.ts.map +0 -1
  230. package/lib-es/bridge/syncSessionManager/index.test.js +0 -116
  231. package/lib-es/bridge/syncSessionManager/index.test.js.map +0 -1
  232. package/lib-es/notifications/ServiceStatusProvider/entry-points.d.ts +0 -3
  233. package/lib-es/notifications/ServiceStatusProvider/entry-points.d.ts.map +0 -1
  234. package/lib-es/notifications/ServiceStatusProvider/entry-points.js +0 -2
  235. package/lib-es/notifications/ServiceStatusProvider/entry-points.js.map +0 -1
  236. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
  237. package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
  238. package/lib-es/notifications/ServiceStatusProvider/index.test.js +0 -86
  239. package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +0 -1
  240. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
  241. package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
  242. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +0 -14
  243. package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
  244. package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts +0 -154
  245. package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts.map +0 -1
  246. package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.js +0 -1189
  247. package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.js.map +0 -1
  248. package/src/bridge/syncSessionManager/index.test.ts +0 -151
  249. package/src/bridge/syncSessionManager/index.ts +0 -93
  250. package/src/notifications/ServiceStatusProvider/entry-points.ts +0 -3
  251. package/src/notifications/ServiceStatusProvider/index.test.ts +0 -102
  252. package/src/notifications/ServiceStatusProvider/ledger-components.ts +0 -13
  253. package/src/notifications/ServiceStatusProvider/mocks/ledgerStatus.ts +0 -1188
@@ -0,0 +1,338 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ton currency bridge scanAccounts ton seed 1 1`] = `
4
+ [
5
+ {
6
+ "balance": "916991005",
7
+ "currencyId": "ton",
8
+ "derivationMode": "ton",
9
+ "freshAddress": "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
10
+ "freshAddressPath": "44'/607'/0'/0'/0'/0'",
11
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
12
+ "index": 0,
13
+ "operationsCount": 9,
14
+ "pendingOperations": [],
15
+ "seedIdentifier": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
16
+ "spendableBalance": "916991005",
17
+ "subAccounts": [],
18
+ "swapHistory": [],
19
+ "syncHash": undefined,
20
+ "used": true,
21
+ "xpub": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
22
+ },
23
+ {
24
+ "balance": "35000000000",
25
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
26
+ "operationsCount": 2,
27
+ "parentId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
28
+ "pendingOperations": [],
29
+ "spendableBalance": "35000000000",
30
+ "swapHistory": [],
31
+ "tokenId": "ton/jetton/eqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm__not",
32
+ "type": "TokenAccountRaw",
33
+ },
34
+ {
35
+ "balance": "0",
36
+ "currencyId": "ton",
37
+ "derivationMode": "ton",
38
+ "freshAddress": "UQAui6M4jOYOezUGfmeONA22Ars9yjd34YIGdAR1Pcpp4sgR",
39
+ "freshAddressPath": "44'/607'/0'/0'/1'/0'",
40
+ "id": "js:2:ton:b5177c2b32f9d72fa8c673cc3d61acec6a9f68eb5e4945445fdbb48a45eb4887:ton",
41
+ "index": 1,
42
+ "operationsCount": 0,
43
+ "pendingOperations": [],
44
+ "seedIdentifier": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
45
+ "spendableBalance": "0",
46
+ "subAccounts": [],
47
+ "swapHistory": [],
48
+ "syncHash": undefined,
49
+ "used": false,
50
+ "xpub": "b5177c2b32f9d72fa8c673cc3d61acec6a9f68eb5e4945445fdbb48a45eb4887",
51
+ },
52
+ ]
53
+ `;
54
+
55
+ exports[`ton currency bridge scanAccounts ton seed 1 2`] = `
56
+ [
57
+ [
58
+ {
59
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
60
+ "blockHash": null,
61
+ "blockHeight": 40170315,
62
+ "extra": {
63
+ "comment": {
64
+ "isEncrypted": false,
65
+ "text": "",
66
+ },
67
+ "explorerHash": "xPDVakqj5a0mcix8dsTNyr4oKD0HWhk0nglfOULUFmQ=",
68
+ "lt": "48954541000001",
69
+ },
70
+ "fee": "2600565",
71
+ "hasFailed": false,
72
+ "hash": "8XFt8ApfGhsr/1B6YxFZLpVmWsTttIR4rvtkBusmQvQ=",
73
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-0J2ClZ4ywxSMQRevw1X0edMaUB874he0oVVmTsN4I7Y=-OUT",
74
+ "recipients": [
75
+ "EQDoD37lf61T2vSL1LpF9ws3SCbcvT53_5nuVd7dGHIdxgH6",
76
+ ],
77
+ "senders": [
78
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
79
+ ],
80
+ "type": "OUT",
81
+ "value": "100000000",
82
+ },
83
+ {
84
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
85
+ "blockHash": null,
86
+ "blockHeight": 37795019,
87
+ "extra": {
88
+ "comment": {
89
+ "isEncrypted": false,
90
+ "text": "",
91
+ },
92
+ "explorerHash": "bUaQn1mpH065e6GMtJAIGJ5YZiJ4g66oHKctDSmwqH4=",
93
+ "lt": "46398660000001",
94
+ },
95
+ "fee": "5547465",
96
+ "hasFailed": false,
97
+ "hash": "7ZIKj4q+KCfZ04dD7m7wI3Q/nVG6VoFujq61UtMQE3E=",
98
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-1KI+JhVbOM2sgDpvUILr6sEmQ6+Iz4twNIOG7lR2eg4=-OUT",
99
+ "recipients": [
100
+ "EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
101
+ ],
102
+ "senders": [
103
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
104
+ ],
105
+ "type": "OUT",
106
+ "value": "50000000",
107
+ },
108
+ {
109
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
110
+ "blockHash": null,
111
+ "blockHeight": 37795026,
112
+ "extra": {
113
+ "comment": {
114
+ "isEncrypted": false,
115
+ "text": "",
116
+ },
117
+ "explorerHash": "zlj5W9f4F4rHDFHzdC3gSa+nKcgobho4MV8JzZWkzoE=",
118
+ "lt": "46398669000001",
119
+ },
120
+ "fee": "396411",
121
+ "hasFailed": false,
122
+ "hash": "4dDNdHb5JwpES6VYZS6ZyKSDnNNk0i37CLF6sYqD7oc=",
123
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-4dDNdHb5JwpES6VYZS6ZyKSDnNNk0i37CLF6sYqD7oc=-IN",
124
+ "recipients": [
125
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
126
+ ],
127
+ "senders": [
128
+ "EQAnDEE6JghjaRCaY5qWTeV2AalOgyU9ohZ37pmUl-t0toX7",
129
+ ],
130
+ "type": "IN",
131
+ "value": "21509565",
132
+ },
133
+ {
134
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
135
+ "blockHash": null,
136
+ "blockHeight": 40170280,
137
+ "extra": {
138
+ "comment": {
139
+ "isEncrypted": false,
140
+ "text": "",
141
+ },
142
+ "explorerHash": "l1j2L+JrLu9MCpAJorHUbp8UtA9aMyQKrQ4zLKO7o8A=",
143
+ "lt": "48954505000001",
144
+ },
145
+ "fee": "2617007",
146
+ "hasFailed": false,
147
+ "hash": "a5ldjLyYtquGurSNnSF9Zmp3dEN4vnlermBnmvCxgd4=",
148
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-a5ldjLyYtquGurSNnSF9Zmp3dEN4vnlermBnmvCxgd4=-IN",
149
+ "recipients": [
150
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
151
+ ],
152
+ "senders": [
153
+ "EQDoD37lf61T2vSL1LpF9ws3SCbcvT53_5nuVd7dGHIdxgH6",
154
+ ],
155
+ "type": "IN",
156
+ "value": "1",
157
+ },
158
+ {
159
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
160
+ "blockHash": null,
161
+ "blockHeight": 37795081,
162
+ "extra": {
163
+ "comment": {
164
+ "isEncrypted": false,
165
+ "text": "",
166
+ },
167
+ "explorerHash": "NqRiKhgFkHGL4z75j1M70KryRr/M5JosW2Zw2pxrciU=",
168
+ "lt": "46398735000001",
169
+ },
170
+ "fee": "2474733",
171
+ "hasFailed": false,
172
+ "hash": "URAvSSvE38mTydf61TAZSVO8b2F5RRwgL61gjX77YT4=",
173
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-cva3yUb4cC+AfML9eidygO1PeYVYqLYpcprXEiw3Nj0=-OUT",
174
+ "recipients": [
175
+ "EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
176
+ ],
177
+ "senders": [
178
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
179
+ ],
180
+ "type": "OUT",
181
+ "value": "50000000",
182
+ },
183
+ {
184
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
185
+ "blockHash": null,
186
+ "blockHeight": 37795087,
187
+ "extra": {
188
+ "comment": {
189
+ "isEncrypted": false,
190
+ "text": "",
191
+ },
192
+ "explorerHash": "3QMpehQMIEz1L9i2RR8NlQ8MEhtIW8OlN9DBmm5PtyM=",
193
+ "lt": "46398745000001",
194
+ },
195
+ "fee": "396410",
196
+ "hasFailed": false,
197
+ "hash": "ExoMI/oYFVbPvh+Q52cf2Pyq0aL4jSpuwen8nmOvGBo=",
198
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-ExoMI/oYFVbPvh+Q52cf2Pyq0aL4jSpuwen8nmOvGBo=-IN",
199
+ "recipients": [
200
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
201
+ ],
202
+ "senders": [
203
+ "EQAnDEE6JghjaRCaY5qWTeV2AalOgyU9ohZ37pmUl-t0toX7",
204
+ ],
205
+ "type": "IN",
206
+ "value": "21509565",
207
+ },
208
+ {
209
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
210
+ "blockHash": null,
211
+ "blockHeight": 37794992,
212
+ "extra": {
213
+ "comment": {
214
+ "isEncrypted": false,
215
+ "text": "",
216
+ },
217
+ "explorerHash": "XxJMiFGk4BHIwNWy1w4ZdenPc0Bh2No+tpUEIi6sycs=",
218
+ "lt": "46398628000001",
219
+ },
220
+ "fee": "84142",
221
+ "hasFailed": false,
222
+ "hash": "f73qoft8iF7ANKH32Mq0cRGO9STLYlhuOFVXPQE1jI0=",
223
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-f73qoft8iF7ANKH32Mq0cRGO9STLYlhuOFVXPQE1jI0=-IN",
224
+ "recipients": [
225
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
226
+ ],
227
+ "senders": [
228
+ "EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
229
+ ],
230
+ "type": "IN",
231
+ "value": "1",
232
+ },
233
+ {
234
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
235
+ "blockHash": null,
236
+ "blockHeight": 40170325,
237
+ "extra": {
238
+ "comment": {
239
+ "isEncrypted": false,
240
+ "text": "",
241
+ },
242
+ "explorerHash": "t9vXEYLHjR3b40v4hPJQJCZRJDXhdhWiWuhzeKIIY9Y=",
243
+ "lt": "48954552000001",
244
+ },
245
+ "fee": "396410",
246
+ "hasFailed": false,
247
+ "hash": "OJbEyEj9+B9yyqkALjMDPHMj2TActki/I5nXxyb0DW4=",
248
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-OJbEyEj9+B9yyqkALjMDPHMj2TActki/I5nXxyb0DW4=-IN",
249
+ "recipients": [
250
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
251
+ ],
252
+ "senders": [
253
+ "EQCGL01uOV1AxfE_-pXqID2wT_dVrZcdGxsUy6GXULR73o_X",
254
+ ],
255
+ "type": "IN",
256
+ "value": "89965561",
257
+ },
258
+ {
259
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
260
+ "blockHash": null,
261
+ "blockHeight": 35650189,
262
+ "extra": {
263
+ "comment": {
264
+ "isEncrypted": false,
265
+ "text": "",
266
+ },
267
+ "explorerHash": "mzCqNBjsEDmpgq5VMfNfNqnslW64f/B1seatUCej9TY=",
268
+ "lt": "44161792000003",
269
+ },
270
+ "fee": "0",
271
+ "hasFailed": false,
272
+ "hash": "V0y/lJDCYzAgmzNVA+dapRQemNP+AJpVhCxBhs7eNfQ=",
273
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-V0y/lJDCYzAgmzNVA+dapRQemNP+AJpVhCxBhs7eNfQ=-IN",
274
+ "recipients": [
275
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
276
+ ],
277
+ "senders": [
278
+ "UQDzd8aeBOU-jqYw_ZSuZjceI5p-F4b7HMprAsUJAtRPbMol",
279
+ ],
280
+ "type": "IN",
281
+ "value": "1000000000",
282
+ },
283
+ ],
284
+ [
285
+ {
286
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
287
+ "blockHash": null,
288
+ "blockHeight": 1,
289
+ "extra": {
290
+ "comment": {
291
+ "isEncrypted": false,
292
+ "text": "Sending NOT",
293
+ },
294
+ "explorerHash": "I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=",
295
+ "lt": "48954545000001",
296
+ },
297
+ "fee": "0",
298
+ "hasFailed": false,
299
+ "hash": "I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=",
300
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not-I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=-OUT",
301
+ "recipients": [
302
+ "EQB0Y6BtnRS9rIJXpsTHFzhEF83Xa4e5yBDOrPEOah66rJs_",
303
+ ],
304
+ "senders": [
305
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
306
+ ],
307
+ "type": "OUT",
308
+ "value": "5000000000",
309
+ },
310
+ {
311
+ "accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
312
+ "blockHash": null,
313
+ "blockHeight": 1,
314
+ "extra": {
315
+ "comment": {
316
+ "isEncrypted": false,
317
+ "text": "",
318
+ },
319
+ "explorerHash": "XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=",
320
+ "lt": "48954497000001",
321
+ },
322
+ "fee": "0",
323
+ "hasFailed": false,
324
+ "hash": "XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=",
325
+ "id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not-XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=-IN",
326
+ "recipients": [
327
+ "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
328
+ ],
329
+ "senders": [
330
+ "EQB0Y6BtnRS9rIJXpsTHFzhEF83Xa4e5yBDOrPEOah66rJs_",
331
+ ],
332
+ "type": "IN",
333
+ "value": "40000000000",
334
+ },
335
+ ],
336
+ [],
337
+ ]
338
+ `;
@@ -2,7 +2,4 @@ import { dataset } from "@ledgerhq/coin-ton/__tests__/integration/bridge.integra
2
2
  import { testBridge } from "../../__tests__/test-helpers/bridge";
3
3
  import "../../__tests__/test-helpers/setup";
4
4
 
5
- // FIXME: Disabled due to TypeError in Send max transaction (ts.amount undefined)
6
- describe.skip("ton integration", () => {
7
- testBridge(dataset);
8
- });
5
+ testBridge(dataset);
@@ -111,7 +111,6 @@ export const DEFAULT_FEATURES: Features = {
111
111
  ptxServiceCtaExchangeDrawer: DEFAULT_FEATURE,
112
112
  ptxServiceCtaScreens: DEFAULT_FEATURE,
113
113
  ptxSwapReceiveTRC20WithoutTrx: DEFAULT_FEATURE,
114
- ptxSwapconfirmSwapOnDevice: DEFAULT_FEATURE,
115
114
  disableNftLedgerMarket: DEFAULT_FEATURE,
116
115
  disableNftRaribleOpensea: DEFAULT_FEATURE,
117
116
  disableNftSend: DEFAULT_FEATURE,
@@ -670,7 +669,6 @@ export const DEFAULT_FEATURES: Features = {
670
669
  },
671
670
  supportDeviceApex: DEFAULT_FEATURE,
672
671
  llmSyncOnboardingIncr1: DEFAULT_FEATURE,
673
- noah: DEFAULT_FEATURE,
674
672
  };
675
673
 
676
674
  // Firebase SDK treat JSON values as strings
@@ -4,9 +4,6 @@ import defaultNetworkApi from "./api";
4
4
  import { fromPromise } from "xstate";
5
5
  import { useMachine } from "@xstate/react";
6
6
  import { serviceStatusMachine } from "./machine";
7
- import { LEDGER_COMPONENTS } from "./ledger-components";
8
- import { EntryPoint } from "./entry-points";
9
-
10
7
  type Props = {
11
8
  children: React.ReactNode;
12
9
  autoUpdateDelay: number;
@@ -36,61 +33,21 @@ function escapeRegExp(string) {
36
33
  return string.replace(/[.*+?^${}()[\]\\]/g, "\\$&"); // $& means the whole matched string
37
34
  }
38
35
 
39
- function sanitizeName(name: string): string {
40
- return name.toLowerCase().trim().replace(/\s+/g, " "); // collapse multiple spaces
41
- }
42
-
43
- /**
44
- * Filters service status incidents based on related tickers or Ledger components.
45
- *
46
- * ## Behavior:
47
- * - If there are no `tickers` or no `incidents`, returns an empty list.
48
- * - For each incident:
49
- * 1. ✅ If the incident has no components → keep it (always relevant).
50
- * 2. ✅ If at least one component name matches a known **Ledger component** → keep it.
51
- * 3. ✅ If at least one component name contains a **currency ticker** → keep it.
52
- * 4. ❌ Otherwise, the incident is discarded.
53
- *
54
- * @param {Incident[]} [incidents=[]] - List of incidents to filter.
55
- * @param {string[]} [tickers=[]] - List of currency tickers to match against incident components.
56
- * @param {EntryPoint} [entryPoint] - Entry point where the incidents are displayed (specifically for Ledger components)
57
- * @returns {Incident[]} The list of incidents relevant to the provided tickers or Ledger components.
58
- */
59
-
60
36
  export function filterServiceStatusIncidents(
61
37
  incidents: Incident[],
62
38
  tickers: string[] = [],
63
- entryPoint?: EntryPoint,
64
39
  ): Incident[] {
65
- if (!incidents.length) return [];
66
- if (!tickers.length) return [];
67
-
68
- const tickerRegex = tickers.length
69
- ? new RegExp(`\\b(${tickers.map(escapeRegExp).join("|")})\\b`, "i")
70
- : null;
71
-
72
- const ledgerComponentsSet = new Set(LEDGER_COMPONENTS.map(component => sanitizeName(component)));
73
-
74
- return incidents.filter(({ components }) => {
75
- // Keep global incidents with no components
76
- if (!components?.length) return true;
77
-
78
- return components.some(({ name }) => {
79
- const sanitizedName = sanitizeName(name);
80
-
81
- // Show Ledger components only for Notification Center
82
- if (entryPoint === "notifications" && ledgerComponentsSet.has(sanitizedName)) {
83
- return true;
84
- }
85
-
86
- // Show coin/ticker-specific components for flows
87
- if (tickerRegex && tickerRegex.test(sanitizedName)) {
88
- return true;
89
- }
90
-
91
- return false;
92
- });
93
- });
40
+ if (!tickers || tickers.length === 0 || !incidents || incidents.length === 0) {
41
+ return [];
42
+ }
43
+
44
+ const tickersRegex = new RegExp(escapeRegExp(tickers.join("|")), "i");
45
+ return incidents.filter(
46
+ ({ components }) =>
47
+ !components || // dont filter out if no components
48
+ components.length === 0 ||
49
+ components.some(({ name }) => tickersRegex.test(name)), // component name should hold currency ticker
50
+ );
94
51
  }
95
52
 
96
53
  // filter out service status incidents by given currencies or fallback on context currencies
@@ -98,12 +55,8 @@ export function useFilteredServiceStatus(filters?: ServiceStatusUserSettings): S
98
55
  const stateData = useContext(ServiceStatusContext);
99
56
  const { incidents, context } = stateData;
100
57
  const filteredIncidents = useMemo(() => {
101
- return filterServiceStatusIncidents(
102
- incidents,
103
- filters?.tickers || context?.tickers,
104
- filters?.entryPoint,
105
- );
106
- }, [incidents, filters?.tickers, context?.tickers, filters?.entryPoint]);
58
+ return filterServiceStatusIncidents(incidents, filters?.tickers || context?.tickers);
59
+ }, [incidents, context, filters?.tickers]);
107
60
 
108
61
  return { ...stateData, incidents: filteredIncidents };
109
62
  }
@@ -116,7 +69,6 @@ export const ServiceStatusProvider = ({
116
69
  }: Props): ReactElement => {
117
70
  const fetchData = useCallback(async () => {
118
71
  const serviceStatusSummary = await networkApi.fetchStatusSummary();
119
-
120
72
  return {
121
73
  incidents: serviceStatusSummary.incidents,
122
74
  updateTime: Date.now(),
@@ -1,5 +1,3 @@
1
- import { EntryPoint } from "./entry-points";
2
-
3
1
  type Component = {
4
2
  id: string;
5
3
  name: string;
@@ -44,6 +42,5 @@ export type ServiceStatusApi = {
44
42
  };
45
43
 
46
44
  export type ServiceStatusUserSettings = {
47
- tickers?: string[];
48
- entryPoint?: EntryPoint;
45
+ tickers: string[];
49
46
  };
@@ -1010,11 +1010,11 @@ export interface RecentlyUsed {
1010
1010
 
1011
1011
  export type RecentlyUsedManifest = AppManifest & { usedAt: UsedAt };
1012
1012
  export type UsedAt = {
1013
- unit?: Intl.RelativeTimeFormatUnit;
1013
+ unit: Intl.RelativeTimeFormatUnit;
1014
1014
  diff: number;
1015
1015
  };
1016
1016
 
1017
- function calculateTimeDiff(usedAt: string): UsedAt {
1017
+ function calculateTimeDiff(usedAt: string) {
1018
1018
  const start = new Date();
1019
1019
  const end = new Date(usedAt);
1020
1020
  const interval = intervalToDuration({ start, end });
@@ -1027,7 +1027,7 @@ function calculateTimeDiff(usedAt: string): UsedAt {
1027
1027
  "minutes",
1028
1028
  "seconds",
1029
1029
  ];
1030
- let timeDiff: UsedAt = { unit: undefined, diff: 0 };
1030
+ let timeDiff = { unit: units[-1], diff: 0 };
1031
1031
 
1032
1032
  for (const unit of units) {
1033
1033
  if (interval[unit] > 0) {
@@ -1,18 +0,0 @@
1
- import { Account } from "@ledgerhq/types-live";
2
- import { Props } from "../react/BridgeSync";
3
- type Session = {
4
- reason: string;
5
- startTime: number;
6
- accountIds: string[];
7
- remaining: Set<string>;
8
- errorsCount: number;
9
- };
10
- export declare function createSyncSessionManager(trackAnalytics: Props["trackAnalytics"]): {
11
- readonly start: (ids: string[], reason: string) => void;
12
- readonly onAccountSyncDone: (accountId: string, accounts: Account[], hadError?: boolean) => void;
13
- };
14
- export declare function getTotalOperations(accounts: Account[]): number;
15
- export declare function getUniqueChains(accounts: Account[]): string[];
16
- export declare function trackSessionAnalytics(trackAnalytics: Props["trackAnalytics"], session: Session, accounts: Account[]): void;
17
- export {};
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC;0BAK1D,MAAM,EAAE,UAAU,MAAM;4CAmBN,MAAM,YAAY,OAAO,EAAE;EAmBlE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAE9D;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAE7D;AAED,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,EACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,EAAE,QAgBpB"}
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trackSessionAnalytics = exports.getUniqueChains = exports.getTotalOperations = exports.createSyncSessionManager = void 0;
4
- const logs_1 = require("@ledgerhq/logs");
5
- // Session manager factory to track global sync sessions (Accounts)
6
- function createSyncSessionManager(trackAnalytics) {
7
- let current = null;
8
- let hasTrackedInitial = false;
9
- const start = (ids, reason) => {
10
- if (reason === "initial" && hasTrackedInitial)
11
- return;
12
- current = {
13
- reason,
14
- startTime: Date.now(),
15
- accountIds: ids,
16
- remaining: new Set(ids),
17
- errorsCount: 0,
18
- };
19
- logSyncSession("started", { reason, accounts: ids.length });
20
- };
21
- /**
22
- *
23
- * @param accountId - the account id that has completed sync
24
- * @param accounts - the accounts that will be synced
25
- * @param hadError - whether the account sync had an error
26
- *
27
- */
28
- const onAccountSyncDone = (accountId, accounts, hadError = false) => {
29
- if (!current)
30
- return;
31
- current.remaining.delete(accountId);
32
- if (hadError) {
33
- current.errorsCount += 1;
34
- }
35
- if (current.remaining.size === 0) {
36
- trackSessionAnalytics(trackAnalytics, current, accounts);
37
- if (current.reason === "initial") {
38
- hasTrackedInitial = true;
39
- }
40
- current = null;
41
- }
42
- };
43
- return { start, onAccountSyncDone };
44
- }
45
- exports.createSyncSessionManager = createSyncSessionManager;
46
- function getTotalOperations(accounts) {
47
- return accounts.reduce((sum, acc) => sum + acc.operationsCount, 0);
48
- }
49
- exports.getTotalOperations = getTotalOperations;
50
- function getUniqueChains(accounts) {
51
- return [...new Set(accounts.map(acc => acc.currency.name))];
52
- }
53
- exports.getUniqueChains = getUniqueChains;
54
- function trackSessionAnalytics(trackAnalytics, session, accounts) {
55
- const duration = (Date.now() - session.startTime) / 1000;
56
- const totalOps = getTotalOperations(accounts);
57
- const chains = getUniqueChains(accounts);
58
- trackAnalytics("SyncSuccessAllAccounts", {
59
- duration,
60
- accountsCount: accounts.length,
61
- operationsCount: totalOps,
62
- chains,
63
- reason: session.reason,
64
- syncWithErrors: session.errorsCount,
65
- });
66
- logSyncSession("finished", { reason: session.reason, duration: `${duration}s` });
67
- }
68
- exports.trackSessionAnalytics = trackSessionAnalytics;
69
- function logSyncSession(event, data) {
70
- const serialized = Object.entries(data)
71
- .map(([key, value]) => `${key}=${value}`)
72
- .join(", ");
73
- (0, logs_1.log)("bridge", `SyncSession ${event} ${serialized}`);
74
- }
75
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.ts"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.test.ts"],"names":[],"mappings":""}