@ledgerhq/live-common 34.52.0-nightly.8 → 34.52.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 (106) hide show
  1. package/lib/apps/config.js +1 -1
  2. package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
  3. package/lib/e2e/data/deviceLabelsData.js +30 -28
  4. package/lib/e2e/data/deviceLabelsData.js.map +1 -1
  5. package/lib/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
  6. package/lib/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
  7. package/lib/e2e/enum/Device.d.ts +1 -0
  8. package/lib/e2e/enum/Device.d.ts.map +1 -1
  9. package/lib/e2e/enum/Device.js +1 -0
  10. package/lib/e2e/enum/Device.js.map +1 -1
  11. package/lib/e2e/enum/DeviceLabels.d.ts +1 -0
  12. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  13. package/lib/e2e/enum/DeviceLabels.js +1 -0
  14. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  15. package/lib/e2e/families/bitcoin.js +1 -1
  16. package/lib/e2e/families/bitcoin.js.map +1 -1
  17. package/lib/e2e/families/cardano.d.ts.map +1 -1
  18. package/lib/e2e/families/cardano.js +12 -11
  19. package/lib/e2e/families/cardano.js.map +1 -1
  20. package/lib/e2e/families/evm.d.ts.map +1 -1
  21. package/lib/e2e/families/evm.js +4 -3
  22. package/lib/e2e/families/evm.js.map +1 -1
  23. package/lib/e2e/speculos.d.ts +2 -0
  24. package/lib/e2e/speculos.d.ts.map +1 -1
  25. package/lib/e2e/speculos.js +8 -2
  26. package/lib/e2e/speculos.js.map +1 -1
  27. package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
  28. package/lib/e2e/speculosAppVersion.js +4 -1
  29. package/lib/e2e/speculosAppVersion.js.map +1 -1
  30. package/lib/e2e/speculosCI.d.ts.map +1 -1
  31. package/lib/e2e/speculosCI.js +4 -0
  32. package/lib/e2e/speculosCI.js.map +1 -1
  33. package/lib/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  34. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
  35. package/lib/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  36. package/lib/exchange/swap/transactionStrategies.d.ts +3 -0
  37. package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
  38. package/lib/exchange/swap/transactionStrategies.js +12 -2
  39. package/lib/exchange/swap/transactionStrategies.js.map +1 -1
  40. package/lib/families/canton/config.d.ts.map +1 -1
  41. package/lib/families/canton/config.js +3 -0
  42. package/lib/families/canton/config.js.map +1 -1
  43. package/lib/load/speculos.d.ts.map +1 -1
  44. package/lib/load/speculos.js +1 -0
  45. package/lib/load/speculos.js.map +1 -1
  46. package/lib-es/apps/config.js +1 -1
  47. package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
  48. package/lib-es/e2e/data/deviceLabelsData.js +30 -28
  49. package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
  50. package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.d.ts.map +1 -1
  51. package/lib-es/e2e/deviceInteraction/TouchDeviceSimulator.js.map +1 -1
  52. package/lib-es/e2e/enum/Device.d.ts +1 -0
  53. package/lib-es/e2e/enum/Device.d.ts.map +1 -1
  54. package/lib-es/e2e/enum/Device.js +1 -0
  55. package/lib-es/e2e/enum/Device.js.map +1 -1
  56. package/lib-es/e2e/enum/DeviceLabels.d.ts +1 -0
  57. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  58. package/lib-es/e2e/enum/DeviceLabels.js +1 -0
  59. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  60. package/lib-es/e2e/families/bitcoin.js +1 -1
  61. package/lib-es/e2e/families/bitcoin.js.map +1 -1
  62. package/lib-es/e2e/families/cardano.d.ts.map +1 -1
  63. package/lib-es/e2e/families/cardano.js +12 -11
  64. package/lib-es/e2e/families/cardano.js.map +1 -1
  65. package/lib-es/e2e/families/evm.d.ts.map +1 -1
  66. package/lib-es/e2e/families/evm.js +4 -3
  67. package/lib-es/e2e/families/evm.js.map +1 -1
  68. package/lib-es/e2e/speculos.d.ts +2 -0
  69. package/lib-es/e2e/speculos.d.ts.map +1 -1
  70. package/lib-es/e2e/speculos.js +8 -2
  71. package/lib-es/e2e/speculos.js.map +1 -1
  72. package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
  73. package/lib-es/e2e/speculosAppVersion.js +4 -1
  74. package/lib-es/e2e/speculosAppVersion.js.map +1 -1
  75. package/lib-es/e2e/speculosCI.d.ts.map +1 -1
  76. package/lib-es/e2e/speculosCI.js +4 -0
  77. package/lib-es/e2e/speculosCI.js.map +1 -1
  78. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.d.ts.map +1 -1
  79. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js +4 -0
  80. package/lib-es/exchange/swap/getIncompatibleCurrencyKeys.js.map +1 -1
  81. package/lib-es/exchange/swap/transactionStrategies.d.ts +3 -0
  82. package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
  83. package/lib-es/exchange/swap/transactionStrategies.js +10 -1
  84. package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
  85. package/lib-es/families/canton/config.d.ts.map +1 -1
  86. package/lib-es/families/canton/config.js +3 -0
  87. package/lib-es/families/canton/config.js.map +1 -1
  88. package/lib-es/load/speculos.d.ts.map +1 -1
  89. package/lib-es/load/speculos.js +1 -0
  90. package/lib-es/load/speculos.js.map +1 -1
  91. package/package.json +72 -72
  92. package/src/apps/config.ts +1 -1
  93. package/src/e2e/data/deviceLabelsData.ts +31 -28
  94. package/src/e2e/deviceInteraction/TouchDeviceSimulator.ts +1 -0
  95. package/src/e2e/enum/Device.ts +1 -0
  96. package/src/e2e/enum/DeviceLabels.ts +1 -0
  97. package/src/e2e/families/bitcoin.ts +1 -1
  98. package/src/e2e/families/cardano.ts +12 -15
  99. package/src/e2e/families/evm.ts +4 -3
  100. package/src/e2e/speculos.ts +14 -2
  101. package/src/e2e/speculosAppVersion.ts +4 -1
  102. package/src/e2e/speculosCI.ts +4 -0
  103. package/src/exchange/swap/getIncompatibleCurrencyKeys.ts +4 -0
  104. package/src/exchange/swap/transactionStrategies.ts +16 -1
  105. package/src/families/canton/config.ts +3 -0
  106. package/src/load/speculos.ts +1 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-common",
