@ledgerhq/live-common 34.53.0 → 34.54.0-nightly.20251126023856

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 (841) hide show
  1. package/lib/__tests__/test-helpers/bridge.d.ts.map +1 -1
  2. package/lib/__tests__/test-helpers/bridge.js +0 -4
  3. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  4. package/lib/__tests__/test-helpers/environment.js +3 -0
  5. package/lib/__tests__/test-helpers/environment.js.map +1 -1
  6. package/lib/__tests__/test-helpers/setup.integration.d.ts +2 -0
  7. package/lib/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
  8. package/lib/__tests__/test-helpers/{setup.js → setup.integration.js} +4 -8
  9. package/lib/__tests__/test-helpers/setup.integration.js.map +1 -0
  10. package/lib/account/helpers.d.ts.map +1 -1
  11. package/lib/account/helpers.js +21 -17
  12. package/lib/account/helpers.js.map +1 -1
  13. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  14. package/lib/bridge/generic-alpaca/getAccountShape.js +12 -10
  15. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  16. package/lib/bridge/generic-alpaca/utils.js +1 -1
  17. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  18. package/lib/bridge/impl.d.ts +0 -2
  19. package/lib/bridge/impl.d.ts.map +1 -1
  20. package/lib/bridge/impl.js +4 -8
  21. package/lib/bridge/impl.js.map +1 -1
  22. package/lib/currencies/helpers.d.ts +1 -3
  23. package/lib/currencies/helpers.d.ts.map +1 -1
  24. package/lib/currencies/helpers.js +1 -27
  25. package/lib/currencies/helpers.js.map +1 -1
  26. package/lib/currencies/index.d.ts +1 -1
  27. package/lib/currencies/index.d.ts.map +1 -1
  28. package/lib/currencies/index.js +1 -4
  29. package/lib/currencies/index.js.map +1 -1
  30. package/lib/dada-client/hooks/useAssetsData.d.ts +1 -0
  31. package/lib/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  32. package/lib/dada-client/hooks/useAssetsData.js +1 -0
  33. package/lib/dada-client/hooks/useAssetsData.js.map +1 -1
  34. package/lib/deposit/type.d.ts +0 -17
  35. package/lib/deposit/type.d.ts.map +1 -1
  36. package/lib/deposit/type.js.map +1 -1
  37. package/lib/device/use-cases/getDeviceHasBattery.d.ts +2 -0
  38. package/lib/device/use-cases/getDeviceHasBattery.d.ts.map +1 -0
  39. package/lib/device/use-cases/getDeviceHasBattery.js +6 -0
  40. package/lib/device/use-cases/getDeviceHasBattery.js.map +1 -0
  41. package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
  42. package/lib/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
  43. package/lib/deviceSDK/hooks/useBatteryStatuses.js +4 -2
  44. package/lib/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
  45. package/lib/deviceSDK/tasks/core.d.ts +1 -1
  46. package/lib/deviceSDK/tasks/core.d.ts.map +1 -1
  47. package/lib/deviceSDK/tasks/core.js +1 -1
  48. package/lib/deviceSDK/tasks/core.js.map +1 -1
  49. package/lib/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
  50. package/lib/deviceSDK/tasks/getDeviceInfo.js +2 -0
  51. package/lib/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
  52. package/lib/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
  53. package/lib/deviceSDK/tasks/getLatestFirmware.js +2 -2
  54. package/lib/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
  55. package/lib/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
  56. package/lib/deviceSDK/tasks/updateFirmware.js +1 -0
  57. package/lib/deviceSDK/tasks/updateFirmware.js.map +1 -1
  58. package/lib/e2e/data/assetsDrawer.d.ts +9 -0
  59. package/lib/e2e/data/assetsDrawer.d.ts.map +1 -0
  60. package/lib/e2e/data/assetsDrawer.js +12 -0
  61. package/lib/e2e/data/assetsDrawer.js.map +1 -0
  62. package/lib/e2e/deviceInteraction/DeviceController.d.ts +41 -0
  63. package/lib/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
  64. package/lib/e2e/deviceInteraction/DeviceController.js +68 -0
  65. package/lib/e2e/deviceInteraction/DeviceController.js.map +1 -0
  66. package/lib/e2e/enum/Account.d.ts +0 -1
  67. package/lib/e2e/enum/Account.d.ts.map +1 -1
  68. package/lib/e2e/enum/Account.js +0 -1
  69. package/lib/e2e/enum/Account.js.map +1 -1
  70. package/lib/e2e/enum/Currency.d.ts +0 -1
  71. package/lib/e2e/enum/Currency.d.ts.map +1 -1
  72. package/lib/e2e/enum/Currency.js +2 -6
  73. package/lib/e2e/enum/Currency.js.map +1 -1
  74. package/lib/e2e/enum/ReceiveFundsOptions.d.ts +6 -0
  75. package/lib/e2e/enum/ReceiveFundsOptions.d.ts.map +1 -0
  76. package/lib/e2e/enum/ReceiveFundsOptions.js +8 -0
  77. package/lib/e2e/enum/ReceiveFundsOptions.js.map +1 -0
  78. package/lib/e2e/families/algorand.d.ts +1 -1
  79. package/lib/e2e/families/algorand.d.ts.map +1 -1
  80. package/lib/e2e/families/algorand.js +5 -5
  81. package/lib/e2e/families/algorand.js.map +1 -1
  82. package/lib/e2e/families/aptos.d.ts +2 -2
  83. package/lib/e2e/families/aptos.d.ts.map +1 -1
  84. package/lib/e2e/families/aptos.js +9 -9
  85. package/lib/e2e/families/aptos.js.map +1 -1
  86. package/lib/e2e/families/bitcoin.d.ts +2 -2
  87. package/lib/e2e/families/bitcoin.d.ts.map +1 -1
  88. package/lib/e2e/families/bitcoin.js +11 -11
  89. package/lib/e2e/families/bitcoin.js.map +1 -1
  90. package/lib/e2e/families/cardano.d.ts +6 -0
  91. package/lib/e2e/families/cardano.d.ts.map +1 -1
  92. package/lib/e2e/families/cardano.js +28 -26
  93. package/lib/e2e/families/cardano.js.map +1 -1
  94. package/lib/e2e/families/celo.d.ts +1 -1
  95. package/lib/e2e/families/celo.d.ts.map +1 -1
  96. package/lib/e2e/families/celo.js +5 -5
  97. package/lib/e2e/families/celo.js.map +1 -1
  98. package/lib/e2e/families/cosmos.d.ts +2 -2
  99. package/lib/e2e/families/cosmos.d.ts.map +1 -1
  100. package/lib/e2e/families/cosmos.js +9 -9
  101. package/lib/e2e/families/cosmos.js.map +1 -1
  102. package/lib/e2e/families/evm.d.ts +2 -0
  103. package/lib/e2e/families/evm.d.ts.map +1 -1
  104. package/lib/e2e/families/evm.js +13 -12
  105. package/lib/e2e/families/evm.js.map +1 -1
  106. package/lib/e2e/families/hedera.d.ts +1 -1
  107. package/lib/e2e/families/hedera.d.ts.map +1 -1
  108. package/lib/e2e/families/hedera.js +5 -5
  109. package/lib/e2e/families/hedera.js.map +1 -1
  110. package/lib/e2e/families/kaspa.d.ts +2 -2
  111. package/lib/e2e/families/kaspa.d.ts.map +1 -1
  112. package/lib/e2e/families/kaspa.js +9 -9
  113. package/lib/e2e/families/kaspa.js.map +1 -1
  114. package/lib/e2e/families/multiversX.d.ts +1 -1
  115. package/lib/e2e/families/multiversX.d.ts.map +1 -1
  116. package/lib/e2e/families/multiversX.js +5 -5
  117. package/lib/e2e/families/multiversX.js.map +1 -1
  118. package/lib/e2e/families/near.d.ts +1 -1
  119. package/lib/e2e/families/near.d.ts.map +1 -1
  120. package/lib/e2e/families/near.js +6 -6
  121. package/lib/e2e/families/near.js.map +1 -1
  122. package/lib/e2e/families/osmosis.d.ts +1 -1
  123. package/lib/e2e/families/osmosis.d.ts.map +1 -1
  124. package/lib/e2e/families/osmosis.js +5 -5
  125. package/lib/e2e/families/osmosis.js.map +1 -1
  126. package/lib/e2e/families/polkadot.d.ts +1 -1
  127. package/lib/e2e/families/polkadot.d.ts.map +1 -1
  128. package/lib/e2e/families/polkadot.js +5 -5
  129. package/lib/e2e/families/polkadot.js.map +1 -1
  130. package/lib/e2e/families/solana.d.ts +2 -2
  131. package/lib/e2e/families/solana.d.ts.map +1 -1
  132. package/lib/e2e/families/solana.js +9 -9
  133. package/lib/e2e/families/solana.js.map +1 -1
  134. package/lib/e2e/families/stellar.d.ts +1 -1
  135. package/lib/e2e/families/stellar.d.ts.map +1 -1
  136. package/lib/e2e/families/stellar.js +5 -5
  137. package/lib/e2e/families/stellar.js.map +1 -1
  138. package/lib/e2e/families/sui.d.ts +1 -1
  139. package/lib/e2e/families/sui.d.ts.map +1 -1
  140. package/lib/e2e/families/sui.js +5 -5
  141. package/lib/e2e/families/sui.js.map +1 -1
  142. package/lib/e2e/families/tezos.d.ts +1 -1
  143. package/lib/e2e/families/tezos.d.ts.map +1 -1
  144. package/lib/e2e/families/tezos.js +7 -8
  145. package/lib/e2e/families/tezos.js.map +1 -1
  146. package/lib/e2e/families/tron.d.ts +1 -1
  147. package/lib/e2e/families/tron.d.ts.map +1 -1
  148. package/lib/e2e/families/tron.js +5 -5
  149. package/lib/e2e/families/tron.js.map +1 -1
  150. package/lib/e2e/families/xrp.d.ts +1 -1
  151. package/lib/e2e/families/xrp.d.ts.map +1 -1
  152. package/lib/e2e/families/xrp.js +5 -5
  153. package/lib/e2e/families/xrp.js.map +1 -1
  154. package/lib/e2e/index.d.ts +22 -0
  155. package/lib/e2e/index.d.ts.map +1 -1
  156. package/lib/e2e/speculos.d.ts +11 -11
  157. package/lib/e2e/speculos.d.ts.map +1 -1
  158. package/lib/e2e/speculos.js +87 -80
  159. package/lib/e2e/speculos.js.map +1 -1
  160. package/lib/env.react.d.ts +1 -1
  161. package/lib/env.react.d.ts.map +1 -1
  162. package/lib/exchange/providers/swap.d.ts +1 -0
  163. package/lib/exchange/providers/swap.d.ts.map +1 -1
  164. package/lib/exchange/providers/swap.js +5 -1
  165. package/lib/exchange/providers/swap.js.map +1 -1
  166. package/lib/exchange/swap/getCompleteSwapHistory.js +2 -2
  167. package/lib/exchange/swap/getCompleteSwapHistory.js.map +1 -1
  168. package/lib/exchange/swap/hooks/useSelectableCurrencies.js +2 -2
  169. package/lib/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
  170. package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
  171. package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js +2 -3
  172. package/lib/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
  173. package/lib/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
  174. package/lib/exchange/swap/hooks/v5/useFilteredProviders.js +15 -10
  175. package/lib/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
  176. package/lib/families/canton/bridge/mock.d.ts.map +1 -1
  177. package/lib/families/canton/bridge/mock.js +1 -0
  178. package/lib/families/canton/bridge/mock.js.map +1 -1
  179. package/lib/families/canton/react.d.ts +15 -0
  180. package/lib/families/canton/react.d.ts.map +1 -0
  181. package/lib/families/canton/react.js +14 -0
  182. package/lib/families/canton/react.js.map +1 -0
  183. package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
  184. package/lib/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
  185. package/lib/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
  186. package/lib/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
  187. package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
  188. package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
  189. package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
  190. package/lib/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
  191. package/lib/families/evm/config.d.ts.map +1 -1
  192. package/lib/families/evm/config.js +49 -0
  193. package/lib/families/evm/config.js.map +1 -1
  194. package/lib/families/evm/setup.d.ts.map +1 -1
  195. package/lib/families/evm/setup.js +1 -11
  196. package/lib/families/evm/setup.js.map +1 -1
  197. package/lib/families/solana/bridge/mock.d.ts.map +1 -1
  198. package/lib/families/solana/bridge/mock.js +10 -8
  199. package/lib/families/solana/bridge/mock.js.map +1 -1
  200. package/lib/families/solana/config.d.ts.map +1 -1
  201. package/lib/families/solana/config.js +0 -1
  202. package/lib/families/solana/config.js.map +1 -1
  203. package/lib/families/solana/setup.d.ts +8 -0
  204. package/lib/families/solana/setup.d.ts.map +1 -1
  205. package/lib/families/solana/setup.js +29 -16
  206. package/lib/families/solana/setup.js.map +1 -1
  207. package/lib/families/tron/data.mock.d.ts.map +1 -1
  208. package/lib/families/tron/data.mock.js +3 -6
  209. package/lib/families/tron/data.mock.js.map +1 -1
  210. package/lib/featureFlags/defaultFeatures.d.ts +3 -0
  211. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  212. package/lib/featureFlags/defaultFeatures.js +10 -0
  213. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  214. package/lib/featureFlags/stakePrograms/index.d.ts +1 -0
  215. package/lib/featureFlags/stakePrograms/index.d.ts.map +1 -1
  216. package/lib/featureFlags/stakePrograms/index.js +16 -1
  217. package/lib/featureFlags/stakePrograms/index.js.map +1 -1
  218. package/lib/featureFlags/useFeature.d.ts +1 -1
  219. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  220. package/lib/market/hooks/useMarketDataProvider.js +1 -0
  221. package/lib/market/hooks/useMarketDataProvider.js.map +1 -1
  222. package/lib/market/utils/types.d.ts +1 -0
  223. package/lib/market/utils/types.d.ts.map +1 -1
  224. package/lib/market/utils/types.js.map +1 -1
  225. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  226. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +11 -0
  227. package/lib/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  228. package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
  229. package/lib/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
  230. package/lib/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
  231. package/lib/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
  232. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  233. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  234. package/lib/modularDrawer/modules/createNetworkConfiguration.js +1 -2
  235. package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  236. package/lib/modularDrawer/utils/{groupCurrenciesByProvider.d.ts → groupCurrenciesByAsset.d.ts} +2 -2
  237. package/lib/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +1 -0
  238. package/lib/modularDrawer/utils/groupCurrenciesByAsset.js +21 -0
  239. package/lib/modularDrawer/utils/groupCurrenciesByAsset.js.map +1 -0
  240. package/lib/modularDrawer/utils/index.d.ts +1 -1
  241. package/lib/modularDrawer/utils/index.d.ts.map +1 -1
  242. package/lib/modularDrawer/utils/index.js +3 -3
  243. package/lib/modularDrawer/utils/index.js.map +1 -1
  244. package/lib/modularDrawer/utils/type.d.ts +0 -5
  245. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  246. package/lib/platform/filters.d.ts +1 -2
  247. package/lib/platform/filters.d.ts.map +1 -1
  248. package/lib/platform/filters.js +1 -17
  249. package/lib/platform/filters.js.map +1 -1
  250. package/lib/platform/helpers.d.ts +1 -5
  251. package/lib/platform/helpers.d.ts.map +1 -1
  252. package/lib/platform/helpers.js +1 -33
  253. package/lib/platform/helpers.js.map +1 -1
  254. package/lib/platform/react.d.ts +2 -3
  255. package/lib/platform/react.d.ts.map +1 -1
  256. package/lib/platform/react.js +66 -16
  257. package/lib/platform/react.js.map +1 -1
  258. package/lib/platform/types.d.ts +3 -3
  259. package/lib/platform/types.d.ts.map +1 -1
  260. package/lib/postOnboarding/reducer.d.ts +2 -0
  261. package/lib/postOnboarding/reducer.d.ts.map +1 -1
  262. package/lib/test-helpers/cryptoAssetsStore.d.ts +2 -0
  263. package/lib/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
  264. package/lib/test-helpers/cryptoAssetsStore.js +8 -0
  265. package/lib/test-helpers/cryptoAssetsStore.js.map +1 -0
  266. package/lib/utils/getAccountTuplesForCurrency.d.ts +1 -1
  267. package/lib/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
  268. package/lib/utils/getAccountTuplesForCurrency.js +2 -3
  269. package/lib/utils/getAccountTuplesForCurrency.js.map +1 -1
  270. package/lib/wallet-api/ACRE/server.js +5 -5
  271. package/lib/wallet-api/ACRE/server.js.map +1 -1
  272. package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
  273. package/lib/wallet-api/Exchange/server.js +8 -7
  274. package/lib/wallet-api/Exchange/server.js.map +1 -1
  275. package/lib/wallet-api/converters.d.ts +1 -0
  276. package/lib/wallet-api/converters.d.ts.map +1 -1
  277. package/lib/wallet-api/converters.js +7 -2
  278. package/lib/wallet-api/converters.js.map +1 -1
  279. package/lib/wallet-api/logic.js +8 -8
  280. package/lib/wallet-api/logic.js.map +1 -1
  281. package/lib/wallet-api/react.d.ts +6 -11
  282. package/lib/wallet-api/react.d.ts.map +1 -1
  283. package/lib/wallet-api/react.js +293 -135
  284. package/lib/wallet-api/react.js.map +1 -1
  285. package/lib/wallet-api/tracking.d.ts +6 -0
  286. package/lib/wallet-api/tracking.d.ts.map +1 -1
  287. package/lib/wallet-api/tracking.js +20 -0
  288. package/lib/wallet-api/tracking.js.map +1 -1
  289. package/lib/wallet-api/types.d.ts +3 -0
  290. package/lib/wallet-api/types.d.ts.map +1 -1
  291. package/lib/wallet-api/useDappLogic.d.ts.map +1 -1
  292. package/lib/wallet-api/useDappLogic.js +65 -80
  293. package/lib/wallet-api/useDappLogic.js.map +1 -1
  294. package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts +6 -0
  295. package/lib/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
  296. package/lib/wallet-api/utils/deriveAccountIdForManifest.js +13 -3
  297. package/lib/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
  298. package/lib-es/__tests__/test-helpers/bridge.d.ts.map +1 -1
  299. package/lib-es/__tests__/test-helpers/bridge.js +0 -4
  300. package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
  301. package/lib-es/__tests__/test-helpers/environment.js +3 -0
  302. package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
  303. package/lib-es/__tests__/test-helpers/setup.integration.d.ts +2 -0
  304. package/lib-es/__tests__/test-helpers/setup.integration.d.ts.map +1 -0
  305. package/lib-es/__tests__/test-helpers/setup.integration.js +14 -0
  306. package/lib-es/__tests__/test-helpers/setup.integration.js.map +1 -0
  307. package/lib-es/account/helpers.d.ts.map +1 -1
  308. package/lib-es/account/helpers.js +5 -1
  309. package/lib-es/account/helpers.js.map +1 -1
  310. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  311. package/lib-es/bridge/generic-alpaca/getAccountShape.js +13 -11
  312. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  313. package/lib-es/bridge/generic-alpaca/utils.js +1 -1
  314. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  315. package/lib-es/bridge/impl.d.ts +0 -2
  316. package/lib-es/bridge/impl.d.ts.map +1 -1
  317. package/lib-es/bridge/impl.js +3 -6
  318. package/lib-es/bridge/impl.js.map +1 -1
  319. package/lib-es/currencies/helpers.d.ts +1 -3
  320. package/lib-es/currencies/helpers.d.ts.map +1 -1
  321. package/lib-es/currencies/helpers.js +0 -24
  322. package/lib-es/currencies/helpers.js.map +1 -1
  323. package/lib-es/currencies/index.d.ts +1 -1
  324. package/lib-es/currencies/index.d.ts.map +1 -1
  325. package/lib-es/currencies/index.js +1 -1
  326. package/lib-es/currencies/index.js.map +1 -1
  327. package/lib-es/dada-client/hooks/useAssetsData.d.ts +1 -0
  328. package/lib-es/dada-client/hooks/useAssetsData.d.ts.map +1 -1
  329. package/lib-es/dada-client/hooks/useAssetsData.js +1 -0
  330. package/lib-es/dada-client/hooks/useAssetsData.js.map +1 -1
  331. package/lib-es/deposit/type.d.ts +0 -17
  332. package/lib-es/deposit/type.d.ts.map +1 -1
  333. package/lib-es/deposit/type.js.map +1 -1
  334. package/lib-es/device/use-cases/getDeviceHasBattery.d.ts +2 -0
  335. package/lib-es/device/use-cases/getDeviceHasBattery.d.ts.map +1 -0
  336. package/lib-es/device/use-cases/getDeviceHasBattery.js +2 -0
  337. package/lib-es/device/use-cases/getDeviceHasBattery.js.map +1 -0
  338. package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts +2 -1
  339. package/lib-es/deviceSDK/hooks/useBatteryStatuses.d.ts.map +1 -1
  340. package/lib-es/deviceSDK/hooks/useBatteryStatuses.js +4 -2
  341. package/lib-es/deviceSDK/hooks/useBatteryStatuses.js.map +1 -1
  342. package/lib-es/deviceSDK/tasks/core.d.ts +1 -1
  343. package/lib-es/deviceSDK/tasks/core.d.ts.map +1 -1
  344. package/lib-es/deviceSDK/tasks/core.js +1 -1
  345. package/lib-es/deviceSDK/tasks/core.js.map +1 -1
  346. package/lib-es/deviceSDK/tasks/getDeviceInfo.d.ts.map +1 -1
  347. package/lib-es/deviceSDK/tasks/getDeviceInfo.js +2 -0
  348. package/lib-es/deviceSDK/tasks/getDeviceInfo.js.map +1 -1
  349. package/lib-es/deviceSDK/tasks/getLatestFirmware.d.ts.map +1 -1
  350. package/lib-es/deviceSDK/tasks/getLatestFirmware.js +2 -2
  351. package/lib-es/deviceSDK/tasks/getLatestFirmware.js.map +1 -1
  352. package/lib-es/deviceSDK/tasks/updateFirmware.d.ts.map +1 -1
  353. package/lib-es/deviceSDK/tasks/updateFirmware.js +2 -1
  354. package/lib-es/deviceSDK/tasks/updateFirmware.js.map +1 -1
  355. package/lib-es/e2e/data/assetsDrawer.d.ts +9 -0
  356. package/lib-es/e2e/data/assetsDrawer.d.ts.map +1 -0
  357. package/lib-es/e2e/data/assetsDrawer.js +9 -0
  358. package/lib-es/e2e/data/assetsDrawer.js.map +1 -0
  359. package/lib-es/e2e/deviceInteraction/DeviceController.d.ts +41 -0
  360. package/lib-es/e2e/deviceInteraction/DeviceController.d.ts.map +1 -0
  361. package/lib-es/e2e/deviceInteraction/DeviceController.js +63 -0
  362. package/lib-es/e2e/deviceInteraction/DeviceController.js.map +1 -0
  363. package/lib-es/e2e/enum/Account.d.ts +0 -1
  364. package/lib-es/e2e/enum/Account.d.ts.map +1 -1
  365. package/lib-es/e2e/enum/Account.js +0 -1
  366. package/lib-es/e2e/enum/Account.js.map +1 -1
  367. package/lib-es/e2e/enum/Currency.d.ts +0 -1
  368. package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
  369. package/lib-es/e2e/enum/Currency.js +2 -6
  370. package/lib-es/e2e/enum/Currency.js.map +1 -1
  371. package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts +6 -0
  372. package/lib-es/e2e/enum/ReceiveFundsOptions.d.ts.map +1 -0
  373. package/lib-es/e2e/enum/ReceiveFundsOptions.js +5 -0
  374. package/lib-es/e2e/enum/ReceiveFundsOptions.js.map +1 -0
  375. package/lib-es/e2e/families/algorand.d.ts +1 -1
  376. package/lib-es/e2e/families/algorand.d.ts.map +1 -1
  377. package/lib-es/e2e/families/algorand.js +5 -4
  378. package/lib-es/e2e/families/algorand.js.map +1 -1
  379. package/lib-es/e2e/families/aptos.d.ts +2 -2
  380. package/lib-es/e2e/families/aptos.d.ts.map +1 -1
  381. package/lib-es/e2e/families/aptos.js +9 -7
  382. package/lib-es/e2e/families/aptos.js.map +1 -1
  383. package/lib-es/e2e/families/bitcoin.d.ts +2 -2
  384. package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
  385. package/lib-es/e2e/families/bitcoin.js +11 -9
  386. package/lib-es/e2e/families/bitcoin.js.map +1 -1
  387. package/lib-es/e2e/families/cardano.d.ts +6 -0
  388. package/lib-es/e2e/families/cardano.d.ts.map +1 -1
  389. package/lib-es/e2e/families/cardano.js +23 -21
  390. package/lib-es/e2e/families/cardano.js.map +1 -1
  391. package/lib-es/e2e/families/celo.d.ts +1 -1
  392. package/lib-es/e2e/families/celo.d.ts.map +1 -1
  393. package/lib-es/e2e/families/celo.js +5 -4
  394. package/lib-es/e2e/families/celo.js.map +1 -1
  395. package/lib-es/e2e/families/cosmos.d.ts +2 -2
  396. package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
  397. package/lib-es/e2e/families/cosmos.js +9 -7
  398. package/lib-es/e2e/families/cosmos.js.map +1 -1
  399. package/lib-es/e2e/families/evm.d.ts +2 -0
  400. package/lib-es/e2e/families/evm.d.ts.map +1 -1
  401. package/lib-es/e2e/families/evm.js +10 -9
  402. package/lib-es/e2e/families/evm.js.map +1 -1
  403. package/lib-es/e2e/families/hedera.d.ts +1 -1
  404. package/lib-es/e2e/families/hedera.d.ts.map +1 -1
  405. package/lib-es/e2e/families/hedera.js +5 -4
  406. package/lib-es/e2e/families/hedera.js.map +1 -1
  407. package/lib-es/e2e/families/kaspa.d.ts +2 -2
  408. package/lib-es/e2e/families/kaspa.d.ts.map +1 -1
  409. package/lib-es/e2e/families/kaspa.js +9 -7
  410. package/lib-es/e2e/families/kaspa.js.map +1 -1
  411. package/lib-es/e2e/families/multiversX.d.ts +1 -1
  412. package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
  413. package/lib-es/e2e/families/multiversX.js +5 -4
  414. package/lib-es/e2e/families/multiversX.js.map +1 -1
  415. package/lib-es/e2e/families/near.d.ts +1 -1
  416. package/lib-es/e2e/families/near.d.ts.map +1 -1
  417. package/lib-es/e2e/families/near.js +6 -5
  418. package/lib-es/e2e/families/near.js.map +1 -1
  419. package/lib-es/e2e/families/osmosis.d.ts +1 -1
  420. package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
  421. package/lib-es/e2e/families/osmosis.js +5 -4
  422. package/lib-es/e2e/families/osmosis.js.map +1 -1
  423. package/lib-es/e2e/families/polkadot.d.ts +1 -1
  424. package/lib-es/e2e/families/polkadot.d.ts.map +1 -1
  425. package/lib-es/e2e/families/polkadot.js +5 -4
  426. package/lib-es/e2e/families/polkadot.js.map +1 -1
  427. package/lib-es/e2e/families/solana.d.ts +2 -2
  428. package/lib-es/e2e/families/solana.d.ts.map +1 -1
  429. package/lib-es/e2e/families/solana.js +9 -7
  430. package/lib-es/e2e/families/solana.js.map +1 -1
  431. package/lib-es/e2e/families/stellar.d.ts +1 -1
  432. package/lib-es/e2e/families/stellar.d.ts.map +1 -1
  433. package/lib-es/e2e/families/stellar.js +5 -4
  434. package/lib-es/e2e/families/stellar.js.map +1 -1
  435. package/lib-es/e2e/families/sui.d.ts +1 -1
  436. package/lib-es/e2e/families/sui.d.ts.map +1 -1
  437. package/lib-es/e2e/families/sui.js +5 -4
  438. package/lib-es/e2e/families/sui.js.map +1 -1
  439. package/lib-es/e2e/families/tezos.d.ts +1 -1
  440. package/lib-es/e2e/families/tezos.d.ts.map +1 -1
  441. package/lib-es/e2e/families/tezos.js +8 -8
  442. package/lib-es/e2e/families/tezos.js.map +1 -1
  443. package/lib-es/e2e/families/tron.d.ts +1 -1
  444. package/lib-es/e2e/families/tron.d.ts.map +1 -1
  445. package/lib-es/e2e/families/tron.js +5 -4
  446. package/lib-es/e2e/families/tron.js.map +1 -1
  447. package/lib-es/e2e/families/xrp.d.ts +1 -1
  448. package/lib-es/e2e/families/xrp.d.ts.map +1 -1
  449. package/lib-es/e2e/families/xrp.js +5 -4
  450. package/lib-es/e2e/families/xrp.js.map +1 -1
  451. package/lib-es/e2e/index.d.ts +22 -0
  452. package/lib-es/e2e/index.d.ts.map +1 -1
  453. package/lib-es/e2e/speculos.d.ts +11 -11
  454. package/lib-es/e2e/speculos.d.ts.map +1 -1
  455. package/lib-es/e2e/speculos.js +63 -45
  456. package/lib-es/e2e/speculos.js.map +1 -1
  457. package/lib-es/env.react.d.ts +1 -1
  458. package/lib-es/env.react.d.ts.map +1 -1
  459. package/lib-es/exchange/providers/swap.d.ts +1 -0
  460. package/lib-es/exchange/providers/swap.d.ts.map +1 -1
  461. package/lib-es/exchange/providers/swap.js +3 -0
  462. package/lib-es/exchange/providers/swap.js.map +1 -1
  463. package/lib-es/exchange/swap/getCompleteSwapHistory.js +1 -1
  464. package/lib-es/exchange/swap/getCompleteSwapHistory.js.map +1 -1
  465. package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js +1 -1
  466. package/lib-es/exchange/swap/hooks/useSelectableCurrencies.js.map +1 -1
  467. package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.d.ts.map +1 -1
  468. package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js +2 -3
  469. package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyAll.js.map +1 -1
  470. package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.d.ts.map +1 -1
  471. package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js +17 -12
  472. package/lib-es/exchange/swap/hooks/v5/useFilteredProviders.js.map +1 -1
  473. package/lib-es/families/canton/bridge/mock.d.ts.map +1 -1
  474. package/lib-es/families/canton/bridge/mock.js +1 -0
  475. package/lib-es/families/canton/bridge/mock.js.map +1 -1
  476. package/lib-es/families/canton/react.d.ts +15 -0
  477. package/lib-es/families/canton/react.d.ts.map +1 -0
  478. package/lib-es/families/canton/react.js +10 -0
  479. package/lib-es/families/canton/react.js.map +1 -0
  480. package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts +1 -1
  481. package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.d.ts.map +1 -1
  482. package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js +1 -1
  483. package/lib-es/families/cosmos/datasets/dydx.integration.FIXME.js.map +1 -1
  484. package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts +1 -1
  485. package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.d.ts.map +1 -1
  486. package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js +1 -1
  487. package/lib-es/families/cosmos/datasets/secretNetwork.integration.FIXME.js.map +1 -1
  488. package/lib-es/families/evm/config.d.ts.map +1 -1
  489. package/lib-es/families/evm/config.js +49 -0
  490. package/lib-es/families/evm/config.js.map +1 -1
  491. package/lib-es/families/evm/setup.d.ts.map +1 -1
  492. package/lib-es/families/evm/setup.js +1 -11
  493. package/lib-es/families/evm/setup.js.map +1 -1
  494. package/lib-es/families/solana/bridge/mock.d.ts.map +1 -1
  495. package/lib-es/families/solana/bridge/mock.js +11 -9
  496. package/lib-es/families/solana/bridge/mock.js.map +1 -1
  497. package/lib-es/families/solana/config.d.ts.map +1 -1
  498. package/lib-es/families/solana/config.js +0 -1
  499. package/lib-es/families/solana/config.js.map +1 -1
  500. package/lib-es/families/solana/setup.d.ts +8 -0
  501. package/lib-es/families/solana/setup.d.ts.map +1 -1
  502. package/lib-es/families/solana/setup.js +28 -17
  503. package/lib-es/families/solana/setup.js.map +1 -1
  504. package/lib-es/families/tron/data.mock.d.ts.map +1 -1
  505. package/lib-es/families/tron/data.mock.js +3 -6
  506. package/lib-es/families/tron/data.mock.js.map +1 -1
  507. package/lib-es/featureFlags/defaultFeatures.d.ts +3 -0
  508. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  509. package/lib-es/featureFlags/defaultFeatures.js +10 -0
  510. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  511. package/lib-es/featureFlags/stakePrograms/index.d.ts +1 -0
  512. package/lib-es/featureFlags/stakePrograms/index.d.ts.map +1 -1
  513. package/lib-es/featureFlags/stakePrograms/index.js +14 -0
  514. package/lib-es/featureFlags/stakePrograms/index.js.map +1 -1
  515. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  516. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  517. package/lib-es/market/hooks/useMarketDataProvider.js +1 -0
  518. package/lib-es/market/hooks/useMarketDataProvider.js.map +1 -1
  519. package/lib-es/market/utils/types.d.ts +1 -0
  520. package/lib-es/market/utils/types.d.ts.map +1 -1
  521. package/lib-es/market/utils/types.js.map +1 -1
  522. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.d.ts.map +1 -1
  523. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js +11 -0
  524. package/lib-es/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.js.map +1 -1
  525. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts +1 -5
  526. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.d.ts.map +1 -1
  527. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js +2 -2
  528. package/lib-es/modularDrawer/hooks/useNetworkAccountCounts.js.map +1 -1
  529. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +1 -1
  530. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -1
  531. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +1 -2
  532. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -1
  533. package/lib-es/modularDrawer/utils/{groupCurrenciesByProvider.d.ts → groupCurrenciesByAsset.d.ts} +2 -2
  534. package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.d.ts.map +1 -0
  535. package/lib-es/modularDrawer/utils/{groupCurrenciesByProvider.js → groupCurrenciesByAsset.js} +6 -6
  536. package/lib-es/modularDrawer/utils/groupCurrenciesByAsset.js.map +1 -0
  537. package/lib-es/modularDrawer/utils/index.d.ts +1 -1
  538. package/lib-es/modularDrawer/utils/index.d.ts.map +1 -1
  539. package/lib-es/modularDrawer/utils/index.js +1 -1
  540. package/lib-es/modularDrawer/utils/index.js.map +1 -1
  541. package/lib-es/modularDrawer/utils/type.d.ts +0 -5
  542. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  543. package/lib-es/platform/filters.d.ts +1 -2
  544. package/lib-es/platform/filters.d.ts.map +1 -1
  545. package/lib-es/platform/filters.js +0 -15
  546. package/lib-es/platform/filters.js.map +1 -1
  547. package/lib-es/platform/helpers.d.ts +1 -5
  548. package/lib-es/platform/helpers.d.ts.map +1 -1
  549. package/lib-es/platform/helpers.js +1 -30
  550. package/lib-es/platform/helpers.js.map +1 -1
  551. package/lib-es/platform/react.d.ts +2 -3
  552. package/lib-es/platform/react.d.ts.map +1 -1
  553. package/lib-es/platform/react.js +67 -16
  554. package/lib-es/platform/react.js.map +1 -1
  555. package/lib-es/platform/types.d.ts +3 -3
  556. package/lib-es/platform/types.d.ts.map +1 -1
  557. package/lib-es/postOnboarding/reducer.d.ts +2 -0
  558. package/lib-es/postOnboarding/reducer.d.ts.map +1 -1
  559. package/lib-es/test-helpers/cryptoAssetsStore.d.ts +2 -0
  560. package/lib-es/test-helpers/cryptoAssetsStore.d.ts.map +1 -0
  561. package/lib-es/test-helpers/cryptoAssetsStore.js +2 -0
  562. package/lib-es/test-helpers/cryptoAssetsStore.js.map +1 -0
  563. package/lib-es/utils/getAccountTuplesForCurrency.d.ts +1 -1
  564. package/lib-es/utils/getAccountTuplesForCurrency.d.ts.map +1 -1
  565. package/lib-es/utils/getAccountTuplesForCurrency.js +2 -3
  566. package/lib-es/utils/getAccountTuplesForCurrency.js.map +1 -1
  567. package/lib-es/wallet-api/ACRE/server.js +1 -1
  568. package/lib-es/wallet-api/ACRE/server.js.map +1 -1
  569. package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
  570. package/lib-es/wallet-api/Exchange/server.js +6 -5
  571. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  572. package/lib-es/wallet-api/converters.d.ts +1 -0
  573. package/lib-es/wallet-api/converters.d.ts.map +1 -1
  574. package/lib-es/wallet-api/converters.js +5 -1
  575. package/lib-es/wallet-api/converters.js.map +1 -1
  576. package/lib-es/wallet-api/logic.js +1 -1
  577. package/lib-es/wallet-api/logic.js.map +1 -1
  578. package/lib-es/wallet-api/react.d.ts +6 -11
  579. package/lib-es/wallet-api/react.d.ts.map +1 -1
  580. package/lib-es/wallet-api/react.js +291 -131
  581. package/lib-es/wallet-api/react.js.map +1 -1
  582. package/lib-es/wallet-api/tracking.d.ts +6 -0
  583. package/lib-es/wallet-api/tracking.d.ts.map +1 -1
  584. package/lib-es/wallet-api/tracking.js +20 -0
  585. package/lib-es/wallet-api/tracking.js.map +1 -1
  586. package/lib-es/wallet-api/types.d.ts +3 -0
  587. package/lib-es/wallet-api/types.d.ts.map +1 -1
  588. package/lib-es/wallet-api/useDappLogic.d.ts.map +1 -1
  589. package/lib-es/wallet-api/useDappLogic.js +62 -77
  590. package/lib-es/wallet-api/useDappLogic.js.map +1 -1
  591. package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts +6 -0
  592. package/lib-es/wallet-api/utils/deriveAccountIdForManifest.d.ts.map +1 -1
  593. package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js +11 -2
  594. package/lib-es/wallet-api/utils/deriveAccountIdForManifest.js.map +1 -1
  595. package/package.json +74 -60
  596. package/src/DataModel.test.ts +2 -8
  597. package/src/__tests__/__snapshots__/csvExport.ts.snap +0 -718
  598. package/src/__tests__/accounts/groupPerDay.ts +2 -4
  599. package/src/__tests__/csvExport.ts +3 -3
  600. package/src/__tests__/currencies.ts +5 -38
  601. package/src/__tests__/migration/account-migration.ts +3 -0
  602. package/src/__tests__/test-helpers/bridge.ts +0 -2
  603. package/src/__tests__/test-helpers/environment.ts +3 -0
  604. package/src/__tests__/test-helpers/setup.integration.ts +17 -0
  605. package/src/__tests__/test-helpers/setup.ts +3 -8
  606. package/src/account/helpers.test.ts +2 -2
  607. package/src/account/helpers.ts +5 -1
  608. package/src/account/serialization.test.ts +2 -2
  609. package/src/bridge/crypto-assets/index.test.ts +15 -44
  610. package/src/bridge/generic-alpaca/getAccountShape.ts +15 -12
  611. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +142 -101
  612. package/src/bridge/generic-alpaca/utils.test.ts +1 -2
  613. package/src/bridge/generic-alpaca/utils.ts +1 -1
  614. package/src/bridge/impl.ts +3 -7
  615. package/src/currencies/cryptoIcons.test.ts +23 -4
  616. package/src/currencies/helpers.test.ts +4 -11
  617. package/src/currencies/helpers.ts +1 -42
  618. package/src/currencies/index.ts +0 -3
  619. package/src/currencies/sortByMarketcap.test.ts +0 -26
  620. package/src/dada-client/hooks/useAssetsData.ts +1 -0
  621. package/src/deposit/type.ts +0 -21
  622. package/src/device/use-cases/getDeviceHasBattery.ts +1 -0
  623. package/src/deviceSDK/hooks/useBatteryStatuses.test.ts +3 -1
  624. package/src/deviceSDK/hooks/useBatteryStatuses.ts +4 -1
  625. package/src/deviceSDK/tasks/core.test.ts +20 -0
  626. package/src/deviceSDK/tasks/core.ts +2 -1
  627. package/src/deviceSDK/tasks/getDeviceInfo.ts +2 -0
  628. package/src/deviceSDK/tasks/getLatestFirmware.ts +4 -4
  629. package/src/deviceSDK/tasks/updateFirmware.ts +2 -0
  630. package/src/domain/getTokensWithFunds.test.ts +32 -3
  631. package/src/e2e/data/assetsDrawer.ts +8 -0
  632. package/src/e2e/deviceInteraction/DeviceController.ts +85 -0
  633. package/src/e2e/enum/Account.ts +0 -6
  634. package/src/e2e/enum/Currency.ts +2 -6
  635. package/src/e2e/enum/ReceiveFundsOptions.ts +7 -0
  636. package/src/e2e/families/algorand.ts +20 -13
  637. package/src/e2e/families/aptos.ts +28 -16
  638. package/src/e2e/families/bitcoin.ts +53 -39
  639. package/src/e2e/families/cardano.ts +47 -36
  640. package/src/e2e/families/celo.ts +18 -12
  641. package/src/e2e/families/cosmos.ts +35 -23
  642. package/src/e2e/families/evm.ts +24 -13
  643. package/src/e2e/families/hedera.ts +6 -4
  644. package/src/e2e/families/kaspa.ts +28 -16
  645. package/src/e2e/families/multiversX.ts +16 -10
  646. package/src/e2e/families/near.ts +23 -17
  647. package/src/e2e/families/osmosis.ts +19 -13
  648. package/src/e2e/families/polkadot.ts +19 -13
  649. package/src/e2e/families/solana.ts +35 -23
  650. package/src/e2e/families/stellar.ts +18 -13
  651. package/src/e2e/families/sui.ts +15 -9
  652. package/src/e2e/families/tezos.ts +25 -18
  653. package/src/e2e/families/tron.ts +19 -13
  654. package/src/e2e/families/xrp.ts +19 -13
  655. package/src/e2e/speculos.ts +174 -139
  656. package/src/exchange/providers/swap.ts +4 -0
  657. package/src/exchange/swap/getCompleteSwapHistory.ts +1 -1
  658. package/src/exchange/swap/hooks/useSelectableCurrencies.test.ts +4 -0
  659. package/src/exchange/swap/hooks/useSelectableCurrencies.ts +1 -1
  660. package/src/exchange/swap/hooks/v5/useFetchCurrencyAll.ts +2 -3
  661. package/src/exchange/swap/hooks/v5/useFilteredProviders.ts +37 -12
  662. package/src/families/algorand/bridge.integration.test.ts +1 -1
  663. package/src/families/aptos/__snapshots__/bridge.integration.test.ts.snap +111 -1
  664. package/src/families/aptos/bridge.integration.test.ts +1 -1
  665. package/src/families/bitcoin/bridge.integration.test.ts +1 -1
  666. package/src/families/bitcoin/satstack.test.ts +5 -8
  667. package/src/families/canton/bridge/mock.ts +1 -0
  668. package/src/families/canton/react.ts +50 -0
  669. package/src/families/cardano/__snapshots__/bridge.integration.test.ts.snap +2 -2
  670. package/src/families/cardano/bridge.integration.test.ts +1 -1
  671. package/src/families/casper/bridge.integration.test.ts +1 -1
  672. package/src/families/celo/bridge.integration.test.ts +1 -1
  673. package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +1 -1
  674. package/src/families/cosmos/datasets/axelar.integration.test.ts +1 -1
  675. package/src/families/cosmos/datasets/babylon.integration.test.ts +1 -1
  676. package/src/families/cosmos/datasets/coreum.integration.test.ts +1 -1
  677. package/src/families/cosmos/datasets/cosmos.integration.test.ts +1 -1
  678. package/src/families/cosmos/datasets/cryptoOrg.integration.test.ts +1 -1
  679. package/src/families/cosmos/datasets/desmos.integration.test.ts +1 -1
  680. package/src/families/cosmos/datasets/dydx.integration.FIXME.ts +1 -1
  681. package/src/families/cosmos/datasets/injective.integration.test.ts +1 -1
  682. package/src/families/cosmos/datasets/mantra.integration.test.ts +1 -1
  683. package/src/families/cosmos/datasets/onomy.integration.test.ts +1 -1
  684. package/src/families/cosmos/datasets/osmosis.integration.test.ts +1 -1
  685. package/src/families/cosmos/datasets/persistence.integration.test.ts +1 -1
  686. package/src/families/cosmos/datasets/quicksilver.integration.test.ts +1 -1
  687. package/src/families/cosmos/datasets/secretNetwork.integration.FIXME.ts +1 -1
  688. package/src/families/cosmos/datasets/seiNetwork.integration.test.ts +1 -1
  689. package/src/families/cosmos/datasets/stargaze.integration.test.ts +1 -1
  690. package/src/families/cosmos/datasets/umee.integration.test.ts +1 -1
  691. package/src/families/cosmos/datasets/xion.integration.test.ts +1 -1
  692. package/src/families/cosmos/datasets/zenrock.integration.test.ts +1 -1
  693. package/src/families/evm/bridge.integration.test.ts +1 -1
  694. package/src/families/evm/config.ts +49 -0
  695. package/src/families/evm/setup.ts +0 -12
  696. package/src/families/filecoin/bridge.integration.test.ts +1 -1
  697. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +191 -596
  698. package/src/families/hedera/bridge.integration.test.ts +1 -1
  699. package/src/families/icon/bridge.integration.test.ts +1 -1
  700. package/src/families/internet_computer/bridge.integration.test.ts +1 -1
  701. package/src/families/kaspa/bridge.integration.test.ts +1 -1
  702. package/src/families/mina/bridge.integration.test.ts +1 -1
  703. package/src/families/multiversx/bridge.integration.test.ts +1 -1
  704. package/src/families/multiversx/synchronisation.integration.test.ts +1 -1
  705. package/src/families/near/bridge.integration.test.ts +1 -1
  706. package/src/families/polkadot/bridge.integration.test.ts +1 -1
  707. package/src/families/solana/bridge/mock.ts +13 -23
  708. package/src/families/solana/bridge.integration.test.ts +1 -1
  709. package/src/families/solana/config.ts +0 -1
  710. package/src/families/solana/setup.ts +37 -24
  711. package/src/families/stacks/__tests__/sync.integration.test.ts +1 -1
  712. package/src/families/stacks/bridge.integration.test.ts +1 -1
  713. package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +279 -15
  714. package/src/families/stellar/bridge.integration.test.ts +1 -1
  715. package/src/families/sui/bridge.integration.test.ts +1 -1
  716. package/src/families/tezos/bridge.integration.test.ts +1 -1
  717. package/src/families/ton/bridge.integration.test.ts +1 -1
  718. package/src/families/tron/bridge.integration.test.ts +1 -1
  719. package/src/families/tron/data.mock.ts +4 -8
  720. package/src/families/vechain/bridge.integration.test.ts +1 -1
  721. package/src/families/xrp/bridge.integration.test.ts +1 -1
  722. package/src/featureFlags/defaultFeatures.ts +11 -0
  723. package/src/featureFlags/stakePrograms/index.ts +18 -0
  724. package/src/market/hooks/useMarketDataProvider.ts +1 -0
  725. package/src/market/utils/types.ts +1 -0
  726. package/src/modularDrawer/hooks/__test__/useAssetAccountCounts.test.ts +0 -5
  727. package/src/modularDrawer/hooks/useCurrenciesUnderFeatureFlag.ts +11 -0
  728. package/src/modularDrawer/hooks/useNetworkAccountCounts.tsx +1 -6
  729. package/src/modularDrawer/modules/__test__/createAssetConfiguration.test.tsx +2 -2
  730. package/src/modularDrawer/modules/createNetworkConfiguration.ts +1 -2
  731. package/src/modularDrawer/utils/__tests__/groupCurrenciesByAsset.test.ts +88 -0
  732. package/src/modularDrawer/utils/{groupCurrenciesByProvider.ts → groupCurrenciesByAsset.ts} +5 -5
  733. package/src/modularDrawer/utils/index.ts +1 -1
  734. package/src/modularDrawer/utils/type.ts +0 -5
  735. package/src/platform/filters.ts +1 -23
  736. package/src/platform/helpers.ts +2 -49
  737. package/src/platform/react.ts +86 -22
  738. package/src/platform/types.ts +1 -1
  739. package/src/test-helpers/cryptoAssetsStore.ts +5 -0
  740. package/src/utils/__tests__/getAccountTuplesForCurrency.test.ts +3 -33
  741. package/src/utils/getAccountTuplesForCurrency.ts +1 -6
  742. package/src/wallet-api/ACRE/server.test.ts +3 -4
  743. package/src/wallet-api/ACRE/server.ts +1 -1
  744. package/src/wallet-api/Exchange/server.test.ts +0 -5
  745. package/src/wallet-api/Exchange/server.ts +8 -7
  746. package/src/wallet-api/converters.ts +6 -1
  747. package/src/wallet-api/logic.test.ts +3 -3
  748. package/src/wallet-api/logic.ts +1 -1
  749. package/src/wallet-api/react.ts +312 -137
  750. package/src/wallet-api/tracking.ts +22 -0
  751. package/src/wallet-api/types.ts +5 -0
  752. package/src/wallet-api/useDappLogic.ts +91 -106
  753. package/src/wallet-api/utils/deriveAccountIdForManifest.ts +14 -2
  754. package/lib/__tests__/test-helpers/setup.d.ts +0 -2
  755. package/lib/__tests__/test-helpers/setup.d.ts.map +0 -1
  756. package/lib/__tests__/test-helpers/setup.js.map +0 -1
  757. package/lib/bridge/crypto-assets/index.d.ts +0 -4
  758. package/lib/bridge/crypto-assets/index.d.ts.map +0 -1
  759. package/lib/bridge/crypto-assets/index.js +0 -22
  760. package/lib/bridge/crypto-assets/index.js.map +0 -1
  761. package/lib/deposit/helper.d.ts +0 -8
  762. package/lib/deposit/helper.d.ts.map +0 -1
  763. package/lib/deposit/helper.js +0 -125
  764. package/lib/deposit/helper.js.map +0 -1
  765. package/lib/deposit/index.d.ts +0 -3
  766. package/lib/deposit/index.d.ts.map +0 -1
  767. package/lib/deposit/index.js +0 -6
  768. package/lib/deposit/index.js.map +0 -1
  769. package/lib/deposit/mock.d.ts +0 -75
  770. package/lib/deposit/mock.d.ts.map +0 -1
  771. package/lib/deposit/mock.js +0 -15111
  772. package/lib/deposit/mock.js.map +0 -1
  773. package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts +0 -3
  774. package/lib/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +0 -1
  775. package/lib/deposit/useGroupedCurrenciesByProvider.hook.js +0 -40
  776. package/lib/deposit/useGroupedCurrenciesByProvider.hook.js.map +0 -1
  777. package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
  778. package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
  779. package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -26
  780. package/lib/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
  781. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +0 -22
  782. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +0 -1
  783. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +0 -41
  784. package/lib/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +0 -1
  785. package/lib/modularDrawer/utils/currencyUtils.d.ts +0 -10
  786. package/lib/modularDrawer/utils/currencyUtils.d.ts.map +0 -1
  787. package/lib/modularDrawer/utils/currencyUtils.js +0 -74
  788. package/lib/modularDrawer/utils/currencyUtils.js.map +0 -1
  789. package/lib/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +0 -1
  790. package/lib/modularDrawer/utils/groupCurrenciesByProvider.js +0 -21
  791. package/lib/modularDrawer/utils/groupCurrenciesByProvider.js.map +0 -1
  792. package/lib-es/__tests__/test-helpers/setup.d.ts +0 -2
  793. package/lib-es/__tests__/test-helpers/setup.d.ts.map +0 -1
  794. package/lib-es/__tests__/test-helpers/setup.js +0 -18
  795. package/lib-es/__tests__/test-helpers/setup.js.map +0 -1
  796. package/lib-es/bridge/crypto-assets/index.d.ts +0 -4
  797. package/lib-es/bridge/crypto-assets/index.d.ts.map +0 -1
  798. package/lib-es/bridge/crypto-assets/index.js +0 -17
  799. package/lib-es/bridge/crypto-assets/index.js.map +0 -1
  800. package/lib-es/deposit/helper.d.ts +0 -8
  801. package/lib-es/deposit/helper.d.ts.map +0 -1
  802. package/lib-es/deposit/helper.js +0 -117
  803. package/lib-es/deposit/helper.js.map +0 -1
  804. package/lib-es/deposit/index.d.ts +0 -3
  805. package/lib-es/deposit/index.d.ts.map +0 -1
  806. package/lib-es/deposit/index.js +0 -3
  807. package/lib-es/deposit/index.js.map +0 -1
  808. package/lib-es/deposit/mock.d.ts +0 -75
  809. package/lib-es/deposit/mock.d.ts.map +0 -1
  810. package/lib-es/deposit/mock.js +0 -15108
  811. package/lib-es/deposit/mock.js.map +0 -1
  812. package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts +0 -3
  813. package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.d.ts.map +0 -1
  814. package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js +0 -36
  815. package/lib-es/deposit/useGroupedCurrenciesByProvider.hook.js.map +0 -1
  816. package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts +0 -3
  817. package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.d.ts.map +0 -1
  818. package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js +0 -18
  819. package/lib-es/e2e/deviceInteraction/ButtonDeviceSimulator.js.map +0 -1
  820. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts +0 -22
  821. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.d.ts.map +0 -1
  822. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js +0 -38
  823. package/lib-es/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.js.map +0 -1
  824. package/lib-es/modularDrawer/utils/currencyUtils.d.ts +0 -10
  825. package/lib-es/modularDrawer/utils/currencyUtils.d.ts.map +0 -1
  826. package/lib-es/modularDrawer/utils/currencyUtils.js +0 -65
  827. package/lib-es/modularDrawer/utils/currencyUtils.js.map +0 -1
  828. package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.d.ts.map +0 -1
  829. package/lib-es/modularDrawer/utils/groupCurrenciesByProvider.js.map +0 -1
  830. package/src/bridge/crypto-assets/index.ts +0 -23
  831. package/src/deposit/deposit.integration.test.ts +0 -88
  832. package/src/deposit/deposit.test.ts +0 -684
  833. package/src/deposit/helper.ts +0 -143
  834. package/src/deposit/index.ts +0 -3
  835. package/src/deposit/mock.ts +0 -15112
  836. package/src/deposit/useGroupedCurrenciesByProvider.hook.ts +0 -46
  837. package/src/e2e/deviceInteraction/ButtonDeviceSimulator.ts +0 -23
  838. package/src/modularDrawer/__mocks__/useGroupedCurrenciesByProvider.mock.ts +0 -49
  839. package/src/modularDrawer/modules/__test__/createNetworkConfiguration.test.ts +0 -342
  840. package/src/modularDrawer/utils/__tests__/currencyUtils.test.ts +0 -126
  841. package/src/modularDrawer/utils/currencyUtils.ts +0 -95
