@ledgerhq/live-common 34.46.0-nightly.5 → 34.46.1

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/bridge/crypto-assets/index.d.ts +1 -1
  2. package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
  3. package/lib/bridge/crypto-assets/index.js +1 -1
  4. package/lib/bridge/crypto-assets/index.js.map +1 -1
  5. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  6. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +4 -6
  7. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  8. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  9. package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -2
  10. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  11. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  12. package/lib/bridge/generic-alpaca/prepareTransaction.js +12 -12
  13. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  14. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  15. package/lib/bridge/generic-alpaca/signOperation.js +4 -3
  16. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  17. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  18. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  19. package/lib/bridge/generic-alpaca/utils.d.ts +1 -0
  20. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  21. package/lib/bridge/generic-alpaca/utils.js +1 -0
  22. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  23. package/lib/bridge/impl.d.ts +1 -1
  24. package/lib/bridge/impl.d.ts.map +1 -1
  25. package/lib/currencies/index.d.ts +1 -1
  26. package/lib/currencies/index.d.ts.map +1 -1
  27. package/lib/currencies/index.js +2 -1
  28. package/lib/currencies/index.js.map +1 -1
  29. package/lib/currencies/sortByMarketcap.test.js +1 -2
  30. package/lib/currencies/sortByMarketcap.test.js.map +1 -1
  31. package/lib/domain/getTokensWithFunds.test.js +1 -1
  32. package/lib/domain/getTokensWithFunds.test.js.map +1 -1
  33. package/lib/e2e/enum/AppInfos.d.ts +1 -1
  34. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  35. package/lib/e2e/enum/DeviceLabels.d.ts +2 -3
  36. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  37. package/lib/e2e/enum/DeviceLabels.js +1 -2
  38. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  39. package/lib/e2e/enum/Provider.d.ts.map +1 -1
  40. package/lib/e2e/enum/Provider.js +2 -2
  41. package/lib/e2e/enum/Provider.js.map +1 -1
  42. package/lib/e2e/families/solana.d.ts.map +1 -1
  43. package/lib/e2e/families/solana.js +4 -4
  44. package/lib/e2e/families/solana.js.map +1 -1
  45. package/lib/e2e/index.d.ts +0 -5
  46. package/lib/e2e/index.d.ts.map +1 -1
  47. package/lib/e2e/speculos.d.ts.map +1 -1
  48. package/lib/e2e/speculos.js +5 -4
  49. package/lib/e2e/speculos.js.map +1 -1
  50. package/lib/e2e/speculosCI.d.ts +0 -4
  51. package/lib/e2e/speculosCI.d.ts.map +1 -1
  52. package/lib/e2e/speculosCI.js +6 -16
  53. package/lib/e2e/speculosCI.js.map +1 -1
  54. package/lib/env.react.d.ts +1 -1
  55. package/lib/env.react.d.ts.map +1 -1
  56. package/lib/exchange/swap/api/v5/actions.js +1 -1
  57. package/lib/exchange/swap/api/v5/actions.js.map +1 -1
  58. package/lib/exchange/swap/types.d.ts +1 -1
  59. package/lib/exchange/swap/types.d.ts.map +1 -1
  60. package/lib/families/evm/setup.d.ts.map +1 -1
  61. package/lib/families/evm/setup.js +1 -11
  62. package/lib/families/evm/setup.js.map +1 -1
  63. package/lib/families/hedera/setup.d.ts +5 -5
  64. package/lib/families/hedera/setup.d.ts.map +1 -1
  65. package/lib/families/hedera/setup.js.map +1 -1
  66. package/lib/families/solana/setup.d.ts.map +1 -1
  67. package/lib/families/solana/setup.js +1 -2
  68. package/lib/families/solana/setup.js.map +1 -1
  69. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  70. package/lib/featureFlags/defaultFeatures.js +0 -1
  71. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  72. package/lib/featureFlags/useFeature.d.ts +1 -1
  73. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  74. package/lib/generated/bridge/js.d.ts +1 -1
  75. package/lib/market/utils/countervalueFormatter.d.ts.map +1 -1
  76. package/lib/market/utils/countervalueFormatter.js.map +1 -1
  77. package/lib/market/utils/types.d.ts +0 -2
  78. package/lib/market/utils/types.d.ts.map +1 -1
  79. package/lib/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  80. package/lib/modularDrawer/__mocks__/currencies.mock.js +7 -7
  81. package/lib/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  82. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
  83. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
  84. package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
  85. package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
  86. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
  87. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
  88. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
  89. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  90. package/lib-es/bridge/crypto-assets/index.d.ts +1 -1
  91. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  92. package/lib-es/bridge/crypto-assets/index.js +1 -1
  93. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  94. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  95. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +4 -6
  96. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  97. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  98. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -2
  99. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  100. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  101. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +12 -12
  102. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  103. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  104. package/lib-es/bridge/generic-alpaca/signOperation.js +4 -3
  105. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  106. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  107. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  108. package/lib-es/bridge/generic-alpaca/utils.d.ts +1 -0
  109. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  110. package/lib-es/bridge/generic-alpaca/utils.js +1 -0
  111. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  112. package/lib-es/bridge/impl.d.ts +1 -1
  113. package/lib-es/bridge/impl.d.ts.map +1 -1
  114. package/lib-es/currencies/index.d.ts +1 -1
  115. package/lib-es/currencies/index.d.ts.map +1 -1
  116. package/lib-es/currencies/index.js +1 -1
  117. package/lib-es/currencies/index.js.map +1 -1
  118. package/lib-es/currencies/sortByMarketcap.test.js +1 -2
  119. package/lib-es/currencies/sortByMarketcap.test.js.map +1 -1
  120. package/lib-es/domain/getTokensWithFunds.test.js +1 -1
  121. package/lib-es/domain/getTokensWithFunds.test.js.map +1 -1
  122. package/lib-es/e2e/enum/AppInfos.d.ts +1 -1
  123. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  124. package/lib-es/e2e/enum/DeviceLabels.d.ts +2 -3
  125. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  126. package/lib-es/e2e/enum/DeviceLabels.js +1 -2
  127. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  128. package/lib-es/e2e/enum/Provider.d.ts.map +1 -1
  129. package/lib-es/e2e/enum/Provider.js +2 -2
  130. package/lib-es/e2e/enum/Provider.js.map +1 -1
  131. package/lib-es/e2e/families/solana.d.ts.map +1 -1
  132. package/lib-es/e2e/families/solana.js +4 -4
  133. package/lib-es/e2e/families/solana.js.map +1 -1
  134. package/lib-es/e2e/index.d.ts +0 -5
  135. package/lib-es/e2e/index.d.ts.map +1 -1
  136. package/lib-es/e2e/speculos.d.ts.map +1 -1
  137. package/lib-es/e2e/speculos.js +5 -4
  138. package/lib-es/e2e/speculos.js.map +1 -1
  139. package/lib-es/e2e/speculosCI.d.ts +0 -4
  140. package/lib-es/e2e/speculosCI.d.ts.map +1 -1
  141. package/lib-es/e2e/speculosCI.js +5 -14
  142. package/lib-es/e2e/speculosCI.js.map +1 -1
  143. package/lib-es/env.react.d.ts +1 -1
  144. package/lib-es/env.react.d.ts.map +1 -1
  145. package/lib-es/exchange/swap/api/v5/actions.js +1 -1
  146. package/lib-es/exchange/swap/api/v5/actions.js.map +1 -1
  147. package/lib-es/exchange/swap/types.d.ts +1 -1
  148. package/lib-es/exchange/swap/types.d.ts.map +1 -1
  149. package/lib-es/families/evm/setup.d.ts.map +1 -1
  150. package/lib-es/families/evm/setup.js +1 -11
  151. package/lib-es/families/evm/setup.js.map +1 -1
  152. package/lib-es/families/hedera/setup.d.ts +5 -5
  153. package/lib-es/families/hedera/setup.d.ts.map +1 -1
  154. package/lib-es/families/hedera/setup.js.map +1 -1
  155. package/lib-es/families/solana/setup.d.ts.map +1 -1
  156. package/lib-es/families/solana/setup.js +1 -2
  157. package/lib-es/families/solana/setup.js.map +1 -1
  158. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  159. package/lib-es/featureFlags/defaultFeatures.js +0 -1
  160. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  161. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  162. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  163. package/lib-es/generated/bridge/js.d.ts +1 -1
  164. package/lib-es/market/utils/countervalueFormatter.d.ts.map +1 -1
  165. package/lib-es/market/utils/countervalueFormatter.js.map +1 -1
  166. package/lib-es/market/utils/types.d.ts +0 -2
  167. package/lib-es/market/utils/types.d.ts.map +1 -1
  168. package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  169. package/lib-es/modularDrawer/__mocks__/currencies.mock.js +1 -1
  170. package/lib-es/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  171. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
  172. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
  173. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
  174. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
  175. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
  176. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
  177. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
  178. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  179. package/package.json +75 -77
  180. package/src/DataModel.test.ts +1 -1
  181. package/src/__tests__/accounts/groupPerDay.ts +1 -1
  182. package/src/__tests__/test-helpers/setup.ts +1 -1
  183. package/src/account/serialization.test.ts +1 -1
  184. package/src/bridge/crypto-assets/index.test.ts +1 -1
  185. package/src/bridge/crypto-assets/index.ts +2 -3
  186. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +5 -11
  187. package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -2
  188. package/src/bridge/generic-alpaca/prepareTransaction.ts +16 -20
  189. package/src/bridge/generic-alpaca/signOperation.ts +2 -3
  190. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +1 -1
  191. package/src/bridge/generic-alpaca/utils.ts +2 -0
  192. package/src/bridge/impl.ts +1 -1
  193. package/src/currencies/index.ts +1 -0
  194. package/src/currencies/sortByMarketcap.test.ts +2 -3
  195. package/src/domain/getTokensWithFunds.test.ts +1 -1
  196. package/src/e2e/enum/AppInfos.ts +1 -1
  197. package/src/e2e/enum/DeviceLabels.ts +1 -2
  198. package/src/e2e/enum/Provider.ts +2 -2
  199. package/src/e2e/families/solana.ts +4 -7
  200. package/src/e2e/speculos.ts +5 -4
  201. package/src/e2e/speculosCI.ts +6 -18
  202. package/src/exchange/swap/api/v5/actions.ts +1 -1
  203. package/src/exchange/swap/types.ts +1 -1
  204. package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +0 -7
  205. package/src/families/bitcoin/satstack.test.ts +1 -1
  206. package/src/families/evm/setup.ts +1 -12
  207. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +1135 -464
  208. package/src/families/hedera/setup.ts +3 -7
  209. package/src/families/solana/setup.ts +0 -2
  210. package/src/families/tron/data.mock.ts +1 -1
  211. package/src/featureFlags/defaultFeatures.ts +0 -1
  212. package/src/market/utils/countervalueFormatter.ts +1 -0
  213. package/src/market/utils/types.ts +0 -4
  214. package/src/modularDrawer/__mocks__/currencies.mock.ts +1 -1
  215. package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +1 -1
  216. package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
  217. package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +2 -2
  218. package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +1 -1
  219. package/lib/families/hedera/constants.d.ts +0 -2
  220. package/lib/families/hedera/constants.d.ts.map +0 -1
  221. package/lib/families/hedera/constants.js +0 -19
  222. package/lib/families/hedera/constants.js.map +0 -1
  223. package/lib/modularDrawer/data/entities/index.d.ts +0 -68
  224. package/lib/modularDrawer/data/entities/index.d.ts.map +0 -1
  225. package/lib/modularDrawer/data/entities/index.js +0 -3
  226. package/lib/modularDrawer/data/entities/index.js.map +0 -1
  227. package/lib/modularDrawer/data/state-manager/api.d.ts +0 -152
  228. package/lib/modularDrawer/data/state-manager/api.d.ts.map +0 -1
  229. package/lib/modularDrawer/data/state-manager/api.js +0 -45
  230. package/lib/modularDrawer/data/state-manager/api.js.map +0 -1
  231. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +0 -5
  232. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +0 -1
  233. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js +0 -120
  234. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +0 -1
  235. package/lib/modularDrawer/hooks/useAssetsData.d.ts +0 -13
  236. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +0 -1
  237. package/lib/modularDrawer/hooks/useAssetsData.js +0 -31
  238. package/lib/modularDrawer/hooks/useAssetsData.js.map +0 -1
  239. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +0 -2
  240. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +0 -1
  241. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js +0 -496
  242. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +0 -1
  243. package/lib/modularDrawer/utils/calculateProviderTotal.d.ts +0 -9
  244. package/lib/modularDrawer/utils/calculateProviderTotal.d.ts.map +0 -1
  245. package/lib/modularDrawer/utils/calculateProviderTotal.js +0 -23
  246. package/lib/modularDrawer/utils/calculateProviderTotal.js.map +0 -1
  247. package/lib/modularDrawer/utils/counterValueFormatter.d.ts +0 -14
  248. package/lib/modularDrawer/utils/counterValueFormatter.d.ts.map +0 -1
  249. package/lib/modularDrawer/utils/counterValueFormatter.js +0 -107
  250. package/lib/modularDrawer/utils/counterValueFormatter.js.map +0 -1
  251. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +0 -11
  252. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +0 -1
  253. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +0 -45
  254. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +0 -1
  255. package/lib/modularDrawer/utils/getProviderCurrency.d.ts +0 -3
  256. package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +0 -1
  257. package/lib/modularDrawer/utils/getProviderCurrency.js +0 -14
  258. package/lib/modularDrawer/utils/getProviderCurrency.js.map +0 -1
  259. package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts +0 -11
  260. package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts.map +0 -1
  261. package/lib/modularDrawer/utils/groupAccountsByAsset.js +0 -32
  262. package/lib/modularDrawer/utils/groupAccountsByAsset.js.map +0 -1
  263. package/lib/modularDrawer/utils/parseToBigNumber.d.ts +0 -9
  264. package/lib/modularDrawer/utils/parseToBigNumber.d.ts.map +0 -1
  265. package/lib/modularDrawer/utils/parseToBigNumber.js +0 -24
  266. package/lib/modularDrawer/utils/parseToBigNumber.js.map +0 -1
  267. package/lib/modularDrawer/utils/type.d.ts +0 -21
  268. package/lib/modularDrawer/utils/type.d.ts.map +0 -1
  269. package/lib/modularDrawer/utils/type.js +0 -3
  270. package/lib/modularDrawer/utils/type.js.map +0 -1
  271. package/lib-es/families/hedera/constants.d.ts +0 -2
  272. package/lib-es/families/hedera/constants.d.ts.map +0 -1
  273. package/lib-es/families/hedera/constants.js +0 -3
  274. package/lib-es/families/hedera/constants.js.map +0 -1
  275. package/lib-es/modularDrawer/data/entities/index.d.ts +0 -68
  276. package/lib-es/modularDrawer/data/entities/index.d.ts.map +0 -1
  277. package/lib-es/modularDrawer/data/entities/index.js +0 -2
  278. package/lib-es/modularDrawer/data/entities/index.js.map +0 -1
  279. package/lib-es/modularDrawer/data/state-manager/api.d.ts +0 -152
  280. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +0 -1
  281. package/lib-es/modularDrawer/data/state-manager/api.js +0 -42
  282. package/lib-es/modularDrawer/data/state-manager/api.js.map +0 -1
  283. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +0 -5
  284. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +0 -1
  285. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js +0 -118
  286. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +0 -1
  287. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +0 -13
  288. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +0 -1
  289. package/lib-es/modularDrawer/hooks/useAssetsData.js +0 -27
  290. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +0 -1
  291. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +0 -2
  292. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +0 -1
  293. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js +0 -494
  294. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +0 -1
  295. package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts +0 -9
  296. package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts.map +0 -1
  297. package/lib-es/modularDrawer/utils/calculateProviderTotal.js +0 -16
  298. package/lib-es/modularDrawer/utils/calculateProviderTotal.js.map +0 -1
  299. package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts +0 -14
  300. package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts.map +0 -1
  301. package/lib-es/modularDrawer/utils/counterValueFormatter.js +0 -103
  302. package/lib-es/modularDrawer/utils/counterValueFormatter.js.map +0 -1
  303. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +0 -11
  304. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +0 -1
  305. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +0 -41
  306. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +0 -1
  307. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts +0 -3
  308. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +0 -1
  309. package/lib-es/modularDrawer/utils/getProviderCurrency.js +0 -10
  310. package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +0 -1
  311. package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts +0 -11
  312. package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts.map +0 -1
  313. package/lib-es/modularDrawer/utils/groupAccountsByAsset.js +0 -25
  314. package/lib-es/modularDrawer/utils/groupAccountsByAsset.js.map +0 -1
  315. package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts +0 -9
  316. package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts.map +0 -1
  317. package/lib-es/modularDrawer/utils/parseToBigNumber.js +0 -17
  318. package/lib-es/modularDrawer/utils/parseToBigNumber.js.map +0 -1
  319. package/lib-es/modularDrawer/utils/type.d.ts +0 -21
  320. package/lib-es/modularDrawer/utils/type.d.ts.map +0 -1
  321. package/lib-es/modularDrawer/utils/type.js +0 -2
  322. package/lib-es/modularDrawer/utils/type.js.map +0 -1
  323. package/src/families/hedera/constants.ts +0 -2
  324. package/src/modularDrawer/data/entities/index.ts +0 -79
  325. package/src/modularDrawer/data/state-manager/api.ts +0 -62
  326. package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +0 -139
  327. package/src/modularDrawer/hooks/useAssetsData.ts +0 -36
  328. package/src/modularDrawer/utils/__tests__/counterValueFormatter.test.ts +0 -549
  329. package/src/modularDrawer/utils/calculateProviderTotal.ts +0 -23
  330. package/src/modularDrawer/utils/counterValueFormatter.ts +0 -165
  331. package/src/modularDrawer/utils/getBalanceAndFiatValueByAssets.ts +0 -76
  332. package/src/modularDrawer/utils/getProviderCurrency.ts +0 -13
  333. package/src/modularDrawer/utils/groupAccountsByAsset.ts +0 -51
  334. package/src/modularDrawer/utils/parseToBigNumber.ts +0 -17
  335. package/src/modularDrawer/utils/type.ts +0 -22
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-common",
3
3
  "description": "Common ground for the Ledger Live apps",