3
3
  "description": "Common ground for the Ledger Live apps",
4
- "version": "34.52.0-nightly.8",
4
+ "version": "34.52.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/LedgerHQ/ledger-live.git"
@@ -164,79 +164,79 @@
164
164
  "yargs": "^17.0.0",
165
165
  "zod": "^3.22.4",
166
166
  "react-redux": "^7.2.9",
167
- "@ledgerhq/coin-algorand": "^0.12.0-nightly.6",
168
- "@ledgerhq/coin-aptos": "^3.5.0-nightly.5",
169
- "@ledgerhq/coin-bitcoin": "^0.24.0-nightly.5",
170
- "@ledgerhq/coin-canton": "^0.9.0-nightly.5",
171
- "@ledgerhq/coin-cardano": "^0.14.0-nightly.5",
172
- "@ledgerhq/coin-casper": "^2.3.0-nightly.5",
173
- "@ledgerhq/coin-celo": "^1.7.0-nightly.7",
174
- "@ledgerhq/coin-cosmos": "^0.19.0-nightly.5",
175
- "@ledgerhq/coin-evm": "^2.34.0-nightly.7",
176
- "@ledgerhq/coin-filecoin": "^1.14.0-nightly.5",
177
- "@ledgerhq/coin-framework": "^6.8.0-nightly.5",
178
- "@ledgerhq/coin-hedera": "^1.13.0-nightly.5",
179
- "@ledgerhq/coin-icon": "^0.14.0-nightly.5",
180
- "@ledgerhq/coin-internet_computer": "^1.10.0-nightly.6",
181
- "@ledgerhq/coin-kaspa": "^1.4.0-nightly.5",
182
- "@ledgerhq/coin-mina": "^1.4.0-nightly.5",
183
- "@ledgerhq/coin-multiversx": "^0.7.0-nightly.6",
184
- "@ledgerhq/coin-near": "^0.15.0-nightly.5",
185
- "@ledgerhq/coin-polkadot": "^6.12.0-nightly.5",
186
- "@ledgerhq/coin-solana": "^0.36.0-nightly.5",
187
- "@ledgerhq/coin-stacks": "^0.11.0-nightly.5",
188
- "@ledgerhq/coin-stellar": "^6.6.0-nightly.5",
189
- "@ledgerhq/coin-sui": "^0.17.0-nightly.7",
190
- "@ledgerhq/coin-tezos": "^6.8.0-nightly.5",
191
- "@ledgerhq/coin-ton": "^0.16.0-nightly.5",
192
- "@ledgerhq/coin-tron": "^5.6.0-nightly.5",
193
- "@ledgerhq/coin-vechain": "^2.11.1-nightly.5",
194
- "@ledgerhq/coin-xrp": "^7.7.0-nightly.5",
195
- "@ledgerhq/crypto-icons-ui": "^1.22.0-nightly.0",
196
- "@ledgerhq/cryptoassets": "^13.32.0-nightly.3",
197
- "@ledgerhq/device-core": "^0.6.7-nightly.3",
198
- "@ledgerhq/devices": "8.7.0-nightly.1",
199
- "@ledgerhq/errors": "^6.27.0-nightly.0",
200
- "@ledgerhq/hw-app-algorand": "^6.31.9-nightly.1",
201
- "@ledgerhq/hw-app-aptos": "^6.34.9-nightly.1",
202
- "@ledgerhq/hw-app-btc": "^10.12.0-nightly.4",
203
- "@ledgerhq/hw-app-celo": "^6.35.2-nightly.3",
204
- "@ledgerhq/hw-app-cosmos": "^6.32.9-nightly.1",
205
- "@ledgerhq/hw-app-eth": "^6.47.0-nightly.3",
206
- "@ledgerhq/hw-app-exchange": "^0.17.0-nightly.0",
207
- "@ledgerhq/hw-app-hedera": "^1.2.9-nightly.1",
208
- "@ledgerhq/hw-app-icon": "^1.3.9-nightly.1",
209
- "@ledgerhq/hw-app-kaspa": "^1.3.2-nightly.1",
210
- "@ledgerhq/hw-app-multiversx": "^6.26.0-nightly.2",
211
- "@ledgerhq/hw-app-near": "^6.31.9-nightly.1",
212
- "@ledgerhq/hw-app-polkadot": "^6.34.9-nightly.1",
213
- "@ledgerhq/hw-app-str": "^7.2.9-nightly.1",
167
+ "@ledgerhq/coin-aptos": "^3.5.0",
168
+ "@ledgerhq/coin-algorand": "^0.12.0",
169
+ "@ledgerhq/coin-bitcoin": "^0.24.0",
170
+ "@ledgerhq/coin-canton": "^0.9.0",
171
+ "@ledgerhq/coin-cardano": "^0.14.0",
172
+ "@ledgerhq/coin-casper": "^2.3.0",
173
+ "@ledgerhq/coin-celo": "^1.7.0",
174
+ "@ledgerhq/coin-cosmos": "^0.19.0",
175
+ "@ledgerhq/coin-evm": "^2.34.0",
176
+ "@ledgerhq/coin-filecoin": "^1.14.0",
177
+ "@ledgerhq/coin-framework": "^6.8.0",
178
+ "@ledgerhq/coin-hedera": "^1.13.0",
179
+ "@ledgerhq/coin-icon": "^0.14.0",
180
+ "@ledgerhq/coin-internet_computer": "^1.10.0",
181
+ "@ledgerhq/coin-kaspa": "^1.4.0",
182
+ "@ledgerhq/coin-mina": "^1.4.0",
183
+ "@ledgerhq/coin-multiversx": "^0.7.0",
184
+ "@ledgerhq/coin-near": "^0.15.0",
185
+ "@ledgerhq/coin-polkadot": "^6.12.0",
186
+ "@ledgerhq/coin-solana": "^0.36.0",
187
+ "@ledgerhq/coin-stacks": "^0.11.0",
188
+ "@ledgerhq/coin-stellar": "^6.6.0",
189
+ "@ledgerhq/coin-sui": "^0.17.0",
190
+ "@ledgerhq/coin-tezos": "^6.8.0",
191
+ "@ledgerhq/coin-ton": "^0.16.0",
192
+ "@ledgerhq/coin-tron": "^5.6.0",
193
+ "@ledgerhq/coin-vechain": "^2.12.0",
194
+ "@ledgerhq/coin-xrp": "^7.7.0",
195
+ "@ledgerhq/crypto-icons-ui": "^1.22.0",
196
+ "@ledgerhq/cryptoassets": "^13.32.0",
197
+ "@ledgerhq/device-core": "^0.6.7",
198
+ "@ledgerhq/devices": "8.7.0",
199
+ "@ledgerhq/errors": "^6.27.0",
200
+ "@ledgerhq/hw-app-algorand": "^6.31.9",
201
+ "@ledgerhq/hw-app-btc": "^10.12.0",
202
+ "@ledgerhq/hw-app-aptos": "^6.34.9",
203
+ "@ledgerhq/hw-app-celo": "^6.35.2",
204
+ "@ledgerhq/hw-app-cosmos": "^6.32.9",
205
+ "@ledgerhq/hw-app-eth": "^6.47.0",
206
+ "@ledgerhq/hw-app-exchange": "^0.17.0",
207
+ "@ledgerhq/hw-app-hedera": "^1.2.9",
208
+ "@ledgerhq/hw-app-icon": "^1.3.9",
209
+ "@ledgerhq/hw-app-kaspa": "^1.3.2",
210
+ "@ledgerhq/hw-app-multiversx": "^6.26.0",
211
+ "@ledgerhq/hw-app-near": "^6.31.9",
212
+ "@ledgerhq/hw-app-polkadot": "^6.34.9",
213
+ "@ledgerhq/hw-app-str": "^7.2.9",
214
214
  "@ledgerhq/hw-app-sui": "^1.4.0",
