@ledgerhq/live-common 34.50.0-nightly.5 → 34.50.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 (380) 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/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  4. package/lib/bridge/generic-alpaca/alpaca/index.js +0 -3
  5. package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  6. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts +4 -4
  7. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
  8. package/lib/bridge/generic-alpaca/buildSubAccounts.js +9 -7
  9. package/lib/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
  10. package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  11. package/lib/bridge/generic-alpaca/createTransaction.js +0 -11
  12. package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
  13. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  14. package/lib/bridge/generic-alpaca/getAccountShape.js +9 -15
  15. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  16. package/lib/bridge/generic-alpaca/getTransactionStatus.js +1 -1
  17. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  18. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  19. package/lib/bridge/generic-alpaca/prepareTransaction.js +2 -30
  20. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  21. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  22. package/lib/bridge/generic-alpaca/signer/index.js +0 -37
  23. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  24. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -2
  25. package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  26. package/lib/bridge/generic-alpaca/signer/signTransaction.js +1 -8
  27. package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  28. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +1 -15
  29. package/lib/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
  30. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +3 -5
  31. package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -1
  32. package/lib/bridge/generic-alpaca/tests/signOperation.test.js +1 -1
  33. package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  34. package/lib/bridge/generic-alpaca/types.d.ts +1 -1
  35. package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/utils.d.ts +2 -2
  37. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  38. package/lib/bridge/generic-alpaca/utils.js +4 -23
  39. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  40. package/lib/bridge/impl.d.ts.map +1 -1
  41. package/lib/bridge/impl.js +0 -1
  42. package/lib/bridge/impl.js.map +1 -1
  43. package/lib/e2e/enum/Account.d.ts +0 -6
  44. package/lib/e2e/enum/Account.d.ts.map +1 -1
  45. package/lib/e2e/enum/Account.js +0 -8
  46. package/lib/e2e/enum/Account.js.map +1 -1
  47. package/lib/e2e/enum/AppInfos.d.ts +0 -2
  48. package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
  49. package/lib/e2e/enum/AppInfos.js +0 -2
  50. package/lib/e2e/enum/AppInfos.js.map +1 -1
  51. package/lib/e2e/enum/Currency.d.ts +0 -4
  52. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  53. package/lib/e2e/enum/Currency.js +0 -6
  54. package/lib/e2e/enum/Currency.js.map +1 -1
  55. package/lib/e2e/enum/Network.d.ts +1 -3
  56. package/lib/e2e/enum/Network.d.ts.map +1 -1
  57. package/lib/e2e/enum/Network.js +0 -2
  58. package/lib/e2e/enum/Network.js.map +1 -1
  59. package/lib/e2e/enum/TokenType.d.ts +1 -2
  60. package/lib/e2e/enum/TokenType.d.ts.map +1 -1
  61. package/lib/e2e/enum/TokenType.js +0 -1
  62. package/lib/e2e/enum/TokenType.js.map +1 -1
  63. package/lib/e2e/enum/TransactionStatus.d.ts +1 -4
  64. package/lib/e2e/enum/TransactionStatus.d.ts.map +1 -1
  65. package/lib/e2e/enum/TransactionStatus.js +0 -3
  66. package/lib/e2e/enum/TransactionStatus.js.map +1 -1
  67. package/lib/e2e/speculos.d.ts +0 -1
  68. package/lib/e2e/speculos.d.ts.map +1 -1
  69. package/lib/e2e/speculos.js +1 -35
  70. package/lib/e2e/speculos.js.map +1 -1
  71. package/lib/exchange/platform/types.d.ts +0 -2
  72. package/lib/exchange/platform/types.d.ts.map +1 -1
  73. package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
  74. package/lib/exchange/swap/completeExchange.js +1 -22
  75. package/lib/exchange/swap/completeExchange.js.map +1 -1
  76. package/lib/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  77. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js +0 -8
  78. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  79. package/lib/families/tezos/react.d.ts +1 -2
  80. package/lib/families/tezos/react.d.ts.map +1 -1
  81. package/lib/families/tezos/react.js +1 -19
  82. package/lib/families/tezos/react.js.map +1 -1
  83. package/lib/families/tezos/setup.d.ts +4 -1
  84. package/lib/families/tezos/setup.d.ts.map +1 -1
  85. package/lib/families/tezos/setup.js +11 -3
  86. package/lib/families/tezos/setup.js.map +1 -1
  87. package/lib/generated/bridge/js.d.ts +1 -0
  88. package/lib/generated/bridge/js.d.ts.map +1 -1
  89. package/lib/generated/bridge/js.js +12 -10
  90. package/lib/generated/bridge/js.js.map +1 -1
  91. package/lib/hw/actions/completeExchange.d.ts +0 -2
  92. package/lib/hw/actions/completeExchange.d.ts.map +1 -1
  93. package/lib/hw/actions/completeExchange.js +0 -1
  94. package/lib/hw/actions/completeExchange.js.map +1 -1
  95. package/lib/hw/signMessage/index.d.ts.map +1 -1
  96. package/lib/hw/signMessage/index.js +0 -7
  97. package/lib/hw/signMessage/index.js.map +1 -1
  98. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +3 -4
  99. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  100. package/lib/modularDrawer/hooks/useRightBalanceAsset.js +47 -13
  101. package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
  102. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +5 -1
  103. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  104. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +55 -15
  105. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
  106. package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
  107. package/lib/modularDrawer/modules/createAssetConfiguration.js +2 -2
  108. package/lib/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
  109. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  110. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  111. package/lib/modularDrawer/modules/createNetworkConfiguration.js +3 -1
  112. package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  113. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +2 -0
  114. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +1 -0
  115. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +28 -0
  116. package/lib/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -0
  117. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
  118. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
  119. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js +17 -0
  120. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
  121. package/lib/modularDrawer/utils/currencyUtils.d.ts.map +1 -1
  122. package/lib/modularDrawer/utils/currencyUtils.js.map +1 -1
  123. package/lib/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
  124. package/lib/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
  125. package/lib/modularDrawer/utils/getProviderCurrency.js +14 -0
  126. package/lib/modularDrawer/utils/getProviderCurrency.js.map +1 -0
  127. package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts +11 -0
  128. package/lib/modularDrawer/utils/haveOneCommonProvider.d.ts.map +1 -0
  129. package/lib/modularDrawer/utils/haveOneCommonProvider.js +29 -0
  130. package/lib/modularDrawer/utils/haveOneCommonProvider.js.map +1 -0
  131. package/lib/modularDrawer/utils/index.d.ts +6 -3
  132. package/lib/modularDrawer/utils/index.d.ts.map +1 -1
  133. package/lib/modularDrawer/utils/index.js +12 -3
  134. package/lib/modularDrawer/utils/index.js.map +1 -1
  135. package/lib/modularDrawer/utils/index.test.js +26 -0
  136. package/lib/modularDrawer/utils/index.test.js.map +1 -1
  137. package/lib/modularDrawer/utils/type.d.ts +6 -0
  138. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  139. package/lib/wallet-api/constants.d.ts +1 -1
  140. package/lib/wallet-api/constants.d.ts.map +1 -1
  141. package/lib-es/__tests__/test-helpers/bridge.js +1 -1
  142. package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
  143. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  144. package/lib-es/bridge/generic-alpaca/alpaca/index.js +0 -3
  145. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  146. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts +4 -4
  147. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
  148. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js +9 -7
  149. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
  150. package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
  151. package/lib-es/bridge/generic-alpaca/createTransaction.js +0 -11
  152. package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
  153. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  154. package/lib-es/bridge/generic-alpaca/getAccountShape.js +9 -15
  155. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  156. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +1 -1
  157. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  158. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  159. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +2 -30
  160. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  161. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  162. package/lib-es/bridge/generic-alpaca/signer/index.js +1 -38
  163. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  164. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +0 -2
  165. package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
  166. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js +0 -6
  167. package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
  168. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js +1 -15
  169. package/lib-es/bridge/generic-alpaca/tests/estimateMaxSpendable.test.js.map +1 -1
  170. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +3 -5
  171. package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -1
  172. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +1 -1
  173. package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
  174. package/lib-es/bridge/generic-alpaca/types.d.ts +1 -1
  175. package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
  176. package/lib-es/bridge/generic-alpaca/utils.d.ts +2 -2
  177. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  178. package/lib-es/bridge/generic-alpaca/utils.js +4 -23
  179. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  180. package/lib-es/bridge/impl.d.ts.map +1 -1
  181. package/lib-es/bridge/impl.js +0 -1
  182. package/lib-es/bridge/impl.js.map +1 -1
  183. package/lib-es/e2e/enum/Account.d.ts +0 -6
  184. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  185. package/lib-es/e2e/enum/Account.js +0 -8
  186. package/lib-es/e2e/enum/Account.js.map +1 -1
  187. package/lib-es/e2e/enum/AppInfos.d.ts +0 -2
  188. package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
  189. package/lib-es/e2e/enum/AppInfos.js +0 -2
  190. package/lib-es/e2e/enum/AppInfos.js.map +1 -1
  191. package/lib-es/e2e/enum/Currency.d.ts +0 -4
  192. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  193. package/lib-es/e2e/enum/Currency.js +0 -6
  194. package/lib-es/e2e/enum/Currency.js.map +1 -1
  195. package/lib-es/e2e/enum/Network.d.ts +1 -3
  196. package/lib-es/e2e/enum/Network.d.ts.map +1 -1
  197. package/lib-es/e2e/enum/Network.js +0 -2
  198. package/lib-es/e2e/enum/Network.js.map +1 -1
  199. package/lib-es/e2e/enum/TokenType.d.ts +1 -2
  200. package/lib-es/e2e/enum/TokenType.d.ts.map +1 -1
  201. package/lib-es/e2e/enum/TokenType.js +0 -1
  202. package/lib-es/e2e/enum/TokenType.js.map +1 -1
  203. package/lib-es/e2e/enum/TransactionStatus.d.ts +1 -4
  204. package/lib-es/e2e/enum/TransactionStatus.d.ts.map +1 -1
  205. package/lib-es/e2e/enum/TransactionStatus.js +0 -3
  206. package/lib-es/e2e/enum/TransactionStatus.js.map +1 -1
  207. package/lib-es/e2e/speculos.d.ts +0 -1
  208. package/lib-es/e2e/speculos.d.ts.map +1 -1
  209. package/lib-es/e2e/speculos.js +0 -33
  210. package/lib-es/e2e/speculos.js.map +1 -1
  211. package/lib-es/exchange/platform/types.d.ts +0 -2
  212. package/lib-es/exchange/platform/types.d.ts.map +1 -1
  213. package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
  214. package/lib-es/exchange/swap/completeExchange.js +1 -22
  215. package/lib-es/exchange/swap/completeExchange.js.map +1 -1
  216. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  217. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js +0 -8
  218. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  219. package/lib-es/families/tezos/react.d.ts +1 -2
  220. package/lib-es/families/tezos/react.d.ts.map +1 -1
  221. package/lib-es/families/tezos/react.js +0 -17
  222. package/lib-es/families/tezos/react.js.map +1 -1
  223. package/lib-es/families/tezos/setup.d.ts +4 -1
  224. package/lib-es/families/tezos/setup.d.ts.map +1 -1
  225. package/lib-es/families/tezos/setup.js +9 -2
  226. package/lib-es/families/tezos/setup.js.map +1 -1
  227. package/lib-es/generated/bridge/js.d.ts +1 -0
  228. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  229. package/lib-es/generated/bridge/js.js +2 -0
  230. package/lib-es/generated/bridge/js.js.map +1 -1
  231. package/lib-es/hw/actions/completeExchange.d.ts +0 -2
  232. package/lib-es/hw/actions/completeExchange.d.ts.map +1 -1
  233. package/lib-es/hw/actions/completeExchange.js +0 -1
  234. package/lib-es/hw/actions/completeExchange.js.map +1 -1
  235. package/lib-es/hw/signMessage/index.d.ts.map +1 -1
  236. package/lib-es/hw/signMessage/index.js +0 -7
  237. package/lib-es/hw/signMessage/index.js.map +1 -1
  238. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +3 -4
  239. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
  240. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +47 -13
  241. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -1
  242. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +5 -1
  243. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
  244. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +55 -15
  245. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -1
  246. package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
  247. package/lib-es/modularDrawer/modules/createAssetConfiguration.js +2 -2
  248. package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
  249. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  250. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  251. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +3 -1
  252. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  253. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js +1 -1
  254. package/lib-es/modularDrawer/utils/__tests__/currencyUtils.test.js.map +1 -1
  255. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts +2 -0
  256. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.d.ts.map +1 -0
  257. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js +26 -0
  258. package/lib-es/modularDrawer/utils/__tests__/haveOneCommonProvider.test.js.map +1 -0
  259. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
  260. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
  261. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js +13 -0
  262. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
  263. package/lib-es/modularDrawer/utils/currencyUtils.d.ts.map +1 -1
  264. package/lib-es/modularDrawer/utils/currencyUtils.js.map +1 -1
  265. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts +3 -0
  266. package/lib-es/modularDrawer/utils/getProviderCurrency.d.ts.map +1 -0
  267. package/lib-es/modularDrawer/utils/getProviderCurrency.js +10 -0
  268. package/lib-es/modularDrawer/utils/getProviderCurrency.js.map +1 -0
  269. package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts +11 -0
  270. package/lib-es/modularDrawer/utils/haveOneCommonProvider.d.ts.map +1 -0
  271. package/lib-es/modularDrawer/utils/haveOneCommonProvider.js +25 -0
  272. package/lib-es/modularDrawer/utils/haveOneCommonProvider.js.map +1 -0
  273. package/lib-es/modularDrawer/utils/index.d.ts +6 -3
  274. package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
  275. package/lib-es/modularDrawer/utils/index.js +10 -3
  276. package/lib-es/modularDrawer/utils/index.js.map +1 -1
  277. package/lib-es/modularDrawer/utils/index.test.js +27 -1
  278. package/lib-es/modularDrawer/utils/index.test.js.map +1 -1
  279. package/lib-es/modularDrawer/utils/type.d.ts +6 -0
  280. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  281. package/lib-es/wallet-api/constants.d.ts +1 -1
  282. package/lib-es/wallet-api/constants.d.ts.map +1 -1
  283. package/package.json +73 -75
  284. package/src/__tests__/test-helpers/bridge.ts +1 -1
  285. package/src/bridge/generic-alpaca/alpaca/index.ts +0 -4
  286. package/src/bridge/generic-alpaca/buildSubAccounts.ts +28 -28
  287. package/src/bridge/generic-alpaca/createTransaction.ts +0 -11
  288. package/src/bridge/generic-alpaca/getAccountShape.ts +15 -22
  289. package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -1
  290. package/src/bridge/generic-alpaca/prepareTransaction.ts +2 -48
  291. package/src/bridge/generic-alpaca/signer/index.ts +1 -44
  292. package/src/bridge/generic-alpaca/signer/signTransaction.ts +0 -10
  293. package/src/bridge/generic-alpaca/tests/estimateMaxSpendable.test.ts +1 -15
  294. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +3 -5
  295. package/src/bridge/generic-alpaca/tests/signOperation.test.ts +1 -1
  296. package/src/bridge/generic-alpaca/types.ts +1 -9
  297. package/src/bridge/generic-alpaca/utils.ts +6 -25
  298. package/src/bridge/impl.ts +0 -1
  299. package/src/e2e/enum/Account.ts +0 -41
  300. package/src/e2e/enum/AppInfos.ts +0 -4
  301. package/src/e2e/enum/Currency.ts +0 -21
  302. package/src/e2e/enum/Network.ts +0 -2
  303. package/src/e2e/enum/TokenType.ts +0 -1
  304. package/src/e2e/enum/TransactionStatus.ts +0 -3
  305. package/src/e2e/speculos.ts +0 -34
  306. package/src/exchange/platform/types.ts +0 -2
  307. package/src/exchange/swap/completeExchange.ts +2 -32
  308. package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +0 -8
  309. package/src/families/tezos/react.ts +1 -20
  310. package/src/families/tezos/setup.ts +22 -3
  311. package/src/generated/bridge/js.ts +2 -0
  312. package/src/hw/actions/completeExchange.ts +0 -3
  313. package/src/hw/signMessage/index.ts +0 -10
  314. package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +76 -16
  315. package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +95 -25
  316. package/src/modularDrawer/modules/createAssetConfiguration.ts +11 -3
  317. package/src/modularDrawer/modules/createNetworkConfiguration.ts +8 -1
  318. package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +1 -1
  319. package/src/modularDrawer/utils/__tests__/haveOneCommonProvider.test.ts +34 -0
  320. package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +25 -0
  321. package/src/modularDrawer/utils/currencyUtils.ts +1 -0
  322. package/src/modularDrawer/utils/getProviderCurrency.ts +13 -0
  323. package/src/modularDrawer/utils/haveOneCommonProvider.ts +31 -0
  324. package/src/modularDrawer/utils/index.test.ts +32 -1
  325. package/src/modularDrawer/utils/index.ts +23 -4
  326. package/src/modularDrawer/utils/type.ts +6 -0
  327. package/lib/e2e/families/hedera.d.ts +0 -2
  328. package/lib/e2e/families/hedera.d.ts.map +0 -1
  329. package/lib/e2e/families/hedera.js +0 -11
  330. package/lib/e2e/families/hedera.js.map +0 -1
  331. package/lib/e2e/families/sui.d.ts +0 -2
  332. package/lib/e2e/families/sui.d.ts.map +0 -1
  333. package/lib/e2e/families/sui.js +0 -11
  334. package/lib/e2e/families/sui.js.map +0 -1
  335. package/lib/families/evm/shouldUseReceiveOptions.d.ts +0 -3
  336. package/lib/families/evm/shouldUseReceiveOptions.d.ts.map +0 -1
  337. package/lib/families/evm/shouldUseReceiveOptions.js +0 -5
  338. package/lib/families/evm/shouldUseReceiveOptions.js.map +0 -1
  339. package/lib/families/evm/shouldUseReceiveOptions.test.d.ts +0 -2
  340. package/lib/families/evm/shouldUseReceiveOptions.test.d.ts.map +0 -1
  341. package/lib/families/evm/shouldUseReceiveOptions.test.js +0 -26
  342. package/lib/families/evm/shouldUseReceiveOptions.test.js.map +0 -1
  343. package/lib/families/hedera/exchange.d.ts +0 -9
  344. package/lib/families/hedera/exchange.d.ts.map +0 -1
  345. package/lib/families/hedera/exchange.js +0 -36
  346. package/lib/families/hedera/exchange.js.map +0 -1
  347. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +0 -7
  348. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +0 -1
  349. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -224
  350. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +0 -1
  351. package/lib-es/e2e/families/hedera.d.ts +0 -2
  352. package/lib-es/e2e/families/hedera.d.ts.map +0 -1
  353. package/lib-es/e2e/families/hedera.js +0 -7
  354. package/lib-es/e2e/families/hedera.js.map +0 -1
  355. package/lib-es/e2e/families/sui.d.ts +0 -2
  356. package/lib-es/e2e/families/sui.d.ts.map +0 -1
  357. package/lib-es/e2e/families/sui.js +0 -7
  358. package/lib-es/e2e/families/sui.js.map +0 -1
  359. package/lib-es/families/evm/shouldUseReceiveOptions.d.ts +0 -3
  360. package/lib-es/families/evm/shouldUseReceiveOptions.d.ts.map +0 -1
  361. package/lib-es/families/evm/shouldUseReceiveOptions.js +0 -3
  362. package/lib-es/families/evm/shouldUseReceiveOptions.js.map +0 -1
  363. package/lib-es/families/evm/shouldUseReceiveOptions.test.d.ts +0 -2
  364. package/lib-es/families/evm/shouldUseReceiveOptions.test.d.ts.map +0 -1
  365. package/lib-es/families/evm/shouldUseReceiveOptions.test.js +0 -21
  366. package/lib-es/families/evm/shouldUseReceiveOptions.test.js.map +0 -1
  367. package/lib-es/families/hedera/exchange.d.ts +0 -9
  368. package/lib-es/families/hedera/exchange.d.ts.map +0 -1
  369. package/lib-es/families/hedera/exchange.js +0 -29
  370. package/lib-es/families/hedera/exchange.js.map +0 -1
  371. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts +0 -7
  372. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +0 -1
  373. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +0 -217
  374. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +0 -1
  375. package/src/e2e/families/hedera.ts +0 -7
  376. package/src/e2e/families/sui.ts +0 -7
  377. package/src/families/evm/shouldUseReceiveOptions.test.ts +0 -25
  378. package/src/families/evm/shouldUseReceiveOptions.ts +0 -4
  379. package/src/families/hedera/exchange.ts +0 -48
  380. package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +0 -231