4
- "version": "34.46.0-nightly.5",
4
+ "version": "34.46.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/LedgerHQ/ledger-live.git"
@@ -106,13 +106,12 @@
106
106
  "@dfinity/agent": "^0.21.0",
107
107
  "@dfinity/candid": "^0.21.0",
108
108
  "@dfinity/principal": "^0.15.6",
109
- "@ledgerhq/device-management-kit": "0.0.0-apex-support-20250721132630",
109
+ "@ledgerhq/device-management-kit": "0.0.0-lns-fix-20250829181539",
110
110
  "@ledgerhq/live-app-sdk": "^0.8.1",
111
111
  "@ledgerhq/wallet-api-client": "^1.9.1",
112
112
  "@ledgerhq/wallet-api-core": "^1.21.1",
113
113
  "@ledgerhq/wallet-api-server": "^1.10.1",
114
- "@reduxjs/toolkit": "2.8.2",
115
- "@stellar/stellar-sdk": "^14.0.0",
114
+ "@stellar/stellar-sdk": "^11.3.0",
116
115
  "@stricahq/typhonjs": "^3.0.0",
117
116
  "@taquito/ledger-signer": "^22.0.0",
118
117
  "@ton-community/ton-ledger": "^7.2.0",
@@ -130,7 +129,7 @@
130
129
  "@zondax/ledger-mina-js": "0.0.2",