@@ -2,24 +2,36 @@ import expect from "expect";
2
2
  import { Transaction } from "../models/Transaction";
3
3
  import { waitFor, pressUntilTextFound, containsSubstringInEvent, getSendEvents } from "../speculos";
4
4
  import { isTouchDevice } from "../speculosAppVersion";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
6
5
  import { DeviceLabels } from "../enum/DeviceLabels";
7
6
  import { Delegate } from "../models/Delegate";
8
7
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
8
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
9
9
 
10
- export async function sendAptos(tx: Transaction) {
11
- await getSendEvents(tx);
12
- if (isTouchDevice()) {
13
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
14
- } else {
15
- await pressBoth();
16
- }
17
- }
10
+ export const sendAptos = withDeviceController(
11
+ ({ getButtonsController }) =>
12
+ async (tx: Transaction) => {
13
+ const buttons = getButtonsController();
18
14
 
19
- export async function delegateAptos(delegatingAccount: Delegate) {
20
- await waitFor(DeviceLabels.REVIEW_OPERATION);
21
- const events = await pressUntilTextFound(DeviceLabels.APPROVE);
22
- const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
23
- expect(isAmountCorrect).toBeTruthy();
24
- await pressBoth();
25
- }
15
+ await getSendEvents(tx);
16
+
17
+ if (isTouchDevice()) {
18
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
19
+ } else {
20
+ await buttons.both();
21
+ }
22
+ },
23
+ );
24
+
25
+ export const delegateAptos = withDeviceController(
26
+ ({ getButtonsController }) =>
27
+ async (delegatingAccount: Delegate) => {
28
+ const buttons = getButtonsController();
29
+
30
+ await waitFor(DeviceLabels.REVIEW_OPERATION);
31
+ const events = await pressUntilTextFound(DeviceLabels.APPROVE);
32
+ const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
33
+ expect(isAmountCorrect).toBeTruthy();
34
+
35
+ await buttons.both();
36
+ },
37
+ );
@@ -2,49 +2,63 @@ import expect from "expect";
2
2
  import { Transaction } from "../models/Transaction";