@@ -1,15 +1,12 @@
1
1
  import xrpGetAddress from "@ledgerhq/coin-xrp/signer/getAddress";
2
2
  import stellarGetAddress from "@ledgerhq/coin-stellar/signer/getAddress";
3
3
  import Stellar from "@ledgerhq/hw-app-str";
4
- import { signTransaction, stellarSignTransaction, tezosSignTransaction } from "./signTransaction";
4
+ import { signTransaction, stellarSignTransaction } from "./signTransaction";
5
5
  import { StrKey } from "@stellar/stellar-sdk";
6
6
  import { CreateSigner, executeWithSigner } from "../../setup";
7
7
  import Xrp from "@ledgerhq/hw-app-xrp";
8
8
  import Transport from "@ledgerhq/hw-transport";
9
9
  import { AlpacaSigner } from "./types";
10
- import { DerivationType, LedgerSigner as TaquitoLedgerSigner } from "@taquito/ledger-signer";
11
- import tezosGetAddress from "@ledgerhq/coin-tezos/signer/getAddress";
12
- import Tezos from "@ledgerhq/hw-app-tezos";
13
10
 
14
11
  const createSignerXrp: CreateSigner<Xrp> = (transport: Transport) => {
15
12
  return new Xrp(transport);
@@ -40,39 +37,6 @@ const createSignerStellar: CreateSigner<Stellar> = (transport: Transport) => {
40
37
 
41
38
  const signerContextStellar = executeWithSigner(createSignerStellar);
42
39
 
43
- const createSignerTezos: CreateSigner<
44
- Tezos & { createLedgerSigner: (path: string, prompt: boolean, derivationType: number) => any }
45
- > = (transport: Transport) => {
46
- const tezos = new Tezos(transport);
47
- // align with genericSignOperation that calls signer.signTransaction
48
- return Object.assign(tezos, {
49
- async signTransaction(path: string, rawTxHex: string) {
50
- const { signature } = await tezos.signOperation(path, rawTxHex, {});
51
- return signature;
52
- },
53
- async getAddress(path: string, { verify }: { verify?: boolean } = {}) {
54
- // Use Taquito LedgerSigner to retrieve base58 public key and matching pkh (like oldbridge)
55
- const ledgerSigner = new TaquitoLedgerSigner(
56
- transport,
57
- path,
58
- !!verify,
59
- DerivationType.ED25519,
60
- );
61
- const address = await ledgerSigner.publicKeyHash();
62
- const publicKey = await ledgerSigner.publicKey();
63
- return { path, address, publicKey };
64
- },
65
- createLedgerSigner(path: string, prompt: boolean, derivationType: number) {
66
- // Map 0 -> ED25519, 1 -> SECP256K1, 2 -> P256 by convention
67
- let dt: DerivationType = DerivationType.ED25519;
68
- if (derivationType === 1) dt = DerivationType.SECP256K1;
69
- else if (derivationType === 2) dt = DerivationType.P256;
70
- return new TaquitoLedgerSigner(transport, path, prompt, dt);
71
- },
72
- });
73
- };
74
- const signerContextTezos = executeWithSigner(createSignerTezos);
75
-
76
40
  export function getSigner(network: string): AlpacaSigner {
77
41
  switch (network) {
78
42
  case "ripple":
@@ -90,13 +54,6 @@ export function getSigner(network: string): AlpacaSigner {
90
54
  context: signerContextStellar,
91
55
  };
92
56
  }
93
- case "tezos": {
94
- return {
95
- getAddress: tezosGetAddress(signerContextTezos),
96
- signTransaction: tezosSignTransaction(executeWithSigner(createSignerTezos)),
97
- context: signerContextTezos,
98
- };
99
- }
100
57
  }
101
58
  throw new Error(`signer for ${network} not implemented`);
102
59
  }
@@ -1,6 +1,5 @@
1
1
  import { SignerContext } from "@ledgerhq/coin-framework/signer";
2
2
  import { StellarSigner } from "@ledgerhq/coin-stellar/types/signer";
3
- import { TezosSigner } from "@ledgerhq/coin-tezos/types/signer";
4
3
  import { LegacySigner, SignTransactionOptions } from "./types";
5
4
 
6
5
  export const signTransaction = <Signer extends LegacySigner>(
@@ -24,12 +23,3 @@ export const stellarSignTransaction = (signerContext: SignerContext<StellarSigne
24
23
  return signedTx.signature.toString("base64"); // It should return a Buffer
25
24
  };
26
25
  };
27
-
28
- export const tezosSignTransaction = (signerContext: SignerContext<TezosSigner>) => {
29
- return async (deviceId: string, { path, rawTxHex }: SignTransactionOptions) => {
30
- const signed = await signerContext(deviceId, signer =>
31
- signer.signOperation(path, rawTxHex, {}),
32
- );
33
- return signed.signature;
34
- };
35
- };
@@ -35,23 +35,9 @@ const dummyAccounts = [
35
35
  freshAddress: "s123",
36
36
  pendingOperations: [],
37
37
  },
38
- {
39
- id: "js:2:tezos:t123",
40
- type: "Account",
41
- spendableBalance: new BigNumber(50000000),
42
- balance: new BigNumber(60000000),
43
- currency: {
44
- id: "tezos",
45
- family: "tezos",
46
- name: "Tezos",
47
- units: [{ name: "XTZ", magnitude: 6 }],
48
- },
49
- freshAddress: "t123",
50
- pendingOperations: [],
51
- },
52
38
  ] as unknown as Account[];