131
130
  "@zondax/ledger-stacks": "^1.0.2",
132
131
  "async": "^3.2.3",
133
- "axios": "1.11.0",
132
+ "axios": "1.7.7",
134
133
  "bech32": "^1.1.3",
135
134
  "bignumber.js": "^9.1.2",
136
135
  "bip32": "^2.0.6",
@@ -139,7 +138,6 @@
139
138
  "date-fns": "^2.23.0",
140
139
  "expect": "^27.4.6",
141
140
  "fuse.js": "^6.6.2",
142
- "i18next": "20.6.1",
143
141
  "invariant": "^2.2.2",
144
142
  "isomorphic-ws": "^4.0.1",
145
143
  "jotai": "2.12.4",
@@ -165,76 +163,76 @@
165
163
  "xstate": "^5.19.2",
166
164
  "yargs": "^17.0.0",
167
165
  "zod": "^3.22.4",
168
- "@ledgerhq/coin-algorand": "^0.9.18-nightly.2",
169
- "@ledgerhq/coin-aptos": "^3.1.1-nightly.2",
170
- "@ledgerhq/coin-bitcoin": "^0.21.0-nightly.2",
171
- "@ledgerhq/coin-canton": "^0.2.2-nightly.2",
172
- "@ledgerhq/coin-cardano": "^0.11.2-nightly.2",
173
- "@ledgerhq/coin-casper": "^2.0.9-nightly.2",
174
- "@ledgerhq/coin-celo": "^1.2.1-nightly.4",
175
- "@ledgerhq/coin-cosmos": "^0.16.7-nightly.2",
176
- "@ledgerhq/coin-evm": "^2.28.0-nightly.4",
177
- "@ledgerhq/coin-filecoin": "^1.10.1-nightly.2",
178
- "@ledgerhq/coin-framework": "^6.2.0-nightly.2",
179
- "@ledgerhq/coin-hedera": "^1.11.0-nightly.2",
180
- "@ledgerhq/coin-icon": "^0.11.5-nightly.2",
181
- "@ledgerhq/coin-internet_computer": "^1.7.18-nightly.2",
182
- "@ledgerhq/coin-mina": "^1.1.17-nightly.2",
183
- "@ledgerhq/coin-multiversx": "^0.4.18-nightly.2",
184
- "@ledgerhq/coin-near": "^0.12.1-nightly.2",
185
- "@ledgerhq/coin-polkadot": "^6.7.1-nightly.2",
186
- "@ledgerhq/coin-solana": "^0.32.0-nightly.2",
187
- "@ledgerhq/coin-stacks": "^0.8.18-nightly.2",
188
- "@ledgerhq/coin-stellar": "^6.2.0-nightly.2",
189
- "@ledgerhq/coin-sui": "^0.10.1-nightly.2",
190
- "@ledgerhq/coin-tezos": "^6.1.1-nightly.2",
191
- "@ledgerhq/coin-ton": "^0.13.7-nightly.2",
192
- "@ledgerhq/coin-tron": "^5.1.1-nightly.2",
193
- "@ledgerhq/coin-vechain": "^2.8.2-nightly.2",
194
- "@ledgerhq/coin-xrp": "^7.2.0-nightly.2",
195
- "@ledgerhq/crypto-icons-ui": "^1.18.0-nightly.0",
196
- "@ledgerhq/cryptoassets": "^13.26.0-nightly.1",
197
- "@ledgerhq/device-core": "^0.6.1-nightly.2",
198
- "@ledgerhq/devices": "8.5.1-nightly.0",
199
- "@ledgerhq/errors": "^6.25.0-nightly.0",
200
- "@ledgerhq/hw-app-algorand": "^6.31.6-nightly.0",
201
- "@ledgerhq/hw-app-aptos": "^6.34.6-nightly.0",
202
- "@ledgerhq/hw-app-btc": "^10.10.2-nightly.0",
203
- "@ledgerhq/hw-app-celo": "^6.34.1-nightly.2",
204
- "@ledgerhq/hw-app-cosmos": "^6.32.6-nightly.0",
205
- "@ledgerhq/hw-app-eth": "^6.45.16-nightly.2",
206
- "@ledgerhq/hw-app-exchange": "^0.12.1-nightly.0",
207
- "@ledgerhq/hw-app-hedera": "^1.2.6-nightly.0",
208
- "@ledgerhq/hw-app-icon": "^1.3.6-nightly.0",
209
- "@ledgerhq/hw-app-multiversx": "^6.25.1-nightly.0",
210
- "@ledgerhq/hw-app-near": "^6.31.6-nightly.0",
211
- "@ledgerhq/hw-app-polkadot": "^6.34.6-nightly.0",
212
- "@ledgerhq/hw-app-str": "^7.2.6-nightly.0",
213
- "@ledgerhq/hw-app-sui": "^1.3.0-nightly.0",
214
- "@ledgerhq/hw-app-tezos": "^6.31.6-nightly.0",
215
- "@ledgerhq/hw-app-trx": "^6.31.6-nightly.0",
216
- "@ledgerhq/hw-app-vet": "^0.5.14-nightly.1",
217
- "@ledgerhq/hw-app-xrp": "^6.32.4-nightly.0",
218
- "@ledgerhq/hw-transport": "^6.31.10-nightly.0",
219
- "@ledgerhq/hw-transport-mocker": "^6.29.10-nightly.0",
220
- "@ledgerhq/ledger-cal-service": "^1.3.1-nightly.1",
221
- "@ledgerhq/live-config": "^3.2.0-nightly.0",
222
- "@ledgerhq/live-countervalues": "^0.7.0-nightly.2",
223
- "@ledgerhq/live-countervalues-react": "^0.4.1-nightly.2",
224
- "@ledgerhq/live-dmk-shared": "^0.12.1-nightly.0",
225
- "@ledgerhq/live-env": "^2.15.0-nightly.1",
166
+ "@ledgerhq/coin-algorand": "^0.9.18",
167
+ "@ledgerhq/coin-aptos": "^3.1.1",
168
+ "@ledgerhq/coin-bitcoin": "^0.20.2",
169
+ "@ledgerhq/coin-cardano": "^0.11.2",
170
+ "@ledgerhq/coin-canton": "^0.3.0",
171
+ "@ledgerhq/coin-casper": "^2.0.9",
172
+ "@ledgerhq/coin-celo": "^1.2.1",
173
+ "@ledgerhq/coin-cosmos": "^0.16.7",
174
+ "@ledgerhq/coin-evm": "^2.28.0",
175
+ "@ledgerhq/coin-filecoin": "^1.10.1",
176
+ "@ledgerhq/coin-framework": "^6.2.0",
177
+ "@ledgerhq/coin-hedera": "^1.10.1",
178
+ "@ledgerhq/coin-internet_computer": "^1.7.18",
179
+ "@ledgerhq/coin-icon": "^0.11.5",
180
+ "@ledgerhq/coin-mina": "^1.1.17",
181
+ "@ledgerhq/coin-multiversx": "^0.4.18",
182
+ "@ledgerhq/coin-near": "^0.12.1",
183
+ "@ledgerhq/coin-polkadot": "^6.8.0",
184
+ "@ledgerhq/coin-solana": "^0.31.1",
185
+ "@ledgerhq/coin-stacks": "^0.8.18",
186
+ "@ledgerhq/coin-sui": "^0.11.0",
187
+ "@ledgerhq/coin-stellar": "^6.2.0",
188
+ "@ledgerhq/coin-ton": "^0.13.7",
189
+ "@ledgerhq/coin-tezos": "^6.2.0",
190
+ "@ledgerhq/coin-tron": "^5.2.0",
191
+ "@ledgerhq/coin-vechain": "^2.8.2",
192
+ "@ledgerhq/coin-xrp": "^7.2.0",
193
+ "@ledgerhq/crypto-icons-ui": "^1.17.0",
194
+ "@ledgerhq/cryptoassets": "^13.26.0",
195
+ "@ledgerhq/devices": "8.5.0",
196
+ "@ledgerhq/errors": "^6.24.0",
197
+ "@ledgerhq/device-core": "^0.6.1",
198
+ "@ledgerhq/hw-app-algorand": "^6.31.5",
199
+ "@ledgerhq/hw-app-aptos": "^6.34.5",
200
+ "@ledgerhq/hw-app-btc": "^10.10.1",
201
+ "@ledgerhq/hw-app-celo": "^6.34.1",
202
+ "@ledgerhq/hw-app-cosmos": "^6.32.5",
203
+ "@ledgerhq/hw-app-eth": "^6.45.16",
204
+ "@ledgerhq/hw-app-exchange": "^0.13.0",
205
+ "@ledgerhq/hw-app-hedera": "^1.2.5",
206
+ "@ledgerhq/hw-app-icon": "^1.3.5",
207
+ "@ledgerhq/hw-app-multiversx": "^6.25.0",
208
+ "@ledgerhq/hw-app-near": "^6.31.5",
209
+ "@ledgerhq/hw-app-polkadot": "^6.34.5",
210
+ "@ledgerhq/hw-app-str": "^7.2.5",
211
+ "@ledgerhq/hw-app-sui": "^1.3.0",
212
+ "@ledgerhq/hw-app-tezos": "^6.31.5",
213
+ "@ledgerhq/hw-app-trx": "^6.31.5",
214
+ "@ledgerhq/hw-app-vet": "^0.5.14",
215
+ "@ledgerhq/hw-transport": "^6.31.9",
216
+ "@ledgerhq/hw-app-xrp": "^6.32.3",
217
+ "@ledgerhq/hw-transport-mocker": "^6.29.9",
218
+ "@ledgerhq/ledger-cal-service": "^1.3.0",
219
+ "@ledgerhq/live-countervalues": "^0.6.2",
220
+ "@ledgerhq/live-config": "^3.1.0",
221
+ "@ledgerhq/live-dmk-shared": "^0.12.1",
222
+ "@ledgerhq/live-countervalues-react": "^0.5.0",
226
223
  "@ledgerhq/live-hooks": "0.1.0",
