@ledgerhq/live-common 34.46.0 → 34.47.0-nightly.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 (434) 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/bridge/crypto-assets/index.d.ts +1 -1
  4. package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
  5. package/lib/bridge/crypto-assets/index.js +1 -1
  6. package/lib/bridge/crypto-assets/index.js.map +1 -1
  7. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  8. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +6 -4
  9. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  10. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  11. package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -2
  12. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  13. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  14. package/lib/bridge/generic-alpaca/prepareTransaction.js +12 -12
  15. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  16. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  17. package/lib/bridge/generic-alpaca/signOperation.js +3 -4
  18. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  19. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  20. package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  21. package/lib/bridge/generic-alpaca/utils.d.ts +0 -1
  22. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  23. package/lib/bridge/generic-alpaca/utils.js +0 -1
  24. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  25. package/lib/bridge/impl.d.ts +1 -1
  26. package/lib/bridge/impl.d.ts.map +1 -1
  27. package/lib/currencies/index.d.ts +1 -1
  28. package/lib/currencies/index.d.ts.map +1 -1
  29. package/lib/currencies/index.js +1 -2
  30. package/lib/currencies/index.js.map +1 -1
  31. package/lib/currencies/sortByMarketcap.test.js +2 -1
  32. package/lib/currencies/sortByMarketcap.test.js.map +1 -1
  33. package/lib/domain/getTokensWithFunds.test.js +1 -1
  34. package/lib/domain/getTokensWithFunds.test.js.map +1 -1
  35. package/lib/e2e/enum/AppInfos.d.ts +1 -1
  36. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  37. package/lib/e2e/enum/DeviceLabels.d.ts +3 -2
  38. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  39. package/lib/e2e/enum/DeviceLabels.js +2 -1
  40. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  41. package/lib/e2e/enum/Provider.d.ts.map +1 -1
  42. package/lib/e2e/enum/Provider.js +2 -2
  43. package/lib/e2e/enum/Provider.js.map +1 -1
  44. package/lib/e2e/families/solana.d.ts.map +1 -1
  45. package/lib/e2e/families/solana.js +4 -4
  46. package/lib/e2e/families/solana.js.map +1 -1
  47. package/lib/e2e/index.d.ts +5 -0
  48. package/lib/e2e/index.d.ts.map +1 -1
  49. package/lib/e2e/speculos.d.ts.map +1 -1
  50. package/lib/e2e/speculos.js +4 -5
  51. package/lib/e2e/speculos.js.map +1 -1
  52. package/lib/e2e/speculosCI.d.ts +4 -0
  53. package/lib/e2e/speculosCI.d.ts.map +1 -1
  54. package/lib/e2e/speculosCI.js +16 -6
  55. package/lib/e2e/speculosCI.js.map +1 -1
  56. package/lib/env.react.d.ts +1 -1
  57. package/lib/env.react.d.ts.map +1 -1
  58. package/lib/exchange/swap/api/v5/actions.js +1 -1
  59. package/lib/exchange/swap/api/v5/actions.js.map +1 -1
  60. package/lib/exchange/swap/types.d.ts +1 -1
  61. package/lib/exchange/swap/types.d.ts.map +1 -1
  62. package/lib/families/canton/config.d.ts.map +1 -1
  63. package/lib/families/canton/config.js +35 -1
  64. package/lib/families/canton/config.js.map +1 -1
  65. package/lib/families/evm/setup.d.ts.map +1 -1
  66. package/lib/families/evm/setup.js +11 -1
  67. package/lib/families/evm/setup.js.map +1 -1
  68. package/lib/families/hedera/constants.d.ts +2 -0
  69. package/lib/families/hedera/constants.d.ts.map +1 -0
  70. package/lib/families/hedera/constants.js +19 -0
  71. package/lib/families/hedera/constants.js.map +1 -0
  72. package/lib/families/hedera/setup.d.ts +5 -5
  73. package/lib/families/hedera/setup.d.ts.map +1 -1
  74. package/lib/families/hedera/setup.js.map +1 -1
  75. package/lib/families/solana/setup.d.ts.map +1 -1
  76. package/lib/families/solana/setup.js +2 -1
  77. package/lib/families/solana/setup.js.map +1 -1
  78. package/lib/families/sui/constants.d.ts +2 -0
  79. package/lib/families/sui/constants.d.ts.map +1 -0
  80. package/lib/families/sui/constants.js +19 -0
  81. package/lib/families/sui/constants.js.map +1 -0
  82. package/lib/families/sui/logic.d.ts +2 -0
  83. package/lib/families/sui/logic.d.ts.map +1 -0
  84. package/lib/families/sui/logic.js +19 -0
  85. package/lib/families/sui/logic.js.map +1 -0
  86. package/lib/families/sui/react.d.ts +8 -0
  87. package/lib/families/sui/react.d.ts.map +1 -0
  88. package/lib/families/sui/react.js +85 -0
  89. package/lib/families/sui/react.js.map +1 -0
  90. package/lib/families/sui/types.d.ts +2 -0
  91. package/lib/families/sui/types.d.ts.map +1 -0
  92. package/lib/families/sui/types.js +19 -0
  93. package/lib/families/sui/types.js.map +1 -0
  94. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  95. package/lib/featureFlags/defaultFeatures.js +1 -0
  96. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  97. package/lib/featureFlags/useFeature.d.ts +1 -1
  98. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  99. package/lib/generated/bridge/js.d.ts +1 -1
  100. package/lib/market/utils/countervalueFormatter.d.ts.map +1 -1
  101. package/lib/market/utils/countervalueFormatter.js.map +1 -1
  102. package/lib/market/utils/types.d.ts +2 -0
  103. package/lib/market/utils/types.d.ts.map +1 -1
  104. package/lib/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  105. package/lib/modularDrawer/__mocks__/currencies.mock.js +7 -7
  106. package/lib/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  107. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
  108. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
  109. package/lib/modularDrawer/data/entities/index.d.ts +68 -0
  110. package/lib/modularDrawer/data/entities/index.d.ts.map +1 -0
  111. package/lib/modularDrawer/data/entities/index.js +3 -0
  112. package/lib/modularDrawer/data/entities/index.js.map +1 -0
  113. package/lib/modularDrawer/data/state-manager/api.d.ts +857 -0
  114. package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -0
  115. package/lib/modularDrawer/data/state-manager/api.js +63 -0
  116. package/lib/modularDrawer/data/state-manager/api.js.map +1 -0
  117. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +5 -0
  118. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +1 -0
  119. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js +176 -0
  120. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -0
  121. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts +19 -0
  122. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
  123. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js +16 -0
  124. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
  125. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +52 -0
  126. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -0
  127. package/lib/modularDrawer/hooks/modules/useLeftApyModule.js +18 -0
  128. package/lib/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -0
  129. package/lib/modularDrawer/hooks/useAssetsData.d.ts +12 -0
  130. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
  131. package/lib/modularDrawer/hooks/useAssetsData.js +50 -0
  132. package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -0
  133. package/lib/modularDrawer/types.d.ts +2 -0
  134. package/lib/modularDrawer/types.d.ts.map +1 -0
  135. package/lib/modularDrawer/types.js +3 -0
  136. package/lib/modularDrawer/types.js.map +1 -0
  137. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +2 -0
  138. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +1 -0
  139. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js +496 -0
  140. package/lib/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +1 -0
  141. package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
  142. package/lib/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
  143. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
  144. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
  145. package/lib/modularDrawer/utils/calculateProviderTotal.d.ts +9 -0
  146. package/lib/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -0
  147. package/lib/modularDrawer/utils/calculateProviderTotal.js +23 -0
  148. package/lib/modularDrawer/utils/calculateProviderTotal.js.map +1 -0
  149. package/lib/modularDrawer/utils/counterValueFormatter.d.ts +14 -0
  150. package/lib/modularDrawer/utils/counterValueFormatter.d.ts.map +1 -0
  151. package/lib/modularDrawer/utils/counterValueFormatter.js +107 -0
  152. package/lib/modularDrawer/utils/counterValueFormatter.js.map +1 -0
  153. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +11 -0
  154. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -0
  155. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +45 -0
  156. package/lib/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -0
  157. package/lib/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
  158. package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
  159. package/lib/modularDrawer/utils/getProviderCurrency.js +14 -0
  160. package/lib/modularDrawer/utils/getProviderCurrency.js.map +1 -0
  161. package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts +11 -0
  162. package/lib/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -0
  163. package/lib/modularDrawer/utils/groupAccountsByAsset.js +32 -0
  164. package/lib/modularDrawer/utils/groupAccountsByAsset.js.map +1 -0
  165. package/lib/modularDrawer/utils/parseToBigNumber.d.ts +9 -0
  166. package/lib/modularDrawer/utils/parseToBigNumber.d.ts.map +1 -0
  167. package/lib/modularDrawer/utils/parseToBigNumber.js +24 -0
  168. package/lib/modularDrawer/utils/parseToBigNumber.js.map +1 -0
  169. package/lib/modularDrawer/utils/type.d.ts +21 -0
  170. package/lib/modularDrawer/utils/type.d.ts.map +1 -0
  171. package/lib/modularDrawer/utils/type.js +3 -0
  172. package/lib/modularDrawer/utils/type.js.map +1 -0
  173. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
  174. package/lib/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  175. package/lib/wallet-api/Exchange/error.d.ts +1 -0
  176. package/lib/wallet-api/Exchange/error.d.ts.map +1 -1
  177. package/lib/wallet-api/Exchange/error.js +11 -1
  178. package/lib/wallet-api/Exchange/error.js.map +1 -1
  179. package/lib/wallet-api/Exchange/server.d.ts +2 -0
  180. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  181. package/lib/wallet-api/Exchange/server.js +29 -5
  182. package/lib/wallet-api/Exchange/server.js.map +1 -1
  183. package/lib/wallet-api/Exchange/server.test.js +3 -0
  184. package/lib/wallet-api/Exchange/server.test.js.map +1 -1
  185. package/lib-es/__tests__/test-helpers/environment.js +2 -0
  186. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  187. package/lib-es/bridge/crypto-assets/index.d.ts +1 -1
  188. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  189. package/lib-es/bridge/crypto-assets/index.js +1 -1
  190. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  191. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  192. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +6 -4
  193. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  194. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  195. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -2
  196. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  197. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  198. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +12 -12
  199. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  200. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  201. package/lib-es/bridge/generic-alpaca/signOperation.js +3 -4
  202. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  203. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +1 -1
  204. package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
  205. package/lib-es/bridge/generic-alpaca/utils.d.ts +0 -1
  206. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  207. package/lib-es/bridge/generic-alpaca/utils.js +0 -1
  208. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  209. package/lib-es/bridge/impl.d.ts +1 -1
  210. package/lib-es/bridge/impl.d.ts.map +1 -1
  211. package/lib-es/currencies/index.d.ts +1 -1
  212. package/lib-es/currencies/index.d.ts.map +1 -1
  213. package/lib-es/currencies/index.js +1 -1
  214. package/lib-es/currencies/index.js.map +1 -1
  215. package/lib-es/currencies/sortByMarketcap.test.js +2 -1
  216. package/lib-es/currencies/sortByMarketcap.test.js.map +1 -1
  217. package/lib-es/domain/getTokensWithFunds.test.js +1 -1
  218. package/lib-es/domain/getTokensWithFunds.test.js.map +1 -1
  219. package/lib-es/e2e/enum/AppInfos.d.ts +1 -1
  220. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  221. package/lib-es/e2e/enum/DeviceLabels.d.ts +3 -2
  222. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  223. package/lib-es/e2e/enum/DeviceLabels.js +2 -1
  224. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  225. package/lib-es/e2e/enum/Provider.d.ts.map +1 -1
  226. package/lib-es/e2e/enum/Provider.js +2 -2
  227. package/lib-es/e2e/enum/Provider.js.map +1 -1
  228. package/lib-es/e2e/families/solana.d.ts.map +1 -1
  229. package/lib-es/e2e/families/solana.js +4 -4
  230. package/lib-es/e2e/families/solana.js.map +1 -1
  231. package/lib-es/e2e/index.d.ts +5 -0
  232. package/lib-es/e2e/index.d.ts.map +1 -1
  233. package/lib-es/e2e/speculos.d.ts.map +1 -1
  234. package/lib-es/e2e/speculos.js +4 -5
  235. package/lib-es/e2e/speculos.js.map +1 -1
  236. package/lib-es/e2e/speculosCI.d.ts +4 -0
  237. package/lib-es/e2e/speculosCI.d.ts.map +1 -1
  238. package/lib-es/e2e/speculosCI.js +14 -5
  239. package/lib-es/e2e/speculosCI.js.map +1 -1
  240. package/lib-es/env.react.d.ts +1 -1
  241. package/lib-es/env.react.d.ts.map +1 -1
  242. package/lib-es/exchange/swap/api/v5/actions.js +1 -1
  243. package/lib-es/exchange/swap/api/v5/actions.js.map +1 -1
  244. package/lib-es/exchange/swap/types.d.ts +1 -1
  245. package/lib-es/exchange/swap/types.d.ts.map +1 -1
  246. package/lib-es/families/canton/config.d.ts.map +1 -1
  247. package/lib-es/families/canton/config.js +35 -1
  248. package/lib-es/families/canton/config.js.map +1 -1
  249. package/lib-es/families/evm/setup.d.ts.map +1 -1
  250. package/lib-es/families/evm/setup.js +11 -1
  251. package/lib-es/families/evm/setup.js.map +1 -1
  252. package/lib-es/families/hedera/constants.d.ts +2 -0
  253. package/lib-es/families/hedera/constants.d.ts.map +1 -0
  254. package/lib-es/families/hedera/constants.js +3 -0
  255. package/lib-es/families/hedera/constants.js.map +1 -0
  256. package/lib-es/families/hedera/setup.d.ts +5 -5
  257. package/lib-es/families/hedera/setup.d.ts.map +1 -1
  258. package/lib-es/families/hedera/setup.js.map +1 -1
  259. package/lib-es/families/solana/setup.d.ts.map +1 -1
  260. package/lib-es/families/solana/setup.js +2 -1
  261. package/lib-es/families/solana/setup.js.map +1 -1
  262. package/lib-es/families/sui/constants.d.ts +2 -0
  263. package/lib-es/families/sui/constants.d.ts.map +1 -0
  264. package/lib-es/families/sui/constants.js +3 -0
  265. package/lib-es/families/sui/constants.js.map +1 -0
  266. package/lib-es/families/sui/logic.d.ts +2 -0
  267. package/lib-es/families/sui/logic.d.ts.map +1 -0
  268. package/lib-es/families/sui/logic.js +3 -0
  269. package/lib-es/families/sui/logic.js.map +1 -0
  270. package/lib-es/families/sui/react.d.ts +8 -0
  271. package/lib-es/families/sui/react.d.ts.map +1 -0
  272. package/lib-es/families/sui/react.js +78 -0
  273. package/lib-es/families/sui/react.js.map +1 -0
  274. package/lib-es/families/sui/types.d.ts +2 -0
  275. package/lib-es/families/sui/types.d.ts.map +1 -0
  276. package/lib-es/families/sui/types.js +3 -0
  277. package/lib-es/families/sui/types.js.map +1 -0
  278. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  279. package/lib-es/featureFlags/defaultFeatures.js +1 -0
  280. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  281. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  282. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  283. package/lib-es/generated/bridge/js.d.ts +1 -1
  284. package/lib-es/market/utils/countervalueFormatter.d.ts.map +1 -1
  285. package/lib-es/market/utils/countervalueFormatter.js.map +1 -1
  286. package/lib-es/market/utils/types.d.ts +2 -0
  287. package/lib-es/market/utils/types.d.ts.map +1 -1
  288. package/lib-es/modularDrawer/__mocks__/currencies.mock.d.ts.map +1 -1
  289. package/lib-es/modularDrawer/__mocks__/currencies.mock.js +1 -1
  290. package/lib-es/modularDrawer/__mocks__/currencies.mock.js.map +1 -1
  291. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +1 -1
  292. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +1 -1
  293. package/lib-es/modularDrawer/data/entities/index.d.ts +68 -0
  294. package/lib-es/modularDrawer/data/entities/index.d.ts.map +1 -0
  295. package/lib-es/modularDrawer/data/entities/index.js +2 -0
  296. package/lib-es/modularDrawer/data/entities/index.js.map +1 -0
  297. package/lib-es/modularDrawer/data/state-manager/api.d.ts +857 -0
  298. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -0
  299. package/lib-es/modularDrawer/data/state-manager/api.js +60 -0
  300. package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -0
  301. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts +5 -0
  302. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.d.ts.map +1 -0
  303. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js +174 -0
  304. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -0
  305. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts +19 -0
  306. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +1 -0
  307. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js +12 -0
  308. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +1 -0
  309. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +52 -0
  310. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -0
  311. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js +11 -0
  312. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -0
  313. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +12 -0
  314. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -0
  315. package/lib-es/modularDrawer/hooks/useAssetsData.js +46 -0
  316. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -0
  317. package/lib-es/modularDrawer/types.d.ts +2 -0
  318. package/lib-es/modularDrawer/types.d.ts.map +1 -0
  319. package/lib-es/modularDrawer/types.js +2 -0
  320. package/lib-es/modularDrawer/types.js.map +1 -0
  321. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts +2 -0
  322. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.d.ts.map +1 -0
  323. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js +494 -0
  324. package/lib-es/modularDrawer/utils/__tests__/counterValueFormatter.test.js.map +1 -0
  325. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
  326. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
  327. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +1 -1
  328. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -1
  329. package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts +9 -0
  330. package/lib-es/modularDrawer/utils/calculateProviderTotal.d.ts.map +1 -0
  331. package/lib-es/modularDrawer/utils/calculateProviderTotal.js +16 -0
  332. package/lib-es/modularDrawer/utils/calculateProviderTotal.js.map +1 -0
  333. package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts +14 -0
  334. package/lib-es/modularDrawer/utils/counterValueFormatter.d.ts.map +1 -0
  335. package/lib-es/modularDrawer/utils/counterValueFormatter.js +103 -0
  336. package/lib-es/modularDrawer/utils/counterValueFormatter.js.map +1 -0
  337. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts +11 -0
  338. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.d.ts.map +1 -0
  339. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js +41 -0
  340. package/lib-es/modularDrawer/utils/getBalanceAndFiatValueByAssets.js.map +1 -0
  341. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
  342. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
  343. package/lib-es/modularDrawer/utils/getProviderCurrency.js +10 -0
  344. package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +1 -0
  345. package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts +11 -0
  346. package/lib-es/modularDrawer/utils/groupAccountsByAsset.d.ts.map +1 -0
  347. package/lib-es/modularDrawer/utils/groupAccountsByAsset.js +25 -0
  348. package/lib-es/modularDrawer/utils/groupAccountsByAsset.js.map +1 -0
  349. package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts +9 -0
  350. package/lib-es/modularDrawer/utils/parseToBigNumber.d.ts.map +1 -0
  351. package/lib-es/modularDrawer/utils/parseToBigNumber.js +17 -0
  352. package/lib-es/modularDrawer/utils/parseToBigNumber.js.map +1 -0
  353. package/lib-es/modularDrawer/utils/type.d.ts +21 -0
  354. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -0
  355. package/lib-es/modularDrawer/utils/type.js +2 -0
  356. package/lib-es/modularDrawer/utils/type.js.map +1 -0
  357. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js +1 -1
  358. package/lib-es/utils/__tests__/getAccountTuplesForCurrency.test.js.map +1 -1
  359. package/lib-es/wallet-api/Exchange/error.d.ts +1 -0
  360. package/lib-es/wallet-api/Exchange/error.d.ts.map +1 -1
  361. package/lib-es/wallet-api/Exchange/error.js +9 -0
  362. package/lib-es/wallet-api/Exchange/error.js.map +1 -1
  363. package/lib-es/wallet-api/Exchange/server.d.ts +2 -0
  364. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  365. package/lib-es/wallet-api/Exchange/server.js +30 -6
  366. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  367. package/lib-es/wallet-api/Exchange/server.test.js +3 -0
  368. package/lib-es/wallet-api/Exchange/server.test.js.map +1 -1
  369. package/package.json +68 -66
  370. package/src/DataModel.test.ts +1 -1
  371. package/src/__tests__/accounts/groupPerDay.ts +1 -1
  372. package/src/__tests__/test-helpers/environment.ts +2 -0
  373. package/src/__tests__/test-helpers/setup.ts +1 -1
  374. package/src/account/serialization.test.ts +1 -1
  375. package/src/bridge/crypto-assets/index.test.ts +1 -1
  376. package/src/bridge/crypto-assets/index.ts +3 -2
  377. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +11 -5
  378. package/src/bridge/generic-alpaca/getTransactionStatus.ts +2 -1
  379. package/src/bridge/generic-alpaca/prepareTransaction.ts +20 -16
  380. package/src/bridge/generic-alpaca/signOperation.ts +3 -2
  381. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +1 -1
  382. package/src/bridge/generic-alpaca/utils.ts +0 -2
  383. package/src/bridge/impl.ts +1 -1
  384. package/src/currencies/index.ts +0 -1
  385. package/src/currencies/sortByMarketcap.test.ts +3 -2
  386. package/src/domain/getTokensWithFunds.test.ts +1 -1
  387. package/src/e2e/enum/AppInfos.ts +1 -1
  388. package/src/e2e/enum/DeviceLabels.ts +2 -1
  389. package/src/e2e/enum/Provider.ts +2 -2
  390. package/src/e2e/families/solana.ts +7 -4
  391. package/src/e2e/speculos.ts +4 -5
  392. package/src/e2e/speculosCI.ts +18 -6
  393. package/src/exchange/swap/api/v5/actions.ts +1 -1
  394. package/src/exchange/swap/types.ts +1 -1
  395. package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +7 -0
  396. package/src/families/bitcoin/satstack.test.ts +1 -1
  397. package/src/families/canton/config.ts +36 -1
  398. package/src/families/evm/setup.ts +12 -1
  399. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +464 -1135
  400. package/src/families/hedera/constants.ts +2 -0
  401. package/src/families/hedera/setup.ts +7 -3
  402. package/src/families/solana/setup.ts +2 -0
  403. package/src/families/sui/__snapshots__/bridge.integration.test.ts.snap +3 -1
  404. package/src/families/sui/constants.ts +2 -0
  405. package/src/families/sui/logic.ts +2 -0
  406. package/src/families/sui/react.ts +115 -0
  407. package/src/families/sui/types.ts +2 -0
  408. package/src/families/tron/data.mock.ts +1 -1
  409. package/src/featureFlags/defaultFeatures.ts +1 -0
  410. package/src/market/utils/countervalueFormatter.ts +0 -1
  411. package/src/market/utils/types.ts +4 -0
  412. package/src/modularDrawer/__mocks__/currencies.mock.ts +1 -1
  413. package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +1 -1
  414. package/src/modularDrawer/data/entities/index.ts +79 -0
  415. package/src/modularDrawer/data/state-manager/api.ts +83 -0
  416. package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +200 -0
  417. package/src/modularDrawer/hooks/modules/useAssetAccountCounts.tsx +36 -0
  418. package/src/modularDrawer/hooks/modules/useLeftApyModule.tsx +26 -0
  419. package/src/modularDrawer/hooks/useAssetsData.ts +59 -0
  420. package/src/modularDrawer/types.ts +1 -0
  421. package/src/modularDrawer/utils/__tests__/counterValueFormatter.test.ts +549 -0
  422. package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
  423. package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +2 -2
  424. package/src/modularDrawer/utils/calculateProviderTotal.ts +23 -0
  425. package/src/modularDrawer/utils/counterValueFormatter.ts +165 -0
  426. package/src/modularDrawer/utils/getBalanceAndFiatValueByAssets.ts +76 -0
  427. package/src/modularDrawer/utils/getProviderCurrency.ts +13 -0
  428. package/src/modularDrawer/utils/groupAccountsByAsset.ts +51 -0
  429. package/src/modularDrawer/utils/parseToBigNumber.ts +17 -0
  430. package/src/modularDrawer/utils/type.ts +22 -0
  431. package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +1 -1
  432. package/src/wallet-api/Exchange/error.ts +10 -0
  433. package/src/wallet-api/Exchange/server.test.ts +5 -1
  434. package/src/wallet-api/Exchange/server.ts +44 -5
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",
4
+ "version": "34.47.0-nightly.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/LedgerHQ/ledger-live.git"
@@ -111,7 +111,8 @@
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
- "@stellar/stellar-sdk": "^11.3.0",
114
+ "@reduxjs/toolkit": "2.8.2",
115
+ "@stellar/stellar-sdk": "^14.0.0",
115
116
  "@stricahq/typhonjs": "^3.0.0",
