@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
@@ -26,6 +26,7 @@ setCryptoAssetsStoreForCoinFramework({
26
26
  return undefined;
27
27
  },
28
28
  findTokenByAddressInCurrency: (_: string, __: string) => undefined,
29
+ getTokensSyncHash: (_: string) => Promise.resolve("0"),
29
30
  } as CryptoAssetsStore);
30
31
 
31
32
  describe("serialization", () => {
@@ -41,7 +41,7 @@ const appConfig: Record<string, ConfigInfo> = {
41
41
  config_nanoapp_celo: {
42
42
  type: "object",
43
43
  default: {
44
- minVersion: "1.4.0",
44
+ minVersion: "1.5.0",
45
45
  },
46
46
  },
47
47
  config_nanoapp_cardano_ada: {
@@ -14,6 +14,7 @@ import type {
14
14
  Stake,
15
15
  Reward,
16
16
  CraftedTransaction,
17
+ Validator,
17
18
  } from "@ledgerhq/coin-framework/api/index";
18
19
  import network from "@ledgerhq/live-network";
19
20
 
@@ -206,4 +207,7 @@ export const getNetworkAlpacaApi = (networkFamily: string) =>
206
207
  getRewards(_address: string, _cursor?: Cursor): Promise<Page<Reward>> {
207
208
  throw new Error("getRewards is not supported");
208
209
  },
210
+ getValidators(_cursor?: Cursor): Promise<Page<Validator>> {
211
+ throw new Error("getValidators is not supported");
212
+ },
209
213
  }) satisfies Api<any>;
@@ -91,7 +91,14 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
91
91
  subOperations,
92
92
  });
93
93
  });
94
- const operations = mergeOps(oldOps, newOpsWithSubs) as OperationCommon[];
94
+ const confirmedOperations =
95
+ alpacaApi.refreshOperations && initialAccount?.pendingOperations.length
96
+ ? await alpacaApi.refreshOperations(initialAccount.pendingOperations)
97
+ : [];
98
+ const operations = mergeOps(oldOps, [
99
+ ...confirmedOperations,
100
+ ...newOpsWithSubs,
101
+ ]) as OperationCommon[];
95
102
 
