@ledgerhq/live-common 34.54.0-nightly.20251209023841 → 34.54.0

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 (553) hide show
  1. package/lib/__tests__/test-helpers/bridge.js +1 -1
  2. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  3. package/lib/__tests__/test-helpers/environment.js +0 -1
  4. package/lib/__tests__/test-helpers/environment.js.map +1 -1
  5. package/lib/account/index.d.ts +0 -1
  6. package/lib/account/index.d.ts.map +1 -1
  7. package/lib/account/index.js +1 -4
  8. package/lib/account/index.js.map +1 -1
  9. package/lib/account/serialization.js +1 -1
  10. package/lib/account/serialization.js.map +1 -1
  11. package/lib/account/support.js +1 -1
  12. package/lib/account/support.js.map +1 -1
  13. package/lib/bridge/generic-alpaca/accountBridge.d.ts +1 -1
  14. package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  15. package/lib/bridge/generic-alpaca/accountBridge.js +1 -2
  16. package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
  17. package/lib/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  18. package/lib/bridge/generic-alpaca/broadcast.js +3 -3
  19. package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
  20. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  21. package/lib/bridge/generic-alpaca/currencyBridge.js +3 -3
  22. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  23. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  24. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +1 -2
  25. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  26. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  27. package/lib/bridge/generic-alpaca/getAccountShape.js +7 -16
  28. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  29. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  30. package/lib/bridge/generic-alpaca/getTransactionStatus.js +1 -16
  31. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  32. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  33. package/lib/bridge/generic-alpaca/prepareTransaction.js +4 -38
  34. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  35. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/signOperation.js +2 -18
  37. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  38. package/lib/bridge/generic-alpaca/signer/Eth.d.ts +0 -2
  39. package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
  40. package/lib/bridge/generic-alpaca/signer/Eth.js +1 -8
  41. package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -1
  42. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  43. package/lib/bridge/generic-alpaca/signer/index.js +0 -7
  44. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  45. package/lib/bridge/generic-alpaca/types.d.ts +0 -4
  46. package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
  47. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  48. package/lib/bridge/generic-alpaca/utils.js +3 -12
  49. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  50. package/lib/bridge/impl.d.ts.map +1 -1
  51. package/lib/bridge/impl.js +3 -14
  52. package/lib/bridge/impl.js.map +1 -1
  53. package/lib/currencies/cryptoIcons.d.ts +3 -0
  54. package/lib/currencies/cryptoIcons.d.ts.map +1 -0
  55. package/lib/currencies/cryptoIcons.js +24 -0
  56. package/lib/currencies/cryptoIcons.js.map +1 -0
  57. package/lib/currencies/helpers.d.ts +0 -1
  58. package/lib/currencies/helpers.d.ts.map +1 -1
  59. package/lib/currencies/helpers.js +1 -7
  60. package/lib/currencies/helpers.js.map +1 -1
  61. package/lib/domain/getTokensWithFunds.d.ts +1 -7
  62. package/lib/domain/getTokensWithFunds.d.ts.map +1 -1
  63. package/lib/domain/getTokensWithFunds.js +4 -15
  64. package/lib/domain/getTokensWithFunds.js.map +1 -1
  65. package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
  66. package/lib/e2e/data/deviceLabelsData.js +0 -1
  67. package/lib/e2e/data/deviceLabelsData.js.map +1 -1
  68. package/lib/e2e/enum/Device.d.ts +0 -1
  69. package/lib/e2e/enum/Device.d.ts.map +1 -1
  70. package/lib/e2e/enum/Device.js +0 -1
  71. package/lib/e2e/enum/Device.js.map +1 -1
  72. package/lib/e2e/families/cardano.d.ts.map +1 -1
  73. package/lib/e2e/families/cardano.js +14 -29
  74. package/lib/e2e/families/cardano.js.map +1 -1
  75. package/lib/e2e/index.d.ts +3 -26
  76. package/lib/e2e/index.d.ts.map +1 -1
  77. package/lib/e2e/index.js +1 -21
  78. package/lib/e2e/index.js.map +1 -1
  79. package/lib/e2e/speculos.d.ts.map +1 -1
  80. package/lib/e2e/speculos.js +4 -31
  81. package/lib/e2e/speculos.js.map +1 -1
  82. package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
  83. package/lib/e2e/speculosAppVersion.js +2 -6
  84. package/lib/e2e/speculosAppVersion.js.map +1 -1
  85. package/lib/e2e/swap.d.ts.map +1 -1
  86. package/lib/e2e/swap.js +6 -7
  87. package/lib/e2e/swap.js.map +1 -1
  88. package/lib/env.react.d.ts +1 -1
  89. package/lib/env.react.d.ts.map +1 -1
  90. package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js +1 -1
  91. package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
  92. package/lib/exchange/swap/postSwapState.d.ts.map +1 -1
  93. package/lib/exchange/swap/postSwapState.js +6 -10
  94. package/lib/exchange/swap/postSwapState.js.map +1 -1
  95. package/lib/exchange/swap/types.d.ts +1 -3
  96. package/lib/exchange/swap/types.d.ts.map +1 -1
  97. package/lib/families/bitcoin/walletApiAdapter.d.ts.map +1 -1
  98. package/lib/families/bitcoin/walletApiAdapter.js +0 -3
  99. package/lib/families/bitcoin/walletApiAdapter.js.map +1 -1
  100. package/lib/families/canton/config.d.ts.map +1 -1
  101. package/lib/families/canton/config.js +4 -4
  102. package/lib/families/canton/config.js.map +1 -1
  103. package/lib/families/canton/react.d.ts +0 -2
  104. package/lib/families/canton/react.d.ts.map +1 -1
  105. package/lib/families/canton/react.js +1 -40
  106. package/lib/families/canton/react.js.map +1 -1
  107. package/lib/families/celo/setup.d.ts.map +1 -1
  108. package/lib/families/celo/setup.js +0 -11
  109. package/lib/families/celo/setup.js.map +1 -1
  110. package/lib/families/evm/bridge/mock.d.ts +0 -1
  111. package/lib/families/evm/bridge/mock.d.ts.map +1 -1
  112. package/lib/families/evm/bridge/mock.js +0 -12
  113. package/lib/families/evm/bridge/mock.js.map +1 -1
  114. package/lib/families/evm/setup.d.ts +4 -1
  115. package/lib/families/evm/setup.d.ts.map +1 -1
  116. package/lib/families/evm/setup.js +8 -1
  117. package/lib/families/evm/setup.js.map +1 -1
  118. package/lib/families/evm/walletApiAdapter.d.ts +0 -7
  119. package/lib/families/evm/walletApiAdapter.d.ts.map +1 -1
  120. package/lib/families/evm/walletApiAdapter.js +2 -36
  121. package/lib/families/evm/walletApiAdapter.js.map +1 -1
  122. package/lib/families/polkadot/config.js +1 -1
  123. package/lib/families/polkadot/config.js.map +1 -1
  124. package/lib/families/stacks/constants.d.ts +1 -1
  125. package/lib/families/stacks/constants.d.ts.map +1 -1
  126. package/lib/families/stacks/constants.js +1 -1
  127. package/lib/families/stacks/constants.js.map +1 -1
  128. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  129. package/lib/featureFlags/defaultFeatures.js +1 -19
  130. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  131. package/lib/featureFlags/firebaseFeatureFlags.js +1 -1
  132. package/lib/featureFlags/firebaseFeatureFlags.js.map +1 -1
  133. package/lib/featureFlags/stakePrograms/index.js +4 -4
  134. package/lib/featureFlags/stakePrograms/index.js.map +1 -1
  135. package/lib/featureFlags/useFeature.d.ts +1 -1
  136. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  137. package/lib/featureFlags/useHasOverriddenFeatureFlags.js +1 -1
  138. package/lib/featureFlags/useHasOverriddenFeatureFlags.js.map +1 -1
  139. package/lib/generated/bridge/js.d.ts +1 -0
  140. package/lib/generated/bridge/js.d.ts.map +1 -1
  141. package/lib/generated/bridge/js.js +32 -30
  142. package/lib/generated/bridge/js.js.map +1 -1
  143. package/lib/generated/bridge/mock.d.ts +0 -1
  144. package/lib/generated/bridge/mock.d.ts.map +1 -1
  145. package/lib/helpers.d.ts +0 -1
  146. package/lib/helpers.d.ts.map +1 -1
  147. package/lib/helpers.js +0 -15
  148. package/lib/helpers.js.map +1 -1
  149. package/lib/hw/getAppAndVersion.d.ts +1 -3
  150. package/lib/hw/getAppAndVersion.d.ts.map +1 -1
  151. package/lib/hw/getAppAndVersion.js +2 -2
  152. package/lib/hw/getAppAndVersion.js.map +1 -1
  153. package/lib/hw/getBitcoinLikeInfo.js +1 -1
  154. package/lib/hw/getBitcoinLikeInfo.js.map +1 -1
  155. package/lib/load/speculos.d.ts.map +1 -1
  156. package/lib/load/speculos.js +0 -1
  157. package/lib/load/speculos.js.map +1 -1
  158. package/lib/mock/account.js +1 -1
  159. package/lib/mock/account.js.map +1 -1
  160. package/lib/operation.d.ts.map +1 -1
  161. package/lib/operation.js +2 -7
  162. package/lib/operation.js.map +1 -1
  163. package/lib/postOnboarding/reducer.d.ts +0 -2
  164. package/lib/postOnboarding/reducer.d.ts.map +1 -1
  165. package/lib/react.d.ts +16 -0
  166. package/lib/react.d.ts.map +1 -0
  167. package/lib/react.js +64 -0
  168. package/lib/react.js.map +1 -0
  169. package/lib/reactNative.d.ts +16 -0
  170. package/lib/reactNative.d.ts.map +1 -0
  171. package/lib/reactNative.js +43 -0
  172. package/lib/reactNative.js.map +1 -0
  173. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  174. package/lib/wallet-api/Exchange/server.js +1 -7
  175. package/lib/wallet-api/Exchange/server.js.map +1 -1
  176. package/lib/wallet-api/Exchange/tracking.d.ts +6 -7
  177. package/lib/wallet-api/Exchange/tracking.d.ts.map +1 -1
  178. package/lib/wallet-api/Exchange/tracking.js +13 -52
  179. package/lib/wallet-api/Exchange/tracking.js.map +1 -1
  180. package/lib/wallet-api/constants.d.ts +1 -1
  181. package/lib/wallet-api/logic.d.ts +1 -1
  182. package/lib/wallet-api/logic.d.ts.map +1 -1
  183. package/lib/wallet-api/logic.js +5 -5
  184. package/lib/wallet-api/logic.js.map +1 -1
  185. package/lib/wallet-api/react.d.ts.map +1 -1
  186. package/lib/wallet-api/react.js +6 -9
  187. package/lib/wallet-api/react.js.map +1 -1
  188. package/lib/wallet-api/tracking.d.ts +5 -5
  189. package/lib/wallet-api/tracking.d.ts.map +1 -1
  190. package/lib/wallet-api/tracking.js +10 -30
  191. package/lib/wallet-api/tracking.js.map +1 -1
  192. package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
  193. package/lib/wallet-api/useDappLogic.js +20 -31
  194. package/lib/wallet-api/useDappLogic.js.map +1 -1
  195. package/lib/wallet-api/utils/extractDappURLFromManifest.js +3 -3
  196. package/lib/wallet-api/utils/extractDappURLFromManifest.js.map +1 -1
  197. package/lib/wallet-api/utils/extractURLFromManifest.js +1 -1
  198. package/lib/wallet-api/utils/extractURLFromManifest.js.map +1 -1
  199. package/lib/walletSync/getEnvironmentParams.js +6 -6
  200. package/lib/walletSync/getEnvironmentParams.js.map +1 -1
  201. package/lib-es/__tests__/test-helpers/bridge.js +1 -1
  202. package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
  203. package/lib-es/__tests__/test-helpers/environment.js +0 -1
  204. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  205. package/lib-es/account/index.d.ts +0 -1
  206. package/lib-es/account/index.d.ts.map +1 -1
  207. package/lib-es/account/index.js +0 -1
  208. package/lib-es/account/index.js.map +1 -1
  209. package/lib-es/account/serialization.js +1 -1
  210. package/lib-es/account/serialization.js.map +1 -1
  211. package/lib-es/account/support.js +1 -1
  212. package/lib-es/account/support.js.map +1 -1
  213. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +1 -1
  214. package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
  215. package/lib-es/bridge/generic-alpaca/accountBridge.js +1 -2
  216. package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
  217. package/lib-es/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  218. package/lib-es/bridge/generic-alpaca/broadcast.js +3 -3
  219. package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
  220. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  221. package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -3
  222. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  223. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  224. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +1 -2
  225. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  226. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  227. package/lib-es/bridge/generic-alpaca/getAccountShape.js +7 -16
  228. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  229. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  230. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +1 -16
  231. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  232. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  233. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +4 -38
  234. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  235. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  236. package/lib-es/bridge/generic-alpaca/signOperation.js +2 -18
  237. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  238. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +0 -2
  239. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
  240. package/lib-es/bridge/generic-alpaca/signer/Eth.js +0 -4
  241. package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -1
  242. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  243. package/lib-es/bridge/generic-alpaca/signer/index.js +0 -7
  244. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  245. package/lib-es/bridge/generic-alpaca/types.d.ts +0 -4
  246. package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
  247. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  248. package/lib-es/bridge/generic-alpaca/utils.js +3 -12
  249. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  250. package/lib-es/bridge/impl.d.ts.map +1 -1
  251. package/lib-es/bridge/impl.js +3 -14
  252. package/lib-es/bridge/impl.js.map +1 -1
  253. package/lib-es/currencies/cryptoIcons.d.ts +3 -0
  254. package/lib-es/currencies/cryptoIcons.d.ts.map +1 -0
  255. package/lib-es/currencies/cryptoIcons.js +20 -0
  256. package/lib-es/currencies/cryptoIcons.js.map +1 -0
  257. package/lib-es/currencies/helpers.d.ts +0 -1
  258. package/lib-es/currencies/helpers.d.ts.map +1 -1
  259. package/lib-es/currencies/helpers.js +0 -5
  260. package/lib-es/currencies/helpers.js.map +1 -1
  261. package/lib-es/domain/getTokensWithFunds.d.ts +1 -7
  262. package/lib-es/domain/getTokensWithFunds.d.ts.map +1 -1
  263. package/lib-es/domain/getTokensWithFunds.js +3 -13
  264. package/lib-es/domain/getTokensWithFunds.js.map +1 -1
  265. package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
  266. package/lib-es/e2e/data/deviceLabelsData.js +0 -1
  267. package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
  268. package/lib-es/e2e/enum/Device.d.ts +0 -1
  269. package/lib-es/e2e/enum/Device.d.ts.map +1 -1
  270. package/lib-es/e2e/enum/Device.js +0 -1
  271. package/lib-es/e2e/enum/Device.js.map +1 -1
  272. package/lib-es/e2e/families/cardano.d.ts.map +1 -1
  273. package/lib-es/e2e/families/cardano.js +14 -29
  274. package/lib-es/e2e/families/cardano.js.map +1 -1
  275. package/lib-es/e2e/index.d.ts +3 -26
  276. package/lib-es/e2e/index.d.ts.map +1 -1
  277. package/lib-es/e2e/index.js +0 -16
  278. package/lib-es/e2e/index.js.map +1 -1
  279. package/lib-es/e2e/speculos.d.ts.map +1 -1
  280. package/lib-es/e2e/speculos.js +4 -31
  281. package/lib-es/e2e/speculos.js.map +1 -1
  282. package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
  283. package/lib-es/e2e/speculosAppVersion.js +2 -6
  284. package/lib-es/e2e/speculosAppVersion.js.map +1 -1
  285. package/lib-es/e2e/swap.d.ts.map +1 -1
  286. package/lib-es/e2e/swap.js +6 -7
  287. package/lib-es/e2e/swap.js.map +1 -1
  288. package/lib-es/env.react.d.ts +1 -1
  289. package/lib-es/env.react.d.ts.map +1 -1
  290. package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js +1 -1
  291. package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
  292. package/lib-es/exchange/swap/postSwapState.d.ts.map +1 -1
  293. package/lib-es/exchange/swap/postSwapState.js +6 -10
  294. package/lib-es/exchange/swap/postSwapState.js.map +1 -1
  295. package/lib-es/exchange/swap/types.d.ts +1 -3
  296. package/lib-es/exchange/swap/types.d.ts.map +1 -1
  297. package/lib-es/families/bitcoin/walletApiAdapter.d.ts.map +1 -1
  298. package/lib-es/families/bitcoin/walletApiAdapter.js +0 -3
  299. package/lib-es/families/bitcoin/walletApiAdapter.js.map +1 -1
  300. package/lib-es/families/canton/config.d.ts.map +1 -1
  301. package/lib-es/families/canton/config.js +4 -4
  302. package/lib-es/families/canton/config.js.map +1 -1
  303. package/lib-es/families/canton/react.d.ts +0 -2
  304. package/lib-es/families/canton/react.d.ts.map +1 -1
  305. package/lib-es/families/canton/react.js +1 -38
  306. package/lib-es/families/canton/react.js.map +1 -1
  307. package/lib-es/families/celo/setup.d.ts.map +1 -1
  308. package/lib-es/families/celo/setup.js +0 -11
  309. package/lib-es/families/celo/setup.js.map +1 -1
  310. package/lib-es/families/evm/bridge/mock.d.ts +0 -1
  311. package/lib-es/families/evm/bridge/mock.d.ts.map +1 -1
  312. package/lib-es/families/evm/bridge/mock.js +0 -12
  313. package/lib-es/families/evm/bridge/mock.js.map +1 -1
  314. package/lib-es/families/evm/setup.d.ts +4 -1
  315. package/lib-es/families/evm/setup.d.ts.map +1 -1
  316. package/lib-es/families/evm/setup.js +8 -2
  317. package/lib-es/families/evm/setup.js.map +1 -1
  318. package/lib-es/families/evm/walletApiAdapter.d.ts +0 -7
  319. package/lib-es/families/evm/walletApiAdapter.d.ts.map +1 -1
  320. package/lib-es/families/evm/walletApiAdapter.js +1 -30
  321. package/lib-es/families/evm/walletApiAdapter.js.map +1 -1
  322. package/lib-es/families/polkadot/config.js +1 -1
  323. package/lib-es/families/polkadot/config.js.map +1 -1
  324. package/lib-es/families/stacks/constants.d.ts +1 -1
  325. package/lib-es/families/stacks/constants.d.ts.map +1 -1
  326. package/lib-es/families/stacks/constants.js +1 -1
  327. package/lib-es/families/stacks/constants.js.map +1 -1
  328. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  329. package/lib-es/featureFlags/defaultFeatures.js +1 -19
  330. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  331. package/lib-es/featureFlags/firebaseFeatureFlags.js +1 -1
  332. package/lib-es/featureFlags/firebaseFeatureFlags.js.map +1 -1
  333. package/lib-es/featureFlags/stakePrograms/index.js +4 -4
  334. package/lib-es/featureFlags/stakePrograms/index.js.map +1 -1
  335. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  336. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  337. package/lib-es/featureFlags/useHasOverriddenFeatureFlags.js +1 -1
  338. package/lib-es/featureFlags/useHasOverriddenFeatureFlags.js.map +1 -1
  339. package/lib-es/generated/bridge/js.d.ts +1 -0
  340. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  341. package/lib-es/generated/bridge/js.js +2 -0
  342. package/lib-es/generated/bridge/js.js.map +1 -1
  343. package/lib-es/generated/bridge/mock.d.ts +0 -1
  344. package/lib-es/generated/bridge/mock.d.ts.map +1 -1
  345. package/lib-es/helpers.d.ts +0 -1
  346. package/lib-es/helpers.d.ts.map +1 -1
  347. package/lib-es/helpers.js +0 -1
  348. package/lib-es/helpers.js.map +1 -1
  349. package/lib-es/hw/getAppAndVersion.d.ts +1 -3
  350. package/lib-es/hw/getAppAndVersion.d.ts.map +1 -1
  351. package/lib-es/hw/getAppAndVersion.js +2 -2
  352. package/lib-es/hw/getAppAndVersion.js.map +1 -1
  353. package/lib-es/hw/getBitcoinLikeInfo.js +1 -1
  354. package/lib-es/hw/getBitcoinLikeInfo.js.map +1 -1
  355. package/lib-es/load/speculos.d.ts.map +1 -1
  356. package/lib-es/load/speculos.js +0 -1
  357. package/lib-es/load/speculos.js.map +1 -1
  358. package/lib-es/mock/account.js +1 -1
  359. package/lib-es/mock/account.js.map +1 -1
  360. package/lib-es/operation.d.ts.map +1 -1
  361. package/lib-es/operation.js +2 -7
  362. package/lib-es/operation.js.map +1 -1
  363. package/lib-es/postOnboarding/reducer.d.ts +0 -2
  364. package/lib-es/postOnboarding/reducer.d.ts.map +1 -1
  365. package/lib-es/react.d.ts +16 -0
  366. package/lib-es/react.d.ts.map +1 -0
  367. package/lib-es/react.js +33 -0
  368. package/lib-es/react.js.map +1 -0
  369. package/lib-es/reactNative.d.ts +16 -0
  370. package/lib-es/reactNative.d.ts.map +1 -0
  371. package/lib-es/reactNative.js +15 -0
  372. package/lib-es/reactNative.js.map +1 -0
  373. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  374. package/lib-es/wallet-api/Exchange/server.js +1 -7
  375. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  376. package/lib-es/wallet-api/Exchange/tracking.d.ts +6 -7
  377. package/lib-es/wallet-api/Exchange/tracking.d.ts.map +1 -1
  378. package/lib-es/wallet-api/Exchange/tracking.js +13 -52
  379. package/lib-es/wallet-api/Exchange/tracking.js.map +1 -1
  380. package/lib-es/wallet-api/constants.d.ts +1 -1
  381. package/lib-es/wallet-api/logic.d.ts +1 -1
  382. package/lib-es/wallet-api/logic.d.ts.map +1 -1
  383. package/lib-es/wallet-api/logic.js +5 -5
  384. package/lib-es/wallet-api/logic.js.map +1 -1
  385. package/lib-es/wallet-api/react.d.ts.map +1 -1
  386. package/lib-es/wallet-api/react.js +6 -9
  387. package/lib-es/wallet-api/react.js.map +1 -1
  388. package/lib-es/wallet-api/tracking.d.ts +5 -5
  389. package/lib-es/wallet-api/tracking.d.ts.map +1 -1
  390. package/lib-es/wallet-api/tracking.js +10 -30
  391. package/lib-es/wallet-api/tracking.js.map +1 -1
  392. package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
  393. package/lib-es/wallet-api/useDappLogic.js +20 -31
  394. package/lib-es/wallet-api/useDappLogic.js.map +1 -1
  395. package/lib-es/wallet-api/utils/extractDappURLFromManifest.js +3 -3
  396. package/lib-es/wallet-api/utils/extractDappURLFromManifest.js.map +1 -1
  397. package/lib-es/wallet-api/utils/extractURLFromManifest.js +1 -1
  398. package/lib-es/wallet-api/utils/extractURLFromManifest.js.map +1 -1
  399. package/lib-es/walletSync/getEnvironmentParams.js +6 -6
  400. package/lib-es/walletSync/getEnvironmentParams.js.map +1 -1
  401. package/package.json +90 -82
  402. package/react.js +1 -0
  403. package/reactNative.js +1 -0
  404. package/src/__tests__/test-helpers/bridge.ts +1 -1
  405. package/src/__tests__/test-helpers/environment.ts +0 -1
  406. package/src/account/index.ts +0 -6
  407. package/src/account/serialization.ts +1 -1
  408. package/src/account/support.ts +1 -1
  409. package/src/bridge/generic-alpaca/accountBridge.ts +2 -3
  410. package/src/bridge/generic-alpaca/broadcast.ts +3 -6
  411. package/src/bridge/generic-alpaca/currencyBridge.ts +3 -3
  412. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +1 -2
  413. package/src/bridge/generic-alpaca/getAccountShape.ts +12 -24
  414. package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -16
  415. package/src/bridge/generic-alpaca/prepareTransaction.ts +10 -44
  416. package/src/bridge/generic-alpaca/signOperation.ts +2 -18
  417. package/src/bridge/generic-alpaca/signer/Eth.ts +1 -5
  418. package/src/bridge/generic-alpaca/signer/index.ts +0 -7
  419. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +2 -2
  420. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +0 -32
  421. package/src/bridge/generic-alpaca/types.ts +0 -4
  422. package/src/bridge/generic-alpaca/utils.test.ts +0 -4
  423. package/src/bridge/generic-alpaca/utils.ts +3 -15
  424. package/src/bridge/impl.ts +3 -16
  425. package/src/currencies/cryptoIcons.test.ts +54 -0
  426. package/src/currencies/cryptoIcons.ts +21 -0
  427. package/src/currencies/helpers.test.ts +1 -10
  428. package/src/currencies/helpers.ts +0 -6
  429. package/src/domain/getTokensWithFunds.ts +5 -18
  430. package/src/e2e/data/deviceLabelsData.ts +0 -1
  431. package/src/e2e/enum/Device.ts +0 -1
  432. package/src/e2e/families/cardano.ts +14 -32
  433. package/src/e2e/index.ts +0 -20
  434. package/src/e2e/speculos.ts +4 -35
  435. package/src/e2e/speculosAppVersion.ts +2 -8
  436. package/src/e2e/swap.ts +7 -8
  437. package/src/exchange/swap/api/v5/fetchCurrencyFrom.ts +1 -1
  438. package/src/exchange/swap/postSwapState.ts +5 -10
  439. package/src/exchange/swap/types.ts +1 -3
  440. package/src/families/bitcoin/walletApiAdapter.test.ts +0 -36
  441. package/src/families/bitcoin/walletApiAdapter.ts +0 -4
  442. package/src/families/canton/config.ts +4 -5
  443. package/src/families/canton/react.ts +1 -45
  444. package/src/families/celo/setup.ts +0 -12
  445. package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +4 -73
  446. package/src/families/cosmos/datasets/__snapshots__/cryptoOrg.integration.test.ts.snap +2 -2
  447. package/src/families/cosmos/datasets/__snapshots__/injective.integration.test.ts.snap +2 -2
  448. package/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap +2 -2
  449. package/src/families/cosmos/datasets/__snapshots__/osmosis.integration.test.ts.snap +2 -2
  450. package/src/families/cosmos/datasets/__snapshots__/persistence.integration.test.ts.snap +4 -4
  451. package/src/families/cosmos/datasets/__snapshots__/stargaze.integration.test.ts.snap +2 -2
  452. package/src/families/evm/bridge/mock.ts +0 -14
  453. package/src/families/evm/setup.ts +22 -3
  454. package/src/families/evm/walletApiAdapter.ts +1 -33
  455. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +17 -278
  456. package/src/families/polkadot/__snapshots__/bridge.integration.test.ts.snap +3653 -6
  457. package/src/families/polkadot/config.ts +1 -1
  458. package/src/families/stacks/__snapshots__/bridge.integration.test.ts.snap +17 -1536
  459. package/src/families/stacks/__tests__/sync.integration.test.ts +2 -2
  460. package/src/families/stacks/constants.ts +1 -1
  461. package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +9 -9
  462. package/src/featureFlags/defaultFeatures.ts +1 -19
  463. package/src/featureFlags/firebaseFeatureFlags.ts +1 -1
  464. package/src/featureFlags/stakePrograms/index.ts +4 -4
  465. package/src/featureFlags/useHasOverriddenFeatureFlags.ts +1 -1
  466. package/src/generated/bridge/js.ts +2 -0
  467. package/src/helpers.ts +0 -2
  468. package/src/hw/getAppAndVersion.ts +1 -2
  469. package/src/hw/getBitcoinLikeInfo.ts +1 -1
  470. package/src/load/speculos.ts +0 -1
  471. package/src/mock/account.ts +1 -1
  472. package/src/operation.ts +2 -10
  473. package/src/react.tsx +43 -0
  474. package/src/reactNative.ts +23 -0
  475. package/src/reactNativeSvg.d.ts +19 -0
  476. package/src/wallet-api/Exchange/server.ts +0 -8
  477. package/src/wallet-api/Exchange/tracking.ts +13 -56
  478. package/src/wallet-api/logic.ts +4 -5
  479. package/src/wallet-api/react.ts +5 -10
  480. package/src/wallet-api/tracking.ts +10 -30
  481. package/src/wallet-api/useDappLogic.ts +20 -32
  482. package/src/wallet-api/utils/extractDappURLFromManifest.ts +3 -3
  483. package/src/wallet-api/utils/extractURLFromManifest.ts +1 -1
  484. package/src/walletSync/getEnvironmentParams.ts +6 -6
  485. package/lib/account/recentAddresses.d.ts +0 -10
  486. package/lib/account/recentAddresses.d.ts.map +0 -1
  487. package/lib/account/recentAddresses.js +0 -60
  488. package/lib/account/recentAddresses.js.map +0 -1
  489. package/lib/bridge/generic-alpaca/postSync.d.ts +0 -16
  490. package/lib/bridge/generic-alpaca/postSync.d.ts.map +0 -1
  491. package/lib/bridge/generic-alpaca/postSync.js +0 -44
  492. package/lib/bridge/generic-alpaca/postSync.js.map +0 -1
  493. package/lib/domain/getTotalStakeableAssets.d.ts +0 -10
  494. package/lib/domain/getTotalStakeableAssets.d.ts.map +0 -1
  495. package/lib/domain/getTotalStakeableAssets.js +0 -35
  496. package/lib/domain/getTotalStakeableAssets.js.map +0 -1
  497. package/lib/e2e/data/regexes.d.ts +0 -2
  498. package/lib/e2e/data/regexes.d.ts.map +0 -1
  499. package/lib/e2e/data/regexes.js +0 -5
  500. package/lib/e2e/data/regexes.js.map +0 -1
  501. package/lib/families/hedera/react.d.ts +0 -6
  502. package/lib/families/hedera/react.d.ts.map +0 -1
  503. package/lib/families/hedera/react.js +0 -50
  504. package/lib/families/hedera/react.js.map +0 -1
  505. package/lib/helpers/cryptoIconSize.d.ts +0 -3
  506. package/lib/helpers/cryptoIconSize.d.ts.map +0 -1
  507. package/lib/helpers/cryptoIconSize.js +0 -40
  508. package/lib/helpers/cryptoIconSize.js.map +0 -1
  509. package/lib/hooks/useHtmlLinkSegments.d.ts +0 -19
  510. package/lib/hooks/useHtmlLinkSegments.d.ts.map +0 -1
  511. package/lib/hooks/useHtmlLinkSegments.js +0 -128
  512. package/lib/hooks/useHtmlLinkSegments.js.map +0 -1
  513. package/lib-es/account/recentAddresses.d.ts +0 -10
  514. package/lib-es/account/recentAddresses.d.ts.map +0 -1
  515. package/lib-es/account/recentAddresses.js +0 -55
  516. package/lib-es/account/recentAddresses.js.map +0 -1
  517. package/lib-es/bridge/generic-alpaca/postSync.d.ts +0 -16
  518. package/lib-es/bridge/generic-alpaca/postSync.d.ts.map +0 -1
  519. package/lib-es/bridge/generic-alpaca/postSync.js +0 -37
  520. package/lib-es/bridge/generic-alpaca/postSync.js.map +0 -1
  521. package/lib-es/domain/getTotalStakeableAssets.d.ts +0 -10
  522. package/lib-es/domain/getTotalStakeableAssets.d.ts.map +0 -1
  523. package/lib-es/domain/getTotalStakeableAssets.js +0 -31
  524. package/lib-es/domain/getTotalStakeableAssets.js.map +0 -1
  525. package/lib-es/e2e/data/regexes.d.ts +0 -2
  526. package/lib-es/e2e/data/regexes.d.ts.map +0 -1
  527. package/lib-es/e2e/data/regexes.js +0 -2
  528. package/lib-es/e2e/data/regexes.js.map +0 -1
  529. package/lib-es/families/hedera/react.d.ts +0 -6
  530. package/lib-es/families/hedera/react.d.ts.map +0 -1
  531. package/lib-es/families/hedera/react.js +0 -41
  532. package/lib-es/families/hedera/react.js.map +0 -1
  533. package/lib-es/helpers/cryptoIconSize.d.ts +0 -3
  534. package/lib-es/helpers/cryptoIconSize.d.ts.map +0 -1
  535. package/lib-es/helpers/cryptoIconSize.js +0 -35
  536. package/lib-es/helpers/cryptoIconSize.js.map +0 -1
  537. package/lib-es/hooks/useHtmlLinkSegments.d.ts +0 -19
  538. package/lib-es/hooks/useHtmlLinkSegments.d.ts.map +0 -1
  539. package/lib-es/hooks/useHtmlLinkSegments.js +0 -121
  540. package/lib-es/hooks/useHtmlLinkSegments.js.map +0 -1
  541. package/src/account/recentAddresses.test.ts +0 -104
  542. package/src/account/recentAddresses.ts +0 -84
  543. package/src/bridge/generic-alpaca/postSync.test.ts +0 -97
  544. package/src/bridge/generic-alpaca/postSync.ts +0 -42
  545. package/src/domain/getTotalStakeableAssets.test.ts +0 -267
  546. package/src/domain/getTotalStakeableAssets.ts +0 -47
  547. package/src/e2e/data/regexes.ts +0 -1
  548. package/src/families/canton/react.test.ts +0 -147
  549. package/src/families/hedera/react.test.ts +0 -272
  550. package/src/families/hedera/react.ts +0 -63
  551. package/src/helpers/cryptoIconSize.ts +0 -25
  552. package/src/hooks/__tests__/useHtmlLinkSegments.test.ts +0 -105
  553. package/src/hooks/useHtmlLinkSegments.ts +0 -158