116
117
  "@taquito/ledger-signer": "^22.0.0",
117
118
  "@ton-community/ton-ledger": "^7.2.0",
@@ -129,7 +130,7 @@
129
130
  "@zondax/ledger-mina-js": "0.0.2",
130
131
  "@zondax/ledger-stacks": "^1.0.2",
131
132
  "async": "^3.2.3",
132
- "axios": "1.7.7",
133
+ "axios": "1.11.0",
133
134
  "bech32": "^1.1.3",
134
135
  "bignumber.js": "^9.1.2",
135
136
  "bip32": "^2.0.6",
@@ -138,6 +139,7 @@
138
139
  "date-fns": "^2.23.0",
139
140
  "expect": "^27.4.6",
140
141
  "fuse.js": "^6.6.2",
142
+ "i18next": "20.6.1",
141
143
  "invariant": "^2.2.2",
142
144
  "isomorphic-ws": "^4.0.1",
143
145
  "jotai": "2.12.4",
@@ -163,76 +165,76 @@
163
165
  "xstate": "^5.19.2",
164
166
  "yargs": "^17.0.0",
165
167
  "zod": "^3.22.4",
166
- "@ledgerhq/coin-algorand": "^0.9.18",
167
- "@ledgerhq/coin-aptos": "^3.1.1",
168
- "@ledgerhq/coin-bitcoin": "^0.20.2",
169
- "@ledgerhq/coin-canton": "^0.3.0",
170
- "@ledgerhq/coin-cardano": "^0.11.2",
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-icon": "^0.11.5",
179
- "@ledgerhq/coin-internet_computer": "^1.7.18",
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-stellar": "^6.2.0",
187
- "@ledgerhq/coin-sui": "^0.11.0",
188
- "@ledgerhq/coin-tezos": "^6.2.0",
189
- "@ledgerhq/coin-ton": "^0.13.7",
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",
168
+ "@ledgerhq/coin-algorand": "^0.9.19-nightly.0",
169
+ "@ledgerhq/coin-aptos": "^3.1.2-nightly.0",
170
+ "@ledgerhq/coin-bitcoin": "^0.20.3-nightly.0",
171
+ "@ledgerhq/coin-canton": "^0.4.0-nightly.0",
172
+ "@ledgerhq/coin-cardano": "^0.11.3-nightly.0",
173
+ "@ledgerhq/coin-casper": "^2.0.10-nightly.0",
174
+ "@ledgerhq/coin-celo": "^1.2.2-nightly.0",
175
+ "@ledgerhq/coin-cosmos": "^0.16.8-nightly.0",
176
+ "@ledgerhq/coin-evm": "^2.29.0-nightly.0",
177
+ "@ledgerhq/coin-filecoin": "^1.10.2-nightly.0",
178
+ "@ledgerhq/coin-framework": "^6.2.1-nightly.0",
179
+ "@ledgerhq/coin-hedera": "^1.10.2-nightly.0",
180
+ "@ledgerhq/coin-icon": "^0.11.6-nightly.0",
181
+ "@ledgerhq/coin-internet_computer": "^1.7.19-nightly.0",
182
+ "@ledgerhq/coin-mina": "^1.1.18-nightly.0",
183
+ "@ledgerhq/coin-multiversx": "^0.4.19-nightly.0",
184
+ "@ledgerhq/coin-near": "^0.12.2-nightly.0",
185
+ "@ledgerhq/coin-polkadot": "^6.8.1-nightly.0",
186
+ "@ledgerhq/coin-solana": "^0.31.2-nightly.0",
187
+ "@ledgerhq/coin-stacks": "^0.8.19-nightly.0",
188
+ "@ledgerhq/coin-stellar": "^6.3.0-nightly.0",
189
+ "@ledgerhq/coin-sui": "^0.12.0-nightly.1",
190
+ "@ledgerhq/coin-tezos": "^6.2.1-nightly.0",
191
+ "@ledgerhq/coin-ton": "^0.13.8-nightly.1",
192
+ "@ledgerhq/coin-tron": "^5.3.0-nightly.1",
193
+ "@ledgerhq/coin-vechain": "^2.8.3-nightly.0",
194
+ "@ledgerhq/coin-xrp": "^7.2.1-nightly.0",
195
+ "@ledgerhq/crypto-icons-ui": "^1.18.0-nightly.0",
196
+ "@ledgerhq/cryptoassets": "^13.27.0-nightly.0",
195
197
  "@ledgerhq/device-core": "^0.6.1",