215
- "@ledgerhq/hw-app-tezos": "^6.31.9-nightly.1",
216
- "@ledgerhq/hw-app-trx": "^6.31.9-nightly.1",
217
- "@ledgerhq/hw-app-vet": "^0.6.3-nightly.0",
218
- "@ledgerhq/hw-app-xrp": "^6.32.7-nightly.1",
219
- "@ledgerhq/hw-bolos": "^6.32.9-nightly.1",
220
- "@ledgerhq/hw-transport": "6.31.13-nightly.1",
221
- "@ledgerhq/hw-transport-mocker": "^6.29.13-nightly.1",
222
- "@ledgerhq/ledger-cal-service": "^1.8.0-nightly.1",
223
- "@ledgerhq/ledger-trust-service": "^0.4.1-nightly.1",
215
+ "@ledgerhq/hw-app-tezos": "^6.31.9",
216
+ "@ledgerhq/hw-app-trx": "^6.31.9",
217
+ "@ledgerhq/hw-app-vet": "^0.7.0",
218
+ "@ledgerhq/hw-app-xrp": "^6.32.7",
219
+ "@ledgerhq/hw-bolos": "^6.32.9",
220
+ "@ledgerhq/hw-transport": "6.31.13",
221
+ "@ledgerhq/hw-transport-mocker": "^6.29.13",
222
+ "@ledgerhq/ledger-cal-service": "^1.8.0",
223
+ "@ledgerhq/ledger-trust-service": "^0.4.1",
224
224
  "@ledgerhq/live-config": "^3.2.0",