227
- "@ledgerhq/live-network": "^2.0.16-nightly.1",
228
- "@ledgerhq/live-nft": "^0.8.18-nightly.2",
224
+ "@ledgerhq/live-env": "^2.14.0",
225
+ "@ledgerhq/live-network": "^2.0.15",
226
+ "@ledgerhq/live-nft": "^0.8.18",
229
227
  "@ledgerhq/live-promise": "^0.1.1",
230
- "@ledgerhq/live-signer-canton": "^0.2.2-nightly.2",
231
- "@ledgerhq/live-signer-evm": "^0.7.1-nightly.4",
232
- "@ledgerhq/live-signer-solana": "^0.5.3-nightly.2",
233
- "@ledgerhq/live-wallet": "^0.13.0-nightly.2",
228
+ "@ledgerhq/live-signer-evm": "^0.7.2",
229
+ "@ledgerhq/live-signer-solana": "^0.5.3",
230
+ "@ledgerhq/live-signer-canton": "^0.2.2",
234
231
  "@ledgerhq/logs": "^6.13.0",
235
- "@ledgerhq/speculos-transport": "^0.2.9-nightly.1",
232
+ "@ledgerhq/live-wallet": "^0.12.2",
233
+ "@ledgerhq/speculos-transport": "^0.2.8",
236
234
  "@ledgerhq/wallet-api-acre-module": "^0.6.0",