96
103
  const res = {
97
104
  id: accountId,
@@ -15,12 +15,14 @@ const getBalanceMock = jest.fn();
15
15
  const lastBlockMock = jest.fn();
16
16
  const getTokenFromAssetMock = jest.fn();
17
17
  const chainSpecificGetAccountShapeMock = jest.fn();
18
+ const refreshOperationsMock = jest.fn();
18
19
  jest.mock("../alpaca", () => ({
19
20
  getAlpacaApi: () => ({
20
21
  lastBlock: (...a: any[]) => lastBlockMock(...a),
21
22
  getBalance: (...a: any[]) => getBalanceMock(...a),
22
23
  listOperations: (...a: any[]) => listOperationsMock(...a),
23
24
  getTokenFromAsset: (...a: any[]) => getTokenFromAssetMock(...a),
25
+ refreshOperations: (...a: any[]) => refreshOperationsMock(...a),
24
26
  getChainSpecificRules: () => ({
25
27
  getAccountShape: (...a: any[]) => chainSpecificGetAccountShapeMock(...a),
26
28
  }),
@@ -68,7 +70,16 @@ describe("genericGetAccountShape", () => {
68
70
  type: "OPT_IN",
69
71
  extra: { pagingToken: "pt1", assetReference: "ar1", assetOwner: "ow1" },
70
72
  };
71
- const initialAccount = { operations: [oldOp], blockHeight: 10 };
73
+ const pendingOp = {
74
+ hash: "h0",
75
+ blockHeight: 10,
76
+ type: "OUT",
77
+ };
78
+ const initialAccount = {
79
+ operations: [oldOp],
80
+ pendingOperations: [pendingOp],
81
+ blockHeight: 10,
82
+ };
72
83
 
73
84
  extractBalanceMock.mockReturnValue({ value: "1000", locked: "300" });
74
85
  getBalanceMock.mockResolvedValue([
@@ -83,6 +94,13 @@ describe("genericGetAccountShape", () => {
83
94
 
84
95
  const coreOp = { hash: "h2", height: 12 };
85
96
  listOperationsMock.mockResolvedValue([[coreOp]]);
97
+ refreshOperationsMock.mockImplementation(ops => {
98
+ const op = ops[0];
99
+ if (op?.hash === "h0") {
100
+ return [{ ...op, blockHeight: 12 }];
101
+ }
102
+ return [];
103
+ });
86
104
 
87
105
  adaptCoreOperationToLiveOperationMock.mockImplementation((_accId, op) => ({
88
106
  hash: op.hash,
@@ -141,9 +159,14 @@ describe("genericGetAccountShape", () => {
141
159
  balance: new BigNumber(1000),
142
160
  spendableBalance: new BigNumber(700),
143
161
  blockHeight: 123,
144
- operationsCount: 2,
162
+ operationsCount: 3,
145
163
  subAccounts: [{ id: `${currency.id}_subAcc1`, type: "TokenAccount" }],
146
164
  operations: [
165
+ {
166
+ hash: "h0",
167
+ type: "OUT",
168
+ blockHeight: 12,
169
+ },
147
170
  {
148
171
  hash: "h2",
149
172
  type: "IN",
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  adaptCoreOperationToLiveOperation,
3
+ buildOptimisticOperation,
3
4
  cleanedOperation,
4
5
  extractBalance,
5
6
  findCryptoCurrencyByNetwork,
@@ -11,6 +12,170 @@ import { Account } from "@ledgerhq/types-live";
11
12
  import { GenericTransaction, OperationCommon } from "./types";
12
13
 
13
14
  describe("Alpaca utils", () => {
15
+ describe("buildOptimisticOperation", () => {
16
+ it.each([
17
+ [
18
+ "coin",
19
+ "changeTrust",
20
+ {},
21
+ {
22
+ parentType: "OPT_IN",
23
+ subType: undefined,
24
+ parentValue: new BigNumber(50),
25
+ },
26
+ ],
27
+ [
28
+ "coin",
29
+ "delegate",
30
+ {},
31
+ {
32
+ parentType: "DELEGATE",
33
+ subType: undefined,
34
+ parentValue: new BigNumber(50),
35
+ },
36
+ ],
37
+ [
38
+ "coin",
39
+ "stake",
40
+ {},
41
+ {
42
+ parentType: "DELEGATE",
43
+ subType: undefined,
44
+ parentValue: new BigNumber(50),
45
+ },
46
+ ],
47
+ [
48
+ "coin",
49
+ "undelegate",
50
+ {},
51
+ {
52
+ parentType: "UNDELEGATE",
53
+ subType: undefined,
54
+ parentValue: new BigNumber(50),
55
+ },
56
+ ],
57
+ [
58
+ "coin",
59
+ "unstake",
60
+ {},
61
+ {
62
+ parentType: "UNDELEGATE",
63
+ subType: undefined,
64
+ parentValue: new BigNumber(50),
65
+ },
66
+ ],
67
+ [
68
+ "coin",
69
+ "send",
70
+ {},
71
+ {
72
+ parentType: "OUT",
73
+ subType: undefined,
74
+ parentValue: new BigNumber(50),
75
+ },
76
+ ],
77
+ [
78
+ "token",
79
+ "changeTrust",
80
+ { subAccountId: "sub-account-id" },
81
+ {
82
+ parentType: "FEES",
83
+ subType: "OPT_IN",
84
+ parentValue: new BigNumber(12),
85
+ },
86
+ ],
87
+ [
88
+ "token",
89
+ "delegate",
90
+ { subAccountId: "sub-account-id" },
91
+ {
92
+ parentType: "FEES",
93
+ subType: "DELEGATE",
94
+ parentValue: new BigNumber(12),
95
+ },
96
+ ],
97
+ [
98
+ "token",
99
+ "stake",
100
+ { subAccountId: "sub-account-id" },
101
+ {
102
+ parentType: "FEES",
103
+ subType: "DELEGATE",
104
+ parentValue: new BigNumber(12),
105
+ },
106
+ ],
107
+ [
108
+ "token",
109
+ "undelegate",
110
+ { subAccountId: "sub-account-id" },
111
+ {
112
+ parentType: "FEES",
113
+ subType: "UNDELEGATE",
114
+ parentValue: new BigNumber(12),
115
+ },
116
+ ],
117
+ [
118
+ "token",
119
+ "unstake",
120
+ { subAccountId: "sub-account-id" },
121
+ {
122
+ parentType: "FEES",
123
+ subType: "UNDELEGATE",
124
+ parentValue: new BigNumber(12),
125
+ },
126
+ ],
127
+ [
128
+ "token",
129
+ "send",
130
+ { subAccountId: "sub-account-id" },
131
+ { parentType: "FEES", subType: "OUT", parentValue: new BigNumber(12) },
132
+ ],
133
+ ])("builds an optimistic %s operation with %s mode ", (_s, mode, params, expected) => {
134
+ const operation = buildOptimisticOperation(
135
+ {
136
+ id: "parent-account-id",
137
+ freshAddress: "account-address",
138
+ subAccounts: [{ id: "sub-account-id" }],
139
+ } as Account,
140
+ {
141
+ mode,
142
+ amount: new BigNumber(50),
143
+ fees: new BigNumber(12),
144
+ recipient: "recipient-address",
145
+ ...params,
146
+ } as GenericTransaction,
147
+ );
148
+
149
+ expect(operation).toMatchObject({
150
+ id: `parent-account-id--${expected.parentType}`,
151
+ type: expected.parentType,
152
+ value: expected.parentValue,
153
+ accountId: "parent-account-id",
154
+ senders: ["account-address"],
155
+ recipients: ["recipient-address"],
156
+ fee: new BigNumber(12),
157
+ blockHash: null,
158
+ blockHeight: null,
159
+ ...(expected.subType
160
+ ? {
161
+ subOperations: [
162
+ {
163
+ id: `sub-account-id--${expected.subType}`,
164
+ accountId: "sub-account-id",
165
+ type: expected.subType,
166
+ senders: ["account-address"],
167
+ recipients: ["recipient-address"],
168
+ value: new BigNumber(50),
169
+ blockHash: null,
170
+ blockHeight: null,
171
+ },
172
+ ],
173
+ }
174
+ : {}),
175
+ });
176
+ });
177
+ });
178
+
14
179
  describe("cleanedOperation", () => {
15
180
  it("creates a cleaned version of an operation without mutating it", () => {
16
181
  const dirty = {
@@ -241,11 +241,12 @@ export const buildOptimisticOperation = (
241
241
  const fees = BigInt(transaction.fees?.toString() || "0");
242
242
  const { subAccountId } = transaction;
243
243
  const { subAccounts } = account;
244
+ const parentType = subAccountId ? "FEES" : type;
244
245
 
245
246
  const operation: Operation = {
246
- id: encodeOperationId(account.id, "", type),
247
+ id: encodeOperationId(account.id, "", parentType),
247
248
  hash: "",
248
- type: type,
249
+ type: parentType,
249
250
  value: subAccountId ? new BigNumber(fees.toString()) : transaction.amount, // match old behavior
250
251
  fee: new BigNumber(fees.toString()),
251
252
  blockHash: null,
@@ -266,9 +267,9 @@ export const buildOptimisticOperation = (
266
267
  if (tokenAccount && subAccountId) {
267
268
  operation.subOperations = [
268
269
  {
269
- id: `${subAccountId}--OUT`,
270
+ id: `${subAccountId}--${type}`,
270
271
  hash: "",
271
- type: "OUT",
272
+ type,
272
273
  value: transaction.useAllAmount ? tokenAccount.balance : transaction.amount,
273
274
  fee: new BigNumber(0),
274
275
  blockHash: null,
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from "react";
2
2
  import { useGetAssetsDataInfiniteQuery } from "../state-manager/api";
3
- import { AssetsDataWithPagination } from "../state-manager/types";
3
+ import { AssetsDataWithPagination, GetAssetsDataParams } from "../state-manager/types";
4
4
 
5
5
  const emptyData = () => ({
6
6
  cryptoAssets: {},
@@ -25,14 +25,9 @@ export function useAssetsData({
25
25
  product,
26
26
  version,
27
27
  isStaging,
28
- }: {
29
- search?: string;
30
- currencyIds?: string[];
31
- useCase?: string;
28
+ includeTestNetworks,
29
+ }: GetAssetsDataParams & {
32
30
  areCurrenciesFiltered?: boolean;
33
- product: "llm" | "lld";
34
- version: string;
35
- isStaging?: boolean;
36
31
  }) {
37
32
  const {
38
33
  data,
@@ -51,6 +46,7 @@ export function useAssetsData({
51
46
  product,
52
47
  version,
53
48
  isStaging,
49
+ includeTestNetworks,
54
50
  });
55
51
 
56
52
  const joinedPages = useMemo(() => {
@@ -45,6 +45,9 @@ export const assetsDataApi = createApi({
45
45
  ...(queryArg?.search && { search: queryArg.search }),
46
46
  product: queryArg.product,
47
47
  minVersion: queryArg.version,
48
+ ...(queryArg?.includeTestNetworks && {
49
+ includeTestNetworks: queryArg.includeTestNetworks,
50
+ }),
48
51
  additionalData: queryArg.additionalData || [
49
52
  AssetsAdditionalData.Apy,
50
53
  AssetsAdditionalData.MarketTrend,
@@ -17,6 +17,7 @@ export interface GetAssetsDataParams {
17
17
  version: string;
18
18
  isStaging?: boolean;
19
19
  additionalData?: AssetsAdditionalData[];
20
+ includeTestNetworks?: boolean;
20
21
  }
21
22
 
22
23
  export interface PageParam {
@@ -7,6 +7,66 @@ import {
7
7
  hasCryptoCurrencyId,
8
8
  } from "../currencies";
9
9
  import { getMappedAssets } from "./api";
10
+
11
+ /**
12
+ * WORKAROUND: Fallback mappings for currencies not yet available in getMappedAssets()
13
+ * TODO: Remove these entries once they are properly supported by the mapping service
14
+ *
15
+ * Each entry maps a Ledger currency ID to its provider ID.
16
+ * The provider ID is used to group currencies by their external provider (e.g., CoinGecko).
17
+ */
18
+ const FALLBACK_CURRENCY_MAPPINGS: Record<string, string> = {
19
+ // Canton Network - using canton_network as both ledgerId and providerId
20
+ canton_network: "canton_network",
21
+ canton_network_devnet: "canton_network_devnet",
22
+ canton_network_testnet: "canton_network_testnet",
23
+
24
+ // Add more fallback mappings here as needed:
25
+ // "ledger_currency_id": "provider_id",
26
+ };
27
+
28
+ /**
29
+ * Creates synthetic MappedAsset entries for currencies that are not yet available
30
+ * in the mapping service API but need to be supported.
31
+ */
32
+ const createFallbackMappedAssets = (
33
+ currencies: CryptoOrTokenCurrency[],
34
+ existingAssets: MappedAsset[],
35
+ ): MappedAsset[] => {
36
+ const existingLedgerIds = new Set(existingAssets.map(asset => asset.ledgerId.toLowerCase()));
37
+ const fallbackAssets: MappedAsset[] = [];
38
+
39
+ for (const [currencyId, providerId] of Object.entries(FALLBACK_CURRENCY_MAPPINGS)) {
40
+ // Skip if currency already exists in mapped assets
41
+ if (existingLedgerIds.has(currencyId.toLowerCase())) {
42
+ continue;
43
+ }
44
+
45
+ // Find the currency in the list
46
+ const currency = currencies.find(c => c.id === currencyId);
47
+ if (currency) {
48
+ fallbackAssets.push({
49
+ $type: currency.type === "TokenCurrency" ? "Token" : "Coin",
50
+ ledgerId: currency.id,
51
+ providerId: providerId,
52
+ name: currency.name,
53
+ ticker: currency.ticker,
54
+ network: currency.type === "TokenCurrency" ? currency.parentCurrency?.id : undefined,
55
+ contract: currency.type === "TokenCurrency" ? currency.contractAddress : undefined,
56
+ status: "active",
57
+ reason: null,
58
+ data: {
59
+ img: "",
60
+ marketCapRank: null,
61
+ },
62
+ ledgerCurrency: currency,
63
+ });
64
+ }
65
+ }
66
+
67
+ return fallbackAssets;
68
+ };
69
+
10
70
  export const loadCurrenciesByProvider = async (
11
71
  coinsAndTokensSupported: CryptoOrTokenCurrency[],
12
72
  ): Promise<GroupedCurrencies> => {
@@ -15,7 +75,11 @@ export const loadCurrenciesByProvider = async (
15
75
  getMappedAssets(),
16
76
  ]);
17
77
 
18
- return groupCurrenciesByProvider(assets, sortedCurrenciesSupported);
78
+ // Merge API assets with fallback assets for currencies not yet in the API
79
+ const fallbackAssets = createFallbackMappedAssets(sortedCurrenciesSupported, assets);
80
+ const allAssets = [...assets, ...fallbackAssets];
81
+
82
+ return groupCurrenciesByProvider(allAssets, sortedCurrenciesSupported);
19
83
  };
20
84
  export const groupCurrenciesByProvider = (
21
85
  assets: MappedAsset[],
@@ -35,6 +35,35 @@ type DeviceLabelsConfig = {
35
35
  [key in DeviceModelId]?: LabelConfig;
36
36
  };
37
37
 
38
+ const TOUCHSCREEN_DEVICE_CONFIG: LabelConfig = {
39
+ receiveVerify: {
40
+ [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
41
+ [AppInfos.COSMOS.name]: DeviceLabels.VERIFY_COSMOS,
42
+ [AppInfos.ETHEREUM.name]: DeviceLabels.VERIFY_ETHEREUM,
43
+ [AppInfos.POLKADOT.name]: DeviceLabels.PLEASE_REVIEW,
44
+ [AppInfos.POLYGON.name]: DeviceLabels.VERIFY_POLYGON,
45
+ [AppInfos.SOLANA.name]: DeviceLabels.VERIFY_SOLANA_ADDRESS,
46
+ default: DeviceLabels.ADDRESS,
47
+ },
48
+ receiveConfirm: {
49
+ default: DeviceLabels.CONFIRM,
50
+ },
51
+ delegateVerify: {
52
+ [AppInfos.NEAR.name]: DeviceLabels.VIEW_HEADER,
53
+ default: DeviceLabels.REVIEW_OPERATION,
54
+ },
55
+ delegateConfirm: {
56
+ [AppInfos.NEAR.name]: DeviceLabels.CONTINUE_TO_ACTION,
57
+ default: DeviceLabels.HOLD_TO_SIGN,
58
+ },
59
+ sendVerify: {
60
+ default: DeviceLabels.REVIEW_OPERATION,
61
+ },
62
+ sendConfirm: {
63
+ default: DeviceLabels.HOLD_TO_SIGN,
64
+ },
65
+ };
66
+
38
67
  export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
39
68
  [DeviceModelId.nanoS]: {
40
69
  receiveVerify: {
@@ -66,10 +95,11 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
66
95
  default: DeviceLabels.CAPS_APPROVE,
67
96
  },
68
97
  sendVerify: {
98
+ [AppInfos.SOLANA.name]: DeviceLabels.TRANSFER,
69
99
  default: DeviceLabels.REVIEW_OPERATION,
70
100
  },
71
101
  sendConfirm: {
72
- [AppInfos.SOLANA.name]: DeviceLabels.SIGN_TRANSACTION,
102
+ [AppInfos.SOLANA.name]: DeviceLabels.APPROVE,
73
103
  [AppInfos.TRON.name]: DeviceLabels.SIGN,
74
104
  [AppInfos.STELLAR.name]: DeviceLabels.SIGN,
75
105
  [AppInfos.RIPPLE.name]: DeviceLabels.SIGN,
@@ -79,34 +109,8 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
79
109
  default: DeviceLabels.CAPS_APPROVE,
80
110
  },
81
111
  },
82
- [DeviceModelId.stax]: {
83
- receiveVerify: {
84
- [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
85
- [AppInfos.COSMOS.name]: DeviceLabels.PLEASE_REVIEW,
86
- [AppInfos.ETHEREUM.name]: DeviceLabels.VERIFY_ETHEREUM,
87
- [AppInfos.POLKADOT.name]: DeviceLabels.PLEASE_REVIEW,
88
- [AppInfos.POLYGON.name]: DeviceLabels.VERIFY_POLYGON,
89
- [AppInfos.SOLANA.name]: DeviceLabels.VERIFY_SOLANA_ADDRESS,
90
- default: DeviceLabels.ADDRESS,
91
- },
92
- receiveConfirm: {
93
- default: DeviceLabels.CONFIRM,
94
- },
95
- delegateVerify: {
96
- [AppInfos.NEAR.name]: DeviceLabels.VIEW_HEADER,
97
- default: DeviceLabels.REVIEW_OPERATION,
98
- },
99
- delegateConfirm: {
100
- [AppInfos.NEAR.name]: DeviceLabels.CONTINUE_TO_ACTION,
101
- default: DeviceLabels.HOLD_TO_SIGN,
102
- },
103
- sendVerify: {
104
- default: DeviceLabels.REVIEW_OPERATION,
105
- },
106
- sendConfirm: {
107
- default: DeviceLabels.HOLD_TO_SIGN,
108
- },
109
- },
112
+ [DeviceModelId.stax]: TOUCHSCREEN_DEVICE_CONFIG,
113
+ [DeviceModelId.europa]: TOUCHSCREEN_DEVICE_CONFIG,
110
114
  default: {
111
115
  receiveVerify: {
112
116
  [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
@@ -131,7 +135,7 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
131
135
  [AppInfos.COSMOS.name]: DeviceLabels.PLEASE_REVIEW,
132
136
  [AppInfos.MULTIVERS_X.name]: DeviceLabels.RECEIVER,
133
137
  [AppInfos.NEAR.name]: DeviceLabels.VIEW_HEADER,
134
- [AppInfos.SOLANA.name]: DeviceLabels.REVIEW_TRANSACTION,
138
+ [AppInfos.SOLANA.name]: DeviceLabels.REVIEW_TRANSACTION_TO,
135
139
  default: DeviceLabels.REVIEW_OPERATION,
136
140
  },
137
141
  delegateConfirm: {
@@ -141,17 +145,17 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
141
145
  [AppInfos.INJECTIVE.name]: DeviceLabels.CAPS_APPROVE,
142
146
  [AppInfos.MULTIVERS_X.name]: DeviceLabels.SIGN,
143
147
  [AppInfos.NEAR.name]: DeviceLabels.CONTINUE_TO_ACTION,
144
- [AppInfos.SOLANA.name]: DeviceLabels.SIGN_TRANSACTION,
145
148
  [AppInfos.OSMOSIS.name]: DeviceLabels.CAPS_APPROVE,
149
+ [AppInfos.SOLANA.name]: DeviceLabels.SIGN,
146
150
  default: DeviceLabels.APPROVE,
147
151
  },
148
152
  sendVerify: {
149
- [AppInfos.SOLANA.name]: DeviceLabels.TRANSFER,
153
+ [AppInfos.SOLANA.name]: DeviceLabels.REVIEW_TRANSACTION_TO,
150
154
  [AppInfos.RIPPLE.name]: DeviceLabels.TRANSACTION_TYPE,
151
155
  default: DeviceLabels.REVIEW_OPERATION,
152
156
  },
153
157
  sendConfirm: {
154
- [AppInfos.SOLANA.name]: DeviceLabels.APPROVE,
158
+ [AppInfos.SOLANA.name]: DeviceLabels.SIGN_TRANSACTION,
155
159
  [AppInfos.TRON.name]: DeviceLabels.SIGN,
156
160
  [AppInfos.STELLAR.name]: DeviceLabels.SIGN,
157
161
  [AppInfos.RIPPLE.name]: DeviceLabels.SIGN,
@@ -160,6 +164,7 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
160
164
  [AppInfos.BITCOIN.name]: DeviceLabels.SIGN_TRANSACTION,
161
165
  [AppInfos.KASPA.name]: DeviceLabels.APPROVE,
162
166
  [AppInfos.DOGECOIN.name]: DeviceLabels.ACCEPT,
167
+ [AppInfos.BITCOIN_CASH.name]: DeviceLabels.ACCEPT,
163
168
  default: DeviceLabels.CAPS_APPROVE,
164
169
  },
165
170
  },
@@ -10,16 +10,24 @@ function getSpeculosInfo(): {
10
10
  const speculosAddress = getSpeculosAddress();
11
11
  return { speculosApiPort, speculosAddress };
12
12
  }
13
+
13
14
  export async function pressAndRelease(deviceLabel: string, x?: number, y?: number) {
14
15
  const { speculosApiPort, speculosAddress } = getSpeculosInfo();
15
- const { x: coordX, y: coordY } = await getDeviceLabelCoordinates(deviceLabel, speculosApiPort);
16
- x = x === undefined ? coordX : x;
17
- y = y === undefined ? coordY : y;
16
+ let xCoord: number;
17
+ let yCoord: number;
18
+ if (x && y) {
19
+ xCoord = x;
20
+ yCoord = y;
21
+ } else {
22
+ const coords = await getDeviceLabelCoordinates(deviceLabel, speculosApiPort);
23
+ xCoord = coords.x;
24
+ yCoord = coords.y;
25
+ }
18
26
  await retryAxiosRequest(() =>
19
27
  axios.post(`${speculosAddress}:${speculosApiPort}/finger`, {
20
28
  action: "press-and-release",
21
- x: x,
22
- y: y,
29
+ x: xCoord,
30
+ y: yCoord,
23
31
  }),
24
32
  );
25
33
  }
@@ -108,12 +108,6 @@ export class Account {
108
108
  "0xa1baa625c5E6A9304cB7AcD86d2fee6B710eC3eB",
109
109
  1,
110
110
  );
111
- static readonly BSC_POL = new Account(
112
- Currency.BSC_POL,
113
- "BNB Chain 1",
114
- "0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
115
- 0,
116
- );
117
111
  static readonly BSC_SHIBA = new Account(
118
112
  Currency.BSC_SHIBA,
119
113
  "BNB Chain 1",
@@ -156,13 +156,6 @@ export class Currency {
156
156
  AppInfos.BNB_CHAIN,
157
157
  [Network.BNB_CHAIN, Network.POLYGON],
158
158
  );
159
- static readonly BSC_POL = new Currency(
160
- "Matic Token",
161
- "MATIC",
162
- "bsc/bep20/matic_token",
163
- AppInfos.BNB_CHAIN,
164
- [Network.BNB_CHAIN],
165
- );
166
159
  static readonly BSC_SHIBA = new Currency("Shiba Inu", "SHIB", "bsc", AppInfos.BNB_CHAIN, [
167
160
  Network.BNB_CHAIN,
168
161
  Network.ETHEREUM,
@@ -8,4 +8,5 @@ export class Device {
8
8
  static readonly LNX = new Device("nanoX", 855638020);
9
9
  static readonly LNSP = new Device("nanoSP", 856686596);
10
10
  static readonly STAX = new Device("stax", 857735172);
11
+ static readonly FLEX = new Device("flex", 858783748);
11
12
  }
@@ -39,6 +39,7 @@ export enum DeviceLabels {
39
39
  REVIEW_OPERATION = "Review",
40
40
  REMOVE_PHONE_OR_COMPUTER = "Remove phone or computer",
41
41
  REVIEW_TRANSACTION = "Review transaction",
42
+ REVIEW_TRANSACTION_TO = "Review transaction to",
42
43
  SEND = "Send",
43
44
  SEND_TO_ADDRESS = "Send to address",
44
45
  SEND_TO_ADDRESS_2 = "Send to address (2/2)",
@@ -59,6 +60,7 @@ export enum DeviceLabels {
59
60
  VERIFY_BSC = "Verify BSC",
60
61
  VERIFY_ETHEREUM = "Verify Ethereum",
61
62
  VERIFY_POLYGON = "Verify Polygon",
63
+ VERIFY_COSMOS = "Verify Cosmos",
62
64
  VERIFY_SOLANA_ADDRESS = "Verify Solana address",
63
65
  VIEW_ACTION = "View action",
64
66
  VIEW_HEADER = "View Header",
@@ -32,7 +32,7 @@ export async function sendBTC(tx: Transaction) {
32
32
  expect(isAmountCorrect).toBeTruthy();
33
33
  const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
34
34
  expect(isAddressCorrect).toBeTruthy();
35
- if (speculosDevice === DeviceModelId.stax) {
35
+ if (isTouchDevice()) {
36
36
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
37
37
  } else {
38
38
  await pressBoth();