225
- "@ledgerhq/live-countervalues": "^0.8.1-nightly.5",
226
- "@ledgerhq/live-countervalues-react": "^0.7.1-nightly.5",
227
- "@ledgerhq/live-dmk-shared": "^0.15.0-nightly.0",
228
- "@ledgerhq/live-env": "^2.20.0-nightly.0",
225
+ "@ledgerhq/live-countervalues": "^0.9.0",
226
+ "@ledgerhq/live-countervalues-react": "^0.7.1",
227
+ "@ledgerhq/live-dmk-shared": "^0.15.0",
228
+ "@ledgerhq/live-env": "^2.20.0",
229
229
  "@ledgerhq/live-hooks": "0.2.0",
230
- "@ledgerhq/live-network": "^2.1.0-nightly.1",
230
+ "@ledgerhq/live-network": "^2.1.0",
231
231
  "@ledgerhq/live-promise": "^0.1.1",
232
- "@ledgerhq/live-signer-canton": "^0.5.0-nightly.5",
233
- "@ledgerhq/live-signer-evm": "^0.10.0-nightly.7",
234
- "@ledgerhq/live-signer-solana": "^0.5.9-nightly.5",
235
- "@ledgerhq/live-wallet": "^0.15.0-nightly.5",
232
+ "@ledgerhq/live-signer-canton": "^0.5.0",
233
+ "@ledgerhq/live-signer-evm": "^0.10.0",
234
+ "@ledgerhq/live-signer-solana": "^0.6.0",
235
+ "@ledgerhq/live-wallet": "^0.15.0",
236
236
  "@ledgerhq/logs": "^6.13.0",
237
- "@ledgerhq/speculos-transport": "^0.2.14-nightly.2",
238
- "@ledgerhq/wallet-api-acre-module": "^0.8.0",
239
- "@ledgerhq/wallet-api-exchange-module": "^0.17.0"
237
+ "@ledgerhq/speculos-transport": "^0.2.14",
238
+ "@ledgerhq/wallet-api-acre-module": "^0.9.0",
239
+ "@ledgerhq/wallet-api-exchange-module": "^0.18.0"
240
240
  },
241
241
  "devDependencies": {
242
242
  "@solana/web3.js": "1.95.4",
@@ -284,10 +284,10 @@
284
284
  "undici": "6.19.2",
285
285
  "uuid": "^8.3.2",
286
286
  "ws": "7",
287
- "@ledgerhq/device-react": "^0.3.1-nightly.3",
288
- "@ledgerhq/types-cryptoassets": "^7.29.0",
287
+ "@ledgerhq/device-react": "^0.3.1",
288
+ "@ledgerhq/types-cryptoassets": "^7.30.0",
289
289
  "@ledgerhq/types-devices": "^6.27.0",
290
- "@ledgerhq/types-live": "^6.88.0-nightly.3"
290
+ "@ledgerhq/types-live": "^6.88.0"
291
291
  },