237
- "@ledgerhq/wallet-api-exchange-module": "^0.16.0-nightly.0"
235
+ "@ledgerhq/wallet-api-exchange-module": "^0.15.0"
238
236
  },
239
237
  "devDependencies": {
240
238
  "@solana/web3.js": "1.95.4",
@@ -282,10 +280,10 @@
282
280
  "undici": "6.19.2",
283
281
  "uuid": "^8.3.2",
284
282
  "ws": "7",
285
- "@ledgerhq/device-react": "^0.2.42-nightly.2",
286
- "@ledgerhq/types-cryptoassets": "^7.26.0-nightly.0",
287
- "@ledgerhq/types-devices": "^6.26.0",
288
- "@ledgerhq/types-live": "^6.82.0-nightly.2"
283
+ "@ledgerhq/device-react": "^0.2.42",
284
+ "@ledgerhq/types-cryptoassets": "^7.25.0",
285
+ "@ledgerhq/types-devices": "^6.27.0",
286
+ "@ledgerhq/types-live": "^6.82.0"
289
287
  },
290
288
  "scripts": {
291
289
  "build": "zx ./scripts/build-ts.mjs",
@@ -307,6 +305,6 @@
307
305
  "test-bridge-update": "UPDATE_BACKEND_MOCKS=1 env-cmd -f .ci.integration.env pnpm jest --ci --updateSnapshot --passWithNoTests",
308
306
  "test-account-migration": "tsx src/__tests__/migration/account-migration.ts",
309
307
  "unimported": "unimported",
310
- "coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot"
308
+ "coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot && git diff --exit-code src"
311
309
  }
