@ledgerhq/live-common 25.0.0 → 25.1.0-next.2

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 (53) hide show
  1. package/lib/__tests__/test-helpers/bridge.d.ts.map +1 -1
  2. package/lib/__tests__/test-helpers/bridge.js +16 -0
  3. package/lib/__tests__/test-helpers/bridge.js.map +1 -1
  4. package/lib/apps/react.js +1 -1
  5. package/lib/apps/react.test.js +1 -1
  6. package/lib/apps/support.js +1 -1
  7. package/lib/bot/index.d.ts.map +1 -1
  8. package/lib/bot/index.js +24 -4
  9. package/lib/bot/index.js.map +1 -1
  10. package/lib/env.d.ts +10 -5
  11. package/lib/env.d.ts.map +1 -1
  12. package/lib/env.js +5 -0
  13. package/lib/env.js.map +1 -1
  14. package/lib/env.react.d.ts +1 -1
  15. package/lib/env.react.d.ts.map +1 -1
  16. package/lib/families/ethereum/hw-signMessage.d.ts +5 -4
  17. package/lib/families/ethereum/hw-signMessage.d.ts.map +1 -1
  18. package/lib/families/ethereum/hw-signMessage.js +26 -17
  19. package/lib/families/ethereum/hw-signMessage.js.map +1 -1
  20. package/lib/families/ethereum/hw-signMessage.test.d.ts +2 -0
  21. package/lib/families/ethereum/hw-signMessage.test.d.ts.map +1 -0
  22. package/lib/families/ethereum/hw-signMessage.test.js +185 -0
  23. package/lib/families/ethereum/hw-signMessage.test.js.map +1 -0
  24. package/lib/families/ethereum/types.d.ts +2 -24
  25. package/lib/families/ethereum/types.d.ts.map +1 -1
  26. package/lib/families/stellar/js-getTransactionStatus.js +3 -3
  27. package/lib/families/stellar/js-getTransactionStatus.js.map +1 -1
  28. package/lib/families/tezos/synchronisation.d.ts +2 -0
  29. package/lib/families/tezos/synchronisation.d.ts.map +1 -1
  30. package/lib/families/tezos/synchronisation.integration.test.d.ts +2 -0
  31. package/lib/families/tezos/synchronisation.integration.test.d.ts.map +1 -0
  32. package/lib/families/tezos/synchronisation.integration.test.js +79 -0
  33. package/lib/families/tezos/synchronisation.integration.test.js.map +1 -0
  34. package/lib/families/tezos/synchronisation.js +5 -3
  35. package/lib/families/tezos/synchronisation.js.map +1 -1
  36. package/lib/featureFlags/types.d.ts +7 -0
  37. package/lib/featureFlags/types.d.ts.map +1 -1
  38. package/lib/generated/hw-signMessage.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/src/__tests__/test-helpers/bridge.ts +12 -1
  41. package/src/apps/react.test.ts +1 -1
  42. package/src/apps/react.ts +1 -1
  43. package/src/apps/support.ts +1 -1
  44. package/src/bot/index.ts +34 -5
  45. package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +38 -4
  46. package/src/env.ts +5 -0
  47. package/src/families/ethereum/hw-signMessage.test.ts +110 -0
  48. package/src/families/ethereum/hw-signMessage.ts +28 -20
  49. package/src/families/ethereum/types.ts +2 -24
  50. package/src/families/stellar/js-getTransactionStatus.ts +3 -3
  51. package/src/families/tezos/synchronisation.integration.test.ts +22 -0
  52. package/src/families/tezos/synchronisation.ts +3 -3
  53. package/src/featureFlags/types.ts +7 -0
@@ -12,6 +12,7 @@ import { areAllOperationsLoaded, decodeAccountId } from "../../account";
12
12
  import type { Operation, Account } from "../../types";
13
13
  import api from "./api/tzkt";
14
14
  import type { APIOperation } from "./api/tzkt";
15
+ import { getEnv } from "../../env";
15
16
 
16
17
  function reconciliatePublicKey(
17
18
  publicKey: string | undefined,
@@ -272,14 +273,13 @@ const txToOp =
272
273
  };
273
274
  };
274
275
 
275
- const fetchAllTransactions = async (
276
+ export const fetchAllTransactions = async (
276
277
  address: string,
277
278
  lastId?: number
278
279
  ): Promise<APIOperation[]> => {
279
280
  let txs: APIOperation[] = [];
280
- let maxIteration = 20; // safe limit
281
+ let maxIteration = getEnv("TEZOS_MAX_TX_QUERIES");
281
282
  do {
282
- // FIXME not sure what is going on here
283
283
  const r = await api.getAccountOperations(address, { lastId, sort: 0 });
284
284
  if (r.length === 0) return txs;
285
285
  txs = txs.concat(r);
@@ -12,7 +12,14 @@ export type FeatureId =
12
12
  // We use objects instead of direct booleans for potential future improvements
13
13
  // like feature versioning etc
14
14
  export type Feature = {
15
+ /** If false, the feature is disabled (for every languages regardless of the languages_whitelisted option) */
15
16
  enabled: boolean;
17
+ /** You can optionnally use one of the two following options (languages_whitelisted and languages_blacklisted) (Only implemented on mobile for now) */
18
+ /** List of languages for which the feature is enabled (it will be disabled by default for all of the others) */
19
+ languages_whitelisted?: [string];
20
+ /** List of languages for which the feature is disabled */
21
+ languages_blacklisted?: [string];
22
+ /** Additional params */
16
23
  params?: any;
17
24
  };
18
25