196
- "@ledgerhq/devices": "8.5.0",
197
- "@ledgerhq/errors": "^6.24.0",
198
- "@ledgerhq/hw-app-algorand": "^6.31.5",
199
- "@ledgerhq/hw-app-aptos": "^6.34.5",
200
- "@ledgerhq/hw-app-btc": "^10.10.1",
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",
201
203
  "@ledgerhq/hw-app-celo": "^6.34.1",
202
- "@ledgerhq/hw-app-cosmos": "^6.32.5",
204
+ "@ledgerhq/hw-app-cosmos": "^6.32.6-nightly.0",
203
205
  "@ledgerhq/hw-app-eth": "^6.45.16",
204
206
  "@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-app-xrp": "^6.32.3",
216
- "@ledgerhq/hw-transport": "^6.31.9",
217
- "@ledgerhq/hw-transport-mocker": "^6.29.9",
218
- "@ledgerhq/ledger-cal-service": "^1.3.0",
219
- "@ledgerhq/live-config": "^3.1.0",
220
- "@ledgerhq/live-countervalues": "^0.6.2",
221
- "@ledgerhq/live-countervalues-react": "^0.5.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.4.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.15-nightly.0",
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.4.0-nightly.2",
221
+ "@ledgerhq/live-config": "^3.2.0-nightly.0",
222
+ "@ledgerhq/live-countervalues": "^0.6.3-nightly.0",
223
+ "@ledgerhq/live-countervalues-react": "^0.6.0-nightly.0",
222
224
  "@ledgerhq/live-dmk-shared": "^0.12.1",
