@ledgerhq/live-common 34.53.0-nightly.20251114023758 → 34.53.0-nightly.20251118023800

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 (436) hide show
  1. package/lib/__tests__/test-helpers/environment.js +2 -0
  2. package/lib/__tests__/test-helpers/environment.js.map +1 -1
  3. package/lib/currencies/helpers.d.ts +1 -3
  4. package/lib/currencies/helpers.d.ts.map +1 -1
  5. package/lib/currencies/helpers.js +1 -27
  6. package/lib/currencies/helpers.js.map +1 -1
  7. package/lib/dada-client/hooks/useAssetsData.d.ts +1 -0
  8. package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  9. package/lib/dada-client/hooks/useAssetsData.js +1 -0
  10. package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
  11. package/lib/deviceSDK/actions/getBatteryStatuses.d.ts +2 -1
  12. package/lib/deviceSDK/actions/getBatteryStatuses.d.ts.map +1 -1
  13. package/lib/deviceSDK/actions/getBatteryStatuses.js +2 -2
  14. package/lib/deviceSDK/actions/getBatteryStatuses.js.map +1 -1
  15. package/lib/deviceSDK/actions/getDeviceInfo.d.ts +2 -1
  16. package/lib/deviceSDK/actions/getDeviceInfo.d.ts.map +1 -1
  17. package/lib/deviceSDK/actions/getDeviceInfo.js +2 -2
  18. package/lib/deviceSDK/actions/getDeviceInfo.js.map +1 -1
  19. package/lib/deviceSDK/actions/getLatestAvailableFirmware.d.ts +2 -1
  20. package/lib/deviceSDK/actions/getLatestAvailableFirmware.d.ts.map +1 -1
  21. package/lib/deviceSDK/actions/getLatestAvailableFirmware.js +6 -3
  22. package/lib/deviceSDK/actions/getLatestAvailableFirmware.js.map +1 -1
  23. package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts +2 -1
  24. package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts.map +1 -1
  25. package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.js +2 -2
  26. package/lib/deviceSDK/actions/toggleOnboardingEarlyCheck.js.map +1 -1
  27. package/lib/deviceSDK/actions/updateFirmware.d.ts +2 -1
  28. package/lib/deviceSDK/actions/updateFirmware.d.ts.map +1 -1
  29. package/lib/deviceSDK/actions/updateFirmware.js +4 -3
  30. package/lib/deviceSDK/actions/updateFirmware.js.map +1 -1
  31. package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
  32. package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
  33. package/lib/deviceSDK/hooks/useBatteryStatuses.js +3 -2
  34. package/lib/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
  35. package/lib/deviceSDK/hooks/useGetDeviceInfo.d.ts +2 -1
  36. package/lib/deviceSDK/hooks/useGetDeviceInfo.d.ts.map +1 -1
  37. package/lib/deviceSDK/hooks/useGetDeviceInfo.js +3 -3
  38. package/lib/deviceSDK/hooks/useGetDeviceInfo.js.map +1 -1
  39. package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts +2 -1
  40. package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -1
  41. package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.js +2 -1
  42. package/lib/deviceSDK/hooks/useGetLatestAvailableFirmware.js.map +1 -1
  43. package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts +2 -1
  44. package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts.map +1 -1
  45. package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js +3 -2
  46. package/lib/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js.map +1 -1
  47. package/lib/deviceSDK/hooks/useUpdateFirmware.d.ts +2 -1
  48. package/lib/deviceSDK/hooks/useUpdateFirmware.d.ts.map +1 -1
  49. package/lib/deviceSDK/hooks/useUpdateFirmware.js +3 -2
  50. package/lib/deviceSDK/hooks/useUpdateFirmware.js.map +1 -1
  51. package/lib/deviceSDK/tasks/getBatteryStatuses.d.ts +1 -0
  52. package/lib/deviceSDK/tasks/getBatteryStatuses.d.ts.map +1 -1
  53. package/lib/deviceSDK/tasks/getBatteryStatuses.js +2 -2
  54. package/lib/deviceSDK/tasks/getBatteryStatuses.js.map +1 -1
  55. package/lib/deviceSDK/tasks/getDeviceInfo.d.ts +2 -1
  56. package/lib/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
  57. package/lib/deviceSDK/tasks/getDeviceInfo.js +2 -2
  58. package/lib/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
  59. package/lib/deviceSDK/tasks/getLatestFirmware.d.ts +1 -0
  60. package/lib/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
  61. package/lib/deviceSDK/tasks/getLatestFirmware.js +2 -2
  62. package/lib/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
  63. package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts +1 -0
  64. package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts.map +1 -1
  65. package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.js +2 -2
  66. package/lib/deviceSDK/tasks/toggleOnboardingEarlyCheck.js.map +1 -1
  67. package/lib/deviceSDK/tasks/updateFirmware.d.ts +1 -0
  68. package/lib/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
  69. package/lib/deviceSDK/tasks/updateFirmware.js +2 -2
  70. package/lib/deviceSDK/tasks/updateFirmware.js.map +1 -1
  71. package/lib/deviceSDK/transports/core.d.ts +1 -0
  72. package/lib/deviceSDK/transports/core.d.ts.map +1 -1
  73. package/lib/deviceSDK/transports/core.js +2 -2
  74. package/lib/deviceSDK/transports/core.js.map +1 -1
  75. package/lib/e2e/index.d.ts +6 -0
  76. package/lib/e2e/index.d.ts.map +1 -1
  77. package/lib/families/evm/config.d.ts.map +1 -1
  78. package/lib/families/evm/config.js +33 -0
  79. package/lib/families/evm/config.js.map +1 -1
  80. package/lib/featureFlags/defaultFeatures.d.ts +2 -0
  81. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  82. package/lib/featureFlags/defaultFeatures.js +2 -0
  83. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  84. package/lib/hw/actions/app.d.ts.map +1 -1
  85. package/lib/hw/actions/app.js +2 -1
  86. package/lib/hw/actions/app.js.map +1 -1
  87. package/lib/hw/actions/customLockScreenLoad.d.ts +1 -1
  88. package/lib/hw/actions/customLockScreenLoad.d.ts.map +1 -1
  89. package/lib/hw/actions/customLockScreenLoad.js +2 -0
  90. package/lib/hw/actions/customLockScreenLoad.js.map +1 -1
  91. package/lib/hw/actions/implementations.d.ts +1 -0
  92. package/lib/hw/actions/implementations.d.ts.map +1 -1
  93. package/lib/hw/actions/implementations.js +12 -2
  94. package/lib/hw/actions/implementations.js.map +1 -1
  95. package/lib/hw/connectApp.d.ts +2 -1
  96. package/lib/hw/connectApp.d.ts.map +1 -1
  97. package/lib/hw/connectApp.js +4 -4
  98. package/lib/hw/connectApp.js.map +1 -1
  99. package/lib/hw/connectManager.d.ts +2 -1
  100. package/lib/hw/connectManager.d.ts.map +1 -1
  101. package/lib/hw/connectManager.js +4 -4
  102. package/lib/hw/connectManager.js.map +1 -1
  103. package/lib/hw/customLockScreenFetch.d.ts +2 -1
  104. package/lib/hw/customLockScreenFetch.d.ts.map +1 -1
  105. package/lib/hw/customLockScreenFetch.js +2 -2
  106. package/lib/hw/customLockScreenFetch.js.map +1 -1
  107. package/lib/hw/customLockScreenLoad.d.ts +2 -1
  108. package/lib/hw/customLockScreenLoad.d.ts.map +1 -1
  109. package/lib/hw/customLockScreenLoad.js +2 -2
  110. package/lib/hw/customLockScreenLoad.js.map +1 -1
  111. package/lib/hw/deviceAccess.d.ts +3 -3
  112. package/lib/hw/deviceAccess.d.ts.map +1 -1
  113. package/lib/hw/deviceAccess.js +2 -1
  114. package/lib/hw/deviceAccess.js.map +1 -1
  115. package/lib/hw/getGenuineCheckFromDeviceId.d.ts +2 -1
  116. package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -1
  117. package/lib/hw/getGenuineCheckFromDeviceId.js +2 -2
  118. package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -1
  119. package/lib/hw/getOnboardingStatePolling.d.ts +2 -1
  120. package/lib/hw/getOnboardingStatePolling.d.ts.map +1 -1
  121. package/lib/hw/getOnboardingStatePolling.js +5 -2
  122. package/lib/hw/getOnboardingStatePolling.js.map +1 -1
  123. package/lib/hw/hooks/useGenuineCheck.d.ts +2 -1
  124. package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -1
  125. package/lib/hw/hooks/useGenuineCheck.js +3 -1
  126. package/lib/hw/hooks/useGenuineCheck.js.map +1 -1
  127. package/lib/hw/index.d.ts +6 -2
  128. package/lib/hw/index.d.ts.map +1 -1
  129. package/lib/hw/index.js +6 -6
  130. package/lib/hw/index.js.map +1 -1
  131. package/lib/hw/installLanguage.d.ts +2 -1
  132. package/lib/hw/installLanguage.d.ts.map +1 -1
  133. package/lib/hw/installLanguage.js +2 -2
  134. package/lib/hw/installLanguage.js.map +1 -1
  135. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  136. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +8 -0
  137. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  138. package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
  139. package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
  140. package/lib/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
  141. package/lib/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
  142. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  143. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  144. package/lib/modularDrawer/modules/createNetworkConfiguration.js +1 -2
  145. package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  146. package/lib/modularDrawer/utils/type.d.ts +0 -5
  147. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  148. package/lib/onboarding/hooks/useOnboardingStatePolling.d.ts.map +1 -1
  149. package/lib/onboarding/hooks/useOnboardingStatePolling.js +1 -0
  150. package/lib/onboarding/hooks/useOnboardingStatePolling.js.map +1 -1
  151. package/lib/platform/filters.d.ts +1 -2
  152. package/lib/platform/filters.d.ts.map +1 -1
  153. package/lib/platform/filters.js +1 -17
  154. package/lib/platform/filters.js.map +1 -1
  155. package/lib/platform/helpers.d.ts +1 -5
  156. package/lib/platform/helpers.d.ts.map +1 -1
  157. package/lib/platform/helpers.js +1 -33
  158. package/lib/platform/helpers.js.map +1 -1
  159. package/lib/platform/react.d.ts +2 -3
  160. package/lib/platform/react.d.ts.map +1 -1
  161. package/lib/platform/react.js +66 -16
  162. package/lib/platform/react.js.map +1 -1
  163. package/lib/platform/types.d.ts +3 -3
  164. package/lib/platform/types.d.ts.map +1 -1
  165. package/lib/utils/getAccountTuplesForCurrency.d.ts +1 -1
  166. package/lib/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
  167. package/lib/utils/getAccountTuplesForCurrency.js +2 -3
  168. package/lib/utils/getAccountTuplesForCurrency.js.map +1 -1
  169. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  170. package/lib/wallet-api/Exchange/server.js +5 -4
  171. package/lib/wallet-api/Exchange/server.js.map +1 -1
  172. package/lib/wallet-api/converters.d.ts +1 -0
  173. package/lib/wallet-api/converters.d.ts.map +1 -1
  174. package/lib/wallet-api/converters.js +7 -2
  175. package/lib/wallet-api/converters.js.map +1 -1
  176. package/lib/wallet-api/react.d.ts +6 -11
  177. package/lib/wallet-api/react.d.ts.map +1 -1
  178. package/lib/wallet-api/react.js +291 -135
  179. package/lib/wallet-api/react.js.map +1 -1
  180. package/lib/wallet-api/tracking.d.ts +6 -0
  181. package/lib/wallet-api/tracking.d.ts.map +1 -1
  182. package/lib/wallet-api/tracking.js +20 -0
  183. package/lib/wallet-api/tracking.js.map +1 -1
  184. package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
  185. package/lib/wallet-api/useDappLogic.js +65 -80
  186. package/lib/wallet-api/useDappLogic.js.map +1 -1
  187. package/lib-es/__tests__/test-helpers/environment.js +2 -0
  188. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  189. package/lib-es/currencies/helpers.d.ts +1 -3
  190. package/lib-es/currencies/helpers.d.ts.map +1 -1
  191. package/lib-es/currencies/helpers.js +0 -24
  192. package/lib-es/currencies/helpers.js.map +1 -1
  193. package/lib-es/dada-client/hooks/useAssetsData.d.ts +1 -0
  194. package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  195. package/lib-es/dada-client/hooks/useAssetsData.js +1 -0
  196. package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
  197. package/lib-es/deviceSDK/actions/getBatteryStatuses.d.ts +2 -1
  198. package/lib-es/deviceSDK/actions/getBatteryStatuses.d.ts.map +1 -1
  199. package/lib-es/deviceSDK/actions/getBatteryStatuses.js +2 -2
  200. package/lib-es/deviceSDK/actions/getBatteryStatuses.js.map +1 -1
  201. package/lib-es/deviceSDK/actions/getDeviceInfo.d.ts +2 -1
  202. package/lib-es/deviceSDK/actions/getDeviceInfo.d.ts.map +1 -1
  203. package/lib-es/deviceSDK/actions/getDeviceInfo.js +2 -2
  204. package/lib-es/deviceSDK/actions/getDeviceInfo.js.map +1 -1
  205. package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.d.ts +2 -1
  206. package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.d.ts.map +1 -1
  207. package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.js +6 -3
  208. package/lib-es/deviceSDK/actions/getLatestAvailableFirmware.js.map +1 -1
  209. package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts +2 -1
  210. package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.d.ts.map +1 -1
  211. package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.js +2 -2
  212. package/lib-es/deviceSDK/actions/toggleOnboardingEarlyCheck.js.map +1 -1
  213. package/lib-es/deviceSDK/actions/updateFirmware.d.ts +2 -1
  214. package/lib-es/deviceSDK/actions/updateFirmware.d.ts.map +1 -1
  215. package/lib-es/deviceSDK/actions/updateFirmware.js +4 -3
  216. package/lib-es/deviceSDK/actions/updateFirmware.js.map +1 -1
  217. package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
  218. package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
  219. package/lib-es/deviceSDK/hooks/useBatteryStatuses.js +3 -2
  220. package/lib-es/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
  221. package/lib-es/deviceSDK/hooks/useGetDeviceInfo.d.ts +2 -1
  222. package/lib-es/deviceSDK/hooks/useGetDeviceInfo.d.ts.map +1 -1
  223. package/lib-es/deviceSDK/hooks/useGetDeviceInfo.js +3 -3
  224. package/lib-es/deviceSDK/hooks/useGetDeviceInfo.js.map +1 -1
  225. package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts +2 -1
  226. package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -1
  227. package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.js +2 -1
  228. package/lib-es/deviceSDK/hooks/useGetLatestAvailableFirmware.js.map +1 -1
  229. package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts +2 -1
  230. package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.d.ts.map +1 -1
  231. package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js +3 -2
  232. package/lib-es/deviceSDK/hooks/useToggleOnboardingEarlyChecks.js.map +1 -1
  233. package/lib-es/deviceSDK/hooks/useUpdateFirmware.d.ts +2 -1
  234. package/lib-es/deviceSDK/hooks/useUpdateFirmware.d.ts.map +1 -1
  235. package/lib-es/deviceSDK/hooks/useUpdateFirmware.js +3 -2
  236. package/lib-es/deviceSDK/hooks/useUpdateFirmware.js.map +1 -1
  237. package/lib-es/deviceSDK/tasks/getBatteryStatuses.d.ts +1 -0
  238. package/lib-es/deviceSDK/tasks/getBatteryStatuses.d.ts.map +1 -1
  239. package/lib-es/deviceSDK/tasks/getBatteryStatuses.js +2 -2
  240. package/lib-es/deviceSDK/tasks/getBatteryStatuses.js.map +1 -1
  241. package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts +2 -1
  242. package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
  243. package/lib-es/deviceSDK/tasks/getDeviceInfo.js +2 -2
  244. package/lib-es/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
  245. package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts +1 -0
  246. package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
  247. package/lib-es/deviceSDK/tasks/getLatestFirmware.js +2 -2
  248. package/lib-es/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
  249. package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts +1 -0
  250. package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.d.ts.map +1 -1
  251. package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.js +2 -2
  252. package/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.js.map +1 -1
  253. package/lib-es/deviceSDK/tasks/updateFirmware.d.ts +1 -0
  254. package/lib-es/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
  255. package/lib-es/deviceSDK/tasks/updateFirmware.js +2 -2
  256. package/lib-es/deviceSDK/tasks/updateFirmware.js.map +1 -1
  257. package/lib-es/deviceSDK/transports/core.d.ts +1 -0
  258. package/lib-es/deviceSDK/transports/core.d.ts.map +1 -1
  259. package/lib-es/deviceSDK/transports/core.js +2 -2
  260. package/lib-es/deviceSDK/transports/core.js.map +1 -1
  261. package/lib-es/e2e/index.d.ts +6 -0
  262. package/lib-es/e2e/index.d.ts.map +1 -1
  263. package/lib-es/families/evm/config.d.ts.map +1 -1
  264. package/lib-es/families/evm/config.js +33 -0
  265. package/lib-es/families/evm/config.js.map +1 -1
  266. package/lib-es/featureFlags/defaultFeatures.d.ts +2 -0
  267. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  268. package/lib-es/featureFlags/defaultFeatures.js +2 -0
  269. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  270. package/lib-es/hw/actions/app.d.ts.map +1 -1
  271. package/lib-es/hw/actions/app.js +2 -1
  272. package/lib-es/hw/actions/app.js.map +1 -1
  273. package/lib-es/hw/actions/customLockScreenLoad.d.ts +1 -1
  274. package/lib-es/hw/actions/customLockScreenLoad.d.ts.map +1 -1
  275. package/lib-es/hw/actions/customLockScreenLoad.js +2 -0
  276. package/lib-es/hw/actions/customLockScreenLoad.js.map +1 -1
  277. package/lib-es/hw/actions/implementations.d.ts +1 -0
  278. package/lib-es/hw/actions/implementations.d.ts.map +1 -1
  279. package/lib-es/hw/actions/implementations.js +12 -2
  280. package/lib-es/hw/actions/implementations.js.map +1 -1
  281. package/lib-es/hw/connectApp.d.ts +2 -1
  282. package/lib-es/hw/connectApp.d.ts.map +1 -1
  283. package/lib-es/hw/connectApp.js +4 -4
  284. package/lib-es/hw/connectApp.js.map +1 -1
  285. package/lib-es/hw/connectManager.d.ts +2 -1
  286. package/lib-es/hw/connectManager.d.ts.map +1 -1
  287. package/lib-es/hw/connectManager.js +4 -4
  288. package/lib-es/hw/connectManager.js.map +1 -1
  289. package/lib-es/hw/customLockScreenFetch.d.ts +2 -1
  290. package/lib-es/hw/customLockScreenFetch.d.ts.map +1 -1
  291. package/lib-es/hw/customLockScreenFetch.js +2 -2
  292. package/lib-es/hw/customLockScreenFetch.js.map +1 -1
  293. package/lib-es/hw/customLockScreenLoad.d.ts +2 -1
  294. package/lib-es/hw/customLockScreenLoad.d.ts.map +1 -1
  295. package/lib-es/hw/customLockScreenLoad.js +2 -2
  296. package/lib-es/hw/customLockScreenLoad.js.map +1 -1
  297. package/lib-es/hw/deviceAccess.d.ts +3 -3
  298. package/lib-es/hw/deviceAccess.d.ts.map +1 -1
  299. package/lib-es/hw/deviceAccess.js +2 -1
  300. package/lib-es/hw/deviceAccess.js.map +1 -1
  301. package/lib-es/hw/getGenuineCheckFromDeviceId.d.ts +2 -1
  302. package/lib-es/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -1
  303. package/lib-es/hw/getGenuineCheckFromDeviceId.js +2 -2
  304. package/lib-es/hw/getGenuineCheckFromDeviceId.js.map +1 -1
  305. package/lib-es/hw/getOnboardingStatePolling.d.ts +2 -1
  306. package/lib-es/hw/getOnboardingStatePolling.d.ts.map +1 -1
  307. package/lib-es/hw/getOnboardingStatePolling.js +5 -2
  308. package/lib-es/hw/getOnboardingStatePolling.js.map +1 -1
  309. package/lib-es/hw/hooks/useGenuineCheck.d.ts +2 -1
  310. package/lib-es/hw/hooks/useGenuineCheck.d.ts.map +1 -1
  311. package/lib-es/hw/hooks/useGenuineCheck.js +3 -1
  312. package/lib-es/hw/hooks/useGenuineCheck.js.map +1 -1
  313. package/lib-es/hw/index.d.ts +6 -2
  314. package/lib-es/hw/index.d.ts.map +1 -1
  315. package/lib-es/hw/index.js +6 -6
  316. package/lib-es/hw/index.js.map +1 -1
  317. package/lib-es/hw/installLanguage.d.ts +2 -1
  318. package/lib-es/hw/installLanguage.d.ts.map +1 -1
  319. package/lib-es/hw/installLanguage.js +2 -2
  320. package/lib-es/hw/installLanguage.js.map +1 -1
  321. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  322. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +8 -0
  323. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  324. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
  325. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
  326. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
  327. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
  328. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  329. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  330. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +1 -2
  331. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  332. package/lib-es/modularDrawer/utils/type.d.ts +0 -5
  333. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  334. package/lib-es/onboarding/hooks/useOnboardingStatePolling.d.ts.map +1 -1
  335. package/lib-es/onboarding/hooks/useOnboardingStatePolling.js +1 -0
  336. package/lib-es/onboarding/hooks/useOnboardingStatePolling.js.map +1 -1
  337. package/lib-es/platform/filters.d.ts +1 -2
  338. package/lib-es/platform/filters.d.ts.map +1 -1
  339. package/lib-es/platform/filters.js +0 -15
  340. package/lib-es/platform/filters.js.map +1 -1
  341. package/lib-es/platform/helpers.d.ts +1 -5
  342. package/lib-es/platform/helpers.d.ts.map +1 -1
  343. package/lib-es/platform/helpers.js +1 -30
  344. package/lib-es/platform/helpers.js.map +1 -1
  345. package/lib-es/platform/react.d.ts +2 -3
  346. package/lib-es/platform/react.d.ts.map +1 -1
  347. package/lib-es/platform/react.js +67 -16
  348. package/lib-es/platform/react.js.map +1 -1
  349. package/lib-es/platform/types.d.ts +3 -3
  350. package/lib-es/platform/types.d.ts.map +1 -1
  351. package/lib-es/utils/getAccountTuplesForCurrency.d.ts +1 -1
  352. package/lib-es/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
  353. package/lib-es/utils/getAccountTuplesForCurrency.js +2 -3
  354. package/lib-es/utils/getAccountTuplesForCurrency.js.map +1 -1
  355. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  356. package/lib-es/wallet-api/Exchange/server.js +5 -4
  357. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  358. package/lib-es/wallet-api/converters.d.ts +1 -0
  359. package/lib-es/wallet-api/converters.d.ts.map +1 -1
  360. package/lib-es/wallet-api/converters.js +5 -1
  361. package/lib-es/wallet-api/converters.js.map +1 -1
  362. package/lib-es/wallet-api/react.d.ts +6 -11
  363. package/lib-es/wallet-api/react.d.ts.map +1 -1
  364. package/lib-es/wallet-api/react.js +289 -131
  365. package/lib-es/wallet-api/react.js.map +1 -1
  366. package/lib-es/wallet-api/tracking.d.ts +6 -0
  367. package/lib-es/wallet-api/tracking.d.ts.map +1 -1
  368. package/lib-es/wallet-api/tracking.js +20 -0
  369. package/lib-es/wallet-api/tracking.js.map +1 -1
  370. package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
  371. package/lib-es/wallet-api/useDappLogic.js +62 -77
  372. package/lib-es/wallet-api/useDappLogic.js.map +1 -1
  373. package/package.json +59 -59
  374. package/src/__tests__/migration/account-migration.ts +2 -0
  375. package/src/__tests__/test-helpers/environment.ts +2 -0
  376. package/src/currencies/helpers.ts +1 -42
  377. package/src/dada-client/hooks/useAssetsData.ts +1 -0
  378. package/src/deviceSDK/actions/getBatteryStatuses.ts +3 -1
  379. package/src/deviceSDK/actions/getDeviceInfo.ts +3 -2
  380. package/src/deviceSDK/actions/getLatestAvailableFirmware.test.ts +31 -0
  381. package/src/deviceSDK/actions/getLatestAvailableFirmware.ts +7 -2
  382. package/src/deviceSDK/actions/toggleOnboardingEarlyCheck.ts +3 -1
  383. package/src/deviceSDK/actions/updateFirmware.ts +5 -2
  384. package/src/deviceSDK/hooks/useBatteryStatuses.test.ts +3 -1
  385. package/src/deviceSDK/hooks/useBatteryStatuses.ts +4 -1
  386. package/src/deviceSDK/hooks/useGetDeviceInfo.ts +4 -2
  387. package/src/deviceSDK/hooks/useGetLatestAvailableFirmware.ts +3 -0
  388. package/src/deviceSDK/hooks/useToggleOnboardingEarlyChecks.test.ts +2 -0
  389. package/src/deviceSDK/hooks/useToggleOnboardingEarlyChecks.ts +4 -1
  390. package/src/deviceSDK/hooks/useUpdateFirmware.ts +4 -1
  391. package/src/deviceSDK/tasks/getBatteryStatuses.ts +6 -1
  392. package/src/deviceSDK/tasks/getDeviceInfo.ts +6 -2
  393. package/src/deviceSDK/tasks/getLatestFirmware.ts +6 -1
  394. package/src/deviceSDK/tasks/toggleOnboardingEarlyCheck.test.ts +3 -0
  395. package/src/deviceSDK/tasks/toggleOnboardingEarlyCheck.ts +6 -1
  396. package/src/deviceSDK/tasks/updateFirmware.ts +6 -1
  397. package/src/deviceSDK/transports/core.ts +6 -3
  398. package/src/families/evm/config.ts +33 -0
  399. package/src/featureFlags/defaultFeatures.ts +2 -0
  400. package/src/hw/actions/app.ts +2 -1
  401. package/src/hw/actions/customLockScreenLoad.ts +6 -2
  402. package/src/hw/actions/implementations.ts +17 -3
  403. package/src/hw/connectApp.ts +12 -5
  404. package/src/hw/connectManager.ts +13 -6
  405. package/src/hw/customLockScreenFetch.ts +10 -2
  406. package/src/hw/customLockScreenLoad.test.ts +28 -3
  407. package/src/hw/customLockScreenLoad.ts +10 -2
  408. package/src/hw/deviceAccess.ts +4 -3
  409. package/src/hw/getGenuineCheckFromDeviceId.test.ts +4 -0
  410. package/src/hw/getGenuineCheckFromDeviceId.ts +6 -1
  411. package/src/hw/getOnboardingStatePolling.test.ts +34 -0
  412. package/src/hw/getOnboardingStatePolling.ts +6 -3
  413. package/src/hw/hooks/useGenuineCheck.test.ts +37 -0
  414. package/src/hw/hooks/useGenuineCheck.ts +4 -0
  415. package/src/hw/index.test.ts +27 -6
  416. package/src/hw/index.ts +15 -8
  417. package/src/hw/installLanguage.ts +6 -1
  418. package/src/modularDrawer/hooks/__test__/useAssetAccountCounts.test.ts +0 -5
  419. package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +8 -0
  420. package/src/modularDrawer/hooks/useNetworkAccountCounts.tsx +1 -6
  421. package/src/modularDrawer/modules/createNetworkConfiguration.ts +1 -2
  422. package/src/modularDrawer/utils/type.ts +0 -5
  423. package/src/onboarding/hooks/useOnboardingStatePolling.ts +1 -0
  424. package/src/platform/filters.ts +1 -23
  425. package/src/platform/helpers.ts +2 -49
  426. package/src/platform/react.ts +86 -22
  427. package/src/platform/types.ts +1 -1
  428. package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +0 -30
  429. package/src/utils/getAccountTuplesForCurrency.ts +1 -6
  430. package/src/wallet-api/Exchange/server.test.ts +0 -5
  431. package/src/wallet-api/Exchange/server.ts +7 -6
  432. package/src/wallet-api/converters.ts +6 -1
  433. package/src/wallet-api/react.ts +310 -137
  434. package/src/wallet-api/tracking.ts +22 -0
  435. package/src/wallet-api/useDappLogic.ts +91 -106
  436. package/src/currencies/helpers.test.ts +0 -20
