@ledgerhq/live-common 34.52.0-nightly.1 → 34.52.0-nightly.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) 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/apps/config.js +1 -1
  4. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -1
  5. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  6. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +3 -0
  7. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  8. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  9. package/lib/bridge/generic-alpaca/getAccountShape.js +7 -1
  10. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  11. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  12. package/lib/bridge/generic-alpaca/utils.js +5 -4
  13. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  14. package/lib/dada-client/hooks/useAssetsData.d.ts +4 -10
  15. package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  16. package/lib/dada-client/hooks/useAssetsData.js +2 -1
  17. package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
  18. package/lib/dada-client/hooks/useInterestRatesByCurrencies.d.ts +5 -1
  19. package/lib/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -1
  20. package/lib/dada-client/hooks/useMarketByCurrencies.d.ts +4 -1
  21. package/lib/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -1
  22. package/lib/dada-client/state-manager/api.d.ts.map +1 -1
  23. package/lib/dada-client/state-manager/api.js +3 -0
  24. package/lib/dada-client/state-manager/api.js.map +1 -1
  25. package/lib/dada-client/state-manager/types.d.ts +1 -0
  26. package/lib/dada-client/state-manager/types.d.ts.map +1 -1
  27. package/lib/deposit/helper.d.ts.map +1 -1
  28. package/lib/deposit/helper.js +54 -1
  29. package/lib/deposit/helper.js.map +1 -1
  30. package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
  31. package/lib/e2e/data/deviceLabelsData.js +37 -33
  32. package/lib/e2e/data/deviceLabelsData.js.map +1 -1
  33. package/lib/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
  34. package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js +13 -5
  35. package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
  36. package/lib/e2e/enum/Account.d.ts +0 -1
  37. package/lib/e2e/enum/Account.d.ts.map +1 -1
  38. package/lib/e2e/enum/Account.js +0 -1
  39. package/lib/e2e/enum/Account.js.map +1 -1
  40. package/lib/e2e/enum/Currency.d.ts +0 -1
  41. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  42. package/lib/e2e/enum/Currency.js +0 -1
  43. package/lib/e2e/enum/Currency.js.map +1 -1
  44. package/lib/e2e/enum/Device.d.ts +1 -0
  45. package/lib/e2e/enum/Device.d.ts.map +1 -1
  46. package/lib/e2e/enum/Device.js +1 -0
  47. package/lib/e2e/enum/Device.js.map +1 -1
  48. package/lib/e2e/enum/DeviceLabels.d.ts +2 -0
  49. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  50. package/lib/e2e/enum/DeviceLabels.js +2 -0
  51. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  52. package/lib/e2e/families/bitcoin.js +1 -1
  53. package/lib/e2e/families/bitcoin.js.map +1 -1
  54. package/lib/e2e/families/cardano.d.ts.map +1 -1
  55. package/lib/e2e/families/cardano.js +12 -11
  56. package/lib/e2e/families/cardano.js.map +1 -1
  57. package/lib/e2e/families/evm.d.ts.map +1 -1
  58. package/lib/e2e/families/evm.js +4 -3
  59. package/lib/e2e/families/evm.js.map +1 -1
  60. package/lib/e2e/families/solana.d.ts.map +1 -1
  61. package/lib/e2e/families/solana.js +1 -1
  62. package/lib/e2e/families/solana.js.map +1 -1
  63. package/lib/e2e/index.d.ts +8 -0
  64. package/lib/e2e/index.d.ts.map +1 -1
  65. package/lib/e2e/speculos.d.ts +2 -0
  66. package/lib/e2e/speculos.d.ts.map +1 -1
  67. package/lib/e2e/speculos.js +22 -17
  68. package/lib/e2e/speculos.js.map +1 -1
  69. package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
  70. package/lib/e2e/speculosAppVersion.js +5 -2
  71. package/lib/e2e/speculosAppVersion.js.map +1 -1
  72. package/lib/e2e/speculosCI.d.ts.map +1 -1
  73. package/lib/e2e/speculosCI.js +4 -0
  74. package/lib/e2e/speculosCI.js.map +1 -1
  75. package/lib/env.react.d.ts +1 -1
  76. package/lib/env.react.d.ts.map +1 -1
  77. package/lib/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  78. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
  79. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  80. package/lib/exchange/swap/transactionStrategies.d.ts +3 -0
  81. package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
  82. package/lib/exchange/swap/transactionStrategies.js +12 -2
  83. package/lib/exchange/swap/transactionStrategies.js.map +1 -1
  84. package/lib/families/canton/bridge/mock.d.ts +2 -2
  85. package/lib/families/canton/bridge/mock.d.ts.map +1 -1
  86. package/lib/families/canton/bridge/mock.js +3 -0
  87. package/lib/families/canton/bridge/mock.js.map +1 -1
  88. package/lib/families/canton/config.d.ts.map +1 -1
  89. package/lib/families/canton/config.js +3 -0
  90. package/lib/families/canton/config.js.map +1 -1
  91. package/lib/families/canton/setup.d.ts +3 -3
  92. package/lib/families/canton/setup.d.ts.map +1 -1
  93. package/lib/families/canton/setup.js.map +1 -1
  94. package/lib/families/evm/config.d.ts.map +1 -1
  95. package/lib/families/evm/config.js +18 -1
  96. package/lib/families/evm/config.js.map +1 -1
  97. package/lib/families/hedera/utils.d.ts +2 -0
  98. package/lib/families/hedera/utils.d.ts.map +1 -0
  99. package/lib/families/hedera/{logic.js → utils.js} +2 -2
  100. package/lib/families/hedera/utils.js.map +1 -0
  101. package/lib/families/sui/react.d.ts.map +1 -1
  102. package/lib/families/sui/react.js +1 -0
  103. package/lib/families/sui/react.js.map +1 -1
  104. package/lib/featureFlags/defaultFeatures.d.ts +3 -0
  105. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  106. package/lib/featureFlags/defaultFeatures.js +3 -0
  107. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  108. package/lib/generated/bridge/js.d.ts +1 -1
  109. package/lib/generated/bridge/mock.d.ts +1 -1
  110. package/lib/generated/deviceTransactionConfig.d.ts +1 -1
  111. package/lib/generated/specs.d.ts +1 -0
  112. package/lib/generated/specs.d.ts.map +1 -1
  113. package/lib/hooks/useDeviceTransactionConfig.d.ts +19 -0
  114. package/lib/hooks/useDeviceTransactionConfig.d.ts.map +1 -0
  115. package/lib/hooks/useDeviceTransactionConfig.js +45 -0
  116. package/lib/hooks/useDeviceTransactionConfig.js.map +1 -0
  117. package/lib/load/speculos.d.ts.map +1 -1
  118. package/lib/load/speculos.js +1 -0
  119. package/lib/load/speculos.js.map +1 -1
  120. package/lib/modularDrawer/__mocks__/currencies.mock.d.ts +3 -0
  121. package/lib/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  122. package/lib/modularDrawer/__mocks__/currencies.mock.js +40 -1
  123. package/lib/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  124. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  125. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +7 -0
  126. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  127. package/lib/modularDrawer/utils/index.d.ts +3 -2
  128. package/lib/modularDrawer/utils/index.d.ts.map +1 -1
  129. package/lib/modularDrawer/utils/index.js +6 -10
  130. package/lib/modularDrawer/utils/index.js.map +1 -1
  131. package/lib/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.js.map +1 -1
  132. package/lib/postOnboarding/hooks/usePostOnboardingHubState.d.ts.map +1 -1
  133. package/lib/postOnboarding/hooks/usePostOnboardingHubState.js +7 -6
  134. package/lib/postOnboarding/hooks/usePostOnboardingHubState.js.map +1 -1
  135. package/lib/transaction/deviceTransactionConfig.d.ts +1 -1
  136. package/lib/transaction/deviceTransactionConfig.d.ts.map +1 -1
  137. package/lib/transaction/deviceTransactionConfig.js +2 -2
  138. package/lib/transaction/deviceTransactionConfig.js.map +1 -1
  139. package/lib-es/__tests__/test-helpers/environment.js +2 -0
  140. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  141. package/lib-es/apps/config.js +1 -1
  142. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts +2 -1
  143. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.d.ts.map +1 -1
  144. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +3 -0
  145. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  146. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  147. package/lib-es/bridge/generic-alpaca/getAccountShape.js +7 -1
  148. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  149. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  150. package/lib-es/bridge/generic-alpaca/utils.js +5 -4
  151. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  152. package/lib-es/dada-client/hooks/useAssetsData.d.ts +4 -10
  153. package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  154. package/lib-es/dada-client/hooks/useAssetsData.js +2 -1
  155. package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
  156. package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.d.ts +5 -1
  157. package/lib-es/dada-client/hooks/useInterestRatesByCurrencies.d.ts.map +1 -1
  158. package/lib-es/dada-client/hooks/useMarketByCurrencies.d.ts +4 -1
  159. package/lib-es/dada-client/hooks/useMarketByCurrencies.d.ts.map +1 -1
  160. package/lib-es/dada-client/state-manager/api.d.ts.map +1 -1
  161. package/lib-es/dada-client/state-manager/api.js +3 -0
  162. package/lib-es/dada-client/state-manager/api.js.map +1 -1
  163. package/lib-es/dada-client/state-manager/types.d.ts +1 -0
  164. package/lib-es/dada-client/state-manager/types.d.ts.map +1 -1
  165. package/lib-es/deposit/helper.d.ts.map +1 -1
  166. package/lib-es/deposit/helper.js +54 -1
  167. package/lib-es/deposit/helper.js.map +1 -1
  168. package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
  169. package/lib-es/e2e/data/deviceLabelsData.js +37 -33
  170. package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
  171. package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
  172. package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js +13 -5
  173. package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
  174. package/lib-es/e2e/enum/Account.d.ts +0 -1
  175. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  176. package/lib-es/e2e/enum/Account.js +0 -1
  177. package/lib-es/e2e/enum/Account.js.map +1 -1
  178. package/lib-es/e2e/enum/Currency.d.ts +0 -1
  179. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  180. package/lib-es/e2e/enum/Currency.js +0 -1
  181. package/lib-es/e2e/enum/Currency.js.map +1 -1
  182. package/lib-es/e2e/enum/Device.d.ts +1 -0
  183. package/lib-es/e2e/enum/Device.d.ts.map +1 -1
  184. package/lib-es/e2e/enum/Device.js +1 -0
  185. package/lib-es/e2e/enum/Device.js.map +1 -1
  186. package/lib-es/e2e/enum/DeviceLabels.d.ts +2 -0
  187. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  188. package/lib-es/e2e/enum/DeviceLabels.js +2 -0
  189. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  190. package/lib-es/e2e/families/bitcoin.js +1 -1
  191. package/lib-es/e2e/families/bitcoin.js.map +1 -1
  192. package/lib-es/e2e/families/cardano.d.ts.map +1 -1
  193. package/lib-es/e2e/families/cardano.js +12 -11
  194. package/lib-es/e2e/families/cardano.js.map +1 -1
  195. package/lib-es/e2e/families/evm.d.ts.map +1 -1
  196. package/lib-es/e2e/families/evm.js +4 -3
  197. package/lib-es/e2e/families/evm.js.map +1 -1
  198. package/lib-es/e2e/families/solana.d.ts.map +1 -1
  199. package/lib-es/e2e/families/solana.js +1 -1
  200. package/lib-es/e2e/families/solana.js.map +1 -1
  201. package/lib-es/e2e/index.d.ts +8 -0
  202. package/lib-es/e2e/index.d.ts.map +1 -1
  203. package/lib-es/e2e/speculos.d.ts +2 -0
  204. package/lib-es/e2e/speculos.d.ts.map +1 -1
  205. package/lib-es/e2e/speculos.js +22 -17
  206. package/lib-es/e2e/speculos.js.map +1 -1
  207. package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
  208. package/lib-es/e2e/speculosAppVersion.js +5 -2
  209. package/lib-es/e2e/speculosAppVersion.js.map +1 -1
  210. package/lib-es/e2e/speculosCI.d.ts.map +1 -1
  211. package/lib-es/e2e/speculosCI.js +4 -0
  212. package/lib-es/e2e/speculosCI.js.map +1 -1
  213. package/lib-es/env.react.d.ts +1 -1
  214. package/lib-es/env.react.d.ts.map +1 -1
  215. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  216. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
  217. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  218. package/lib-es/exchange/swap/transactionStrategies.d.ts +3 -0
  219. package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
  220. package/lib-es/exchange/swap/transactionStrategies.js +10 -1
  221. package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
  222. package/lib-es/families/canton/bridge/mock.d.ts +2 -2
  223. package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
  224. package/lib-es/families/canton/bridge/mock.js +3 -0
  225. package/lib-es/families/canton/bridge/mock.js.map +1 -1
  226. package/lib-es/families/canton/config.d.ts.map +1 -1
  227. package/lib-es/families/canton/config.js +3 -0
  228. package/lib-es/families/canton/config.js.map +1 -1
  229. package/lib-es/families/canton/setup.d.ts +3 -3
  230. package/lib-es/families/canton/setup.d.ts.map +1 -1
  231. package/lib-es/families/canton/setup.js.map +1 -1
  232. package/lib-es/families/evm/config.d.ts.map +1 -1
  233. package/lib-es/families/evm/config.js +18 -1
  234. package/lib-es/families/evm/config.js.map +1 -1
  235. package/lib-es/families/hedera/utils.d.ts +2 -0
  236. package/lib-es/families/hedera/utils.d.ts.map +1 -0
  237. package/lib-es/families/hedera/utils.js +3 -0
  238. package/lib-es/families/hedera/utils.js.map +1 -0
  239. package/lib-es/families/sui/react.d.ts.map +1 -1
  240. package/lib-es/families/sui/react.js +1 -0
  241. package/lib-es/families/sui/react.js.map +1 -1
  242. package/lib-es/featureFlags/defaultFeatures.d.ts +3 -0
  243. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  244. package/lib-es/featureFlags/defaultFeatures.js +3 -0
  245. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  246. package/lib-es/generated/bridge/js.d.ts +1 -1
  247. package/lib-es/generated/bridge/mock.d.ts +1 -1
  248. package/lib-es/generated/deviceTransactionConfig.d.ts +1 -1
  249. package/lib-es/generated/specs.d.ts +1 -0
  250. package/lib-es/generated/specs.d.ts.map +1 -1
  251. package/lib-es/hooks/useDeviceTransactionConfig.d.ts +19 -0
  252. package/lib-es/hooks/useDeviceTransactionConfig.d.ts.map +1 -0
  253. package/lib-es/hooks/useDeviceTransactionConfig.js +41 -0
  254. package/lib-es/hooks/useDeviceTransactionConfig.js.map +1 -0
  255. package/lib-es/load/speculos.d.ts.map +1 -1
  256. package/lib-es/load/speculos.js +1 -0
  257. package/lib-es/load/speculos.js.map +1 -1
  258. package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts +3 -0
  259. package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  260. package/lib-es/modularDrawer/__mocks__/currencies.mock.js +39 -0
  261. package/lib-es/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  262. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  263. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +7 -0
  264. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  265. package/lib-es/modularDrawer/utils/index.d.ts +3 -2
  266. package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
  267. package/lib-es/modularDrawer/utils/index.js +4 -9
  268. package/lib-es/modularDrawer/utils/index.js.map +1 -1
  269. package/lib-es/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.js.map +1 -1
  270. package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.d.ts.map +1 -1
  271. package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.js +7 -6
  272. package/lib-es/postOnboarding/hooks/usePostOnboardingHubState.js.map +1 -1
  273. package/lib-es/transaction/deviceTransactionConfig.d.ts +1 -1
  274. package/lib-es/transaction/deviceTransactionConfig.d.ts.map +1 -1
  275. package/lib-es/transaction/deviceTransactionConfig.js +2 -2
  276. package/lib-es/transaction/deviceTransactionConfig.js.map +1 -1
  277. package/package.json +72 -71
  278. package/src/__tests__/environment.test.ts +8 -5
  279. package/src/__tests__/migration/account-migration.ts +1 -0
  280. package/src/__tests__/test-helpers/environment.ts +2 -0
  281. package/src/account/serialization.test.ts +1 -0
  282. package/src/apps/config.ts +1 -1
  283. package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +4 -0
  284. package/src/bridge/generic-alpaca/getAccountShape.ts +8 -1
  285. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +25 -2
  286. package/src/bridge/generic-alpaca/utils.test.ts +165 -0
  287. package/src/bridge/generic-alpaca/utils.ts +5 -4
  288. package/src/dada-client/hooks/useAssetsData.ts +4 -8
  289. package/src/dada-client/state-manager/api.ts +3 -0
  290. package/src/dada-client/state-manager/types.ts +1 -0
  291. package/src/deposit/helper.ts +65 -1
  292. package/src/e2e/data/deviceLabelsData.ts +38 -33
  293. package/src/e2e/deviceInteraction/TouchDeviceSimulator.ts +13 -5
  294. package/src/e2e/enum/Account.ts +0 -6
  295. package/src/e2e/enum/Currency.ts +0 -7
  296. package/src/e2e/enum/Device.ts +1 -0
  297. package/src/e2e/enum/DeviceLabels.ts +2 -0
  298. package/src/e2e/families/bitcoin.ts +1 -1
  299. package/src/e2e/families/cardano.ts +12 -15
  300. package/src/e2e/families/evm.ts +4 -3
  301. package/src/e2e/families/solana.ts +1 -4
  302. package/src/e2e/speculos.ts +32 -18
  303. package/src/e2e/speculosAppVersion.ts +5 -2
  304. package/src/e2e/speculosCI.ts +4 -0
  305. package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +4 -0
  306. package/src/exchange/swap/transactionStrategies.ts +16 -1
  307. package/src/families/bitcoin/satstack.test.ts +1 -0
  308. package/src/families/canton/bridge/mock.ts +10 -7
  309. package/src/families/canton/config.ts +3 -0
  310. package/src/families/canton/setup.ts +3 -3
  311. package/src/families/evm/config.ts +18 -1
  312. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +222 -86
  313. package/src/families/hedera/utils.ts +2 -0
  314. package/src/families/sui/react.ts +5 -0
  315. package/src/featureFlags/defaultFeatures.ts +3 -0
  316. package/src/hooks/useDeviceTransactionConfig.test.tsx +200 -0
  317. package/src/hooks/useDeviceTransactionConfig.ts +65 -0
  318. package/src/load/speculos.ts +1 -0
  319. package/src/modularDrawer/__mocks__/currencies.mock.ts +40 -0
  320. package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +7 -0
  321. package/src/modularDrawer/utils/index.ts +6 -10
  322. package/src/postOnboarding/hooks/useAutoDismissPostOnboardingEntryPoint.ts +1 -1
  323. package/src/postOnboarding/hooks/usePostOnboardingHubState.ts +7 -9
  324. package/src/transaction/deviceTransactionConfig.ts +3 -3
  325. package/lib/families/hedera/logic.d.ts +0 -2
  326. package/lib/families/hedera/logic.d.ts.map +0 -1
  327. package/lib/families/hedera/logic.js.map +0 -1
  328. package/lib-es/families/hedera/logic.d.ts +0 -2
  329. package/lib-es/families/hedera/logic.d.ts.map +0 -1
  330. package/lib-es/families/hedera/logic.js +0 -3
  331. package/lib-es/families/hedera/logic.js.map +0 -1
  332. package/src/dada-client/MIGRATION_GUIDE.md +0 -187
  333. package/src/families/hedera/logic.ts +0 -2
  334. package/src/families/sui/__snapshots__/bridge.integration.test.ts.snap +0 -428
  335. package/src/modularDrawer/utils/index.test.ts +0 -43