223
- "@ledgerhq/live-env": "^2.14.0",
225
+ "@ledgerhq/live-env": "^2.15.0-nightly.1",
224
226
  "@ledgerhq/live-hooks": "0.1.0",
225
- "@ledgerhq/live-network": "^2.0.15",
226
- "@ledgerhq/live-nft": "^0.8.18",
227
+ "@ledgerhq/live-network": "^2.0.16-nightly.1",
228
+ "@ledgerhq/live-nft": "^0.8.19-nightly.0",
227
229
  "@ledgerhq/live-promise": "^0.1.1",
228
- "@ledgerhq/live-signer-evm": "^0.7.1",
229
- "@ledgerhq/live-signer-solana": "^0.5.3",
230
- "@ledgerhq/live-signer-canton": "^0.2.2",
231
- "@ledgerhq/live-wallet": "^0.12.2",
230
+ "@ledgerhq/live-signer-canton": "^0.2.3-nightly.1",
231
+ "@ledgerhq/live-signer-evm": "^0.7.2-nightly.0",
232
+ "@ledgerhq/live-signer-solana": "^0.5.4-nightly.0",
233
+ "@ledgerhq/live-wallet": "^0.12.3-nightly.0",
232
234
  "@ledgerhq/logs": "^6.13.0",
233
- "@ledgerhq/speculos-transport": "^0.2.8",
235
+ "@ledgerhq/speculos-transport": "^0.2.9-nightly.1",
234
236
  "@ledgerhq/wallet-api-acre-module": "^0.6.0",