3
3
  import { waitFor, containsSubstringInEvent, pressUntilTextFound, getSendEvents } from "../speculos";
4
4
  import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
6
5
  import { DeviceLabels } from "../enum/DeviceLabels";
7
6
  import invariant from "invariant";
8
7
  import { DeviceModelId } from "@ledgerhq/types-devices";
9
8
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
9
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
10
10
 
11
- export async function sendBTCBasedCoin(tx: Transaction) {
12
- const events = await getSendEvents(tx);
13
- const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
14
- expect(isAmountCorrect).toBeTruthy();
15
- const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
16
- expect(isAddressCorrect).toBeTruthy();
17
- if (isTouchDevice()) {
18
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
19
- } else {
20
- await pressBoth();
21
- await waitFor(DeviceLabels.CONFIRM);
22
- await pressUntilTextFound(DeviceLabels.ACCEPT);
23
- await pressBoth();
24
- }
25
- }
26
-
27
- export async function sendBTC(tx: Transaction) {
28
- const speculosDevice = getSpeculosModel();
29
- try {
30
- const events = await getSendEvents(tx);
31
- const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
32
- expect(isAmountCorrect).toBeTruthy();
33
- const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
34
- expect(isAddressCorrect).toBeTruthy();
35
- if (isTouchDevice()) {
36
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
37
- } else {
38
- await pressBoth();
39
- if (speculosDevice === DeviceModelId.nanoS) {
40
- await pressUntilTextFound(DeviceLabels.SIGN);
41
- await pressBoth();
42
- await waitFor(DeviceLabels.BITCOIN_IS_READY);
11
+ export const sendBTCBasedCoin = withDeviceController(
12
+ ({ getButtonsController }) =>
13
+ async (tx: Transaction) => {
14
+ const buttons = getButtonsController();
15
+
16
+ const events = await getSendEvents(tx);
17
+ const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
18
+ expect(isAmountCorrect).toBeTruthy();
19
+
20
+ const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
21
+ expect(isAddressCorrect).toBeTruthy();
22
+
23
+ if (isTouchDevice()) {
24
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
43
25
  } else {
44
- await waitFor(DeviceLabels.TRANSACTION_SIGNED);
26
+ await buttons.both();
27
+ await waitFor(DeviceLabels.CONFIRM);
28
+ await pressUntilTextFound(DeviceLabels.ACCEPT);
29
+ await buttons.both();
30
+ }
31
+ },
32
+ );
33
+
34
+ export const sendBTC = withDeviceController(
35
+ ({ getButtonsController }) =>
36
+ async (tx: Transaction) => {
37
+ const buttons = getButtonsController();
38
+ const speculosDevice = getSpeculosModel();
39
+
40
+ try {
41
+ const events = await getSendEvents(tx);
42
+ const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
43
+ expect(isAmountCorrect).toBeTruthy();
44
+
45
+ const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
46
+ expect(isAddressCorrect).toBeTruthy();
47
+
48
+ if (isTouchDevice()) {
49
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
50
+ } else {
51
+ await buttons.both();
52
+ if (speculosDevice === DeviceModelId.nanoS) {
53
+ await pressUntilTextFound(DeviceLabels.SIGN);
54
+ await buttons.both();
55
+ await waitFor(DeviceLabels.BITCOIN_IS_READY);
56
+ } else {
57
+ await waitFor(DeviceLabels.TRANSACTION_SIGNED);
58
+ }
59
+ }
60
+ } catch (e) {
61
+ invariant(false, `Error while sending BTC transaction: ${e}`);
45
62
  }
46
- }
47
- } catch (e) {
48
- invariant(false, `Error while sending BTC transaction: ${e}`);
49
- }
50
- }
63
+ },
64
+ );
@@ -1,8 +1,7 @@
1
1
  import expect from "expect";
2
2
  import { Transaction } from "../models/Transaction";
3
3
  import { pressUntilTextFound, containsSubstringInEvent, waitFor } from "../speculos";
4
- import { getSpeculosModel } from "../speculosAppVersion";
5
- import { pressBoth, pressRightButton } from "../deviceInteraction/ButtonDeviceSimulator";
4
+ import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
6
5
  import {
7
6
  pressAndRelease,
8
7
  longPressAndRelease,
@@ -10,7 +9,7 @@ import {
10
9
  } from "../deviceInteraction/TouchDeviceSimulator";
11
10
  import { DeviceLabels } from "../enum/DeviceLabels";
12
11
  import { DeviceModelId } from "@ledgerhq/types-devices";
13
- import { isTouchDevice } from "../speculosAppVersion";
12
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
14
13
 
15
14
  type ActionType = "both" | "right" | "tap" | "swipe" | "confirm" | "hold";
16
15
 
@@ -32,32 +31,40 @@ async function sendCardanoTouchDevices(tx: Transaction) {
32
31
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
33
32
  }
34
33
 
35
- async function sendCardanoNanoS(_tx: Transaction) {
36
- await waitFor(DeviceLabels.NEW_ORDINARY);
37
- await pressRightButton();
38
- await waitFor(DeviceLabels.SEND_TO_ADDRESS);
39
- await pressBoth();
40
- await pressUntilTextFound(DeviceLabels.SEND);
41
- await pressBoth();
42
- await waitFor(DeviceLabels.TRANSACTION_FEE);
43
- await pressBoth();
44
- await waitFor(DeviceLabels.CONFIRM);
45
- await pressRightButton();
46
- }
34
+ export const sendCardanoNanoS = withDeviceController(
35
+ ({ getButtonsController }) =>
36
+ async (_tx: Transaction) => {
37
+ const buttons = getButtonsController();
38
+ await waitFor(DeviceLabels.NEW_ORDINARY);
39
+ await buttons.right();
40
+ await waitFor(DeviceLabels.SEND_TO_ADDRESS);
41
+ await buttons.both();
42
+ await pressUntilTextFound(DeviceLabels.SEND);
43
+ await buttons.both();
44
+ await waitFor(DeviceLabels.TRANSACTION_FEE);
45
+ await buttons.both();
46
+ await waitFor(DeviceLabels.CONFIRM);
47
+ await buttons.right();
48
+ },
49
+ );
47
50
 
48
- async function sendCardanoButtonDevice(tx: Transaction) {
49
- await waitFor(DeviceLabels.NEW_ORDINARY);
50
- await pressBoth();
51
- await pressUntilTextFound(DeviceLabels.SEND_TO_ADDRESS_2);
52
- await pressBoth();
53
- const events = await pressUntilTextFound(DeviceLabels.SEND);
54
- validateTransactionData(tx, events);
55
- await pressBoth();
56
- await waitFor(DeviceLabels.TRANSACTION_FEE);
57
- await pressBoth();
58
- await waitFor(DeviceLabels.CONFIRM);
59
- await pressBoth();
60
- }
51
+ export const sendCardanoButtonDevice = withDeviceController(
52
+ ({ getButtonsController }) =>
53
+ async (tx: Transaction) => {
54
+ const buttons = getButtonsController();
55
+ await waitFor(DeviceLabels.NEW_ORDINARY);
56
+ await buttons.both();
57
+ await pressUntilTextFound(DeviceLabels.SEND_TO_ADDRESS_2);
58
+ await buttons.both();
59
+ const events = await pressUntilTextFound(DeviceLabels.SEND);
60
+ validateTransactionData(tx, events);
61
+ await buttons.both();
62
+ await waitFor(DeviceLabels.TRANSACTION_FEE);
63
+ await buttons.both();
64
+ await waitFor(DeviceLabels.CONFIRM);
65
+ await buttons.both();
66
+ },
67
+ );
61
68
 
62
69
  export async function sendCardano(tx: Transaction) {
63
70
  const speculosModel = getSpeculosModel();
@@ -127,14 +134,18 @@ async function delegateTouchDevicesAction(label: DeviceLabels) {
127
134
  }
128
135
  }
129
136
 
130
- async function delegateNanoAction(label: DeviceLabels, action: ActionType) {
131
- await waitFor(label);
132
- if (action === "both") {
133
- await pressBoth();
134
- } else {
135
- await pressRightButton();
136
- }
137
- }
137
+ export const delegateNanoAction = withDeviceController(
138
+ ({ getButtonsController }) =>
139
+ async (label: DeviceLabels, action: ActionType) => {
140
+ const buttons = getButtonsController();
141
+ await waitFor(label);
142
+ if (action === "both") {
143
+ await buttons.both();
144
+ } else {
145
+ await buttons.right();
146
+ }
147
+ },
148
+ );
138
149
 
139
150
  async function executeDelegateStep(label: DeviceLabels, action: ActionType) {
140
151
  try {
@@ -2,18 +2,24 @@ import { containsSubstringInEvent, getDelegateEvents, pressUntilTextFound } from
2
2
  import { isTouchDevice } from "../speculosAppVersion";
3
3
  import { Delegate } from "../models/Delegate";
4
4
  import expect from "expect";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
6
5
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
7
6
  import { DeviceLabels } from "../enum/DeviceLabels";
7
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
8
8
 
9
- export async function delegateCelo(delegatingAccount: Delegate) {
10
- const events = await getDelegateEvents(delegatingAccount);
11
- const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
12
- expect(isAmountCorrect).toBeTruthy();
13
- if (isTouchDevice()) {
14
- await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
15
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
16
- } else {
17
- await pressBoth();
18
- }
19
- }
9
+ export const delegateCelo = withDeviceController(
10
+ ({ getButtonsController }) =>
11
+ async (delegatingAccount: Delegate) => {
12
+ const buttons = getButtonsController();
13
+
14
+ const events = await getDelegateEvents(delegatingAccount);
15
+ const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
16
+ expect(isAmountCorrect).toBeTruthy();
17
+
18
+ if (isTouchDevice()) {
19
+ await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
20
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
21
+ } else {
22
+ await buttons.both();
23
+ }
24
+ },
25
+ );
@@ -2,32 +2,44 @@ import expect from "expect";
2
2
  import { Delegate } from "../models/Delegate";
3
3
  import { Transaction } from "../models/Transaction";
4
4
  import { containsSubstringInEvent, getDelegateEvents, getSendEvents } from "../speculos";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
6
5
  import { DeviceLabels } from "../enum/DeviceLabels";
7
6
  import { isTouchDevice } from "../speculosAppVersion";
8
7
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
8
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
9
9
 
10
- export async function delegateCosmos(delegatingAccount: Delegate) {
11
- const events = await getDelegateEvents(delegatingAccount);
12
- const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
13
- expect(isAmountCorrect).toBeTruthy();
14
- if (isTouchDevice()) {
15
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
16
- } else {
17
- await pressBoth();
18
- }
19
- }
10
+ export const delegateCosmos = withDeviceController(
11
+ ({ getButtonsController }) =>
12
+ async (delegatingAccount: Delegate) => {
13
+ const buttons = getButtonsController();
20
14
 
21
- export async function sendCosmos(tx: Transaction) {
22
- const events = await getSendEvents(tx);
23
- const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
24
- expect(isAmountCorrect).toBeTruthy();
25
- const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
26
- expect(isAddressCorrect).toBeTruthy();
15
+ const events = await getDelegateEvents(delegatingAccount);
16
+ const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
17
+ expect(isAmountCorrect).toBeTruthy();
27
18
 
28
- if (isTouchDevice()) {
29
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
30
- } else {
31
- await pressBoth();
32
- }
33
- }
19
+ if (isTouchDevice()) {
20
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
21
+ } else {
22
+ await buttons.both();
23
+ }
24
+ },
25
+ );
26
+
27
+ export const sendCosmos = withDeviceController(
28
+ ({ getButtonsController }) =>
29
+ async (tx: Transaction) => {
30
+ const buttons = getButtonsController();
31
+
32
+ const events = await getSendEvents(tx);
33
+ const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
34
+ expect(isAmountCorrect).toBeTruthy();
35
+
36
+ const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
37
+ expect(isAddressCorrect).toBeTruthy();
38
+
39
+ if (isTouchDevice()) {
40
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
41
+ } else {
42
+ await buttons.both();
43
+ }
44
+ },
45
+ );
@@ -1,17 +1,17 @@
1
1
  import expect from "expect";
2
2
  import { Transaction } from "../models/Transaction";
3
3
  import { containsSubstringInEvent, pressUntilTextFound } from "../speculos";
4
- import { getSpeculosModel } from "../speculosAppVersion";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
4
+ import { getSpeculosModel, isTouchDevice } from "../speculosAppVersion";
6
5
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
7
6
  import { DeviceLabels } from "../enum/DeviceLabels";
8
7
  import { Device } from "../enum/Device";
9
8
  import { DeviceModelId } from "@ledgerhq/types-devices";
10
- import { isTouchDevice } from "../speculosAppVersion";
9
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
11
10
 
12
11
  function validateTransactionData(tx: Transaction, events: string[]) {
13
12
  const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
14
13
  expect(isAmountCorrect).toBeTruthy();
14
+
15
15
  if (tx.accountToCredit.ensName && process.env.SPECULOS_DEVICE !== Device.LNS.name) {
16
16
  const isENSNameCorrect = containsSubstringInEvent(tx.accountToCredit.ensName, events);
17
17
  expect(isENSNameCorrect).toBeTruthy();
@@ -27,20 +27,31 @@ async function sendEvmTouchDevices(tx: Transaction) {
27
27
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
28
28
  }
29
29
 
30
- async function sendEvmButtonDevice(tx: Transaction) {
31
- const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
32
- validateTransactionData(tx, events);
33
- await pressBoth();
34
- }
30
+ export const sendEvmButtonDevice = withDeviceController(
31
+ ({ getButtonsController }) =>
32
+ async (tx: Transaction) => {
33
+ const buttons = getButtonsController();
35
34
 
36
- async function sendEvmNanoS(tx: Transaction) {
37
- const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
38
- validateTransactionData(tx, events);
39
- await pressBoth();
40
- }
35
+ const events = await pressUntilTextFound(DeviceLabels.SIGN_TRANSACTION);
36
+ validateTransactionData(tx, events);
37
+ await buttons.both();
38
+ },
39
+ );
40
+
41
+ export const sendEvmNanoS = withDeviceController(
42
+ ({ getButtonsController }) =>
43
+ async (tx: Transaction) => {
44
+ const buttons = getButtonsController();
45
+
46
+ const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
47
+ validateTransactionData(tx, events);
48
+ await buttons.both();
49
+ },
50
+ );
41
51
 
42
52
  export async function sendEVM(tx: Transaction) {
43
53
  const speculosModel = getSpeculosModel();
54
+
44
55
  if (isTouchDevice()) {
45
56
  return sendEvmTouchDevices(tx);
46
57
  }
@@ -1,8 +1,10 @@
1
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
2
1
  import { DeviceLabels } from "../enum/DeviceLabels";
3
2
  import { pressUntilTextFound } from "../speculos";
3
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
4
+
5
+ export const sendHedera = withDeviceController(({ getButtonsController }) => async () => {
6
+ const buttons = getButtonsController();
4
7
 
5
- export async function sendHedera() {
6
8
  await pressUntilTextFound(DeviceLabels.APPROVE);
7
- await pressBoth();
8
- }
9
+ await buttons.both();
10
+ });
@@ -1,25 +1,37 @@
1
1
  import expect from "expect";
2
2
  import { waitFor, containsSubstringInEvent, pressUntilTextFound, getSendEvents } from "../speculos";
3
3
  import { isTouchDevice } from "../speculosAppVersion";
4
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
5
4
  import { DeviceLabels } from "../enum/DeviceLabels";
6
5
  import { Delegate } from "../models/Delegate";
7
6
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
8
7
  import { Transaction } from "../models/Transaction";
8
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
9
9
 
10
- export async function sendKaspa(tx: Transaction) {
11
- await getSendEvents(tx);
12
- if (isTouchDevice()) {
13
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
14
- } else {
15
- await pressBoth();
16
- }
17
- }
10
+ export const sendKaspa = withDeviceController(
11
+ ({ getButtonsController }) =>
12
+ async (tx: Transaction) => {
13
+ const buttons = getButtonsController();
18
14
 
19
- export async function delegateKaspa(delegatingAccount: Delegate) {
20
- await waitFor(DeviceLabels.REVIEW_OPERATION);
21
- const events = await pressUntilTextFound(DeviceLabels.APPROVE);
22
- const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
23
- expect(isAmountCorrect).toBeTruthy();
24
- await pressBoth();
25
- }
15
+ await getSendEvents(tx);
16
+
17
+ if (isTouchDevice()) {
18
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
19
+ } else {
20
+ await buttons.both();
21
+ }
22
+ },
23
+ );
24
+
25
+ export const delegateKaspa = withDeviceController(
26
+ ({ getButtonsController }) =>
27
+ async (delegatingAccount: Delegate) => {
28
+ const buttons = getButtonsController();
29
+
30
+ await waitFor(DeviceLabels.REVIEW_OPERATION);
31
+ const events = await pressUntilTextFound(DeviceLabels.APPROVE);
32
+ const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
33
+ expect(isAmountCorrect).toBeTruthy();
34
+
35
+ await buttons.both();
36
+ },
37
+ );
@@ -1,16 +1,22 @@
1
1
  import { getDelegateEvents, pressUntilTextFound } from "../speculos";
2
2
  import { Delegate } from "../models/Delegate";
3
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
4
3
  import { DeviceLabels } from "../enum/DeviceLabels";
5
4
  import { isTouchDevice } from "../speculosAppVersion";
6
5
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
6
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
7
7
 
8
- export async function delegateMultiversX(delegatingAccount: Delegate) {
9
- await getDelegateEvents(delegatingAccount);
10
- if (isTouchDevice()) {
11
- await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
12
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
13
- } else {
14
- await pressBoth();
15
- }
16
- }
8
+ export const delegateMultiversX = withDeviceController(
9
+ ({ getButtonsController }) =>
10
+ async (delegatingAccount: Delegate) => {
11
+ const buttons = getButtonsController();
12
+
13
+ await getDelegateEvents(delegatingAccount);
14
+
15
+ if (isTouchDevice()) {
16
+ await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
17
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
18
+ } else {
19
+ await buttons.both();
20
+ }
21
+ },
22
+ );
@@ -7,23 +7,29 @@ import {
7
7
  pressUntilTextFound,
8
8
  } from "../speculos";
9
9
  import { isTouchDevice } from "../speculosAppVersion";
10
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
11
10
  import { DeviceLabels } from "../enum/DeviceLabels";
12
11
  import { longPressAndRelease, pressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
12
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
13
13
 
14
- export async function delegateNear(delegatingAccount: Delegate) {
15
- const events = await getDelegateEvents(delegatingAccount);
16
- const isProviderCorrect = containsSubstringInEvent(delegatingAccount.provider, events);
17
- expect(isProviderCorrect).toBeTruthy();
18
- if (isTouchDevice()) {
19
- await pressAndRelease(DeviceLabels.CONFIRM_HEADER);
20
- await waitFor(DeviceLabels.VIEW_ACTION);
21
- await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
22
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
23
- } else {
24
- await pressBoth();
25
- await waitFor(DeviceLabels.VIEW_ACTION);
26
- await pressUntilTextFound(DeviceLabels.SIGN);
27
- await pressBoth();
28
- }
29
- }
14
+ export const delegateNear = withDeviceController(
15
+ ({ getButtonsController }) =>
16
+ async (delegatingAccount: Delegate) => {
17
+ const buttons = getButtonsController();
18
+
19
+ const events = await getDelegateEvents(delegatingAccount);
20
+ const isProviderCorrect = containsSubstringInEvent(delegatingAccount.provider, events);
21
+ expect(isProviderCorrect).toBeTruthy();
22
+
23
+ if (isTouchDevice()) {
24
+ await pressAndRelease(DeviceLabels.CONFIRM_HEADER);
25
+ await waitFor(DeviceLabels.VIEW_ACTION);
26
+ await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
27
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
28
+ } else {
29
+ await buttons.both();
30
+ await waitFor(DeviceLabels.VIEW_ACTION);
31
+ await pressUntilTextFound(DeviceLabels.SIGN);
32
+ await buttons.both();
33
+ }
34
+ },
35
+ );
@@ -2,19 +2,25 @@ import { Delegate } from "../models/Delegate";
2
2
  import { pressUntilTextFound, containsSubstringInEvent, getDelegateEvents } from "../speculos";
3
3
  import { isTouchDevice } from "../speculosAppVersion";
4
4
  import expect from "expect";
5
- import { pressBoth } from "../deviceInteraction/ButtonDeviceSimulator";
6
5
  import { DeviceLabels } from "../enum/DeviceLabels";
7
6
  import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
7
+ import { withDeviceController } from "../deviceInteraction/DeviceController";
8
8
 
9
- export async function delegateOsmosis(delegatingAccount: Delegate) {
10
- const events = await getDelegateEvents(delegatingAccount);
11
- const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
12
- const isAmountCorrect = containsSubstringInEvent(amountInUosmo, events);
13
- expect(isAmountCorrect).toBeTruthy();
14
- if (isTouchDevice()) {
15
- await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
16
- await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
17
- } else {
18
- await pressBoth();
19
- }
20
- }
9
+ export const delegateOsmosis = withDeviceController(
10
+ ({ getButtonsController }) =>
11
+ async (delegatingAccount: Delegate) => {
12
+ const buttons = getButtonsController();
13
+
14
+ const events = await getDelegateEvents(delegatingAccount);
15
+ const amountInUosmo = (Number(delegatingAccount.amount) * 1_000_000).toString();
16
+ const isAmountCorrect = containsSubstringInEvent(amountInUosmo, events);
17
+ expect(isAmountCorrect).toBeTruthy();
18
+
19
+ if (isTouchDevice()) {
20
+ await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
21
+ await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
22
+ } else {
23
+ await buttons.both();
24
+ }
25
+ },
26
+ );