@@ -10,6 +10,7 @@ import {
10
10
  } from "../deviceInteraction/TouchDeviceSimulator";
11
11
  import { DeviceLabels } from "../enum/DeviceLabels";
12
12
  import { DeviceModelId } from "@ledgerhq/types-devices";
13
+ import { isTouchDevice } from "../speculosAppVersion";
13
14
 
14
15
  type ActionType = "both" | "right" | "tap" | "swipe" | "confirm" | "hold";
15
16
 
@@ -20,7 +21,7 @@ function validateTransactionData(tx: Transaction, events: string[]) {
20
21
  expect(isAmountCorrect).toBeTruthy();
21
22
  }
22
23
 
23
- async function sendCardanoStax(tx: Transaction) {
24
+ async function sendCardanoTouchDevices(tx: Transaction) {
24
25
  await waitFor(DeviceLabels.REVIEW_TRANSACTION);
25
26
  const events = await pressUntilTextFound(DeviceLabels.TO);
26
27
  validateTransactionData(tx, events);
@@ -60,8 +61,8 @@ async function sendCardanoButtonDevice(tx: Transaction) {
60
61
 
61
62
  export async function sendCardano(tx: Transaction) {
62
63
  const speculosModel = getSpeculosModel();
63
- if (speculosModel === DeviceModelId.stax) {
64
- return sendCardanoStax(tx);
64
+ if (isTouchDevice()) {
65
+ return sendCardanoTouchDevices(tx);
65
66
  }
66
67
  if (speculosModel === DeviceModelId.nanoS) {
67
68
  return sendCardanoNanoS(tx);
@@ -70,7 +71,7 @@ export async function sendCardano(tx: Transaction) {
70
71
  }
71
72
 
72
73
  const DELEGATE_STEPS_CONFIG = {
73
- [DeviceModelId.stax]: [
74
+ [DeviceModelId.stax || DeviceModelId.europa]: [
74
75
  [DeviceLabels.REVIEW_TRANSACTION, "swipe"],
75
76
  [DeviceLabels.TAP_TO_CONTINUE, "tap"],
76
77
  [DeviceLabels.REGISTER, "swipe"],
@@ -107,7 +108,7 @@ const DELEGATE_STEPS_CONFIG = {
107
108
  ] as const,
108
109
  };
109
110
 
110
- async function delegateStaxAction(label: DeviceLabels) {
111
+ async function delegateTouchDevicesAction(label: DeviceLabels) {
111
112
  const CONFIRM_BUTTON_COORDS = { x: 139, y: 532 };
112
113
  await waitFor(label);
113
114
  switch (label) {
@@ -135,14 +136,10 @@ async function delegateNanoAction(label: DeviceLabels, action: ActionType) {
135
136
  }
136
137
  }
137
138
 
138
- async function executeDelegateStep(
139
- label: DeviceLabels,
140
- action: ActionType,
141
- speculosModel: DeviceModelId,
142
- ) {
139
+ async function executeDelegateStep(label: DeviceLabels, action: ActionType) {
143
140
  try {
144
- if (speculosModel === DeviceModelId.stax) {
145
- await delegateStaxAction(label);
141
+ if (isTouchDevice()) {
142
+ await delegateTouchDevicesAction(label);
146
143
  } else {
147
144
  await delegateNanoAction(label, action);
148
145
  }
@@ -156,13 +153,13 @@ async function executeDelegateStep(
156
153
  export async function delegateCardano() {
157
154
  const speculosModel = getSpeculosModel();
158
155
  const steps =
159
- speculosModel === DeviceModelId.stax
160
- ? DELEGATE_STEPS_CONFIG[DeviceModelId.stax]
156
+ speculosModel === DeviceModelId.stax || speculosModel === DeviceModelId.europa
157
+ ? DELEGATE_STEPS_CONFIG[speculosModel]
161
158
  : speculosModel === DeviceModelId.nanoS
162
159
  ? DELEGATE_STEPS_CONFIG[DeviceModelId.nanoS]
163
160
  : DELEGATE_STEPS_CONFIG.default;
164
161
 
165
162
  for (const [label, action] of steps) {
166
- await executeDelegateStep(label, action, speculosModel);
163
+ await executeDelegateStep(label, action);
167
164
  }
168
165
  }
@@ -7,6 +7,7 @@ import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
7
7
  import { DeviceLabels } from "../enum/DeviceLabels";
8
8
  import { Device } from "../enum/Device";
9
9
  import { DeviceModelId } from "@ledgerhq/types-devices";
10
+ import { isTouchDevice } from "../speculosAppVersion";
10
11
 
11
12
  function validateTransactionData(tx: Transaction, events: string[]) {
12
13
  const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
@@ -20,7 +21,7 @@ function validateTransactionData(tx: Transaction, events: string[]) {
20
21
  }
21
22
  }
22
23
 
23
- async function sendEvmStax(tx: Transaction) {
24
+ async function sendEvmTouchDevices(tx: Transaction) {
24
25
  const events = await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
25
26
  validateTransactionData(tx, events);
26
27
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
@@ -40,8 +41,8 @@ async function sendEvmNanoS(tx: Transaction) {
40
41
 
41
42
  export async function sendEVM(tx: Transaction) {
42
43
  const speculosModel = getSpeculosModel();
43
- if (speculosModel === DeviceModelId.stax) {
44
- return sendEvmStax(tx);
44
+ if (isTouchDevice()) {
45
+ return sendEvmTouchDevices(tx);
45
46
  }
46
47
  if (speculosModel === DeviceModelId.nanoS) {
47
48
  return sendEvmNanoS(tx);
@@ -22,10 +22,7 @@ export async function sendSolana(tx: Transaction) {
22
22
  const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
23
23
  expect(isAmountCorrect).toBeTruthy();
24
24
  if (process.env.SPECULOS_DEVICE !== Device.LNS.name) {
25
- const isAddressCorrect = containsSubstringInEvent(
26
- tx.accountToCredit.parentAccount?.address ?? tx.accountToCredit.address,
27
- events,
28
- );
25
+ const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
29
26
  expect(isAddressCorrect).toBeTruthy();
30
27
  }
31
28
 
@@ -69,6 +69,8 @@ export type Dependency = { name: string; appVersion?: string };
69
69
  export type SpeculosDevice = {
70
70
  id: string;
71
71
  port: number;
72
+ appName?: string;
73
+ appVersion?: string;
72
74
  };
73
75
 
74
76
  export function setExchangeDependencies(dependencies: Dependency[]) {
@@ -418,7 +420,12 @@ export async function startSpeculos(
418
420
  ? await createSpeculosDeviceCI(deviceParams)
419
421
  : await createSpeculosDevice(deviceParams).then(device => {
420
422
  invariant(device.ports.apiPort, "[E2E] Speculos apiPort is not defined");
421
- return { id: device.id, port: device.ports.apiPort };
423
+ return {
424
+ id: device.id,
425
+ port: device.ports.apiPort,
426
+ appName: appCandidate.appName,
427
+ appVersion: appCandidate.appVersion,
428
+ };
422
429
  });
423
430
  } catch (e: unknown) {
424
431
  console.error(e);
@@ -654,7 +661,12 @@ export async function activateLedgerSync() {
654
661
  export async function activateExpertMode() {
655
662
  if (isTouchDevice()) {
656
663
  await goToSettings();
657
- await pressAndRelease(DeviceLabels.SETTINGS_TOGGLE_1);
664
+ const SettingsToggle1Coordinates = { x: 344, y: 136 };
665
+ await pressAndRelease(
666
+ DeviceLabels.SETTINGS_TOGGLE_1,
667
+ SettingsToggle1Coordinates.x,
668
+ SettingsToggle1Coordinates.y,
669
+ );
658
670
  } else {
659
671
  await pressUntilTextFound(DeviceLabels.EXPERT_MODE);
660
672
  await pressBoth();
@@ -670,7 +682,12 @@ export async function activateContractData() {
670
682
 
671
683
  export async function goToSettings() {
672
684
  if (isTouchDevice()) {
673
- await pressAndRelease(DeviceLabels.SETTINGS);
685
+ const SettingsCogwheelCoordinates = { x: 400, y: 75 };
686
+ await pressAndRelease(
687
+ DeviceLabels.SETTINGS,
688
+ SettingsCogwheelCoordinates.x,
689
+ SettingsCogwheelCoordinates.y,
690
+ );
674
691
  } else {
675
692
  await pressUntilTextFound(DeviceLabels.SETTINGS);
676
693
  await pressBoth();
@@ -723,26 +740,23 @@ export function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn {
723
740
  export async function expectValidAddressDevice(account: Account, addressDisplayed: string) {
724
741
  if (account.currency === Currency.SUI_USDC) {
725
742
  providePublicKey();
743
+ }
744
+ const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(account.currency.speculosApp);
745
+ await waitFor(receiveVerifyLabel);
746
+ if (isTouchDevice()) {
747
+ const events = await pressUntilTextFound(receiveConfirmLabel);
748
+ const isAddressCorrect = containsSubstringInEvent(addressDisplayed, events);
749
+ expect(isAddressCorrect).toBeTruthy();
750
+ await pressAndRelease(DeviceLabels.CONFIRM);
726
751
  } else {
727
752
  const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(
728
753
  account.currency.speculosApp,
729
754
  );
730
755
  await waitFor(receiveVerifyLabel);
731
- if (isTouchDevice()) {
732
- const events = await pressUntilTextFound(receiveConfirmLabel);
733
- const isAddressCorrect = containsSubstringInEvent(addressDisplayed, events);
734
- expect(isAddressCorrect).toBeTruthy();
735
- await pressAndRelease(DeviceLabels.CONFIRM);
736
- } else {
737
- const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(
738
- account.currency.speculosApp,
739
- );
740
- await waitFor(receiveVerifyLabel);
741
- const events = await pressUntilTextFound(receiveConfirmLabel);
742
- const isAddressCorrect = containsSubstringInEvent(addressDisplayed, events);
743
- expect(isAddressCorrect).toBeTruthy();
744
- await pressBoth();
745
- }
756
+ const events = await pressUntilTextFound(receiveConfirmLabel);
757
+ const isAddressCorrect = containsSubstringInEvent(addressDisplayed, events);
758
+ expect(isAddressCorrect).toBeTruthy();
759
+ await pressBoth();
746
760
  }
747
761
  }
748
762
 
@@ -1,5 +1,5 @@
1
1
  import { HttpManagerApiRepository, ApplicationV2Entity } from "@ledgerhq/device-core";
2
- import { version } from "@ledgerhq/device-core/package.json";
2
+ import { version } from "../../package.json";
3
3
  import { getEnv } from "@ledgerhq/live-env";
4
4
  import { DeviceModelId } from "@ledgerhq/devices";
5
5
  import { Device as CryptoWallet } from "./enum/Device";
@@ -15,6 +15,8 @@ export function getSpeculosModel(): DeviceModelId {
15
15
  return DeviceModelId.nanoX;
16
16
  case CryptoWallet.STAX.name:
17
17
  return DeviceModelId.stax;
18
+ case CryptoWallet.FLEX.name:
19
+ return DeviceModelId.europa;
18
20
  case CryptoWallet.LNSP.name:
19
21
  default:
20
22
  return DeviceModelId.nanoSP;
@@ -23,7 +25,7 @@ export function getSpeculosModel(): DeviceModelId {
23
25
 
24
26
  export function isTouchDevice(): boolean {
25
27
  const model = getSpeculosModel();
26
- return model === DeviceModelId.stax;
28
+ return model === DeviceModelId.stax || model === DeviceModelId.europa;
27
29
  }
28
30
 
29
31
  function getDeviceTargetId(device: DeviceModelId): number {
@@ -32,6 +34,7 @@ function getDeviceTargetId(device: DeviceModelId): number {
32
34
  [DeviceModelId.nanoX]: CryptoWallet.LNX.targetId,
33
35
  [DeviceModelId.nanoSP]: CryptoWallet.LNSP.targetId,
34
36
  [DeviceModelId.stax]: CryptoWallet.STAX.targetId,
37
+ [DeviceModelId.europa]: CryptoWallet.FLEX.targetId,
35
38
  };
36
39
  return modelToTargetIdMap[device];
37
40
  }
@@ -171,6 +171,8 @@ export async function createSpeculosDeviceCI(
171
171
  return {
172
172
  id: runId,
173
173
  port: speculosPort,
174
+ appName: deviceParams.appName,
175
+ appVersion: deviceParams.appVersion,
174
176
  };
175
177
  } catch (e: unknown) {
176
178
  console.warn(
@@ -179,6 +181,8 @@ export async function createSpeculosDeviceCI(
179
181
  return {
180
182
  id: runId,
181
183
  port: 0,
184
+ appName: deviceParams.appName,
185
+ appVersion: deviceParams.appVersion,
182
186
  };
183
187
  }
184
188
  }
@@ -79,6 +79,10 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
79
79
  title: "swap.incompatibility.kaspa_title",
80
80
  description: "swap.incompatibility.kaspa_description",
81
81
  },
82
+ celo: {
83
+ title: "swap.incompatibility.celo_title",
84
+ description: "swap.incompatibility.celo_description",
85
+ },
82
86
  };
83
87
 
84
88
  export const getIncompatibleCurrencyKeys = (exchange: ExchangeSwap) => {
@@ -237,6 +237,21 @@ export function cosmosTransaction({
237
237
  };
238
238
  }
239
239
 
240
+ export function hederaTransaction({
241
+ amount,
242
+ recipient,
243
+ customFeeConfig,
244
+ payinExtraId,
245
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "hedera" }>> {
246
+ return {
247
+ family: "hedera",
248
+ amount,
249
+ recipient,
250
+ ...customFeeConfig,
251
+ memo: payinExtraId ?? undefined,
252
+ };
253
+ }
254
+
240
255
  export type TransactionWithCustomFee = TransactionCommon & {
241
256
  customFeeConfig: {
242
257
  [key: string]: BigNumber;
@@ -266,7 +281,7 @@ export const transactionStrategy: {
266
281
  cosmos: cosmosTransaction,
267
282
  evm: evmTransaction,
268
283
  filecoin: defaultTransaction,
269
- hedera: defaultTransaction,
284
+ hedera: hederaTransaction,
270
285
  icon: defaultTransaction,
271
286
  internet_computer: defaultTransaction,
272
287
  mina: defaultTransaction,
@@ -236,6 +236,7 @@ describe("editSatStackConfig", () => {
236
236
  setCryptoAssetsStoreForCoinFramework({
237
237
  findTokenById: (_: string) => undefined,
238
238
  findTokenByAddressInCurrency: (_: string, __: string) => undefined,
239
+ getTokensSyncHash: (_: string) => Promise.resolve("0"),
239
240
  } as CryptoAssetsStore);
240
241
  const config = {
241
242
  node: { ...mockConfig, tls: false },
@@ -1,6 +1,6 @@
1
1
  import { makeLRUCache, minutes } from "@ledgerhq/live-network/cache";
2
2
  import { createApi } from "@ledgerhq/coin-canton/api/index";
3
- import { Transaction as CantonTransaction } from "@ledgerhq/coin-canton/types";
3
+ import { Transaction as CantonTransaction, CantonAccount } from "@ledgerhq/coin-canton/types";
4
4
  import type { AccountBridge } from "@ledgerhq/types-live";
5
5
  import { BigNumber } from "bignumber.js";
6
6
 
@@ -51,12 +51,12 @@ const getTransactionStatus = async (): Promise<any> => {
51
51
  };
52
52
  };
53
53
 
54
- const estimateMaxSpendable = ({ account }: { account: any }): Promise<BigNumber> => {
54
+ const estimateMaxSpendable = ({ account }: { account: CantonAccount }): Promise<BigNumber> => {
55
55
  return Promise.resolve(account.balance || new BigNumber(0));
56
56
  };
57
57
 
58
58
  const prepareTransaction = async (
59
- _account: any,
59
+ _account: CantonAccount,
60
60
  transaction: CantonTransaction,
61
61
  ): Promise<CantonTransaction> => {
62
62
  return {
@@ -65,17 +65,17 @@ const prepareTransaction = async (
65
65
  };
66
66
  };
67
67
 
68
- const sync = (_initialAccount: any): any => {
68
+ const sync = (_initialAccount: CantonAccount): any => {
69
69
  return {
70
70
  subscribe: (observer: any) => {
71
- observer.next((acc: any) => acc);
71
+ observer.next((acc: CantonAccount) => acc);
72
72
  observer.complete();
73
73
  return { unsubscribe: () => {} };
74
74
  },
75
75
  };
76
76
  };
77
77
 
78
- const receive = (_account: any, _opts: { deviceId: string }): any => {
78
+ const receive = (_account: CantonAccount, _opts: { deviceId: string }): any => {
79
79
  return {
80
80
  subscribe: (observer: any) => {
81
81
  observer.next({
@@ -144,6 +144,9 @@ const scanAccounts = (): any => {
144
144
  lastSyncDate: new Date(),
145
145
  operations: [],
146
146
  pendingOperations: [],
147
+ cantonResources: {
148
+ instrumentUtxoCounts: {},
149
+ },
147
150
  },
148
151
  });
149
152
  observer.complete();
@@ -156,7 +159,7 @@ const getSerializedAddressParameters = (): Buffer => {
156
159
  return Buffer.from("mock-address-params");
157
160
  };
158
161
 
159
- const accountBridge: AccountBridge<CantonTransaction> = {
162
+ const accountBridge: AccountBridge<CantonTransaction, CantonAccount> = {
160
163
  createTransaction,
161
164
  updateTransaction,
162
165
  getTransactionStatus,
@@ -14,6 +14,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
14
14
  useGateway: true,
15
15
  networkType: "mainnet",
16
16
  nativeInstrumentId: "Amulet",
17
+ fee: 0,
17
18
  },
18
19
  },
19
20
  config_currency_canton_network_devnet: {
@@ -29,6 +30,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
29
30
  useGateway: true,
30
31
  networkType: "devnet",
31
32
  nativeInstrumentId: "Amulet",
33
+ fee: 0,
32
34
  },
33
35
  },
34
36
  config_currency_canton_network_testnet: {
@@ -44,6 +46,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
44
46
  nativeInstrumentId: "Amulet",
45
47
  useGateway: true,
46
48
  networkType: "testnet",
49
+ fee: 0,
47
50
  },
48
51
  },
49
52
  };
@@ -5,10 +5,10 @@ import { getEnv } from "@ledgerhq/live-env";
5
5
  import Transport from "@ledgerhq/hw-transport";
6
6
  import { CantonSigner } from "@ledgerhq/coin-canton";
7
7
  import cantonResolver from "@ledgerhq/coin-canton/signer";
8
- import type { Account, Bridge } from "@ledgerhq/types-live";
8
+ import type { Bridge } from "@ledgerhq/types-live";
9
9
  import makeCliTools from "@ledgerhq/coin-canton/test/cli";
10
10
  import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
11
- import { TransactionStatus, Transaction } from "@ledgerhq/coin-canton/types";
11
+ import { TransactionStatus, Transaction, CantonAccount } from "@ledgerhq/coin-canton/types";
12
12
  import { LegacySignerCanton } from "@ledgerhq/live-signer-canton";
13
13
  import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
14
14
  import cantonBridgeMock from "./bridge/mock";
@@ -27,7 +27,7 @@ const getCurrencyConfig = (currency?: CryptoCurrency) => {
27
27
  return getCurrencyConfiguration<CantonCoinConfig>(currency);
28
28
  };
29
29
 
30
- const bridge: Bridge<Transaction, Account, TransactionStatus> = getEnv("MOCK")
30
+ const bridge: Bridge<Transaction, CantonAccount, TransactionStatus> = getEnv("MOCK")
31
31
  ? cantonBridgeMock
32
32
  : createBridges(executeWithSigner(createSigner), getCurrencyConfig);
33
33
 
@@ -704,7 +704,7 @@ const evmConfig: CurrencyLiveConfigDefinition = {
704
704
  },
705
705
  node: {
706
706
  type: "external",
707
- uri: "https://developer-access-mainnet.base.org",
707
+ uri: "https://base-rpc.publicnode.com",
708
708
  },
709
709
  explorer: {
710
710
  type: "etherscan",
@@ -925,6 +925,23 @@ const evmConfig: CurrencyLiveConfigDefinition = {
925
925
  showNfts: false,
926
926
  },
927
927
  },
928
+ config_currency_monad: {
929
+ type: "object",
930
+ default: {
931
+ status: {
932
+ type: "active",
933
+ },
934
+ node: {
935
+ type: "external",
936
+ uri: "https://rpc.monad.xyz",
937
+ },
938
+ explorer: {
939
+ type: "etherscan",
940
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/143",
941
+ },
942
+ showNfts: false,
943
+ },
944
+ },
928
945
  };
929
946
 
930
947
  export { evmConfig };