235
- "@ledgerhq/wallet-api-exchange-module": "^0.15.0"
237
+ "@ledgerhq/wallet-api-exchange-module": "^0.16.0-nightly.1"
236
238
  },
237
239
  "devDependencies": {
238
240
  "@solana/web3.js": "1.95.4",
@@ -281,7 +283,7 @@
281
283
  "uuid": "^8.3.2",
282
284
  "ws": "7",
283
285
  "@ledgerhq/device-react": "^0.2.42",
284
- "@ledgerhq/types-cryptoassets": "^7.25.0",
286
+ "@ledgerhq/types-cryptoassets": "^7.26.0-nightly.1",
285
287
  "@ledgerhq/types-devices": "^6.27.0",
286
288
  "@ledgerhq/types-live": "^6.82.0"
287
289
  },
@@ -305,6 +307,6 @@
305
307
  "test-bridge-update": "UPDATE_BACKEND_MOCKS=1 env-cmd -f .ci.integration.env pnpm jest --ci --updateSnapshot --passWithNoTests",
306
308
  "test-account-migration": "tsx src/__tests__/migration/account-migration.ts",
307
309
  "unimported": "unimported",
308
- "coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot && git diff --exit-code src"
310
+ "coverage": "env-cmd -f .ci.unit.env pnpm jest --coverage --ci --updateSnapshot"
309
311
  }