53
39
 
54
- ["xrp", "stellar", "tezos"].forEach((currencyName, idx) => {
40
+ ["xrp", "stellar"].forEach((currencyName, idx) => {
55
41
  describe(`genericEstimateMaxSpendable for ${currencyName}`, () => {
56
42
  const dummyAccount = dummyAccounts[idx];
57
43
 
@@ -117,11 +117,9 @@ describe("genericGetAccountShape (stellar & xrp)", () => {
117
117
  lastPagingToken: "pt1",
118
118
  });
119
119
 
120
- const assetsBalancePassed = buildSubAccountsMock.mock.calls[0][0].allTokenAssetsBalances;
121
- expect(assetsBalancePassed).toEqual([
122
- { asset: { symbol: "TOK1", type: "token" }, value: "42" },
123
- { asset: { symbol: "TOK_IGNORE", type: "token" }, value: "5" },
124
- ]);
120
+ const assetsBalancePassed = buildSubAccountsMock.mock.calls[0][0].assetsBalance;
121
+ expect(assetsBalancePassed).toHaveLength(1);
122
+ expect(assetsBalancePassed[0].asset.symbol).toBe("TOK1");
125
123
 
126
124
  const assetOpsPassed = buildSubAccountsMock.mock.calls[0][0].operations;
127
125
  expect(assetOpsPassed).toHaveLength(1);
@@ -14,7 +14,7 @@ jest.mock("../utils", () => ({
14
14
  transactionToIntent: jest.fn(),
15
15
  }));
16
16
  describe("genericSignOperation", () => {
17
- const networks = ["xrp", "stellar", "tezos"];
17
+ const networks = ["xrp", "stellar"];
18
18
  const kind = "local";
19
19
 
20
20
  const mockSignerContext = jest.fn();
@@ -18,16 +18,8 @@ export type GenericTransaction = TransactionCommon & {
18
18
  memoType?: string | null;
19
19
  memoValue?: string | null;
20
20
  data?: Buffer;
21
- mode?:
22
- | "send"
23
- | "changeTrust"
24
- | "send-legacy"
25
- | "send-eip1559"
26
- | "delegate"
27
- | "stake"
28
- | "undelegate"
29
- | "unstake";
30
21
  type?: number;
22
+ mode?: "send" | "changeTrust" | "send-legacy" | "send-eip1559";
31
23
  assetReference?: string;
32
24
  assetOwner?: string;
33
25
  networkInfo?: NetworkInfo | null;
@@ -1,5 +1,5 @@
1
1
  import { encodeOperationId } from "@ledgerhq/coin-framework/operation";
2
- import { Account, Operation, OperationType } from "@ledgerhq/types-live";
2
+ import { Account, Operation, OperationType, TransactionCommon } from "@ledgerhq/types-live";
3
3
  import BigNumber from "bignumber.js";
4
4
  import { fromBigNumberToBigInt } from "@ledgerhq/coin-framework/utils";
5
5
  import {
@@ -128,18 +128,15 @@ export function transactionToIntent(
128
128
  data?: { type: string; value?: unknown };
129
129
  } {
130
130
  const intentType = (computeIntentType ?? defaultComputeIntentType)(transaction);
131
- const isStaking = ["stake", "unstake"].includes(intentType);
132
- const amount = isStaking ? 0n : fromBigNumberToBigInt(transaction.amount, 0n);
133
- const useAllAmount = isStaking || !!transaction.useAllAmount;
134
131
  const res: TransactionIntent & { memo?: { type: string; value?: string } } & {
135
132
  data?: { type: string; value?: unknown };
136
133
  } = {
137
134
  type: intentType,
138
135
  sender: account.freshAddress,
139
136
  recipient: transaction.recipient,
140
- amount,
137
+ amount: fromBigNumberToBigInt(transaction.amount, BigInt(0)),
141
138
  asset: { type: "native", name: account.currency.name, unit: account.currency.units[0] },
142
- useAllAmount,
139
+ useAllAmount: !!transaction.useAllAmount,
143
140
  feesStrategy:
144
141
  transaction.feesStrategy === "custom" ? undefined : transaction.feesStrategy ?? undefined,
145
142
  data: Buffer.isBuffer(transaction.data)
@@ -174,27 +171,11 @@ export function transactionToIntent(
174
171
 
175
172
  export const buildOptimisticOperation = (
176
173
  account: Account,
177
- transaction: GenericTransaction,
174
+ transaction: TransactionCommon,
178
175
  sequenceNumber?: number,
179
176
  ): Operation => {
180
- let type: OperationType;
181
- switch (transaction.mode) {
182
- case "changeTrust":
183
- type = "OPT_IN";
184
- break;
185
- case "delegate":
186
- case "stake":
187
- type = "DELEGATE";
188
- break;
189
- case "undelegate":
190
- case "unstake":
191
- type = "UNDELEGATE";
192
- break;
193
- default:
194
- type = "OUT";
195
- break;
196
- }
197
- const fees = BigInt(transaction.fees?.toString() || "0");
177
+ const type = transaction["mode"] === "changeTrust" ? "OPT_IN" : "OUT";
178
+ const fees = BigInt(transaction["fees"]?.toString() || "0");
198
179
  const { subAccountId } = transaction;
199
180
  const { subAccounts } = account;
200
181
 
@@ -27,7 +27,6 @@ import { getCryptoAssetsStore, setCryptoAssetsStore } from "./crypto-assets";
27
27
  const alpacaized = {
28
28
  xrp: true,
29
29
  stellar: true,
30
- tezos: true,
31
30
  };
32
31
 
33
32
  // let accountBridgeInstance: AccountBridge<any> | null = null;
@@ -110,12 +110,6 @@ export class Account {
110
110
  "0xa1baa625c5E6A9304cB7AcD86d2fee6B710eC3eB",
111
111
  1,
112
112
  );
113
- static readonly BSC_POL = new Account(
114
- Currency.BSC_POL,
115
- "BNB Chain 1",
116
- "0x4BE2E2B8872AA298D6d123b9211B53E41f611566",
117
- 0,
118
- );
119
113
  static readonly BSC_SHIBA = new Account(
120
114
  Currency.BSC_SHIBA,
121
115
  "BNB Chain 1",
@@ -248,8 +242,6 @@ export class Account {
248
242
  undefined,
249
243
  [Nft.ANTITUS, Nft.PODIUM, Nft.NY_LA_MUSE],
250
244
  );
251
- // don't use this account as a recipient, it's balance
252
- // should stay close to null to allow for error message testing
253
245
  static readonly ETH_2 = new Account(
254
246
  Currency.ETH,
255
247
  "Ethereum 2",
@@ -284,8 +276,6 @@ export class Account {
284
276
  0,
285
277
  );
286
278
 
287
- static readonly HEDERA_1 = new Account(Currency.HBAR, "Hedera 1", "0.0.9374930", 0);
288
-
289
279
  static readonly INJ_1 = new Account(
290
280
  Currency.INJ,
291
281
  "Injective 1",
@@ -526,19 +516,6 @@ export class Account {
526
516
  1,
527
517
  );
528
518
 
529
- static readonly SUI_1 = new Account(
530
- Currency.SUI,
531
- "Sui 1",
532
- "0xc6169bcce8718609e43d179b087e6c1e2ac28e5325660af34d22fb5ce284031e",
533
- 0,
534
- );
535
- static readonly SUI_2 = new Account(
536
- Currency.SUI,
537
- "Sui 2",
538
- "0x6644c1ce77c5e5ef8d8bd3ae2a4e18239e5d418a5e0800ed5037818399e3a7f6",
539
- 1,
540
- );
541
-
542
519
  static readonly EMPTY = new Account(Currency.BTC, "Empty", "", 0);
543
520
  }
544
521
 
@@ -653,24 +630,6 @@ export class TokenAccount extends Account {
653
630
  TokenType.TRC20,
654
631
  Account.TRX_1,
655
632
  );
656
-
657
- static readonly SUI_USDC_1 = new TokenAccount(
658
- Currency.SUI_USDC,
659
- "SUI USDC 1",
660
- Account.SUI_1.address,
661
- 0,
662
- TokenType.ERC20,
663
- Account.SUI_1,
664
- );
665
-
666
- static readonly SUI_USDC_2 = new TokenAccount(
667
- Currency.SUI_USDC,
668
- "SUI USDC 2",
669
- Account.SUI_2.address,
670
- 1,
671
- TokenType.ERC20,
672
- Account.SUI_2,
673
- );
674
633
  }
675
634
 
676
635
  export type AccountType = Account | TokenAccount;
@@ -33,8 +33,6 @@ export class AppInfos {
33
33
 
34
34
  static readonly STELLAR = new AppInfos("Stellar");
35
35
 
36
- static readonly SUI = new AppInfos("Sui");
37
-
38
36
  static readonly BITCOIN_CASH = new AppInfos("Bitcoin Cash");
39
37
 
40
38
  static readonly ALGORAND = new AppInfos("Algorand");
@@ -64,6 +62,4 @@ export class AppInfos {
64
62
  static readonly LTC = new AppInfos("Litecoin");
65
63
 
66
64
  static readonly KASPA = new AppInfos("Kaspa");
67
-
68
- static readonly HEDERA = new AppInfos("Hedera");
69
65
  }
@@ -27,10 +27,6 @@ export class Currency {
27
27
 
28
28
  static readonly KAS = new Currency("Kaspa", "KAS", "kaspa", AppInfos.KASPA, [Network.KASPA]);
29
29
 
30
- static readonly HBAR = new Currency("Hedera", "HBAR", "hedera", AppInfos.HEDERA, [
31
- Network.HEDERA,
32
- ]);
33
-
34
30
  static readonly tBTC = new Currency(
35
31
  "Bitcoin Testnet",
36
32
  "𝚝BTC",
@@ -83,7 +79,6 @@ export class Currency {
83
79
  static readonly XLM = new Currency("Stellar", "XLM", "stellar", AppInfos.STELLAR, [
84
80
  Network.STELLAR,
85
81
  ]);
86
- static readonly SUI = new Currency("Sui", "SUI", "sui", AppInfos.SUI, [Network.SUI]);
87
82
  static readonly BCH = new Currency("Bitcoin Cash", "BCH", "bitcoin_cash", AppInfos.BITCOIN_CASH, [
88
83
  Network.BITCOIN_CASH,
89
84
  ]);
@@ -157,13 +152,6 @@ export class Currency {
157
152
  AppInfos.BNB_CHAIN,
158
153
  [Network.BNB_CHAIN, Network.POLYGON],
159
154
  );
160
- static readonly BSC_POL = new Currency(
161
- "Matic Token",
162
- "MATIC",
163
- "bsc/bep20/matic_token",
164
- AppInfos.BNB_CHAIN,
165
- [Network.BNB_CHAIN],
166
- );
167
155
  static readonly BSC_SHIBA = new Currency("Shiba Inu", "SHIB", "bsc", AppInfos.BNB_CHAIN, [
168
156
  Network.BNB_CHAIN,
169
157
  Network.ETHEREUM,
@@ -208,13 +196,4 @@ export class Currency {
208
196
  static readonly OP = new Currency("OP Mainnet", "OP", "optimism", AppInfos.ETHEREUM, [
209
197
  Network.OPTIMISM,
210
198
  ]);
211
-
212
- static readonly SUI_USDC = new Currency(
213
- "USDC",
214
- "USDC",
215
- "sui/coin/usdc_0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::usdc",
216
- AppInfos.SUI,
217
- [Network.SUI],
218
- "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7",
219
- );
220
199
  }
@@ -16,7 +16,6 @@ export enum Network {
16
16
  XRP = "XRP",
17
17
  CARDANO = "Cardano",
18
18
  STELLAR = "Stellar",
19
- SUI = "Sui",
20
19
  BITCOIN_CASH = "Bitcoin Cash",
21
20
  ALGORAND = "Algorand",
22
21
  COSMOS = "Cosmos",
@@ -33,5 +32,4 @@ export enum Network {
33
32
  MULTIVERS_X = "MultiversX",
34
33
  LITECOIN = "Litecoin",
35
34
  KASPA = "Kaspa",
36
- HEDERA = "Hedera",
37
35
  }
@@ -2,5 +2,4 @@ export enum TokenType {
2
2
  ERC20 = "erc20",
3
3
  TRC20 = "trc20",
4
4
  SPL = "spl",
5
- SUI = "sui",
6
5
  }
@@ -2,11 +2,8 @@ export enum TransactionStatus {
2
2
  RECEIVED = "Received",
3
3
  DELEGATED = "Delegated",
4
4
  NFT_RECEIVED = "NFT Received",
5
- SEND = "Send",
6
5
  SENT = "Sent",
7
6
  FEES = "Fees",
8
7
  STAKED = "Staked",
9
8
  SENDING = "Sending",
10
- TRANSACTION_SENT = "Transaction sent",
11
- CONFIRMED = "Confirmed",
12
9
  }
@@ -28,7 +28,6 @@ import { sendStellar } from "./families/stellar";
28
28
  import { delegateCardano, sendCardano } from "./families/cardano";
29
29
  import { sendXRP } from "./families/xrp";
30
30
  import { delegateAptos, sendAptos } from "./families/aptos";
31
- import { sendHedera } from "./families/hedera";
32
31
  import { delegateNear } from "./families/near";
33
32
  import { delegateCosmos, sendCosmos } from "./families/cosmos";
34
33
  import { sendKaspa } from "./families/kaspa";
@@ -42,7 +41,6 @@ import { Swap } from "./models/Swap";
42
41
  import { delegateOsmosis } from "./families/osmosis";
43
42
  import { AppInfos } from "./enum/AppInfos";
44
43
  import { DEVICE_LABELS_CONFIG } from "./data/deviceLabelsData";
45
- import { sendSui } from "./families/sui";
46
44
 
47
45
  const isSpeculosRemote = process.env.REMOTE_SPECULOS === "true";
48
46
 
@@ -224,14 +222,6 @@ export const specs: Specs = {
224
222
  },
225
223
  dependency: "",
226
224
  },
227
- Sui: {
228
- currency: getCryptoCurrencyById("sui"),
229
- appQuery: {
230
- model: getSpeculosModel(),
231
- appName: "Sui",
232
- },
233
- dependency: "",
234
- },
235
225
  Bitcoin_Cash: {
236
226
  currency: getCryptoCurrencyById("bitcoin_cash"),
237
227
  appQuery: {
@@ -345,14 +335,6 @@ export const specs: Specs = {
345
335
  },
346
336
  dependency: "",
347
337
  },
348
- Hedera: {
349
- currency: getCryptoCurrencyById("hedera"),
350
- appQuery: {
351
- model: getSpeculosModel(),
352
- appName: "Hedera",
353
- },
354
- dependency: "",
355
- },
356
338
  };
357
339
 
358
340
  export async function startSpeculos(
@@ -641,10 +623,6 @@ export async function goToSettings() {
641
623
  await pressBoth();
642
624
  }
643
625
 
644
- export async function providePublicKey() {
645
- await pressRightButton();
646
- }
647
-
648
626
  type DeviceLabelsReturn = {
649
627
  delegateConfirmLabel: string;
650
628
  delegateVerifyLabel: string;
@@ -673,9 +651,6 @@ export function getDeviceLabels(appInfo: AppInfos): DeviceLabelsReturn {
673
651
  }
674
652
 
675
653
  export async function expectValidAddressDevice(account: Account, addressDisplayed: string) {
676
- if (account.currency === Currency.SUI_USDC) {
677
- providePublicKey();
678
- }
679
654
  const { receiveVerifyLabel, receiveConfirmLabel } = getDeviceLabels(account.currency.speculosApp);
680
655
 
681
656
  await waitFor(receiveVerifyLabel);
@@ -734,15 +709,6 @@ export async function signSendTransaction(tx: Transaction) {
734
709
  case Currency.KAS:
735
710
  await sendKaspa();
736
711
  break;
737
- case Currency.HBAR:
738
- await sendHedera();
739
- break;
740
- case Currency.SUI:
741
- await sendSui();
742
- break;
743
- case Currency.SUI_USDC:
744
- await sendSui();
745
- break;
746
712
  default:
747
713
  throw new Error(`Unsupported currency: ${currencyName.ticker}`);
748
714
  }
@@ -1,4 +1,3 @@
1
- import type { DeviceModelId } from "@ledgerhq/devices";
2
1
  import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
3
2
  import type { Account, AccountLike, AccountRaw, AccountRawLike } from "@ledgerhq/types-live";
4
3
  import type { ExchangeTypes, RateTypes } from "@ledgerhq/hw-app-exchange";
@@ -43,7 +42,6 @@ export type StartExchangeInput = {
43
42
 
44
43
  interface CompleteExchangeInputCommon {
45
44
  rateType?: RateTypes;
46
- deviceModelId?: DeviceModelId;
47
45
  deviceId?: string;
48
46
  provider: string;
49
47
  binaryPayload: string;
@@ -1,4 +1,3 @@
1
- import type { Account } from "@ledgerhq/types-live";
2
1
  import {
3
2
  DisconnectedDeviceDuringOperation,
4
3
  TransportStatusError,
@@ -14,14 +13,12 @@ import {
14
13
  import { getDefaultAccountName } from "@ledgerhq/live-wallet/accountName";
15
14
  import { log } from "@ledgerhq/logs";
16
15
  import BigNumber from "bignumber.js";
17
- import invariant from "invariant";
18
16
  import { Observable } from "rxjs";
19
17
  import { secp256k1 } from "@noble/curves/secp256k1";
20
18
  import { getCurrencyExchangeConfig } from "../";
21
19
  import { getAccountCurrency, getMainAccount } from "../../account";
22
20
  import { getAccountBridge } from "../../bridge";
23
21
  import { TransactionRefusedOnDevice } from "../../errors";
24
- import { handleHederaTrustedFlow } from "../../families/hedera/exchange";
25
22
  import { withDevicePromise } from "../../hw/deviceAccess";
26
23
  import { delay } from "../../promise";
27
24
  import { CompleteExchangeStep, convertTransportError } from "../error";
@@ -30,7 +27,6 @@ import { convertToAppExchangePartnerKey, getSwapProvider } from "../providers";
30
27
  import { CEXProviderConfig } from "../providers/swap";
31
28
  import { isAddressSanctioned } from "@ledgerhq/coin-framework/sanction/index";
32
29
  import { AddressesSanctionedError } from "@ledgerhq/coin-framework/sanction/errors";
33
- import { getCryptoCurrencyById } from "../../currencies";
34
30
 
35
31
  const COMPLETE_EXCHANGE_LOG = "SWAP-CompleteExchange";
36
32
 
@@ -38,16 +34,8 @@ const completeExchange = (
38
34
  input: CompleteExchangeInputSwap,
39
35
  ): Observable<CompleteExchangeRequestEvent> => {
40
36
  let { transaction } = input; // TODO build a tx from the data
41
- const {
42
- deviceId,
43
- deviceModelId,
44
- exchange,
45
- provider,
46
- binaryPayload,
47
- signature,
48
- rateType,
49
- exchangeType,
50
- } = input;
37
+
38
+ const { deviceId, exchange, provider, binaryPayload, signature, rateType, exchangeType } = input;
51
39
 
52
40
  const { fromAccount, fromParentAccount } = exchange;
53
41
  const { toAccount, toParentAccount } = exchange;
@@ -164,24 +152,6 @@ const completeExchange = (
164
152
  await exchange.checkTransactionSignature(goodSign);
165
153
  if (unsubscribed) return;
166
154
 
167
- // Hedera swap payload is filled with user account address,
168
- // but the device app requires the related public key for verification.
169
- // Since this key is stored on-chain, we use the TrustedService
170
- // to fetch a signed descriptor linking the address to its public key.
171
- const hederaCurrency = getCryptoCurrencyById("hedera");
172
- let hederaAccount: Account | null = null;
173
- if (payoutAccount.currency.family === hederaCurrency.family) {
174
- hederaAccount = payoutAccount;
175
- } else if (refundAccount.currency.family === hederaCurrency.family) {
176
- hederaAccount = refundAccount;
177
- }
178
-
179
- if (hederaAccount) {
180
- invariant(deviceModelId, "hedera: deviceModelId is not available");
181
- await handleHederaTrustedFlow({ exchange, hederaAccount, deviceModelId });
182
- if (unsubscribed) return;
183
- }
184
-
185
155
  const payoutAddressParameters = payoutAccountBridge.getSerializedAddressParameters(
186
156
  payoutAccount,
187
157
  mainPayoutCurrency.id,
@@ -59,10 +59,6 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
59
59
  title: "swap.incompatibility.cosmos_title",
60
60
  description: "swap.incompatibility.cosmos_description",
61
61
  },
62
- hedera: {
63
- title: "swap.incompatibility.hedera_title",
64
- description: "swap.incompatibility.hedera_description",
65
- },
66
62
  osmo: {
67
63
  title: "swap.incompatibility.osmo_title",
68
64
  description: "swap.incompatibility.osmo_description",
@@ -75,10 +71,6 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
75
71
  title: "swap.incompatibility.sui_title",
76
72
  description: "swap.incompatibility.sui_description",
77
73
  },
78
- kaspa: {
79
- title: "swap.incompatibility.kaspa_title",
80
- description: "swap.incompatibility.kaspa_description",
81
- },
82
74
  };
83
75
 
84
76
  export const getIncompatibleCurrencyKeys = (exchange: ExchangeSwap) => {
@@ -1,6 +1,6 @@
1
1
  import type { AccountLike } from "@ledgerhq/types-live";
2
2
  import { useEffect, useMemo, useState } from "react";
3
- import { Baker, Delegation, StakingPosition } from "@ledgerhq/coin-tezos/types/index";
3
+ import { Baker, Delegation } from "@ledgerhq/coin-tezos/types/index";
4
4
  import { bakers } from "@ledgerhq/coin-tezos/network/index";
5
5
 
6
6
  export function useBakers(whitelistAddresses: string[]): Baker[] {
@@ -55,22 +55,3 @@ export function useRandomBaker(bakers: Baker[]): Baker {
55
55
  }, [bakers.length]);
56
56
  return bakers[randomBakerIndex];
57
57
  }
58
-
59
- export function useStakingPositions(account: AccountLike): StakingPosition[] {
60
- const delegation = useDelegation(account);
61
-
62
- return useMemo(() => {
63
- if (account.type !== "Account" || !delegation?.address) return [];
64
-
65
- return [
66
- {
67
- uid: account.freshAddress,
68
- address: account.freshAddress,
69
- delegate: delegation.address,
70
- state: "active" as const,
71
- asset: { type: "native" as const },
72
- amount: BigInt(account.balance.toString()),
73
- },
74
- ];
75
- }, [account, delegation]);
76
- }
@@ -1,14 +1,24 @@
1
1
  // Goal of this file is to inject all necessary device/signer dependency to coin-modules
2
2
 
3
3
  import { DerivationType, LedgerSigner } from "@taquito/ledger-signer";
4
- import type { TezosSigner } from "@ledgerhq/coin-tezos/types/index";
4
+ import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets";
5
+ import { TezosCoinConfig } from "@ledgerhq/coin-tezos/config";
6
+ import { createBridges } from "@ledgerhq/coin-tezos/bridge/index";
7
+ import type {
8
+ Transaction,
9
+ TezosSigner,
10
+ TransactionStatus,
11
+ TezosAccount,
12
+ } from "@ledgerhq/coin-tezos/types/index";
5
13
  import makeCliTools from "@ledgerhq/coin-tezos/test/cli";
6
14
  import type { CliTools } from "@ledgerhq/coin-tezos/test/cli";
7
15
  import tezosResolver from "@ledgerhq/coin-tezos/signer/index";
8
16
  import Xtz, { Curve } from "@ledgerhq/hw-app-tezos";
9
17
  import Transport from "@ledgerhq/hw-transport";
10
- import { createResolver, CreateSigner } from "../../bridge/setup";
18
+ import type { Bridge } from "@ledgerhq/types-live";
19
+ import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
11
20
  import { Resolver } from "../../hw/getAddress/types";
21
+ import { getCurrencyConfiguration } from "../../config";
12
22
 
13
23
  const createSigner: CreateSigner<TezosSigner> = (transport: Transport) => {
14
24
  const xtz = new Xtz(transport);
@@ -36,8 +46,17 @@ const createSigner: CreateSigner<TezosSigner> = (transport: Transport) => {
36
46
  };
37
47
  };
38
48
 
49
+ const getCurrencyConfig = (): TezosCoinConfig => {
50
+ return getCurrencyConfiguration(getCryptoCurrencyById("tezos"));
51
+ };
52
+
53
+ const bridge: Bridge<Transaction, TezosAccount, TransactionStatus> = createBridges(
54
+ executeWithSigner(createSigner),
55
+ getCurrencyConfig,
56
+ );
57
+
39
58
  const resolver: Resolver = createResolver(createSigner, tezosResolver);
40
59
 
41
60
  const cliTools: CliTools = makeCliTools();
42
61
 
43
- export { cliTools, resolver };
62
+ export { bridge, cliTools, resolver };