292
292
  "scripts": {
293
293
  "build": "zx ./scripts/build-ts.mjs",
@@ -41,7 +41,7 @@ const appConfig: Record<string, ConfigInfo> = {
41
41
  config_nanoapp_celo: {
42
42
  type: "object",
43
43
  default: {
44
- minVersion: "1.4.0",
44
+ minVersion: "1.5.0",
45
45
  },
46
46
  },
47
47
  config_nanoapp_cardano_ada: {
@@ -35,6 +35,35 @@ type DeviceLabelsConfig = {
35
35
  [key in DeviceModelId]?: LabelConfig;
36
36
  };
37
37
 
38
+ const TOUCHSCREEN_DEVICE_CONFIG: LabelConfig = {
39
+ receiveVerify: {
40
+ [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
41
+ [AppInfos.COSMOS.name]: DeviceLabels.VERIFY_COSMOS,
42
+ [AppInfos.ETHEREUM.name]: DeviceLabels.VERIFY_ETHEREUM,
43
+ [AppInfos.POLKADOT.name]: DeviceLabels.PLEASE_REVIEW,
44
+ [AppInfos.POLYGON.name]: DeviceLabels.VERIFY_POLYGON,
45
+ [AppInfos.SOLANA.name]: DeviceLabels.VERIFY_SOLANA_ADDRESS,
46
+ default: DeviceLabels.ADDRESS,
47
+ },
48
+ receiveConfirm: {
49
+ default: DeviceLabels.CONFIRM,
50
+ },
51
+ delegateVerify: {
52
+ [AppInfos.NEAR.name]: DeviceLabels.VIEW_HEADER,
53
+ default: DeviceLabels.REVIEW_OPERATION,
54
+ },
55
+ delegateConfirm: {
56
+ [AppInfos.NEAR.name]: DeviceLabels.CONTINUE_TO_ACTION,
57
+ default: DeviceLabels.HOLD_TO_SIGN,
58
+ },
59
+ sendVerify: {
60
+ default: DeviceLabels.REVIEW_OPERATION,
61
+ },
62
+ sendConfirm: {
63
+ default: DeviceLabels.HOLD_TO_SIGN,
64
+ },
65
+ };
66
+
38
67
  export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
39
68
  [DeviceModelId.nanoS]: {
40
69
  receiveVerify: {
@@ -80,34 +109,8 @@ export const DEVICE_LABELS_CONFIG: DeviceLabelsConfig = {
80
109
  default: DeviceLabels.CAPS_APPROVE,
81
110
  },
82
111
  },
83
- [DeviceModelId.stax]: {
84
- receiveVerify: {
85
- [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
86
- [AppInfos.COSMOS.name]: DeviceLabels.PLEASE_REVIEW,
87
- [AppInfos.ETHEREUM.name]: DeviceLabels.VERIFY_ETHEREUM,
88
- [AppInfos.POLKADOT.name]: DeviceLabels.PLEASE_REVIEW,
89
- [AppInfos.POLYGON.name]: DeviceLabels.VERIFY_POLYGON,
90
- [AppInfos.SOLANA.name]: DeviceLabels.VERIFY_SOLANA_ADDRESS,
91
- default: DeviceLabels.ADDRESS,
92
- },
93
- receiveConfirm: {
94
- default: DeviceLabels.CONFIRM,
95
- },
96
- delegateVerify: {
97
- [AppInfos.NEAR.name]: DeviceLabels.VIEW_HEADER,
98
- default: DeviceLabels.REVIEW_OPERATION,
99
- },
100
- delegateConfirm: {
101
- [AppInfos.NEAR.name]: DeviceLabels.CONTINUE_TO_ACTION,
102
- default: DeviceLabels.HOLD_TO_SIGN,
103
- },
104
- sendVerify: {
105
- default: DeviceLabels.REVIEW_OPERATION,
106
- },
107
- sendConfirm: {
108
- default: DeviceLabels.HOLD_TO_SIGN,
109
- },
110
- },
112
+ [DeviceModelId.stax]: TOUCHSCREEN_DEVICE_CONFIG,
113
+ [DeviceModelId.europa]: TOUCHSCREEN_DEVICE_CONFIG,
111
114
  default: {
112
115
  receiveVerify: {
113
116
  [AppInfos.BNB_CHAIN.name]: DeviceLabels.VERIFY_BSC,
@@ -10,6 +10,7 @@ function getSpeculosInfo(): {
10
10
  const speculosAddress = getSpeculosAddress();
11
11
  return { speculosApiPort, speculosAddress };
12
12
  }
13
+
13
14
  export async function pressAndRelease(deviceLabel: string, x?: number, y?: number) {
14
15
  const { speculosApiPort, speculosAddress } = getSpeculosInfo();
15
16
  let xCoord: number;
@@ -8,4 +8,5 @@ export class Device {
8
8
  static readonly LNX = new Device("nanoX", 855638020);
9
9
  static readonly LNSP = new Device("nanoSP", 856686596);
10
10
  static readonly STAX = new Device("stax", 857735172);
11
+ static readonly FLEX = new Device("flex", 858783748);
11
12
  }
@@ -60,6 +60,7 @@ export enum DeviceLabels {
60
60
  VERIFY_BSC = "Verify BSC",
61
61
  VERIFY_ETHEREUM = "Verify Ethereum",
62
62
  VERIFY_POLYGON = "Verify Polygon",
63
+ VERIFY_COSMOS = "Verify Cosmos",
63
64
  VERIFY_SOLANA_ADDRESS = "Verify Solana address",
64
65
  VIEW_ACTION = "View action",
65
66
  VIEW_HEADER = "View Header",
@@ -32,7 +32,7 @@ export async function sendBTC(tx: Transaction) {
32
32
  expect(isAmountCorrect).toBeTruthy();
33
33
  const isAddressCorrect = containsSubstringInEvent(tx.accountToCredit.address, events);
34
34
  expect(isAddressCorrect).toBeTruthy();
35
- if (speculosDevice === DeviceModelId.stax) {
35
+ if (isTouchDevice()) {
36
36
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
37
37
  } else {
38
38
  await pressBoth();
@@ -10,6 +10,7 @@ import {
10
10
  } from "../deviceInteraction/TouchDeviceSimulator";
11
11
  import { DeviceLabels } from "../enum/DeviceLabels";
12
12
  import { DeviceModelId } from "@ledgerhq/types-devices";
13
+ import { isTouchDevice } from "../speculosAppVersion";
13
14
 
14
15
  type ActionType = "both" | "right" | "tap" | "swipe" | "confirm" | "hold";
15
16
 
@@ -20,7 +21,7 @@ function validateTransactionData(tx: Transaction, events: string[]) {
20
21
  expect(isAmountCorrect).toBeTruthy();
21
22
  }
22
23
 
23
- async function sendCardanoStax(tx: Transaction) {
24
+ async function sendCardanoTouchDevices(tx: Transaction) {
24
25
  await waitFor(DeviceLabels.REVIEW_TRANSACTION);
25
26
  const events = await pressUntilTextFound(DeviceLabels.TO);
26
27
  validateTransactionData(tx, events);
@@ -60,8 +61,8 @@ async function sendCardanoButtonDevice(tx: Transaction) {
60
61
 
61
62
  export async function sendCardano(tx: Transaction) {
62
63
  const speculosModel = getSpeculosModel();
63
- if (speculosModel === DeviceModelId.stax) {
64
- return sendCardanoStax(tx);
64
+ if (isTouchDevice()) {
65
+ return sendCardanoTouchDevices(tx);
65
66
  }
66
67
  if (speculosModel === DeviceModelId.nanoS) {
67
68
  return sendCardanoNanoS(tx);
@@ -70,7 +71,7 @@ export async function sendCardano(tx: Transaction) {
70
71
  }
71
72
 
72
73
  const DELEGATE_STEPS_CONFIG = {
73
- [DeviceModelId.stax]: [
74
+ [DeviceModelId.stax || DeviceModelId.europa]: [
74
75
  [DeviceLabels.REVIEW_TRANSACTION, "swipe"],
75
76
  [DeviceLabels.TAP_TO_CONTINUE, "tap"],
76
77
  [DeviceLabels.REGISTER, "swipe"],
@@ -107,7 +108,7 @@ const DELEGATE_STEPS_CONFIG = {
107
108
  ] as const,
108
109
  };
109
110
 
110
- async function delegateStaxAction(label: DeviceLabels) {
111
+ async function delegateTouchDevicesAction(label: DeviceLabels) {
111
112
  const CONFIRM_BUTTON_COORDS = { x: 139, y: 532 };
112
113
  await waitFor(label);
113
114
  switch (label) {
@@ -135,14 +136,10 @@ async function delegateNanoAction(label: DeviceLabels, action: ActionType) {
135
136
  }
136
137
  }
137
138
 
138
- async function executeDelegateStep(
139
- label: DeviceLabels,
140
- action: ActionType,
141
- speculosModel: DeviceModelId,
142
- ) {
139
+ async function executeDelegateStep(label: DeviceLabels, action: ActionType) {
143
140
  try {
144
- if (speculosModel === DeviceModelId.stax) {
145
- await delegateStaxAction(label);
141
+ if (isTouchDevice()) {
142
+ await delegateTouchDevicesAction(label);
146
143
  } else {
147
144
  await delegateNanoAction(label, action);
148
145
  }
@@ -156,13 +153,13 @@ async function executeDelegateStep(
156
153
  export async function delegateCardano() {
157
154
  const speculosModel = getSpeculosModel();
158
155
  const steps =
159
- speculosModel === DeviceModelId.stax
160
- ? DELEGATE_STEPS_CONFIG[DeviceModelId.stax]
156
+ speculosModel === DeviceModelId.stax || speculosModel === DeviceModelId.europa
157
+ ? DELEGATE_STEPS_CONFIG[speculosModel]
161
158
  : speculosModel === DeviceModelId.nanoS
162
159
  ? DELEGATE_STEPS_CONFIG[DeviceModelId.nanoS]
163
160
  : DELEGATE_STEPS_CONFIG.default;
164
161
 
165
162
  for (const [label, action] of steps) {
166
- await executeDelegateStep(label, action, speculosModel);
163
+ await executeDelegateStep(label, action);
167
164
  }
168
165
  }
@@ -7,6 +7,7 @@ import { longPressAndRelease } from "../deviceInteraction/TouchDeviceSimulator";
7
7
  import { DeviceLabels } from "../enum/DeviceLabels";
8
8
  import { Device } from "../enum/Device";
9
9
  import { DeviceModelId } from "@ledgerhq/types-devices";
10
+ import { isTouchDevice } from "../speculosAppVersion";
10
11
 
11
12
  function validateTransactionData(tx: Transaction, events: string[]) {
12
13
  const isAmountCorrect = containsSubstringInEvent(tx.amount, events);
@@ -20,7 +21,7 @@ function validateTransactionData(tx: Transaction, events: string[]) {
20
21
  }
21
22
  }
22
23
 
23
- async function sendEvmStax(tx: Transaction) {
24
+ async function sendEvmTouchDevices(tx: Transaction) {
24
25
  const events = await pressUntilTextFound(DeviceLabels.HOLD_TO_SIGN);
25
26
  validateTransactionData(tx, events);
26
27
  await longPressAndRelease(DeviceLabels.HOLD_TO_SIGN, 3);
@@ -40,8 +41,8 @@ async function sendEvmNanoS(tx: Transaction) {
40
41
 
41
42
  export async function sendEVM(tx: Transaction) {
42
43
  const speculosModel = getSpeculosModel();
43
- if (speculosModel === DeviceModelId.stax) {
44
- return sendEvmStax(tx);
44
+ if (isTouchDevice()) {
45
+ return sendEvmTouchDevices(tx);
45
46
  }
46
47
  if (speculosModel === DeviceModelId.nanoS) {
47
48
  return sendEvmNanoS(tx);
@@ -69,6 +69,8 @@ export type Dependency = { name: string; appVersion?: string };
69
69
  export type SpeculosDevice = {
70
70
  id: string;
71
71
  port: number;
72
+ appName?: string;
73
+ appVersion?: string;
72
74
  };
73
75
 
74
76
  export function setExchangeDependencies(dependencies: Dependency[]) {
@@ -418,7 +420,12 @@ export async function startSpeculos(
418
420
  ? await createSpeculosDeviceCI(deviceParams)
419
421
  : await createSpeculosDevice(deviceParams).then(device => {
420
422
  invariant(device.ports.apiPort, "[E2E] Speculos apiPort is not defined");
421
- return { id: device.id, port: device.ports.apiPort };
423
+ return {
424
+ id: device.id,
425
+ port: device.ports.apiPort,
426
+ appName: appCandidate.appName,
427
+ appVersion: appCandidate.appVersion,
428
+ };
422
429
  });
423
430
  } catch (e: unknown) {
424
431
  console.error(e);
@@ -675,7 +682,12 @@ export async function activateContractData() {
675
682
 
676
683
  export async function goToSettings() {
677
684
  if (isTouchDevice()) {
678
- await pressAndRelease(DeviceLabels.SETTINGS);
685
+ const SettingsCogwheelCoordinates = { x: 400, y: 75 };
686
+ await pressAndRelease(
687
+ DeviceLabels.SETTINGS,
688
+ SettingsCogwheelCoordinates.x,
689
+ SettingsCogwheelCoordinates.y,
690
+ );
679
691
  } else {
680
692
  await pressUntilTextFound(DeviceLabels.SETTINGS);
681
693
  await pressBoth();
@@ -15,6 +15,8 @@ export function getSpeculosModel(): DeviceModelId {
15
15
  return DeviceModelId.nanoX;
16
16
  case CryptoWallet.STAX.name:
17
17
  return DeviceModelId.stax;
18
+ case CryptoWallet.FLEX.name:
19
+ return DeviceModelId.europa;
18
20
  case CryptoWallet.LNSP.name:
19
21
  default:
20
22
  return DeviceModelId.nanoSP;
@@ -23,7 +25,7 @@ export function getSpeculosModel(): DeviceModelId {
23
25
 
24
26
  export function isTouchDevice(): boolean {
25
27
  const model = getSpeculosModel();
26
- return model === DeviceModelId.stax;
28
+ return model === DeviceModelId.stax || model === DeviceModelId.europa;
27
29
  }
28
30
 
29
31
  function getDeviceTargetId(device: DeviceModelId): number {
@@ -32,6 +34,7 @@ function getDeviceTargetId(device: DeviceModelId): number {
32
34
  [DeviceModelId.nanoX]: CryptoWallet.LNX.targetId,
33
35
  [DeviceModelId.nanoSP]: CryptoWallet.LNSP.targetId,
34
36
  [DeviceModelId.stax]: CryptoWallet.STAX.targetId,
37
+ [DeviceModelId.europa]: CryptoWallet.FLEX.targetId,
35
38
  };
36
39
  return modelToTargetIdMap[device];
37
40
  }
@@ -171,6 +171,8 @@ export async function createSpeculosDeviceCI(
171
171
  return {
172
172
  id: runId,
173
173
  port: speculosPort,
174
+ appName: deviceParams.appName,
175
+ appVersion: deviceParams.appVersion,
174
176
  };
175
177
  } catch (e: unknown) {
176
178
  console.warn(
@@ -179,6 +181,8 @@ export async function createSpeculosDeviceCI(
179
181
  return {
180
182
  id: runId,
181
183
  port: 0,
184
+ appName: deviceParams.appName,
185
+ appVersion: deviceParams.appVersion,
182
186
  };
183
187
  }
184
188
  }
@@ -79,6 +79,10 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = {
79
79
  title: "swap.incompatibility.kaspa_title",
80
80
  description: "swap.incompatibility.kaspa_description",
81
81
  },
82
+ celo: {
83
+ title: "swap.incompatibility.celo_title",
84
+ description: "swap.incompatibility.celo_description",
85
+ },
82
86
  };
83
87
 
84
88
  export const getIncompatibleCurrencyKeys = (exchange: ExchangeSwap) => {
@@ -237,6 +237,21 @@ export function cosmosTransaction({
237
237
  };
238
238
  }
239
239
 
240
+ export function hederaTransaction({
241
+ amount,
242
+ recipient,
243
+ customFeeConfig,
244
+ payinExtraId,
245
+ }: TransactionWithCustomFee): Partial<Extract<Transaction, { family: "hedera" }>> {
246
+ return {
247
+ family: "hedera",
248
+ amount,
249
+ recipient,
250
+ ...customFeeConfig,
251
+ memo: payinExtraId ?? undefined,
252
+ };
253
+ }
254
+
240
255
  export type TransactionWithCustomFee = TransactionCommon & {
241
256
  customFeeConfig: {
242
257
  [key: string]: BigNumber;
@@ -266,7 +281,7 @@ export const transactionStrategy: {
266
281
  cosmos: cosmosTransaction,
267
282
  evm: evmTransaction,
268
283
  filecoin: defaultTransaction,
269
- hedera: defaultTransaction,
284
+ hedera: hederaTransaction,
270
285
  icon: defaultTransaction,
271
286
  internet_computer: defaultTransaction,
272
287
  mina: defaultTransaction,
@@ -14,6 +14,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
14
14
  useGateway: true,
15
15
  networkType: "mainnet",
16
16
  nativeInstrumentId: "Amulet",
17
+ fee: 0,
17
18
  },
18
19
  },
19
20
  config_currency_canton_network_devnet: {
@@ -29,6 +30,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
29
30
  useGateway: true,
30
31
  networkType: "devnet",
31
32
  nativeInstrumentId: "Amulet",
33
+ fee: 0,
32
34
  },
33
35
  },
34
36
  config_currency_canton_network_testnet: {
@@ -44,6 +46,7 @@ export const cantonConfig: Record<string, ConfigInfo> = {
44
46
  nativeInstrumentId: "Amulet",
45
47
  useGateway: true,
46
48
  networkType: "testnet",
49
+ fee: 0,
47
50
  },
48
51
  },
49
52
  };
@@ -28,6 +28,7 @@ export { closeAllSpeculosDevices, releaseSpeculosDevice, createSpeculosDevice };
28
28
  export type { SpeculosTransport };
29
29
 
30
30
  const modelMapPriority: Record<string, number> = {
31
+ flex: 6,
31
32
  stax: 5,
32
33
  nanos: 4,
33
34
  "nanos+": 3,