310
312
  }
@@ -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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
10
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
5
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
6
6
  import { setup } from "../../bridge/impl";
7
7
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
8
8
  setSupportedCurrencies(["tezos"]);
@@ -117,6 +117,8 @@ setSupportedCurrencies([
117
117
  "mina",
118
118
  "babylon",
119
119
  "canton_network",
120
+ "canton_network_devnet",
121
+ "canton_network_localnet",
120
122
  ]);
121
123
  LiveConfig.setConfig(liveConfig);
122
124
 
@@ -1,5 +1,5 @@
1
1
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
2
- import { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
2
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
7
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
4
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
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";
3
2
  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,7 +17,8 @@ export function setCryptoAssetsStore(store: CryptoAssetsStore) {
17
17
  }
18
18
 
19
19
  export function getCryptoAssetsStore(): CryptoAssetsStore {
20
- const featureEnabled = LiveConfig.getValueByKey("feature_cal_lazy_loading");
20
+ const featureEnabled =
21
+ LiveConfig.isConfigSet() && LiveConfig.getValueByKey("feature_cal_lazy_loading");
21
22
  if (!featureEnabled) {
22
23
  return legacyStore;
23
24
  }
@@ -19,18 +19,24 @@ export function genericEstimateMaxSpendable(
19
19
  ...transaction,
20
20
  amount: mainAccount.spendableBalance,
21
21
  useAllAmount: true,
22
- fees: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n,
23
22
  };
24
- const fees = await getAlpacaApi(network, kind).estimateFees(
25
- transactionToIntent(mainAccount, draftTransaction),
26
- );
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
+ }
27
32
  const { amount } = await getAlpacaApi(network, kind).validateIntent(
28
33
  transactionToIntent(account, { ...draftTransaction }),
34
+ { value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
29
35
  );
30
36
  if (network === "stellar") {
31
37
  return amount > 0 ? new BigNumber(amount.toString()) : new BigNumber(0);
32
38
  }
33
- const bnFee = BigNumber(fees.value.toString());
39
+ const bnFee = BigNumber(fees.toString());
34
40
  return BigNumber.max(0, account.spendableBalance.minus(bnFee));
35
41
  };
36
42
  }