@@ -16,9 +16,3 @@ export * from "./formatters";
16
16
  export * from "./helpers";
17
17
  export * from "./serialization";
18
18
  export * from "./support";
19
- export {
20
- RecentAddressesStore,
21
- getRecentAddressesStore,
22
- setupRecentAddressesStore,
23
- RecentAddressesCache,
24
- } from "./recentAddresses";
@@ -99,7 +99,7 @@ const inferFamilyFromAccountId: (accountId: string) => string | null | undefined
99
99
  try {
100
100
  const { currencyId } = decodeAccountId(accountId);
101
101
  return getCryptoCurrencyById(currencyId).family;
102
- } catch {
102
+ } catch (e) {
103
103
  return null;
104
104
  }
105
105
  },
@@ -13,7 +13,7 @@ export function canSend(account: AccountLike, parentAccount: Account | null | un
13
13
  getMainAccount(account, parentAccount),
14
14
  );
15
15
  return true;
16
- } catch {
16
+ } catch (e) {
17
17
  return false;
18
18
  }
19
19
  }
@@ -1,4 +1,4 @@
1
- import type { AccountBridge } from "@ledgerhq/types-live";
1
+ import { AccountBridge } from "@ledgerhq/types-live";
2
2
  import { makeSync } from "../jsHelpers";
