@ledgerhq/live-common 34.51.0-nightly.2 → 34.51.0-nightly.4

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 (351) hide show
  1. package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
  2. package/lib/bridge/crypto-assets/index.js +2 -32
  3. package/lib/bridge/crypto-assets/index.js.map +1 -1
  4. package/lib/bridge/crypto-assets/index.test.js +5 -38
  5. package/lib/bridge/crypto-assets/index.test.js.map +1 -1
  6. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  7. package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -1
  8. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  9. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  10. package/lib/bridge/generic-alpaca/utils.js +1 -1
  11. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  12. package/lib/currencies/cryptoIcons.test.js +4 -1
  13. package/lib/currencies/cryptoIcons.test.js.map +1 -1
  14. package/lib/currencies/index.d.ts +1 -1
  15. package/lib/currencies/index.d.ts.map +1 -1
  16. package/lib/currencies/index.js +2 -5
  17. package/lib/currencies/index.js.map +1 -1
  18. package/lib/currencies/sortByMarketcap.test.js +1 -3
  19. package/lib/currencies/sortByMarketcap.test.js.map +1 -1
  20. package/lib/deposit/deposit.test.js +29 -12
  21. package/lib/deposit/deposit.test.js.map +1 -1
  22. package/lib/deposit/helper.d.ts.map +1 -1
  23. package/lib/deposit/helper.js +5 -1
  24. package/lib/deposit/helper.js.map +1 -1
  25. package/lib/e2e/enum/Account.d.ts +4 -0
  26. package/lib/e2e/enum/Account.d.ts.map +1 -1
  27. package/lib/e2e/enum/Account.js +4 -0
  28. package/lib/e2e/enum/Account.js.map +1 -1
  29. package/lib/e2e/enum/AppInfos.d.ts +1 -0
  30. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  31. package/lib/e2e/enum/AppInfos.js +1 -0
  32. package/lib/e2e/enum/AppInfos.js.map +1 -1
  33. package/lib/e2e/enum/Currency.d.ts +2 -0
  34. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  35. package/lib/e2e/enum/Currency.js +2 -0
  36. package/lib/e2e/enum/Currency.js.map +1 -1
  37. package/lib/e2e/enum/Network.d.ts +2 -1
  38. package/lib/e2e/enum/Network.d.ts.map +1 -1
  39. package/lib/e2e/enum/Network.js +1 -0
  40. package/lib/e2e/enum/Network.js.map +1 -1
  41. package/lib/e2e/enum/TokenType.d.ts +2 -1
  42. package/lib/e2e/enum/TokenType.d.ts.map +1 -1
  43. package/lib/e2e/enum/TokenType.js +1 -0
  44. package/lib/e2e/enum/TokenType.js.map +1 -1
  45. package/lib/e2e/enum/TransactionStatus.d.ts +4 -1
  46. package/lib/e2e/enum/TransactionStatus.d.ts.map +1 -1
  47. package/lib/e2e/enum/TransactionStatus.js +3 -0
  48. package/lib/e2e/enum/TransactionStatus.js.map +1 -1
  49. package/lib/e2e/families/sui.d.ts +2 -0
  50. package/lib/e2e/families/sui.d.ts.map +1 -0
  51. package/lib/e2e/families/sui.js +11 -0
  52. package/lib/e2e/families/sui.js.map +1 -0
  53. package/lib/e2e/index.d.ts +3 -0
  54. package/lib/e2e/index.d.ts.map +1 -1
  55. package/lib/e2e/speculos.d.ts +1 -0
  56. package/lib/e2e/speculos.d.ts.map +1 -1
  57. package/lib/e2e/speculos.js +23 -1
  58. package/lib/e2e/speculos.js.map +1 -1
  59. package/lib/env.react.d.ts +1 -1
  60. package/lib/env.react.d.ts.map +1 -1
  61. package/lib/exchange/providers/swap.js +4 -4
  62. package/lib/exchange/providers/swap.js.map +1 -1
  63. package/lib/exchange/swap/api/v5/__mocks__/fetchRates.mocks.d.ts.map +1 -1
  64. package/lib/exchange/swap/api/v5/__mocks__/fetchRates.mocks.js +1 -1
  65. package/lib/exchange/swap/api/v5/__mocks__/fetchRates.mocks.js.map +1 -1
  66. package/lib/exchange/swap/hooks/useFromState.test.js +4 -1
  67. package/lib/exchange/swap/hooks/useFromState.test.js.map +1 -1
  68. package/lib/exchange/swap/hooks/useReverseAccounts.test.js +4 -1
  69. package/lib/exchange/swap/hooks/useReverseAccounts.test.js.map +1 -1
  70. package/lib/exchange/swap/hooks/useToState.test.js +4 -1
  71. package/lib/exchange/swap/hooks/useToState.test.js.map +1 -1
  72. package/lib/exchange/swap/hooks/useUpdateMaxAmount.test.js +4 -1
  73. package/lib/exchange/swap/hooks/useUpdateMaxAmount.test.js.map +1 -1
  74. package/lib/exchange/swap/mock.js +1 -1
  75. package/lib/exchange/swap/mock.js.map +1 -1
  76. package/lib/exchange/swap/utils/index.test.js +4 -1
  77. package/lib/exchange/swap/utils/index.test.js.map +1 -1
  78. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  79. package/lib/featureFlags/defaultFeatures.js +4 -0
  80. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  81. package/lib/featureFlags/useFeature.d.ts +1 -1
  82. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  83. package/lib/hooks/useManifestWithSessionId.d.ts +12 -0
  84. package/lib/hooks/useManifestWithSessionId.d.ts.map +1 -0
  85. package/lib/hooks/useManifestWithSessionId.js +67 -0
  86. package/lib/hooks/useManifestWithSessionId.js.map +1 -0
  87. package/lib/hooks/useManifestWithSessionId.test.d.ts +2 -0
  88. package/lib/hooks/useManifestWithSessionId.test.d.ts.map +1 -0
  89. package/lib/hooks/useManifestWithSessionId.test.js +71 -0
  90. package/lib/hooks/useManifestWithSessionId.test.js.map +1 -0
  91. package/lib/market/utils/index.d.ts +1 -0
  92. package/lib/market/utils/index.d.ts.map +1 -1
  93. package/lib/market/utils/index.js +16 -0
  94. package/lib/market/utils/index.js.map +1 -1
  95. package/lib/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.d.ts +2 -0
  96. package/lib/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.d.ts.map +1 -0
  97. package/lib/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.js +350 -0
  98. package/lib/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.js.map +1 -0
  99. package/lib/modularDrawer/hooks/index.d.ts +2 -0
  100. package/lib/modularDrawer/hooks/index.d.ts.map +1 -0
  101. package/lib/modularDrawer/hooks/index.js +6 -0
  102. package/lib/modularDrawer/hooks/index.js.map +1 -0
  103. package/lib/modularDrawer/hooks/useDetailedAccountsCore.d.ts +14 -0
  104. package/lib/modularDrawer/hooks/useDetailedAccountsCore.d.ts.map +1 -0
  105. package/lib/modularDrawer/hooks/useDetailedAccountsCore.js +119 -0
  106. package/lib/modularDrawer/hooks/useDetailedAccountsCore.js.map +1 -0
  107. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  108. package/lib/modularDrawer/hooks/useRightBalanceAsset.js +9 -1
  109. package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
  110. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +6 -1
  111. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  112. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +12 -4
  113. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
  114. package/lib/modularDrawer/index.d.ts +4 -0
  115. package/lib/modularDrawer/index.d.ts.map +1 -0
  116. package/lib/modularDrawer/index.js +20 -0
  117. package/lib/modularDrawer/index.js.map +1 -0
  118. package/lib/modularDrawer/types/detailedAccount.d.ts +46 -0
  119. package/lib/modularDrawer/types/detailedAccount.d.ts.map +1 -0
  120. package/lib/modularDrawer/types/detailedAccount.js +3 -0
  121. package/lib/modularDrawer/types/detailedAccount.js.map +1 -0
  122. package/lib/modularDrawer/types/index.d.ts +2 -0
  123. package/lib/modularDrawer/types/index.d.ts.map +1 -0
  124. package/lib/modularDrawer/types/index.js +18 -0
  125. package/lib/modularDrawer/types/index.js.map +1 -0
  126. package/lib/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.d.ts +2 -0
  127. package/lib/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.d.ts.map +1 -0
  128. package/lib/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.js +106 -0
  129. package/lib/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.js.map +1 -0
  130. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +3 -4
  131. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -1
  132. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +7 -0
  133. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -1
  134. package/lib/modularDrawer/utils/index.d.ts +1 -0
  135. package/lib/modularDrawer/utils/index.d.ts.map +1 -1
  136. package/lib/modularDrawer/utils/index.js +3 -1
  137. package/lib/modularDrawer/utils/index.js.map +1 -1
  138. package/lib/modularDrawer/utils/sortAccountsByFiatValue.d.ts +8 -0
  139. package/lib/modularDrawer/utils/sortAccountsByFiatValue.d.ts.map +1 -0
  140. package/lib/modularDrawer/utils/sortAccountsByFiatValue.js +17 -0
  141. package/lib/modularDrawer/utils/sortAccountsByFiatValue.js.map +1 -0
  142. package/lib/modularDrawer/utils/type.d.ts +2 -2
  143. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  144. package/lib/notifications/ServiceStatusProvider/index.d.ts +1 -1
  145. package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  146. package/lib/notifications/ServiceStatusProvider/index.js +1 -1
  147. package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
  148. package/lib/platform/providers/RemoteLiveAppProvider/api/mock.json +3 -3
  149. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js +4 -1
  150. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  151. package/lib/wallet-api/useDappLogic.js +1 -1
  152. package/lib/wallet-api/useDappLogic.js.map +1 -1
  153. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  154. package/lib-es/bridge/crypto-assets/index.js +2 -9
  155. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  156. package/lib-es/bridge/crypto-assets/index.test.js +5 -15
  157. package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
  158. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  159. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -1
  160. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  161. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  162. package/lib-es/bridge/generic-alpaca/utils.js +1 -1
  163. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  164. package/lib-es/currencies/cryptoIcons.test.js +5 -2
  165. package/lib-es/currencies/cryptoIcons.test.js.map +1 -1
  166. package/lib-es/currencies/index.d.ts +1 -1
  167. package/lib-es/currencies/index.d.ts.map +1 -1
  168. package/lib-es/currencies/index.js +1 -1
  169. package/lib-es/currencies/index.js.map +1 -1
  170. package/lib-es/currencies/sortByMarketcap.test.js +1 -3
  171. package/lib-es/currencies/sortByMarketcap.test.js.map +1 -1
  172. package/lib-es/deposit/deposit.test.js +30 -13
  173. package/lib-es/deposit/deposit.test.js.map +1 -1
  174. package/lib-es/deposit/helper.d.ts.map +1 -1
  175. package/lib-es/deposit/helper.js +6 -2
  176. package/lib-es/deposit/helper.js.map +1 -1
  177. package/lib-es/e2e/enum/Account.d.ts +4 -0
  178. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  179. package/lib-es/e2e/enum/Account.js +4 -0
  180. package/lib-es/e2e/enum/Account.js.map +1 -1
  181. package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
  182. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  183. package/lib-es/e2e/enum/AppInfos.js +1 -0
  184. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  185. package/lib-es/e2e/enum/Currency.d.ts +2 -0
  186. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  187. package/lib-es/e2e/enum/Currency.js +2 -0
  188. package/lib-es/e2e/enum/Currency.js.map +1 -1
  189. package/lib-es/e2e/enum/Network.d.ts +2 -1
  190. package/lib-es/e2e/enum/Network.d.ts.map +1 -1
  191. package/lib-es/e2e/enum/Network.js +1 -0
  192. package/lib-es/e2e/enum/Network.js.map +1 -1
  193. package/lib-es/e2e/enum/TokenType.d.ts +2 -1
  194. package/lib-es/e2e/enum/TokenType.d.ts.map +1 -1
  195. package/lib-es/e2e/enum/TokenType.js +1 -0
  196. package/lib-es/e2e/enum/TokenType.js.map +1 -1
  197. package/lib-es/e2e/enum/TransactionStatus.d.ts +4 -1
  198. package/lib-es/e2e/enum/TransactionStatus.d.ts.map +1 -1
  199. package/lib-es/e2e/enum/TransactionStatus.js +3 -0
  200. package/lib-es/e2e/enum/TransactionStatus.js.map +1 -1
  201. package/lib-es/e2e/families/sui.d.ts +2 -0
  202. package/lib-es/e2e/families/sui.d.ts.map +1 -0
  203. package/lib-es/e2e/families/sui.js +7 -0
  204. package/lib-es/e2e/families/sui.js.map +1 -0
  205. package/lib-es/e2e/index.d.ts +3 -0
  206. package/lib-es/e2e/index.d.ts.map +1 -1
  207. package/lib-es/e2e/speculos.d.ts +1 -0
  208. package/lib-es/e2e/speculos.d.ts.map +1 -1
  209. package/lib-es/e2e/speculos.js +21 -0
  210. package/lib-es/e2e/speculos.js.map +1 -1
  211. package/lib-es/env.react.d.ts +1 -1
  212. package/lib-es/env.react.d.ts.map +1 -1
  213. package/lib-es/exchange/providers/swap.js +4 -4
  214. package/lib-es/exchange/providers/swap.js.map +1 -1
  215. package/lib-es/exchange/swap/api/v5/__mocks__/fetchRates.mocks.d.ts.map +1 -1
  216. package/lib-es/exchange/swap/api/v5/__mocks__/fetchRates.mocks.js +1 -1
  217. package/lib-es/exchange/swap/api/v5/__mocks__/fetchRates.mocks.js.map +1 -1
  218. package/lib-es/exchange/swap/hooks/useFromState.test.js +5 -2
  219. package/lib-es/exchange/swap/hooks/useFromState.test.js.map +1 -1
  220. package/lib-es/exchange/swap/hooks/useReverseAccounts.test.js +5 -2
  221. package/lib-es/exchange/swap/hooks/useReverseAccounts.test.js.map +1 -1
  222. package/lib-es/exchange/swap/hooks/useToState.test.js +5 -2
  223. package/lib-es/exchange/swap/hooks/useToState.test.js.map +1 -1
  224. package/lib-es/exchange/swap/hooks/useUpdateMaxAmount.test.js +5 -2
  225. package/lib-es/exchange/swap/hooks/useUpdateMaxAmount.test.js.map +1 -1
  226. package/lib-es/exchange/swap/mock.js +1 -1
  227. package/lib-es/exchange/swap/mock.js.map +1 -1
  228. package/lib-es/exchange/swap/utils/index.test.js +5 -2
  229. package/lib-es/exchange/swap/utils/index.test.js.map +1 -1
  230. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  231. package/lib-es/featureFlags/defaultFeatures.js +4 -0
  232. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  233. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  234. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  235. package/lib-es/hooks/useManifestWithSessionId.d.ts +12 -0
  236. package/lib-es/hooks/useManifestWithSessionId.d.ts.map +1 -0
  237. package/lib-es/hooks/useManifestWithSessionId.js +60 -0
  238. package/lib-es/hooks/useManifestWithSessionId.js.map +1 -0
  239. package/lib-es/hooks/useManifestWithSessionId.test.d.ts +2 -0
  240. package/lib-es/hooks/useManifestWithSessionId.test.d.ts.map +1 -0
  241. package/lib-es/hooks/useManifestWithSessionId.test.js +69 -0
  242. package/lib-es/hooks/useManifestWithSessionId.test.js.map +1 -0
  243. package/lib-es/market/utils/index.d.ts +1 -0
  244. package/lib-es/market/utils/index.d.ts.map +1 -1
  245. package/lib-es/market/utils/index.js +2 -0
  246. package/lib-es/market/utils/index.js.map +1 -1
  247. package/lib-es/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.d.ts +2 -0
  248. package/lib-es/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.d.ts.map +1 -0
  249. package/lib-es/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.js +345 -0
  250. package/lib-es/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.js.map +1 -0
  251. package/lib-es/modularDrawer/hooks/index.d.ts +2 -0
  252. package/lib-es/modularDrawer/hooks/index.d.ts.map +1 -0
  253. package/lib-es/modularDrawer/hooks/index.js +2 -0
  254. package/lib-es/modularDrawer/hooks/index.js.map +1 -0
  255. package/lib-es/modularDrawer/hooks/useDetailedAccountsCore.d.ts +14 -0
  256. package/lib-es/modularDrawer/hooks/useDetailedAccountsCore.d.ts.map +1 -0
  257. package/lib-es/modularDrawer/hooks/useDetailedAccountsCore.js +115 -0
  258. package/lib-es/modularDrawer/hooks/useDetailedAccountsCore.js.map +1 -0
  259. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  260. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +6 -1
  261. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
  262. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +6 -1
  263. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  264. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +9 -4
  265. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
  266. package/lib-es/modularDrawer/index.d.ts +4 -0
  267. package/lib-es/modularDrawer/index.d.ts.map +1 -0
  268. package/lib-es/modularDrawer/index.js +4 -0
  269. package/lib-es/modularDrawer/index.js.map +1 -0
  270. package/lib-es/modularDrawer/types/detailedAccount.d.ts +46 -0
  271. package/lib-es/modularDrawer/types/detailedAccount.d.ts.map +1 -0
  272. package/lib-es/modularDrawer/types/detailedAccount.js +2 -0
  273. package/lib-es/modularDrawer/types/detailedAccount.js.map +1 -0
  274. package/lib-es/modularDrawer/types/index.d.ts +2 -0
  275. package/lib-es/modularDrawer/types/index.d.ts.map +1 -0
  276. package/lib-es/modularDrawer/types/index.js +2 -0
  277. package/lib-es/modularDrawer/types/index.js.map +1 -0
  278. package/lib-es/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.d.ts +2 -0
  279. package/lib-es/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.d.ts.map +1 -0
  280. package/lib-es/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.js +101 -0
  281. package/lib-es/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.js.map +1 -0
  282. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +3 -4
  283. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -1
  284. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +4 -0
  285. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -1
  286. package/lib-es/modularDrawer/utils/index.d.ts +1 -0
  287. package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
  288. package/lib-es/modularDrawer/utils/index.js +1 -0
  289. package/lib-es/modularDrawer/utils/index.js.map +1 -1
  290. package/lib-es/modularDrawer/utils/sortAccountsByFiatValue.d.ts +8 -0
  291. package/lib-es/modularDrawer/utils/sortAccountsByFiatValue.d.ts.map +1 -0
  292. package/lib-es/modularDrawer/utils/sortAccountsByFiatValue.js +13 -0
  293. package/lib-es/modularDrawer/utils/sortAccountsByFiatValue.js.map +1 -0
  294. package/lib-es/modularDrawer/utils/type.d.ts +2 -2
  295. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  296. package/lib-es/notifications/ServiceStatusProvider/index.d.ts +1 -1
  297. package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
  298. package/lib-es/notifications/ServiceStatusProvider/index.js +1 -1
  299. package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
  300. package/lib-es/platform/providers/RemoteLiveAppProvider/api/mock.json +3 -3
  301. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js +5 -2
  302. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  303. package/lib-es/wallet-api/useDappLogic.js +2 -2
  304. package/lib-es/wallet-api/useDappLogic.js.map +1 -1
  305. package/package.json +53 -53
  306. package/src/bridge/crypto-assets/index.test.ts +9 -15
  307. package/src/bridge/crypto-assets/index.ts +2 -10
  308. package/src/bridge/generic-alpaca/getTransactionStatus.ts +6 -4
  309. package/src/bridge/generic-alpaca/utils.ts +1 -2
  310. package/src/currencies/cryptoIcons.test.ts +4 -4
  311. package/src/currencies/index.ts +1 -4
  312. package/src/currencies/sortByMarketcap.test.ts +1 -3
  313. package/src/deposit/deposit.test.ts +29 -14
  314. package/src/deposit/helper.ts +6 -2
  315. package/src/e2e/enum/Account.ts +31 -0
  316. package/src/e2e/enum/AppInfos.ts +2 -0
  317. package/src/e2e/enum/Currency.ts +11 -0
  318. package/src/e2e/enum/Network.ts +1 -0
  319. package/src/e2e/enum/TokenType.ts +1 -0
  320. package/src/e2e/enum/TransactionStatus.ts +3 -0
  321. package/src/e2e/families/sui.ts +7 -0
  322. package/src/e2e/speculos.ts +23 -0
  323. package/src/exchange/providers/swap.ts +4 -4
  324. package/src/exchange/swap/api/v5/__mocks__/fetchRates.mocks.ts +1 -2
  325. package/src/exchange/swap/hooks/useFromState.test.ts +4 -2
  326. package/src/exchange/swap/hooks/useReverseAccounts.test.ts +4 -2
  327. package/src/exchange/swap/hooks/useToState.test.ts +4 -2
  328. package/src/exchange/swap/hooks/useUpdateMaxAmount.test.ts +4 -2
  329. package/src/exchange/swap/mock.ts +1 -1
  330. package/src/exchange/swap/utils/index.test.ts +4 -2
  331. package/src/featureFlags/defaultFeatures.ts +5 -0
  332. package/src/hooks/useManifestWithSessionId.test.ts +105 -0
  333. package/src/hooks/useManifestWithSessionId.ts +83 -0
  334. package/src/market/utils/index.ts +3 -0
  335. package/src/modularDrawer/hooks/__tests__/useDetailedAccountsCore.test.ts +472 -0
  336. package/src/modularDrawer/hooks/index.ts +1 -0
  337. package/src/modularDrawer/hooks/useDetailedAccountsCore.ts +146 -0
  338. package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +5 -1
  339. package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +10 -4
  340. package/src/modularDrawer/index.ts +3 -0
  341. package/src/modularDrawer/types/detailedAccount.ts +49 -0
  342. package/src/modularDrawer/types/index.ts +1 -0
  343. package/src/modularDrawer/utils/__tests__/sortAccountsByFiatValue.test.ts +117 -0
  344. package/src/modularDrawer/utils/getBalanceAndFiatValueByAssets.ts +6 -3
  345. package/src/modularDrawer/utils/index.ts +1 -0
  346. package/src/modularDrawer/utils/sortAccountsByFiatValue.ts +14 -0
  347. package/src/modularDrawer/utils/type.ts +3 -2
  348. package/src/notifications/ServiceStatusProvider/index.tsx +1 -1
  349. package/src/platform/providers/RemoteLiveAppProvider/api/mock.json +3 -3
  350. package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +4 -2
  351. package/src/wallet-api/useDappLogic.ts +3 -3