@@ -3,6 +3,7 @@ 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";
6
7
 
7
8
  // => alpaca validateIntent
8
9
  export function genericGetTransactionStatus(
@@ -26,7 +27,6 @@ export function genericGetTransactionStatus(
26
27
  mode: transaction?.mode,
27
28
  recipient: transaction.recipient,
28
29
  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,6 +46,7 @@ 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 },
49
50
  );
50
51
 
51
52
  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 { NetworkInfo } from "./createTransaction";
5
+ import { FeeEstimation } from "@ledgerhq/coin-framework/api/types";
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,31 +16,35 @@ export function genericPrepareTransaction(
16
16
  account,
17
17
  transaction: TransactionCommon & {
18
18
  fees: BigNumber | null | undefined;
19
+ customFees?: FeeEstimation;
19
20
  assetReference?: string;
20
21
  assetOwner?: string;
21
22
  subAccountId?: string;
22
- networkInfo?: NetworkInfo | null;
23
23
  },
24
24
  ) => {
25
25
  const [assetReference, assetOwner] = getAssetInfos(transaction);
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()))) {
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()))) {
37
39
  return {
38
40
  ...transaction,
39
- fees: new BigNumber(fees.value.toString()),
41
+ fees: new BigNumber(fees.toString()),
40
42
  assetReference,
41
43
  assetOwner,
42
- networkInfo: {
43
- fees: new BigNumber(fees.value.toString()),
44
+ customFees: {
45
+ parameters: {
46
+ fees: new BigNumber(fees.toString()),
47
+ },
44
48
  },
45
49
  };
46
50
  }
@@ -95,7 +95,6 @@ export const genericSignOperation =
95
95
  const draftTransaction = {
96
96
  recipient: transaction.recipient,
97
97
  amount: transaction.amount ?? 0,
98
- fees: fees,
99
98
  useAllAmount: !!transaction.useAllAmount,
100
99
  assetReference: transaction?.["assetReference"] || "",
101
100
  assetOwner: transaction?.["assetOwner"] || "",
@@ -103,6 +102,7 @@ export const genericSignOperation =
103
102
  };
104
103
  const { amount } = await getAlpacaApi(network, kind).validateIntent(
105
104
  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, fees });
113
+ let transactionIntent = transactionToIntent(account, { ...transaction });
114
114
  transactionIntent.senderPublicKey = publicKey;
115
115
 
116
116
  // Enrich with memo and asset information
@@ -125,6 +125,7 @@ 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 },
128
129
  );
129
130
 