3
3
  import { genericGetAccountShape } from "./getAccountShape";
4
4
  import {
@@ -16,7 +16,6 @@ import { genericBroadcast } from "./broadcast";
16
16
  import { genericSignOperation } from "./signOperation";
17
17
  import { genericSignRawOperation } from "./signRawOperation";
18
18
  import type { AlpacaSigner } from "./signer/types";
19
- import { postSync } from "./postSync";
20
19
 
21
20
  export function getAlpacaAccountBridge(
22
21
  network: string,
@@ -25,7 +24,7 @@ export function getAlpacaAccountBridge(
25
24
  ): AccountBridge<any> {
26
25
  const signer = customSigner ?? getSigner(network);
27
26
  return {
28
- sync: makeSync({ getAccountShape: genericGetAccountShape(network, kind), postSync }),
27
+ sync: makeSync({ getAccountShape: genericGetAccountShape(network, kind) }),
29
28
  receive: makeAccountBridgeReceive(getAddressWrapper(signer.getAddress)),
30
29
  createTransaction: createTransaction,
31
30
  updateTransaction: updateTransaction<any>,
@@ -1,14 +1,11 @@
1
1
  import { AccountBridge, TransactionCommon } from "@ledgerhq/types-live";
2
- import { patchOperationWithHash } from "@ledgerhq/coin-framework/operation";
2
+ import { patchOperationWithHash } from "../../operation";
3
3
  import { getAlpacaApi } from "./alpaca";
4
4
 
5
5
  export const genericBroadcast: (network, kind) => AccountBridge<TransactionCommon>["broadcast"] =
6
6
  (network, kind) =>
7
- async ({ signedOperation: { signature, operation }, account, broadcastConfig }) => {
8
- const hash = await getAlpacaApi(account.currency.id, kind).broadcast(
9
- signature,
10
- broadcastConfig,
11
- );
7
+ async ({ signedOperation: { signature, operation }, account }) => {
8
+ const hash = await getAlpacaApi(account.currency.id, kind).broadcast(signature);
12
9
 
13
10
  return patchOperationWithHash(operation, hash);
14
11
  };
@@ -3,7 +3,6 @@ import { CurrencyBridge } from "@ledgerhq/types-live";
3
3
  import { genericGetAccountShape } from "./getAccountShape";
4
4
  import { getSigner } from "./signer";
5
5
  import type { AlpacaSigner } from "./signer/types";
6
- import { postSync } from "./postSync";
7
6
 
8
7
  export function getAlpacaCurrencyBridge(
9
8
  network: string,
@@ -13,11 +12,12 @@ export function getAlpacaCurrencyBridge(
13
12
  const signer = customSigner ?? getSigner(network);
14
13
  return {
15
14
  preload: () => Promise.resolve({}),
16
- hydrate: () => undefined,
15
+ hydrate: () => {
16
+ return;
17
+ },
17
18
  scanAccounts: makeScanAccounts({
18
19
  getAccountShape: genericGetAccountShape(network, kind),
19
20
  getAddressFn: signer.getAddress.bind(signer),
20
- postSync,
21
21
  }),
22
22
  };
23
23
  }
@@ -30,12 +30,11 @@ export function genericEstimateMaxSpendable(
30
30
  )
31
31
  ).value;
32
32
  }
33
- // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22229
34
33
  const { amount } = await alpacaApi.validateIntent(
35
34
  transactionToIntent(account, { ...draftTransaction }, alpacaApi.computeIntentType),
36
35
  { value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
37
36
  );
38
- if (["stellar", "tezos", "evm"].includes(network)) {
37
+ if (["stellar", "tezos"].includes(network)) {
39
38
  return amount > 0 ? new BigNumber(amount.toString()) : new BigNumber(0);
40
39
  }
41
40
  const bnFee = BigNumber(fees.toString());
@@ -17,10 +17,6 @@ function isNftCoreOp(operation: Operation): boolean {
17
17
  );
18
18
  }
19
19
 
20
- function isInternalLiveOp(operation: OperationCommon): boolean {
21
- return !!operation.extra?.internal;
22
- }
23
-
24
20
  export function genericGetAccountShape(network: string, kind: string): GetAccountShape {
25
21
  return async (info, syncConfig) => {
26
22
  const { address, initialAccount, currency, derivationMode } = info;
@@ -62,7 +58,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
62
58
 
63
59
  // Calculate minHeight for pagination
64
60
  const minHeight = syncFromScratch ? 0 : (oldOps[0]?.blockHeight ?? 0) + 1;
65
- const paginationParams: Pagination = { minHeight, order: "desc" };
61
+ const paginationParams: Pagination = { minHeight, order: "asc" };
66
62
  if (lastPagingToken && !syncFromScratch) {
67
63
  paginationParams.lastPagingToken = lastPagingToken;
68
64
  }
@@ -78,7 +74,6 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
78
74
  operation?.extra?.assetOwner &&
79
75
  !["OPT_IN", "OPT_OUT"].includes(operation.type),
80
76
  );
81
- const newInternalOperations = newOps.filter(isInternalLiveOp);
82
77
  const newSubAccounts = await buildSubAccounts({
83
78
  accountId,
84
79
  allTokenAssetsBalances,
@@ -90,29 +85,22 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
90
85
  ? newSubAccounts
91
86
  : mergeSubAccounts(initialAccount?.subAccounts ?? [], newSubAccounts);
92
87
 
93
- const newOpsWithSubs = newOps
94
- .filter(operation => !isInternalLiveOp(operation))
95
- .map(op => {
96
- const subOperations = inferSubOperations(op.hash, newSubAccounts);
97
- const internalOperations = newInternalOperations.filter(it => it.hash === op.hash);
88
+ const newOpsWithSubs = newOps.map(op => {
89
+ const subOperations = inferSubOperations(op.hash, newSubAccounts);
98
90
 
99
- return cleanedOperation({
100
- ...op,
101
- subOperations,
102
- internalOperations,
103
- });
91
+ return cleanedOperation({
92
+ ...op,
93
+ subOperations,
104
94
  });
105
- // Try to refresh known pending operations (if not already updated)
106
- // Useful for integrations without explorers
107
- const operationsToRefresh = initialAccount?.pendingOperations.filter(
108
- pendingOp => !newOpsWithSubs.some(newOp => pendingOp.hash === newOp.hash),
109
- );
95
+ });
110
96
  const confirmedOperations =
111
- alpacaApi.refreshOperations && operationsToRefresh?.length
112
- ? await alpacaApi.refreshOperations(operationsToRefresh)
97
+ alpacaApi.refreshOperations && initialAccount?.pendingOperations.length
98
+ ? await alpacaApi.refreshOperations(initialAccount.pendingOperations)
113
99
  : [];
114
100
  const newOperations = [...confirmedOperations, ...newOpsWithSubs];
115
- const operations = mergeOps(syncFromScratch ? [] : oldOps, newOperations) as OperationCommon[];
101
+ const operations = syncFromScratch
102
+ ? newOperations
103
+ : (mergeOps(oldOps, newOperations) as OperationCommon[]);
116
104
 
117
105
  const res: Partial<Account> = {
118
106
  id: accountId,
@@ -26,7 +26,6 @@ export function genericGetTransactionStatus(
26
26
  feesStrategy: transaction.feesStrategy,
27
27
  data: transaction.data,
28
28
  type: transaction.type,
29
- sponsored: transaction.sponsored,
30
29
  };
31
30
 
32
31
  if (alpacaApi.getChainSpecificRules) {
@@ -38,24 +37,10 @@ export function genericGetTransactionStatus(
38
37
  }
39
38
  }
40
39
 
41
- const fees = BigInt(transaction.fees?.toString() || "0");
42
- const feesParameters = {
43
- ...(transaction.gasLimit ? { gasLimit: BigInt(transaction.gasLimit.toFixed()) } : {}),
44
- ...(transaction.gasPrice ? { gasPrice: BigInt(transaction.gasPrice.toFixed()) } : {}),
45
- ...(transaction.maxFeePerGas
46
- ? { maxFeePerGas: BigInt(transaction.maxFeePerGas.toFixed()) }
47
- : {}),
48
- ...(transaction.maxPriorityFeePerGas
49
- ? { maxPriorityFeePerGas: BigInt(transaction.maxPriorityFeePerGas.toFixed()) }
50
- : {}),
51
- ...(transaction.additionalFees
52
- ? { additionalFees: BigInt(transaction.additionalFees.toFixed()) }
53
- : {}),
54
- };
55
40
  const { errors, warnings, estimatedFees, amount, totalSpent, totalFees } =
56
41
  await alpacaApi.validateIntent(
57
42
  transactionToIntent(account, draftTransaction, alpacaApi.computeIntentType),
58
- { value: fees, parameters: feesParameters },
43
+ { value: transaction.fees ? BigInt(transaction.fees.toString()) : 0n },
59
44
  );
60
45
 
61
46
  return {
@@ -31,11 +31,6 @@ function propagateField(estimation: FeeEstimation, field: string, dest: GenericT
31
31
  dest[field] = Number(value.toString());
32
32
  return;
33
33
  case "storageLimit":
34
- case "gasLimit":
35
- case "gasPrice":
36
- case "maxFeePerGas":
37
- case "maxPriorityFeePerGas":
38
- case "additionalFees":
39
34
  dest[field] = new BigNumber(value.toString());
40
35
  return;
41
36
  default:
@@ -56,37 +51,17 @@ export function genericPrepareTransaction(
56
51
  ? await getAssetInfos(transaction, account.freshAddress, getAssetFromToken)
57
52
  : assetInfosFallback(transaction);
58
53
  const customParametersFees = transaction.customFees?.parameters?.fees;
59
-
60
- /**
61
- * Ticking `useAllAmount` constantly resets the amount to 0. This is problematic
62
- * because some Blockchain need the actual transaction amount to compute the fees
63
- * (Example with EVM and ERC20 transactions)
64
- * In case of `useAllAmount` and token transaction, we read the token account spendable
65
- * balance instead.
66
- */
67
- let amount = transaction.amount;
68
- if (transaction.useAllAmount && transaction.subAccountId) {
69
- const subAccount = account.subAccounts?.find(acc => acc.id === transaction.subAccountId);
70
- amount = subAccount?.spendableBalance ?? amount;
71
- }
72
-
73
- // Pass any parameters that help estimating fees
74
- const intent = transactionToIntent(
75
- account,
76
- {
77
- ...transaction,
78
- amount,
79
- },
80
- computeIntentType,
81
- );
82
54
  const estimation: FeeEstimation = customParametersFees
83
55
  ? { value: BigInt(customParametersFees.toFixed()) }
84
- : await estimateFees(intent, {
85
- gasPrice: transaction.gasPrice,
86
- maxFeePerGas: transaction.maxFeePerGas,
87
- maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,
88
- gasOptions: transaction.gasOptions,
89
- });
56
+ : await estimateFees(
57
+ transactionToIntent(
58
+ account,
59
+ {
60
+ ...transaction,
61
+ },
62
+ computeIntentType,
63
+ ),
64
+ );
90
65
  const fees = new BigNumber(estimation.value.toString());
91
66
 
92
67
  if (!bnEq(transaction.fees, fees)) {
@@ -103,15 +78,7 @@ export function genericPrepareTransaction(
103
78
  };
104
79
 
105
80
  // Propagate needed fields
106
- const fieldsToPropagate = [
107
- "type",
108
- "storageLimit",
109
- "gasLimit",
110
- "gasPrice",
111
- "maxFeePerGas",
112
- "maxPriorityFeePerGas",
113
- "additionalFees",
114
- ];
81
+ const fieldsToPropagate = ["type", "storageLimit"];
115
82
 
116
83
  for (const field of fieldsToPropagate) {
117
84
  propagateField(estimation, field, next);
@@ -119,7 +86,6 @@ export function genericPrepareTransaction(
119
86
 
120
87
  // align with stellar/xrp: when send max (or staking intents), reflect validated amount in UI
121
88
  if (transaction.useAllAmount || ["stake", "unstake"].includes(transaction.mode ?? "")) {
122
- // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22228
123
89
  const { amount } = await validateIntent(
124
90
  transactionToIntent(
125
91
  account,
@@ -86,19 +86,6 @@ export const genericSignOperation =
86
86
  const alpacaApi = getAlpacaApi(account.currency.id, kind);
87
87
  if (!transaction.fees) throw new FeeNotLoaded();
88
88
  const fees = BigInt(transaction.fees?.toString() || "0");
89
- const feesParameters = {
90
- ...(transaction.gasLimit ? { gasLimit: BigInt(transaction.gasLimit.toFixed()) } : {}),
91
- ...(transaction.gasPrice ? { gasPrice: BigInt(transaction.gasPrice.toFixed()) } : {}),
92
- ...(transaction.maxFeePerGas
93
- ? { maxFeePerGas: BigInt(transaction.maxFeePerGas.toFixed()) }
94
- : {}),
95
- ...(transaction.maxPriorityFeePerGas
96
- ? { maxPriorityFeePerGas: BigInt(transaction.maxPriorityFeePerGas.toFixed()) }
97
- : {}),
98
- ...(transaction.additionalFees
99
- ? { additionalFees: BigInt(transaction.additionalFees.toFixed()) }
100
- : {}),
101
- };
102
89
  if (transaction.useAllAmount) {
103
90
  const draftTransaction = {
104
91
  mode: transaction.mode,
@@ -111,12 +98,10 @@ export const genericSignOperation =
111
98
  family: transaction.family,
112
99
  feesStrategy: transaction.feesStrategy,
113
100
  data: transaction.data,
114
- type: transaction.type,
115
101
  };
116
- // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22227
117
102
  const { amount } = await alpacaApi.validateIntent(
118
103
  transactionToIntent(account, draftTransaction, alpacaApi.computeIntentType),
119
- { value: fees, parameters: feesParameters },
104
+ { value: fees },
120
105
  );
121
106
  transaction.amount = new BigNumber(amount.toString());
122
107
  }
@@ -134,7 +119,7 @@ export const genericSignOperation =
134
119
  // Enrich with memo and asset information
135
120
  transactionIntent = enrichTransactionIntent(transactionIntent, transaction, publicKey);
136
121
 
137
- if (typeof transactionIntent.sequence !== "bigint" || transactionIntent.sequence < 0n) {
122
+ if (typeof transactionIntent.sequence !== "bigint") {
138
123
  // TODO: should compute it and pass it down to craftTransaction (duplicate call right now)
139
124
  const sequenceNumber = await alpacaApi.getSequence(transactionIntent.sender);
140
125
  transactionIntent.sequence = sequenceNumber;
@@ -143,7 +128,6 @@ export const genericSignOperation =
143
128
  /* Craft unsigned blob via Alpaca */
144
129
  const { transaction: unsigned } = await alpacaApi.craftTransaction(transactionIntent, {
145
130
  value: fees,
146
- parameters: feesParameters,
147
131
  });
148
132
 
149
133
  /* Notify UI that the device is now showing the tx */
@@ -1,6 +1,6 @@
1
1
  import { filter, firstValueFrom } from "rxjs";
2
2
  import { EvmAddress, EvmSignature, EvmSigner } from "@ledgerhq/coin-evm/types/signer";
3
- import { CreateSigner, executeWithSigner } from "../../setup";
3
+ import { CreateSigner } from "../../setup";
4
4
  import { DeviceManagementKit } from "@ledgerhq/device-management-kit";
5
5
  import { DmkSignerEth, LegacySignerEth } from "@ledgerhq/live-signer-evm";
6
6
  import Transport from "@ledgerhq/hw-transport";
@@ -8,7 +8,6 @@ import { getEnv } from "@ledgerhq/live-env";
8
8
  import { ResolutionConfig, LoadConfig } from "@ledgerhq/hw-app-eth/lib/services/types";
9
9
  import { Signature } from "ethers";
10
10
  import type { DomainServiceResolution } from "@ledgerhq/types-live";
11
- import resolver from "@ledgerhq/coin-evm/hw-getAddress";
12
11
 
13
12
  export type Signer = {
14
13
  getAddress: (path: string) => Promise<EvmAddress>;
@@ -71,6 +70,3 @@ export const createSigner: CreateSigner<Signer> = (transport: Transport) => {
71
70
  },
72
71
  };
73
72
  };
74
-
75
- export const context = executeWithSigner(createSigner);
76
- export const getAddress = resolver(context);
@@ -10,7 +10,6 @@ import { AlpacaSigner } from "./types";
10
10
  import { DerivationType, LedgerSigner as TaquitoLedgerSigner } from "@taquito/ledger-signer";
11
11
  import tezosGetAddress from "@ledgerhq/coin-tezos/signer/getAddress";
12
12
  import Tezos from "@ledgerhq/hw-app-tezos";
13
- import { context as evmContext, getAddress as evmGetAddress } from "./Eth";
14
13
 
15
14
  const createSignerXrp: CreateSigner<Xrp> = (transport: Transport) => {
16
15
  return new Xrp(transport);
@@ -98,12 +97,6 @@ export function getSigner(network: string): AlpacaSigner {
98
97
  context: signerContextTezos,
99
98
  };
100
99
  }
101
- case "evm": {
102
- return {
103
- getAddress: evmGetAddress,
104
- context: evmContext,
105
- };
106
- }
107
100
  }
108
101
  throw new Error(`signer for ${network} not implemented`);
109
102
  }
@@ -71,7 +71,7 @@ describe("genericGetAccountShape", () => {
71
71
  "sync-hash",
72
72
  {
73
73
  minHeight: 11,
74
- order: "desc",
74
+ order: "asc",
75
75
  lastPagingToken: "pt1",
76
76
  },
77
77
  [
@@ -100,7 +100,7 @@ describe("genericGetAccountShape", () => {
100
100
  "outdated-sync-hash",
101
101
  {
102
102
  minHeight: 0,
103
- order: "desc",
103
+ order: "asc",
104
104
  },
105
105
  [
106
106
  {
@@ -2,7 +2,6 @@ import { genericPrepareTransaction } from "../prepareTransaction";
2
2
  import { getAlpacaApi } from "../alpaca";
3
3
  import { transactionToIntent } from "../utils";
4
4
  import BigNumber from "bignumber.js";
5
- import { GenericTransaction } from "../types";
6
5
 
7
6
  jest.mock("../alpaca", () => ({
8
7
  getAlpacaApi: jest.fn(),
@@ -96,11 +95,6 @@ describe("genericPrepareTransaction", () => {
96
95
  it.each([
97
96
  ["type", 2, 2],
98
97
  ["storageLimit", 300n, new BigNumber(300)],
99
- ["gasLimit", 300n, new BigNumber(300)],
100
- ["gasPrice", 300n, new BigNumber(300)],
101
- ["maxFeePerGas", 300n, new BigNumber(300)],
102
- ["maxPriorityFeePerGas", 300n, new BigNumber(300)],
103
- ["additionalFees", 300n, new BigNumber(300)],
104
98
  ])(
105
99
  "propagates %s from estimation parameters",
106
100
  async (parameterName, parameterValue, expectedValue) => {
@@ -128,30 +122,4 @@ describe("genericPrepareTransaction", () => {
128
122
  );
129
123
  },
130
124
  );
131
-
132
- it("estimates using the token account spendable balance when sending all amount", async () => {
133
- const estimateFees = jest.fn().mockResolvedValue({ value: new BigNumber(50) });
134
- (transactionToIntent as jest.Mock).mockImplementation((_, transaction) => ({
135
- amount: BigInt(transaction.amount.toFixed()),
136
- }));
137
- (getAlpacaApi as jest.Mock).mockReturnValue({
138
- estimateFees,
139
- validateIntent: intent => Promise.resolve({ amount: intent.amount }),
140
- });
141
- const prepareTransaction = genericPrepareTransaction(network, kind);
142
-
143
- await prepareTransaction(
144
- {
145
- ...account,
146
- subAccounts: [{ id: "test-sub-account", spendableBalance: new BigNumber(100) }],
147
- },
148
- {
149
- subAccountId: "test-sub-account",
150
- useAllAmount: true,
151
- amount: new BigNumber(0),
152
- } as GenericTransaction,
153
- );
154
-
155
- expect(estimateFees).toHaveBeenCalledWith(expect.objectContaining({ amount: 100n }), {});
156
- });
157
125
  });
@@ -70,9 +70,7 @@ export type GenericTransaction = TransactionCommon & {
70
70
  gasPrice?: BigNumber | null;
71
71
  maxFeePerGas?: BigNumber | null;
72
72
  maxPriorityFeePerGas?: BigNumber | null;
73
- additionalFees?: BigNumber | null;
74
73
  gasOptions?: GasOptions;
75
- sponsored?: boolean;
76
74
  };
77
75
 
78
76
  export type GenericTransactionRaw = TransactionCommonRaw & {
@@ -106,9 +104,7 @@ export type GenericTransactionRaw = TransactionCommonRaw & {
106
104
  gasPrice?: string | null;
107
105
  maxFeePerGas?: string | null;
108
106
  maxPriorityFeePerGas?: string | null;
109
- additionalFees?: string | null;
110
107
  gasOptions?: GasOptionsRaw;
111
- sponsored?: boolean;
112
108
  };
113
109
 
114
110
  export interface OperationCommon extends Operation {
@@ -166,12 +166,10 @@ describe("Alpaca utils", () => {
166
166
  },
167
167
  ...params,
168
168
  } as GenericTransaction,
169
- 3n,
170
169
  );
171
170
 
172
171
  expect(operation).toMatchObject({
173
172
  id: `parent-account-id--${expected.parentType}`,
174
- transactionSequenceNumber: new BigNumber(3),
175
173
  type: expected.parentType,
176
174
  value: expected.parentValue,
177
175
  accountId: "parent-account-id",
@@ -196,12 +194,10 @@ describe("Alpaca utils", () => {
196
194
  subOperations: [
197
195
  {
198
196
  id: `sub-account-id--${expected.subType}`,
199
- transactionSequenceNumber: new BigNumber(3),
200
197
  accountId: "sub-account-id",
201
198
  type: expected.subType,
202
199
  senders: ["account-address"],
203
200
  recipients: ["recipient-address"],
204
- fee: new BigNumber(12),
205
201
  value: new BigNumber(50),
206
202
  blockHash: null,
207
203
  blockHeight: null,
@@ -72,7 +72,6 @@ export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOpe
72
72
  parentRecipients?: string[];
73
73
  ledgerOpType?: string | undefined;
74
74
  memo?: string | undefined;
75
- internal?: boolean;
76
75
  } = {};
77
76
 
78
77
  if (op.details?.ledgerOpType !== undefined) {
@@ -107,11 +106,6 @@ export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOpe
107
106
  if (op.details?.memo) {
108
107
  extra.memo = op.details.memo as string;
109
108
  }
110
-
111
- if (op.details?.internal === true) {
112
- extra.internal = op.details?.internal;
113
- }
114
-
115
109
  const bnFees = new BigNumber(op.tx.fees.toString());
116
110
  const hasFailed = op.tx.failed;
117
111
 
@@ -220,7 +214,6 @@ export function transactionToIntent(
220
214
  transaction.nonce !== null && transaction.nonce !== undefined
221
215
  ? BigInt(transaction.nonce.toString())
222
216
  : undefined,
223
- sponsored: transaction.sponsored,
224
217
  };
225
218
  if (transaction.assetReference && transaction.assetOwner) {
226
219
  const { subAccountId } = transaction;
@@ -272,11 +265,8 @@ function toGenericTransactionRaw(transaction: GenericTransaction): GenericTransa
272
265
  family: transaction.family,
273
266
  };
274
267
 
275
- const booleanFieldsToPropagate = ["useAllAmount", "sponsored"] as const;
276
- for (const field of booleanFieldsToPropagate) {
277
- if (field in transaction) {
278
- raw[field] = transaction[field];
279
- }
268
+ if ("useAllAmount" in transaction) {
269
+ raw.useAllAmount = transaction.useAllAmount;
280
270
  }
281
271
 
282
272
  const stringFieldsToPropagate = [
@@ -306,7 +296,6 @@ function toGenericTransactionRaw(transaction: GenericTransaction): GenericTransa
306
296
  "gasPrice",
307
297
  "maxFeePerGas",
308
298
  "maxPriorityFeePerGas",
309
- "additionalFees",
310
299
  ] as const;
311
300
  for (const field of bigNumberFieldsToPropagate) {
312
301
  if (field in transaction) {
@@ -418,12 +407,11 @@ export const buildOptimisticOperation = (
418
407
  hash: "",
419
408
  type,
420
409
  value: transaction.useAllAmount ? tokenAccount.balance : transaction.amount,
421
- fee: new BigNumber(fees.toString()),
410
+ fee: new BigNumber(0),
422
411
  blockHash: null,
423
412
  blockHeight: null,
424
413
  senders: [account.freshAddress],
425
414
  recipients: [transaction.recipient],
426
- transactionSequenceNumber: new BigNumber(sequenceNumber?.toString() ?? 0),
427
415
  accountId: subAccountId,
428
416
  date: new Date(),
429
417
  transactionRaw: toGenericTransactionRaw({
@@ -23,7 +23,6 @@ import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/erro
23
23
  // Removed: stores are now managed globally by @ledgerhq/cryptoassets/cal-client/store
24
24
 
25
25
  const alpacaized = {
26
- evm: true,
27
26
  xrp: true,
28
27
  stellar: true,
29
28
  tezos: true,
@@ -36,13 +35,7 @@ const currencyBridgeCache: Record<string, CurrencyBridge> = {};
36
35
  export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => {
37
36
  if (getEnv("MOCK")) {
38
37
  const mockBridge = mockBridges[currency.family];
39
- // TODO Remove once we delete mock bridges tests
40
- if (mockBridge) {
41
- if (typeof mockBridge.loadCoinConfig === "function") {
42
- mockBridge.loadCoinConfig();
43
- }
44
- return mockBridge.currencyBridge;
45
- }
38
+ if (mockBridge) return mockBridge.currencyBridge;
46
39
  throw new CurrencyNotSupported("no mock implementation available for currency " + currency.id, {
47
40
  currencyName: currency.id,
48
41
  });
@@ -92,19 +85,13 @@ export function getAccountBridgeByFamily(family: string, accountId?: string): Ac
92
85
 
93
86
  if (type === "mock") {
94
87
  const mockBridge = mockBridges[family];
95
- // TODO Remove once we delete mock bridges tests
96
- if (mockBridge) {
97
- if (typeof mockBridge.loadCoinConfig === "function") {
98
- mockBridge.loadCoinConfig();
99
- }
100
- return wrapAccountBridge(mockBridge.accountBridge);
101
- }
88
+ if (mockBridge) return wrapAccountBridge(mockBridge.accountBridge);
102
89
  }
103
90
  }
104
91
 
105
92
  if (alpacaized[family]) {
106
93
  if (!bridgeCache[family]) {
107
- bridgeCache[family] = wrapAccountBridge(getAlpacaAccountBridge(family, "local"));
94
+ bridgeCache[family] = getAlpacaAccountBridge(family, "local");
108
95
  }
109
96
  return bridgeCache[family];
110
97
  }