@@ -0,0 +1,7 @@
1
+ import { pressBoth, pressUntilTextFound } from "../speculos";
2
+ import { DeviceLabels } from "../enum/DeviceLabels";
3
+
4
+ export async function sendSui() {
5
+ await pressUntilTextFound(DeviceLabels.ACCEPT);
6
+ await pressBoth();
7
+ }
@@ -42,6 +42,7 @@ import { Swap } from "./models/Swap";
42
42
  import { delegateOsmosis } from "./families/osmosis";
43
43
  import { AppInfos } from "./enum/AppInfos";
44
44
  import { DEVICE_LABELS_CONFIG } from "./data/deviceLabelsData";
45
+ import { sendSui } from "./families/sui";
45
46
 
46
47
  const isSpeculosRemote = process.env.REMOTE_SPECULOS === "true";
47
48
 
@@ -344,6 +345,14 @@ export const specs: Specs = {
344
345
  },
345
346
  dependency: "",
346
347
  },
348
+ Sui: {
349
+ currency: getCryptoCurrencyById("sui"),
350
+ appQuery: {
351
+ model: getSpeculosModel(),
352
+ appName: "Sui",
353
+ },
354
+ dependency: "",
355
+ },
347
356
  };
348
357
 
349
358
  export async function startSpeculos(
@@ -632,6 +641,10 @@ export async function goToSettings() {
632
641
  await pressBoth();
633
642
  }
634
643
 
644
+ export async function providePublicKey() {
645
+ await pressRightButton();
646
+ }
647
+
635
648
  type DeviceLabelsReturn = {
636
649
  delegateConfirmLabel: string;
637
650
  delegateVerifyLabel: string;
@@ -660,6 +673,10 @@ export function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn {
660
673
  }
661
674
 
662
675
  export async function expectValidAddressDevice(account: Account, addressDisplayed: string) {
676
+ if (account.currency === Currency.SUI_USDC) {
677
+ providePublicKey();
678
+ }
679
+
663
680
  const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(account.currency.speculosApp);
664
681
 
665
682
  await waitFor(receiveVerifyLabel);
@@ -721,6 +738,12 @@ export async function signSendTransaction(tx: Transaction) {
721
738
  case Currency.HBAR:
722
739
  await sendHedera();
723
740
  break;
741
+ case Currency.SUI:
742
+ await sendSui();
743
+ break;
744
+ case Currency.SUI_USDC:
745
+ await sendSui();
746
+ break;
724
747
  default:
725
748
  throw new Error(`Unsupported currency: ${currencyName.ticker}`);
726
749
  }
@@ -140,9 +140,9 @@ const DEFAULT_SWAP_PROVIDERS: Record<string, ProviderConfig & Partial<Additional
140
140
  type: "DEX",
141
141
  needsKYC: false,
142
142
  needsBearerToken: false,
143
- termsOfUseUrl: "https://1inch.io/assets/1inch_network_terms_of_use.pdf",
144
- supportUrl: "https://help.1inch.io/en/",
145
- mainUrl: "https://1inch.io/",
143
+ termsOfUseUrl: "https://1inch.com/assets/Widget_1inch.com_Terms_of_Use.pdf",
144
+ supportUrl: "https://help.1inch.com/en/",
145
+ mainUrl: "https://1inch.com/",
146
146
  },
147
147
  paraswap: {
148
148
  type: "DEX",
@@ -232,7 +232,7 @@ export const dexProvidersContractAddress: { [key: string]: string } = {
232
232
 
233
233
  export const termsOfUse: { [key: string]: string } = {
234
234
  paraswap: "https://paraswap.io/tos",
235
- "1inch": "https://1inch.io/assets/1inch_network_terms_of_use.pdf",
235
+ "1inch": "https://1inch.com/assets/Widget_1inch.com_Terms_of_Use.pdf",
236
236
  Uniswap: "https://uniswap.org/terms-of-service",
237
237
  };
238
238
 
@@ -58,8 +58,7 @@ export const fetchRatesMock = (
58
58
  {
59
59
  provider: "oneinch",
60
60
  providerType: "DEX",
61
- providerURL:
62
- "https://app.1inch.io/#/1/unified/swap/usdt/eth?ledgerLive=true&sourceTokenAmount=100",
61
+ providerURL: "https://1inch.com/swap/#/1/unified/swap/usdt/eth&sourceTokenAmount=100",
63
62
  from: "ethereum/erc20/usd_tether__erc20_",
64
63
  to: "ethereum",
65
64
  amountFrom: "100",
@@ -2,7 +2,7 @@
2
2
  * @jest-environment jsdom
3
3
  */
4
4
  import "../../../__tests__/test-helpers/dom-polyfill";
5
- import { getCryptoCurrencyById, getTokenById } from "@ledgerhq/cryptoassets";
5
+ import { getCryptoCurrencyById, findTokenById } from "@ledgerhq/cryptoassets";
6
6
  import { Account } from "@ledgerhq/types-live";
7
7
  import { renderHook, act } from "@testing-library/react";
8
8
  import BigNumber from "bignumber.js";
@@ -14,7 +14,9 @@ import { useFromState } from "./useFromState";
14
14
 
15
15
  const BTC = getCryptoCurrencyById("bitcoin");
16
16
  const ETH = getCryptoCurrencyById("ethereum");
17
- const USDT = getTokenById("ethereum/erc20/usd_tether__erc20_");
17
+ const usdtToken = findTokenById("ethereum/erc20/usd_tether__erc20_");
18
+ if (!usdtToken) throw new Error("USDT token not found");
19
+ const USDT = usdtToken;
18
20
 
19
21
  jest.useFakeTimers();
20
22
 
@@ -2,7 +2,7 @@
2
2
  * @jest-environment jsdom
3
3
  */
4
4
  import "../../../__tests__/test-helpers/dom-polyfill";
5
- import { getCryptoCurrencyById, getTokenById } from "@ledgerhq/cryptoassets";
5
+ import { getCryptoCurrencyById, findTokenById } from "@ledgerhq/cryptoassets";
6
6
  import type { Account } from "@ledgerhq/types-live";
7
7
  import { renderHook, act } from "@testing-library/react";
8
8
  import { genTokenAccount } from "@ledgerhq/coin-framework/mocks/account";
@@ -11,7 +11,9 @@ import { useReverseAccounts } from "./useReverseAccounts";
11
11
 
12
12
  const BTC = getCryptoCurrencyById("bitcoin");
13
13
  const ETH = getCryptoCurrencyById("ethereum");
14
- const USDT = getTokenById("ethereum/erc20/usd_tether__erc20_");
14
+ const usdtToken = findTokenById("ethereum/erc20/usd_tether__erc20_");
15
+ if (!usdtToken) throw new Error("USDT token not found");
16
+ const USDT = usdtToken;
15
17
 
16
18
  const fromParentAccount = genAccount("mocked-account-2", {
17
19
  currency: ETH,
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import "../../../__tests__/test-helpers/dom-polyfill";
5
5
  import { renderHook, act } from "@testing-library/react";
6
- import { getCryptoCurrencyById, getTokenById } from "@ledgerhq/cryptoassets";
6
+ import { getCryptoCurrencyById, findTokenById } from "@ledgerhq/cryptoassets";
7
7
  import { selectorStateDefaultValues, useToState } from ".";
8
8
  import { genTokenAccount } from "@ledgerhq/coin-framework/mocks/account";
9
9
  import { genAccount } from "../../../mock/account";
@@ -12,7 +12,9 @@ import type { Account } from "@ledgerhq/types-live";
12
12
 
13
13
  const BTC = getCryptoCurrencyById("bitcoin");
14
14
  const ETH = getCryptoCurrencyById("ethereum");
15
- const USDT = getTokenById("ethereum/erc20/usd_tether__erc20_");
15
+ const usdtToken = findTokenById("ethereum/erc20/usd_tether__erc20_");
16
+ if (!usdtToken) throw new Error("USDT token not found");
17
+ const USDT = usdtToken;
16
18
 
17
19
  const selectedAccount = genAccount("mocked-account-selected", { currency: ETH });
18
20
 
@@ -2,7 +2,7 @@
2
2
  * @jest-environment jsdom
3
3
  */
4
4
  import "../../../__tests__/test-helpers/dom-polyfill";
5
- import { getCryptoCurrencyById, getTokenById } from "@ledgerhq/cryptoassets";
5
+ import { getCryptoCurrencyById, findTokenById } from "@ledgerhq/cryptoassets";
6
6
  import { act, renderHook } from "@testing-library/react";
7
7
  import BigNumber from "bignumber.js";
8
8
  import { checkAccountSupported } from "../../../account/index";
@@ -19,7 +19,9 @@ jest.mock("../../../families/evm/bridge/mock");
19
19
  const mockedEstimateMaxSpendable = jest.mocked(ethBridge.accountBridge.estimateMaxSpendable);
20
20
 
21
21
  const ETH = getCryptoCurrencyById("ethereum");
22
- const USDT = getTokenById("ethereum/erc20/usd_tether__erc20_");
22
+ const usdtToken = findTokenById("ethereum/erc20/usd_tether__erc20_");
23
+ if (!usdtToken) throw new Error("USDT token not found");
24
+ const USDT = usdtToken;
23
25
 
24
26
  const parentAccount = genAccount("parent-account", {
25
27
  currency: ETH,
@@ -103,7 +103,7 @@ export const mockGetExchangeRates = async (
103
103
  providerType: "DEX",
104
104
  expirationDate: new Date(),
105
105
  tradeMethod: "float",
106
- providerURL: `https://app.1inch.io/#/1/unified/swap/eth/usdt?ledgerLive=true&sourceTokenAmount=${transaction.amount}`,
106
+ providerURL: `https://1inch.com/swap/#/1/unified/swap/eth/usdt&sourceTokenAmount=${transaction.amount}`,
107
107
  },
108
108
  ];
109
109
  };
@@ -1,4 +1,4 @@
1
- import { getTokenById } from "@ledgerhq/cryptoassets";
1
+ import { findTokenById } from "@ledgerhq/cryptoassets";
2
2
  import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
3
3
  import type { Account, TokenAccount } from "@ledgerhq/types-live";
4
4
  import BigNumber from "bignumber.js";
@@ -87,7 +87,9 @@ describe("swap/utils/getAccountTuplesForCurrency", () => {
87
87
  });
88
88
 
89
89
  describe("TokenCurrency", () => {
90
- const aaveToken = Object.freeze(getTokenById("ethereum/erc20/aave"));
90
+ const token = findTokenById("ethereum/erc20/aave");
91
+ if (!token) throw new Error("AAVE token not found");
92
+ const aaveToken = Object.freeze(token);
91
93
 
92
94
  test("returns correct parent accounts including a new subAccount when a TokenCurrency is provided", () => {
93
95
  const ethAccounts = [
@@ -439,6 +439,11 @@ export const DEFAULT_FEATURES: Features = {
439
439
  },
440
440
  },
441
441
 
442
+ ptxEarnDrawerApy: {
443
+ enabled: false,
444
+ params: {},
445
+ },
446
+
442
447
  ptxSwapLiveAppMobile: {
443
448
  enabled: false,
444
449
  params: {
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
4
+ import { renderHook, waitFor } from "@testing-library/react";
5
+ import { useManifestWithSessionId } from "./useManifestWithSessionId";
6
+ import { LiveAppManifest } from "../platform/types";
7
+
8
+ const mockFetch = jest.fn();
9
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
10
+ global.fetch = mockFetch as any;
11
+
12
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
13
+ const baseManifest = {
14
+ id: "test-app",
15
+ name: "Test App",
16
+ url: "https://example.com",
17
+ } as LiveAppManifest;
18
+
19
+ describe("useManifestWithSessionId", () => {
20
+ beforeEach(() => {
21
+ jest.clearAllMocks();
22
+ });
23
+
24
+ it("returns null manifest during loading", async () => {
25
+ mockFetch.mockResolvedValueOnce({
26
+ ok: true,
27
+ json: async () => ({ providerSessionId: "abc123" }),
28
+ });
29
+
30
+ const { result } = renderHook(() =>
31
+ useManifestWithSessionId({ manifest: baseManifest, shareAnalytics: true }),
32
+ );
33
+
34
+ expect(result.current.loading).toBe(true);
35
+ expect(result.current.manifest).toBeNull();
36
+ });
37
+
38
+ it("returns manifest with externalID after success", async () => {
39
+ mockFetch.mockResolvedValueOnce({
40
+ ok: true,
41
+ json: async () => ({ providerSessionId: "abc123" }),
42
+ });
43
+
44
+ const { result } = renderHook(() =>
45
+ useManifestWithSessionId({ manifest: baseManifest, shareAnalytics: true }),
46
+ );
47
+
48
+ await waitFor(() =>
49
+ expect(result.current.manifest).toEqual({
50
+ ...baseManifest,
51
+ url: "https://example.com/?externalID=abc123",
52
+ }),
53
+ );
54
+
55
+ expect(result.current.loading).toBe(false);
56
+ });
57
+
58
+ it("falls back to original manifest if fetch rejects", async () => {
59
+ mockFetch.mockRejectedValueOnce(new Error("network error"));
60
+
61
+ const { result } = renderHook(() =>
62
+ useManifestWithSessionId({ manifest: baseManifest, shareAnalytics: true }),
63
+ );
64
+
65
+ await waitFor(() => {
66
+ expect(result.current.manifest).toEqual(baseManifest);
67
+ });
68
+
69
+ expect(result.current.loading).toBe(false);
70
+ });
71
+
72
+ it("falls back to original manifest if response is not ok", async () => {
73
+ mockFetch.mockResolvedValueOnce({ ok: false });
74
+
75
+ const { result } = renderHook(() =>
76
+ useManifestWithSessionId({ manifest: baseManifest, shareAnalytics: true }),
77
+ );
78
+
79
+ await waitFor(() => {
80
+ expect(result.current.manifest).toEqual(baseManifest);
81
+ });
82
+
83
+ expect(result.current.loading).toBe(false);
84
+ });
85
+
86
+ it("returns null if manifest is not provided", async () => {
87
+ const { result } = renderHook(() =>
88
+ useManifestWithSessionId({ manifest: null, shareAnalytics: true }),
89
+ );
90
+
91
+ expect(mockFetch).not.toHaveBeenCalled();
92
+ expect(result.current.manifest).toBeNull();
93
+ expect(result.current.loading).toBe(false);
94
+ });
95
+
96
+ it("skips fetch if shareAnalytics is false and just returns manifest", () => {
97
+ const { result } = renderHook(() =>
98
+ useManifestWithSessionId({ manifest: baseManifest, shareAnalytics: false }),
99
+ );
100
+
101
+ expect(mockFetch).not.toHaveBeenCalled();
102
+ expect(result.current.manifest).toEqual(baseManifest);
103
+ expect(result.current.loading).toBe(false);
104
+ });
105
+ });
@@ -0,0 +1,83 @@
1
+ import React from "react";
2
+ import { appendQueryParamsToManifestURL } from "../wallet-api/utils/appendQueryParamsToManifestURL";
3
+ import { LiveAppManifest } from "../platform/types";
4
+ import { getEnv } from "@ledgerhq/live-env";
5
+
6
+ type Options = {
7
+ manifest: LiveAppManifest | null | undefined;
8
+ shareAnalytics: boolean;
9
+ };
10
+
11
+ type HookResult = {
12
+ manifest?: LiveAppManifest | null;
13
+ loading: boolean;
14
+ };
15
+
16
+ export function useManifestWithSessionId({ manifest, shareAnalytics }: Options): HookResult {
17
+ const [id, setId] = React.useState<string | null>(null);
18
+ const [loading, setLoading] = React.useState<boolean>(false);
19
+
20
+ React.useEffect(() => {
21
+ let cancelled = false;
22
+
23
+ async function fetchId() {
24
+ if (!shareAnalytics || !manifest) {
25
+ setId(null);
26
+ setLoading(false);
27
+ return;
28
+ }
29
+
30
+ setLoading(true);
31
+
32
+ try {
33
+ const response = await fetch(getEnv("PROVIDER_SESSION_ID_ENDPOINT"), {
34
+ method: "GET",
35
+ headers: {
36
+ Accept: "application/json",
37
+ "Content-Type": "application/json",
38
+ },
39
+ });
40
+
41
+ if (!response.ok) throw new Error("Failed to fetch session ID");
42
+
43
+ const { providerSessionId } = await response.json();
44
+
45
+ if (!cancelled) {
46
+ setId(providerSessionId);
47
+ setLoading(false);
48
+ }
49
+ } catch {
50
+ if (!cancelled) {
51
+ setId(null);
52
+ setLoading(false);
53
+ }
54
+ }
55
+ }
56
+
57
+ fetchId();
58
+
59
+ return () => {
60
+ cancelled = true; // avoid setting state after unmount
61
+ };
62
+ }, [shareAnalytics]);
63
+
64
+ const customizedManifest = React.useMemo(() => {
65
+ if (!manifest) return null;
66
+
67
+ if (loading) {
68
+ return null;
69
+ }
70
+
71
+ if (id) {
72
+ const url = appendQueryParamsToManifestURL(manifest, {
73
+ externalID: id,
74
+ });
75
+
76
+ return url ? { ...manifest, url: url.toString() } : manifest;
77
+ }
78
+
79
+ return manifest;
80
+ }, [manifest, id, loading]);
81
+
82
+ return { manifest: customizedManifest, loading };
83
+ }
@@ -1,6 +1,9 @@
1
1
  import { PortfolioRange } from "@ledgerhq/types-live";
2
2
  import { Order } from "./types";
3
3
 
4
+ // Export all types from types.ts
5
+ export * from "./types";
6
+
4
7
  export function getRange(range: PortfolioRange | string) {
5
8
  switch (range) {
6
9
  case "day":