130
131
  /* 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, fees: 500n }),
50
+ expect.objectContaining(baseTransaction),
51
51
  );
52
52
  });
53
53
 
@@ -94,7 +94,6 @@ export function transactionToIntent(
94
94
  assetOwner?: string;
95
95
  assetReference?: string;
96
96
  mode?: string;
97
- fees?: bigint | null | undefined;
98
97
  memoType?: string;
99
98
  memoValue?: string;
100
99
  useAllAmount?: boolean;
@@ -114,7 +113,6 @@ export function transactionToIntent(
114
113
  }
115
114
  }
116
115
  const res: TransactionIntent & { memo?: { type: string; value?: string } } = {
117
- fees: transaction?.fees ? transaction.fees : null,
118
116
  type: transactionType,
119
117
  sender: account.freshAddress,
120
118
  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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
23
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
24
24
  import { setCryptoAssetsStore as setCryptoAssetsStoreForCoinFramework } from "@ledgerhq/coin-framework/crypto-assets/index";
25
25
  import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
26
26
 
@@ -28,7 +28,6 @@ export {
28
28
  sanitizeValueString,
29
29
  formatCurrencyUnit,
30
30
  type formatCurrencyUnitOptions,
31
- findCurrencyByTicker,
32
31
  parseCurrencyUnit,
33
32
  toLocaleString,
34
33
  isCurrencySupported,
@@ -1,9 +1,10 @@
1
1
  import { sortCurrenciesByIds } from "./sortByMarketcap";
2
- import { findCurrencyByTicker, listCryptoCurrencies, listTokens } from ".";
2
+ import { 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 { CryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/type";
6
+ import type { CryptoAssetsStore } from "@ledgerhq/types-live";
7
+ import { findCurrencyByTicker } from "@ledgerhq/live-countervalues/findCurrencyByTicker";
7
8
 
8
9
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
9
10
  setCryptoAssetsStoreForCoinFramework({
@@ -1,5 +1,5 @@
1
1
  import { genAccount } from "@ledgerhq/coin-framework/lib/mocks/account";
2
- import { getCryptoCurrencyById } from "@ledgerhq/live-common/currencies/index";
2
+ import { getCryptoCurrencyById } from "../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 AppInfosType = AppInfos;
1
+ export type SpeculosAppType = AppInfos;
2
2
 
3
3
  export class AppInfos {
4
4
  constructor(public readonly name: string) {}
@@ -8,7 +8,6 @@ export enum DeviceLabels {
8
8
  ACCEPT = "Accept",
9
9
  TRANSFER = "Transfer",
10
10
  RECIPIENT = "Recipient",
11
- PUBKEY = "Pubkey",
12
11
  DEST = "Dest",
13
12
  CAPS_APPROVE = "APPROVE",
14
13
  CAPS_REJECT = "REJECT",
@@ -53,4 +52,6 @@ export enum DeviceLabels {
53
52
  VERIFY_BSC = "Verify BSC",
54
53
  SIGN_TRANSACTION = "Sign transaction",
55
54
  VERIFY_POLYGON = "Verify Polygon",
55
+ VERIFY_SOLANA_ADDRESS = "Verify Solana address",
56
+ REVIEW_TRANSACTION = "Review transaction",
56
57
  }
@@ -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", "Kiln staking Pool", false, true, true);
20
- static readonly STADER_LABS = new Provider("stader", "Stader Labs", 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);
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,17 +5,20 @@ import { Device } from "../enum/Device";
5
5
  import { Transaction } from "../models/Transaction";
6
6
 
7
7
  export async function delegateSolana() {
8
- await waitFor(DeviceLabels.DELEGATE_FROM);
9
- await pressUntilTextFound(DeviceLabels.APPROVE);
8
+ await waitFor(DeviceLabels.REVIEW_TRANSACTION);
9
+ await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
10
10
  await pressBoth();
11
11
  }
12
12
 
13
13
  export async function sendSolana(tx: Transaction) {
14
- const events = await pressUntilTextFound(DeviceLabels.APPROVE);
14
+ const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
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(tx.accountToCredit.address, events);
18
+ const isAddressCorrect = containsSubstringInEvent(
19
+ tx.accountToCredit.parentAccount?.address ?? tx.accountToCredit.address,
20
+ events,
21
+ );
19
22
  expect(isAddressCorrect).toBeTruthy();
20
23
  }
21
24
 
@@ -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 "../e2e/enum/DeviceLabels";
17
+ import { DeviceLabels } from "./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,13 +385,12 @@ export async function startSpeculos(
385
385
  onSpeculosDeviceCreated,
386
386
  };
387
387
  try {
388
- const device = isSpeculosRemote
388
+ return 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;
395
394
  } catch (e: unknown) {
396
395
  console.error(e);
397
396
  log("engine", `test ${testName} failed with ${String(e)}`);
@@ -622,7 +621,7 @@ const APP_LABEL_MAP = new Map<AppInfos, [string, string]>([
622
621
  [AppInfos.ETHEREUM, [DeviceLabels.VERIFY_ETHEREUM, DeviceLabels.CONFIRM]],
623
622
  [AppInfos.BNB_CHAIN, [DeviceLabels.VERIFY_BSC, DeviceLabels.CONFIRM]],
624
623
  [AppInfos.POLYGON, [DeviceLabels.VERIFY_POLYGON, DeviceLabels.CONFIRM]],
625
- [AppInfos.SOLANA, [DeviceLabels.PUBKEY, DeviceLabels.APPROVE]],
624
+ [AppInfos.SOLANA, [DeviceLabels.VERIFY_SOLANA_ADDRESS, DeviceLabels.CONFIRM]],
626
625
  [AppInfos.POLKADOT, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
627
626
  [AppInfos.COSMOS, [DeviceLabels.PLEASE_REVIEW, DeviceLabels.CAPS_APPROVE]],
628
627
  [AppInfos.BITCOIN, [DeviceLabels.ADDRESS, DeviceLabels.CONFIRM]],