@@ -8,16 +8,15 @@ import { getAccountBridge } from "../bridge";
8
8
  import { getEnv } from "@ledgerhq/live-env";
9
9
  import network from "@ledgerhq/live-network/network";
10
10
  import { getWalletAPITransactionSignFlowInfos } from "./converters";
11
- import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/index";
12
- import { getCryptoAssetsStore } from "../bridge/crypto-assets/index";
13
11
  import { prepareMessageToSign } from "../hw/signMessage/index";
14
- import { CurrentAccountHistDB, UiHook, usePermission } from "./react";
12
+ import { CurrentAccountHistDB, UiHook } from "./react";
15
13
  import BigNumber from "bignumber.js";
16
14
  import { safeEncodeEIP55 } from "@ledgerhq/coin-evm/utils";
17
15
  import { SmartWebsocket } from "./SmartWebsocket";
18
16
  import { stripHexPrefix } from "./helpers";
19
17
  import { getTxType } from "./utils/txTrackingHelper";
20
18
  import { Transaction as EvmTransaction } from "@ledgerhq/coin-evm/types/transaction";
19
+ import { getCryptoAssetsStore } from "../bridge/crypto-assets";
21
20
 
22
21
  type MessageId = number | string | null;
23
22
 
@@ -88,6 +87,8 @@ export function useDappCurrentAccount(currentAccountHistDb?: CurrentAccountHistD
88
87
  return { currentAccount, setCurrentAccount, setCurrentAccountHist };
89
88
  }