312
310
  }
@@ -7,7 +7,7 @@ import { accountRawToAccountUserData } from "@ledgerhq/live-wallet/store";
7
7
  import { createDataModel } from "./DataModel";
8
8
  import { fromAccountRaw, toAccountRaw } from "./account";
9
9
  import { getCurrencyConfiguration } from "./config";
10
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
10
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
11
11
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
12
12
 
13
13
  jest.mock("./config", () => ({
@@ -2,7 +2,7 @@ import flatMap from "lodash/flatMap";
2
2
  import { fromAccountRaw, groupAccountOperationsByDay } from "../../account";
3
3
  import { TezosAccountRaw } from "../../families/tezos/types";
4
4
  import { setSupportedCurrencies } from "../../currencies";
5
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
5
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
6
6
  import { setup } from "../../bridge/impl";
7
7
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
8
8
  setSupportedCurrencies(["tezos"]);
@@ -1,5 +1,5 @@
1
1
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
2
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
2
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
3
3
  import "./environment";
4
4
  import BigNumber from "bignumber.js";
5
5
 
@@ -4,7 +4,7 @@ import { toAccountRaw, fromAccountRaw } from "./serialization";
4
4
  import { setWalletAPIVersion } from "../wallet-api/version";
5
5
  import { WALLET_API_VERSION } from "../wallet-api/constants";
6
6
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
7
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
7
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
8
8
  import solanaSplTokenData from "../__fixtures__/solana-spl-epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v.json";
9
9
  import { TokenCurrency } from "@ledgerhq/types-cryptoassets";
10
10
 
@@ -1,7 +1,7 @@
1
1
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
2
2
  import { getCryptoAssetsStore, setCryptoAssetsStore } from ".";
3
3
  import * as legacy from "@ledgerhq/cryptoassets/tokens";
4
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
4
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
5
5
 
6
6
  describe("Testing CryptoAssetStore", () => {
7
7
  it("should return the default methods from cryptoassets libs when feature flag does not exists", () => {
@@ -1,6 +1,6 @@
1
1
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
2
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
2
3
  import * as legacy from "@ledgerhq/cryptoassets/tokens";
3
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
4
4
 
5
5
  const legacyStore: CryptoAssetsStore = {
6
6
  findTokenByAddress: legacy.findTokenByAddress,
@@ -17,8 +17,7 @@ export function setCryptoAssetsStore(store: CryptoAssetsStore) {
17
17
  }
18
18
 
19
19
  export function getCryptoAssetsStore(): CryptoAssetsStore {
20
- const featureEnabled =
21
- LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading");
20
+ const featureEnabled = LiveConfig.getValueByKey("feature_cal_lazy_loading");
22
21
  if (!featureEnabled) {
23
22
  return legacyStore;
24
23
  }
@@ -19,24 +19,18 @@ export function genericEstimateMaxSpendable(
19
19
  ...transaction,
20
20
  amount: mainAccount.spendableBalance,
21
21
  useAllAmount: true,
22
+ fees: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n,
22
23
  };
23
-
24
- let fees = transaction?.fees;
25
- if (transaction?.fees === null || transaction?.fees === undefined) {
26
- fees = (
27
- await getAlpacaApi(network, kind).estimateFees(
28
- transactionToIntent(mainAccount, draftTransaction),
29
- )
30
- ).value;
31
- }
24
+ const fees = await getAlpacaApi(network, kind).estimateFees(
25
+ transactionToIntent(mainAccount, draftTransaction),
26
+ );
32
27
  const { amount } = await getAlpacaApi(network, kind).validateIntent(
33
28
  transactionToIntent(account, { ...draftTransaction }),
34
- { value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
35
29
  );
36
30
  if (network === "stellar") {
37
31
  return amount > 0 ? new BigNumber(amount.toString()) : new BigNumber(0);
38
32
  }
39
- const bnFee = BigNumber(fees.toString());
33
+ const bnFee = BigNumber(fees.value.toString());
40
34
  return BigNumber.max(0, account.spendableBalance.minus(bnFee));
41
35
  };
42
36
  }
@@ -3,7 +3,6 @@ import { AccountAwaitingSendPendingOperations } from "@ledgerhq/errors";
3
3
  import BigNumber from "bignumber.js";
4
4
  import { getAlpacaApi } from "./alpaca";
5
5
  import { transactionToIntent } from "./utils";
6
- // import { FeeEstimation } from "@ledgerhq/coin-framework/api/types";
7
6
 
8
7
  // => alpaca validateIntent
9
8
  export function genericGetTransactionStatus(
@@ -27,6 +26,7 @@ export function genericGetTransactionStatus(
27
26
  mode: transaction?.mode,
28
27
  recipient: transaction.recipient,
29
28
  amount: transaction.amount ?? new BigNumber(0),
29
+ fees: transaction.fees ? BigInt(transaction.fees.toString()) : 0n,
30
30
  useAllAmount: !!transaction.useAllAmount,
31
31
  assetReference: transaction.assetReference || "",
32
32
  assetOwner: transaction.assetOwner || "",
@@ -46,7 +46,6 @@ export function genericGetTransactionStatus(
46
46
 
47
47
  const { errors, warnings, estimatedFees, amount, totalSpent } = await alpacaApi.validateIntent(
48
48
  transactionToIntent(account, draftTransaction),
49
- { value: transaction.fees ? BigInt(transaction.fees.toString()) : 0n },
50
49
  );
51
50
 
52
51
  return Promise.resolve({
@@ -2,7 +2,7 @@ import { Account, AccountBridge, TransactionCommon } from "@ledgerhq/types-live"
2
2
  import { getAlpacaApi } from "./alpaca";
3
3
  import { transactionToIntent } from "./utils";
4
4
  import BigNumber from "bignumber.js";
5
- import { FeeEstimation } from "@ledgerhq/coin-framework/api/types";
5
+ import { NetworkInfo } from "./createTransaction";
6
6
 
7
7
  function bnEq(a: BigNumber | null | undefined, b: BigNumber | null | undefined): boolean {
8
8
  return !a && !b ? true : !a || !b ? false : a.eq(b);
@@ -16,35 +16,31 @@ export function genericPrepareTransaction(
16
16
  account,
17
17
  transaction: TransactionCommon & {
18
18
  fees: BigNumber | null | undefined;
19
- customFees?: FeeEstimation;
20
19
  assetReference?: string;
21
20
  assetOwner?: string;
22
21
  subAccountId?: string;
22
+ networkInfo?: NetworkInfo | null;
23
23
  },
24
24
  ) => {
25
25
  const [assetReference, assetOwner] = getAssetInfos(transaction);
26
-
27
- let fees = transaction.customFees?.parameters?.fees || null;
28
- if (fees === null) {
29
- fees = (
30
- await getAlpacaApi(network, kind).estimateFees(
31
- transactionToIntent(account, {
32
- ...transaction,
33
- }),
34
- )
35
- ).value;
36
- }
37
-
38
- if (!bnEq(transaction.fees, new BigNumber(fees.toString()))) {
26
+ const fees = await getAlpacaApi(network, kind).estimateFees(
27
+ transactionToIntent(account, {
28
+ ...transaction,
29
+ fees: transaction.fees ? BigInt(transaction.fees.toString()) : 0n,
30
+ }),
31
+ );
32
+ // NOTE: this is problematic, we should maybe have a method / object that lists what field warrant an update per chain
33
+ // for reference, stellar checked this:
34
+ // transaction.networkInfo !== networkInfo ||
35
+ // transaction.baseReserve !== baseReserve
36
+ if (!bnEq(transaction.fees, new BigNumber(fees.value.toString()))) {
39
37
  return {
40
38
  ...transaction,
41
- fees: new BigNumber(fees.toString()),
39
+ fees: new BigNumber(fees.value.toString()),
42
40
  assetReference,
43
41
  assetOwner,
44
- customFees: {
45
- parameters: {
46
- fees: new BigNumber(fees.toString()),
47
- },
42
+ networkInfo: {
43
+ fees: new BigNumber(fees.value.toString()),
48
44
  },
49
45
  };
50
46
  }
@@ -95,6 +95,7 @@ export const genericSignOperation =
95
95
  const draftTransaction = {
96
96
  recipient: transaction.recipient,
97
97
  amount: transaction.amount ?? 0,
98
+ fees: fees,
98
99
  useAllAmount: !!transaction.useAllAmount,
99
100
  assetReference: transaction?.["assetReference"] || "",
100
101
  assetOwner: transaction?.["assetOwner"] || "",
@@ -102,7 +103,6 @@ export const genericSignOperation =
102
103
  };
103
104
  const { amount } = await getAlpacaApi(network, kind).validateIntent(
104
105
  transactionToIntent(account, draftTransaction),
105
- { value: fees },
106
106
  );
107
107
  transaction.amount = new BigNumber(amount.toString());
108
108
  }
@@ -110,7 +110,7 @@ export const genericSignOperation =
110
110
  const derivationPath = account.freshAddressPath;
111
111
  const { publicKey } = (await signer.getAddress(derivationPath)) as Result;
112
112
 
113
- let transactionIntent = transactionToIntent(account, { ...transaction });
113
+ let transactionIntent = transactionToIntent(account, { ...transaction, fees });
114
114
  transactionIntent.senderPublicKey = publicKey;
115
115
 
116
116
  // Enrich with memo and asset information
@@ -125,7 +125,6 @@ export const genericSignOperation =
125
125
  /* Craft unsigned blob via Alpaca */
126
126
  const unsigned: string = await getAlpacaApi(network, kind).craftTransaction(
127
127
  transactionIntent,
128
- { value: fees },
129
128
  );
130
129
 
131
130
  /* Notify UI that the device is now showing the tx */
@@ -47,7 +47,7 @@ describe("genericPrepareTransaction", () => {
47
47
  expect((result as any).fees.toString()).toBe(newFee.toString());
48
48
  expect(transactionToIntent).toHaveBeenCalledWith(
49
49
  account,
50
- expect.objectContaining(baseTransaction),
50
+ expect.objectContaining({ ...baseTransaction, fees: 500n }),
51
51
  );
52
52
  });
53
53
 
@@ -94,6 +94,7 @@ export function transactionToIntent(
94
94
  assetOwner?: string;
95
95
  assetReference?: string;
96
96
  mode?: string;
97
+ fees?: bigint | null | undefined;
97
98
  memoType?: string;
98
99
  memoValue?: string;
99
100
  useAllAmount?: boolean;
@@ -113,6 +114,7 @@ export function transactionToIntent(
113
114
  }
114
115
  }
115
116
  const res: TransactionIntent & { memo?: { type: string; value?: string } } = {
117
+ fees: transaction?.fees ? transaction.fees : null,
116
118
  type: transactionType,
117
119
  sender: account.freshAddress,
118
120
  recipient: transaction.recipient,
@@ -20,7 +20,7 @@ import {
20
20
  import { getAlpacaAccountBridge } from "./generic-alpaca/accountBridge";
21
21
  import { getAlpacaCurrencyBridge } from "./generic-alpaca/currencyBridge";
22
22
  import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/errors";
23
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
23
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
24
24
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
25
25
  import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
26
26
 
@@ -28,6 +28,7 @@ export {
28
28
  sanitizeValueString,
29
29
  formatCurrencyUnit,
30
30
  type formatCurrencyUnitOptions,
31
+ findCurrencyByTicker,
31
32
  parseCurrencyUnit,
32
33
  toLocaleString,
33
34
  isCurrencySupported,
@@ -1,10 +1,9 @@
1
1
  import { sortCurrenciesByIds } from "./sortByMarketcap";
2
- import { listCryptoCurrencies, listTokens } from ".";
2
+ import { findCurrencyByTicker, listCryptoCurrencies, listTokens } from ".";
3
3
  import { getBTCValues } from "@ledgerhq/live-countervalues/mock";
4
4
  import { CURRENCIES_LIST, IDS } from "./mock";
5
5
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
6
- import type { CryptoAssetsStore } from "@ledgerhq/types-live";
7
- import { findCurrencyByTicker } from "@ledgerhq/live-countervalues/findCurrencyByTicker";
6
+ import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
8
7
 
9
8
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
10
9
  setCryptoAssetsStoreForCoinFramework({
@@ -1,5 +1,5 @@
1
1
  import { genAccount } from "@ledgerhq/coin-framework/lib/mocks/account";
2
- import { getCryptoCurrencyById } from "../currencies/index";
2
+ import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/index";
3
3
  import { Account } from "@ledgerhq/types-live";
4
4
  import BigNumber from "bignumber.js";
5
5
  import { getTokensWithFunds } from "./getTokensWithFunds";
@@ -1,4 +1,4 @@
1
- export type SpeculosAppType = AppInfos;
1
+ export type AppInfosType = AppInfos;
2
2
 
3
3
  export class AppInfos {
4
4
  constructor(public readonly name: string) {}
@@ -8,6 +8,7 @@ export enum DeviceLabels {
8
8
  ACCEPT = "Accept",
9
9
  TRANSFER = "Transfer",
10
10
  RECIPIENT = "Recipient",
11
+ PUBKEY = "Pubkey",
11
12
  DEST = "Dest",
12
13
  CAPS_APPROVE = "APPROVE",
13
14
  CAPS_REJECT = "REJECT",
@@ -52,6 +53,4 @@ export enum DeviceLabels {
52
53
  VERIFY_BSC = "Verify BSC",
53
54
  SIGN_TRANSACTION = "Sign transaction",
54
55
  VERIFY_POLYGON = "Verify Polygon",
55
- VERIFY_SOLANA_ADDRESS = "Verify Solana address",
56
- REVIEW_TRANSACTION = "Review transaction",
57
56
  }
@@ -16,8 +16,8 @@ export class Provider {
16
16
  static readonly LIFI = new Provider("lifi", "LI.FI", false, true, false);
17
17
  static readonly CIC = new Provider("cic", "CIC", false, true, true);
18
18
  static readonly COINBASE = new Provider("coinbase", "Coinbase", false, true, true);
19
- static readonly KILN = new Provider("kiln_pooling", "Kiln staking Pool", false, true, true);
20
- static readonly STADER_LABS = new Provider("stader-eth", "Stader Labs", false, true, true);
19
+ static readonly KILN = new Provider("kiln", "Kiln staking Pool", false, true, true);
20
+ static readonly STADER_LABS = new Provider("stader", "Stader Labs", false, true, true);
21
21
  static readonly LIDO = new Provider("lido", "Lido", false, true, true);
22
22
  static readonly TRANSAK = new Provider("transak", "Transak", false, true, true);
23
23
 
@@ -5,20 +5,17 @@ import { Device } from "../enum/Device";
5
5
  import { Transaction } from "../models/Transaction";
6
6
 
7
7
  export async function delegateSolana() {
8
- await waitFor(DeviceLabels.REVIEW_TRANSACTION);
9
- await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
8
+ await waitFor(DeviceLabels.DELEGATE_FROM);
9
+ await pressUntilTextFound(DeviceLabels.APPROVE);
10
10
  await pressBoth();
11
11
  }
12
12
 
13
13
  export async function sendSolana(tx: Transaction) {
14
- const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
14
+ const events = await pressUntilTextFound(DeviceLabels.APPROVE);
15
15
  const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
16
16
  expect(isAmountCorrect).toBeTruthy();
17
17
  if (process.env.SPECULOS_DEVICE !== Device.LNS) {
18
- const isAddressCorrect = containsSubstringInEvent(
19
- tx.accountToCredit.parentAccount?.address ?? tx.accountToCredit.address,
20
- events,
21
- );
18
+ const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
22
19
  expect(isAddressCorrect).toBeTruthy();
23
20
  }
24
21
 
@@ -14,13 +14,13 @@ import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
14
14
  import axios, { AxiosError, AxiosResponse } from "axios";
15
15
  import { getEnv } from "@ledgerhq/live-env";
16
16
  import { getCryptoCurrencyById } from "../currencies";
17
- import { DeviceLabels } from "./enum/DeviceLabels";
17
+ import { DeviceLabels } from "../e2e/enum/DeviceLabels";
18
18
  import { Account } from "./enum/Account";
19
19
  import { Device as CryptoWallet } from "./enum/Device";
20
20
  import { Currency } from "./enum/Currency";
21
21
  import expect from "expect";
22
22
  import { sendBTCBasedCoin } from "./families/bitcoin";
23
- import { sendEVM, sendEvmNFT } from "./families/evm";
23
+ import { sendEVM, sendEvmNFT } from ".//families/evm";
24
24
  import { sendPolkadot } from "./families/polkadot";
25
25
  import { sendAlgorand } from "./families/algorand";
26
26
  import { sendTron } from "./families/tron";
@@ -385,12 +385,13 @@ export async function startSpeculos(
385
385
  onSpeculosDeviceCreated,
386
386
  };
387
387
  try {
388
- return isSpeculosRemote
388
+ const device = isSpeculosRemote
389
389
  ? await createSpeculosDeviceCI(deviceParams)
390
390
  : await createSpeculosDevice(deviceParams).then(device => {
391
391
  invariant(device.ports.apiPort, "[E2E] Speculos apiPort is not defined");
392
392
  return { id: device.id, port: device.ports.apiPort };
393
393
  });
394
+ return device;
394
395
  } catch (e: unknown) {
395
396
  console.error(e);
396
397
  log("engine", `test ${testName} failed with ${String(e)}`);
@@ -621,7 +622,7 @@ const APP_LABEL_MAP = new Map<AppInfos, [string, string]>([
621
622
  [AppInfos.ETHEREUM, [DeviceLabels.VERIFY_ETHEREUM, DeviceLabels.CONFIRM]],
622
623
  [AppInfos.BNB_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
623
624
  [AppInfos.POLYGON, [DeviceLabels.VERIFY_POLYGON, DeviceLabels.CONFIRM]],
624
- [AppInfos.SOLANA, [DeviceLabels.VERIFY_SOLANA_ADDRESS, DeviceLabels.CONFIRM]],
625
+ [AppInfos.SOLANA, [DeviceLabels.PUBKEY, DeviceLabels.APPROVE]],
625
626
  [AppInfos.POLKADOT, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
626
627
  [AppInfos.COSMOS, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
627
628
  [AppInfos.BITCOIN, [DeviceLabels.ADDRESS, DeviceLabels.CONFIRM]],