90
89
 
90
+ const globCurrencies = ["**"];
91
+
91
92
  function useDappAccountLogic({
92
93
  manifest,
93
94
  accounts,
@@ -100,7 +101,7 @@ function useDappAccountLogic({
100
101
  initialAccountId?: string;
101
102
  }) {
102
103
  const [initialAccountSelected, setInitialAccountSelected] = useState(false);
103
- const { currencyIds } = usePermission(manifest);
104
+ const currencyIds = manifest.currencies === "*" ? globCurrencies : manifest.currencies;
104
105
  const { currentAccount, setCurrentAccount, setCurrentAccountHist } =
105
106
  useDappCurrentAccount(currentAccountHistDb);
106
107
  const currentParentAccount = useMemo(() => {
@@ -434,7 +435,8 @@ export function useDappLogic({
434
435
  try {
435
436
  await new Promise<void>((resolve, reject) =>
436
437
  uiHook["account.request"]({
437
- currencies: [getCryptoCurrencyById(requestedCurrency.currency)],
438
+ currencyIds: [requestedCurrency.currency],
439
+ areCurrenciesFiltered: true,
438
440
  onSuccess: account => {
439
441
  setCurrentAccountHist(manifest.id, account);
440
442
  setCurrentAccount(account);
@@ -474,108 +476,95 @@ export function useDappLogic({
474
476
  : currentParentAccount.freshAddress;
475
477
 
476
478
  if (address.toLowerCase() === ethTX.from.toLowerCase()) {
477
- (async () => {
478
- let trackingData: DAppTrackingData | undefined;
479
- try {
480
- const signFlowInfos = getWalletAPITransactionSignFlowInfos({
481
- walletApiTransaction: tx,
479
+ let trackingData: DAppTrackingData | undefined;
480
+ try {
481
+ const signFlowInfos = getWalletAPITransactionSignFlowInfos({
482
+ walletApiTransaction: tx,
483
+ account: currentAccount,
484
+ });
485
+
486
+ const transactionType = getTxType(signFlowInfos.liveTx as EvmTransaction);
487
+
488
+ const accountCurrencyName =
489
+ currentAccount.type === "TokenAccount"
490
+ ? currentAccount.token.name
491
+ : currentAccount.currency.name;
492
+
493
+ const accountNetwork =
494
+ currentAccount.type === "TokenAccount"
495
+ ? currentAccount.token.parentCurrency.id
496
+ : currentAccount.currency.id;
497
+
498
+ const token = await getCryptoAssetsStore().findTokenByAddressInCurrency(
499
+ tx.recipient,
500
+ accountNetwork,
501
+ );
502
+
503
+ trackingData = {
504
+ type: transactionType,
505
+ currency: token ? token.name : accountCurrencyName,
506
+ network: token ? token.parentCurrency.id : accountNetwork,
507
+ };
508
+
509
+ const options = nanoApp
510
+ ? { hwAppId: nanoApp, dependencies: dependencies }
511
+ : undefined;
512
+ tracking.dappSendTransactionRequested(manifest, trackingData);
513
+
514
+ const signedTransaction = await new Promise<SignedOperation>((resolve, reject) =>
515
+ uiHook["transaction.sign"]({
482
516
  account: currentAccount,
483
- });
517
+ parentAccount: undefined,
518
+ signFlowInfos,
519
+ options,
520
+ onSuccess: signedOperation => {
521
+ resolve(signedOperation);
522
+ },
523
+ onError: error => {
524
+ reject(error);
525
+ },
526
+ }),
527
+ );
528
+
529
+ const bridge = getAccountBridge(currentAccount, undefined);
530
+ const mainAccount = getMainAccount(currentAccount, undefined);
484
531
 
485
- const transactionType = getTxType(signFlowInfos.liveTx as EvmTransaction);
486
-
487
- const token = await getCryptoAssetsStore().findTokenByAddressInCurrency(
488
- tx.recipient,
489
- currentAccount.type === "TokenAccount"
490
- ? currentAccount.token.parentCurrency.id
491
- : currentAccount.currency.id,
492
- );
493
-
494
- const accountCurrencyName =
495
- currentAccount.type === "TokenAccount"
496
- ? currentAccount.token.name
497
- : currentAccount.currency.name;
498
-
499
- const accountNetwork =
500
- currentAccount.type === "TokenAccount"
501
- ? currentAccount.token.parentCurrency.id
502
- : currentAccount.currency.id;
503
-
504
- trackingData = {
505
- type: transactionType,
506
- currency: token ? token.name : accountCurrencyName,
507
- network: token ? token.parentCurrency.id : accountNetwork,
508
- };
509
-
510
- const options = nanoApp
511
- ? { hwAppId: nanoApp, dependencies: dependencies }
512
- : undefined;
513
- tracking.dappSendTransactionRequested(manifest, trackingData);
514
-
515
- const signedTransaction = await new Promise<SignedOperation>((resolve, reject) =>
516
- uiHook["transaction.sign"]({
517
- account: currentAccount,
518
- parentAccount: undefined,
519
- signFlowInfos,
520
- options,
521
- onSuccess: signedOperation => {
522
- resolve(signedOperation);
523
- },
524
- onError: error => {
525
- reject(error);
526
- },
527
- }),
528
- );
529
-
530
- const bridge = getAccountBridge(currentAccount, undefined);
531
- const mainAccount = getMainAccount(currentAccount, undefined);
532
-
533
- let optimisticOperation: Operation = signedTransaction.operation;
534
-
535
- if (!getEnv("DISABLE_TRANSACTION_BROADCAST")) {
536
- optimisticOperation = await bridge.broadcast({
537
- account: mainAccount,
538
- signedOperation: signedTransaction,
539
- broadcastConfig: { mevProtected: !!mevProtected },
540
- });
541
- }
542
-
543
- uiHook["transaction.broadcast"](
544
- currentAccount,
545
- undefined,
546
- mainAccount,
547
- optimisticOperation,
548
- );
549
-
550
- tracking.dappSendTransactionSuccess(manifest, trackingData);
551
-
552
- postMessage(
553
- JSON.stringify({
554
- id: data.id,
555
- jsonrpc: "2.0",
556
- result: optimisticOperation.hash,
557
- }),
558
- );
559
- } catch (error) {
560
- tracking.dappSendTransactionFail(manifest, trackingData);
561
- postMessage(
562
- JSON.stringify({
563
- id: data.id,
564
- jsonrpc: "2.0",
565
- error: rejectedError("Transaction declined"),
566
- }),
567
- );
532
+ let optimisticOperation: Operation = signedTransaction.operation;
533
+
534
+ if (!getEnv("DISABLE_TRANSACTION_BROADCAST")) {
535
+ optimisticOperation = await bridge.broadcast({
536
+ account: mainAccount,
537
+ signedOperation: signedTransaction,
538
+ broadcastConfig: { mevProtected: !!mevProtected },
539
+ });
568
540
  }
569
- })().catch(error => {
570
- console.error("Error in eth_sendTransaction handler:", error);
541
+
542
+ uiHook["transaction.broadcast"](
543
+ currentAccount,
544
+ undefined,
545
+ mainAccount,
546
+ optimisticOperation,
547
+ );
548
+
549
+ tracking.dappSendTransactionSuccess(manifest, trackingData);
550
+
571
551
  postMessage(
572
552
  JSON.stringify({
573
553
  id: data.id,
574
554
  jsonrpc: "2.0",
575
- error: rejectedError("Transaction processing failed"),
555
+ result: optimisticOperation.hash,
576
556
  }),
577
557
  );
578
- });
558
+ } catch (error) {
559
+ tracking.dappSendTransactionFail(manifest, trackingData);
560
+ postMessage(
561
+ JSON.stringify({
562
+ id: data.id,
563
+ jsonrpc: "2.0",
564
+ error: rejectedError("Transaction declined"),
565
+ }),
566
+ );
567
+ }
579
568
  }
580
569
  break;
581
570
  }
@@ -684,17 +673,13 @@ export function useDappLogic({
684
673
  if (ws.current) {
685
674
  ws.current.send(data);
686
675
  } else if (currentNetwork.nodeURL?.startsWith("https:")) {
687
- network({
676
+ void network({
688
677
  method: "POST",
689
678
  url: currentNetwork.nodeURL,
690
679
  data,
691
- })
692
- .then(res => {
693
- postMessage(JSON.stringify(res.data));
694
- })
695
- .catch(() => {
696
- // Silently ignore network errors
697
- });
680
+ }).then(res => {
681
+ postMessage(JSON.stringify(res.data));
682
+ });
698
683
  }
699
684
  break;
700
685
  }
@@ -1,20 +0,0 @@
1
- import "../__tests__/test-helpers/setup";
2
- import { isCryptoCurrency, isTokenCurrency, listCurrencies } from "./helpers";
3
-
4
- describe("Currencies helpers", () => {
5
- test("listCurrencies without includeTokens", () => {
6
- const currencies = listCurrencies(false);
7
-
8
- currencies.forEach(currency => {
9
- expect(isCryptoCurrency(currency)).toBeTruthy();
10
- });
11
- });
12
-
13
- test("listCurrencies with includeTokens", () => {
14
- const currencies = listCurrencies(true);
15
-
16
- currencies.forEach(currency => {
17
- expect(isCryptoCurrency(currency) || isTokenCurrency(currency)).toBeTruthy();
18
- });
19
- });
20
- });