@ledgerhq/device-core 0.1.1-nightly.4 → 0.1.1

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 (30) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +16 -25
  3. package/lib/index.d.ts +0 -1
  4. package/lib/index.d.ts.map +1 -1
  5. package/lib/index.js +1 -4
  6. package/lib/index.js.map +1 -1
  7. package/lib-es/index.d.ts +0 -1
  8. package/lib-es/index.d.ts.map +1 -1
  9. package/lib-es/index.js +0 -2
  10. package/lib-es/index.js.map +1 -1
  11. package/package.json +6 -6
  12. package/src/index.ts +0 -2
  13. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.d.ts +0 -15
  14. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.d.ts.map +0 -1
  15. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.js +0 -31
  16. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.js.map +0 -1
  17. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.test.d.ts +0 -2
  18. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.test.d.ts.map +0 -1
  19. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.test.js +0 -41
  20. package/lib/firmwareUpdate/shouldForceFirmwareUpdate.test.js.map +0 -1
  21. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.d.ts +0 -15
  22. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.d.ts.map +0 -1
  23. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.js +0 -24
  24. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.js.map +0 -1
  25. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.test.d.ts +0 -2
  26. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.test.d.ts.map +0 -1
  27. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.test.js +0 -39
  28. package/lib-es/firmwareUpdate/shouldForceFirmwareUpdate.test.js.map +0 -1
  29. package/src/firmwareUpdate/shouldForceFirmwareUpdate.test.ts +0 -74
  30. package/src/firmwareUpdate/shouldForceFirmwareUpdate.ts +0 -34
@@ -1,4 +1,4 @@
1
1
 
2
- > @ledgerhq/device-core@0.1.1-nightly.3 build /home/runner/work/ledger-live/ledger-live/libs/device-core
2
+ > @ledgerhq/device-core@0.1.1 build /home/runner/work/ledger-live/ledger-live/libs/device-core
3
3
  > tsc && tsc -m ES6 --outDir lib-es
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,39 +1,30 @@
1
1
  # @ledgerhq/device-core
2
2
 
3
- ## 0.1.1-nightly.4
3
+ ## 0.1.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`0dae8e5`](https://github.com/LedgerHQ/ledger-live/commit/0dae8e5a33704eaee5976e8ae2cbe29c6f458167)]:
8
- - @ledgerhq/types-live@6.46.0-nightly.2
7
+ - Updated dependencies [[`7d5a724`](https://github.com/LedgerHQ/ledger-live/commit/7d5a724f40079a233b159b5231d69f318327e175), [`b3dfed5`](https://github.com/LedgerHQ/ledger-live/commit/b3dfed54bd8d54e62530cb2db92c3c108b43e0d7), [`7887ad9`](https://github.com/LedgerHQ/ledger-live/commit/7887ad9842e59f6fc567f118f06b3e12bdb9073b), [`5ae6d8f`](https://github.com/LedgerHQ/ledger-live/commit/5ae6d8fb9b868dc01724e84ede2708e7a717c3f2), [`21f5c44`](https://github.com/LedgerHQ/ledger-live/commit/21f5c4438bb542a3891f692f4274ee4c28aa76cd), [`a780777`](https://github.com/LedgerHQ/ledger-live/commit/a780777c13e08c1c3cd66ef5f6deac0fe928a894), [`1aa8ef4`](https://github.com/LedgerHQ/ledger-live/commit/1aa8ef404411c31f6ac4cf09fba453042db8b955), [`fc4f83e`](https://github.com/LedgerHQ/ledger-live/commit/fc4f83e26d9f00b7c518f28157e8d9da55ce3685), [`13bea7c`](https://github.com/LedgerHQ/ledger-live/commit/13bea7ced4b8a7ad40fbc5205e3b58ed8a217982), [`d2f8b26`](https://github.com/LedgerHQ/ledger-live/commit/d2f8b26c99551cba902c07e9c544f3c84d74686c), [`dd1d17f`](https://github.com/LedgerHQ/ledger-live/commit/dd1d17fd3ce7ed42558204b2f93707fb9b1599de), [`5ca7923`](https://github.com/LedgerHQ/ledger-live/commit/5ca79234ccbe66ce22f998fe3ebd2cdec681499a), [`26b3a5d`](https://github.com/LedgerHQ/ledger-live/commit/26b3a5d7d6e11efc226403707d683f3d0098a1c1), [`9ada63a`](https://github.com/LedgerHQ/ledger-live/commit/9ada63a05b2d2518af09a9c07937cf94b5b2ea67), [`5848f9e`](https://github.com/LedgerHQ/ledger-live/commit/5848f9e247f169eb7a4aff322253937214b9efdd), [`c7f072f`](https://github.com/LedgerHQ/ledger-live/commit/c7f072f833a950e230137499d4908b792f6b615f), [`a8138f9`](https://github.com/LedgerHQ/ledger-live/commit/a8138f9ec0cff714d9745012eb91a09713ffbbd2), [`2331bae`](https://github.com/LedgerHQ/ledger-live/commit/2331bae7393f822aa64e5d0ab8f51622b6363b33), [`b72c52b`](https://github.com/LedgerHQ/ledger-live/commit/b72c52b3e4ebbb7aaf2142afbf6a9b9172e7ee04), [`e1df8bc`](https://github.com/LedgerHQ/ledger-live/commit/e1df8bca348287e94970de90c51e98fa277c5364), [`53da330`](https://github.com/LedgerHQ/ledger-live/commit/53da3301aaceeb16e6b1f96b1ea44428fbeb4483), [`52d5703`](https://github.com/LedgerHQ/ledger-live/commit/52d57039bb015af2616670db480364a2e5fc9966), [`ba5c49b`](https://github.com/LedgerHQ/ledger-live/commit/ba5c49b82af70a2e459720b9cb124546c406b88b)]:
8
+ - @ledgerhq/types-live@6.46.0
9
+ - @ledgerhq/errors@6.16.4
10
+ - @ledgerhq/devices@8.3.0
11
+ - @ledgerhq/live-network@1.2.1
12
+ - @ledgerhq/hw-transport@6.30.6
9
13
 
10
- ## 0.1.1-nightly.3
11
-
12
- ### Patch Changes
13
-
14
- - [#6662](https://github.com/LedgerHQ/ledger-live/pull/6662) [`1bc09ce`](https://github.com/LedgerHQ/ledger-live/commit/1bc09ce84d1d579a253d0239747ad969e9613b52) Thanks [@ofreyssinet-ledger](https://github.com/ofreyssinet-ledger)! - feat(earlysecuritychecks): make stax update from <=1.3.0 unskippable
15
-
16
- ## 0.1.1-nightly.2
17
-
18
- ### Patch Changes
19
-
20
- - Updated dependencies [[`33c4239`](https://github.com/LedgerHQ/ledger-live/commit/33c42392386e5e8ebf9f3251ccf1ade3af11644d)]:
21
- - @ledgerhq/types-live@6.46.0-nightly.1
22
-
23
- ## 0.1.1-nightly.1
14
+ ## 0.1.1-next.1
24
15
 
25
16
  ### Patch Changes
26
17
 
27
18
  - Updated dependencies []:
28
- - @ledgerhq/live-network@1.2.1-nightly.1
19
+ - @ledgerhq/live-network@1.2.1-next.1
29
20
 
30
- ## 0.1.1-nightly.0
21
+ ## 0.1.1-next.0
31
22
 
32
23
  ### Patch Changes
33
24
 
34
- - Updated dependencies [[`dd1d17f`](https://github.com/LedgerHQ/ledger-live/commit/dd1d17fd3ce7ed42558204b2f93707fb9b1599de), [`9ada63a`](https://github.com/LedgerHQ/ledger-live/commit/9ada63a05b2d2518af09a9c07937cf94b5b2ea67)]:
35
- - @ledgerhq/errors@6.16.4-nightly.0
36
- - @ledgerhq/types-live@6.46.0-nightly.0
37
- - @ledgerhq/devices@8.2.3-nightly.0
38
- - @ledgerhq/hw-transport@6.30.6-nightly.0
39
- - @ledgerhq/live-network@1.2.1-nightly.0
25
+ - Updated dependencies [[`7d5a724`](https://github.com/LedgerHQ/ledger-live/commit/7d5a724f40079a233b159b5231d69f318327e175), [`b3dfed5`](https://github.com/LedgerHQ/ledger-live/commit/b3dfed54bd8d54e62530cb2db92c3c108b43e0d7), [`7887ad9`](https://github.com/LedgerHQ/ledger-live/commit/7887ad9842e59f6fc567f118f06b3e12bdb9073b), [`5ae6d8f`](https://github.com/LedgerHQ/ledger-live/commit/5ae6d8fb9b868dc01724e84ede2708e7a717c3f2), [`21f5c44`](https://github.com/LedgerHQ/ledger-live/commit/21f5c4438bb542a3891f692f4274ee4c28aa76cd), [`a780777`](https://github.com/LedgerHQ/ledger-live/commit/a780777c13e08c1c3cd66ef5f6deac0fe928a894), [`1aa8ef4`](https://github.com/LedgerHQ/ledger-live/commit/1aa8ef404411c31f6ac4cf09fba453042db8b955), [`fc4f83e`](https://github.com/LedgerHQ/ledger-live/commit/fc4f83e26d9f00b7c518f28157e8d9da55ce3685), [`13bea7c`](https://github.com/LedgerHQ/ledger-live/commit/13bea7ced4b8a7ad40fbc5205e3b58ed8a217982), [`d2f8b26`](https://github.com/LedgerHQ/ledger-live/commit/d2f8b26c99551cba902c07e9c544f3c84d74686c), [`dd1d17f`](https://github.com/LedgerHQ/ledger-live/commit/dd1d17fd3ce7ed42558204b2f93707fb9b1599de), [`5ca7923`](https://github.com/LedgerHQ/ledger-live/commit/5ca79234ccbe66ce22f998fe3ebd2cdec681499a), [`26b3a5d`](https://github.com/LedgerHQ/ledger-live/commit/26b3a5d7d6e11efc226403707d683f3d0098a1c1), [`9ada63a`](https://github.com/LedgerHQ/ledger-live/commit/9ada63a05b2d2518af09a9c07937cf94b5b2ea67), [`5848f9e`](https://github.com/LedgerHQ/ledger-live/commit/5848f9e247f169eb7a4aff322253937214b9efdd), [`c7f072f`](https://github.com/LedgerHQ/ledger-live/commit/c7f072f833a950e230137499d4908b792f6b615f), [`a8138f9`](https://github.com/LedgerHQ/ledger-live/commit/a8138f9ec0cff714d9745012eb91a09713ffbbd2), [`2331bae`](https://github.com/LedgerHQ/ledger-live/commit/2331bae7393f822aa64e5d0ab8f51622b6363b33), [`b72c52b`](https://github.com/LedgerHQ/ledger-live/commit/b72c52b3e4ebbb7aaf2142afbf6a9b9172e7ee04), [`e1df8bc`](https://github.com/LedgerHQ/ledger-live/commit/e1df8bca348287e94970de90c51e98fa277c5364), [`53da330`](https://github.com/LedgerHQ/ledger-live/commit/53da3301aaceeb16e6b1f96b1ea44428fbeb4483), [`52d5703`](https://github.com/LedgerHQ/ledger-live/commit/52d57039bb015af2616670db480364a2e5fc9966), [`ba5c49b`](https://github.com/LedgerHQ/ledger-live/commit/ba5c49b82af70a2e459720b9cb124546c406b88b)]:
26
+ - @ledgerhq/types-live@6.46.0-next.0
27
+ - @ledgerhq/errors@6.16.4-next.0
28
+ - @ledgerhq/devices@8.3.0-next.0
29
+ - @ledgerhq/hw-transport@6.30.6-next.0
30
+ - @ledgerhq/live-network@1.2.1-next.0
package/lib/index.d.ts CHANGED
@@ -20,5 +20,4 @@ export { isEditDeviceNameSupported } from "./capabilities/isEditDeviceNameSuppor
20
20
  export { isSyncOnboardingSupported } from "./capabilities/isSyncOnboardingSupported";
21
21
  export { supportedDeviceModelIds } from "./capabilities/isCustomLockScreenSupported";
22
22
  export * from "./customLockScreen/screenSpecs";
23
- export { shouldForceFirmwareUpdate } from "./firmwareUpdate/shouldForceFirmwareUpdate";
24
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,YAAY,EACV,aAAa,EACb,WAAW,EACX,2BAA2B,GAC5B,MAAM,mDAAmD,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MA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AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EACL,KAAK,yBAAyB,EAC9B,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF,cAAc,gCAAgC,CAAC"}
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.shouldForceFirmwareUpdate = exports.supportedDeviceModelIds = exports.isSyncOnboardingSupported = exports.isEditDeviceNameSupported = exports.isCustomLockScreenSupported = exports.getVersion = exports.isBootloaderVersionSupported = exports.isHardwareVersionSupported = exports.getDeviceName = exports.parseGetVersionResponse = exports.GET_VERSION_APDU = exports.aDeviceInfoBuilder = exports.fetchMcus = exports.getProviderIdUseCase = exports.PROVIDERS = exports.isDeviceLocalizationSupported = exports.getLatestFirmwareForDevice = exports.StubManagerApiRepository = exports.HttpManagerApiRepository = void 0;
17
+ exports.supportedDeviceModelIds = exports.isSyncOnboardingSupported = exports.isEditDeviceNameSupported = exports.isCustomLockScreenSupported = exports.getVersion = exports.isBootloaderVersionSupported = exports.isHardwareVersionSupported = exports.getDeviceName = exports.parseGetVersionResponse = exports.GET_VERSION_APDU = exports.aDeviceInfoBuilder = exports.fetchMcus = exports.getProviderIdUseCase = exports.PROVIDERS = exports.isDeviceLocalizationSupported = exports.getLatestFirmwareForDevice = exports.StubManagerApiRepository = exports.HttpManagerApiRepository = void 0;
18
18
  var HttpManagerApiRepository_1 = require("./managerApi/repositories/HttpManagerApiRepository");
19
19
  Object.defineProperty(exports, "HttpManagerApiRepository", { enumerable: true, get: function () { return HttpManagerApiRepository_1.HttpManagerApiRepository; } });
20
20
  var StubManagerApiRepository_1 = require("./managerApi/repositories/StubManagerApiRepository");
@@ -53,7 +53,4 @@ var isCustomLockScreenSupported_2 = require("./capabilities/isCustomLockScreenSu
53
53
  Object.defineProperty(exports, "supportedDeviceModelIds", { enumerable: true, get: function () { return isCustomLockScreenSupported_2.supportedDeviceModelIds; } });
54
54
  // src/customLockScreen/
55
55
  __exportStar(require("./customLockScreen/screenSpecs"), exports);
56
- // src/firmwareUpdate/
57
- var shouldForceFirmwareUpdate_1 = require("./firmwareUpdate/shouldForceFirmwareUpdate");
58
- Object.defineProperty(exports, "shouldForceFirmwareUpdate", { enumerable: true, get: function () { return shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate; } });
59
56
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,+FAA8F;AAArF,oIAAA,wBAAwB,OAAA;AACjC,+FAA8F;AAArF,oIAAA,wBAAwB,OAAA;AACjC,gGAA+F;AAAtF,wIAAA,0BAA0B,OAAA;AACnC,oGAAmG;AAA1F,8IAAA,6BAA6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;AAApF,wIAAA,0BAA0B,OAAA;AACnC,kGAAiG;AAAxF,4IAAA,4BAA4B,OAAA;AACrC,8DAA6D;AAApD,wGAAA,UAAU,OAAA;AACnB,oBAAoB;AACpB,0FAGoD;AADlD,0IAAA,2BAA2B,OAAA;AAE7B,sFAAqF;AAA5E,sIAAA,yBAAyB,OAAA;AAClC,sFAAqF;AAA5E,sIAAA,yBAAyB,OAAA;AAClC,0FAAqF;AAA5E,sIAAA,uBAAuB,OAAA;AAChC,wBAAwB;AACxB,iEAA+C"}
package/lib-es/index.d.ts CHANGED
@@ -20,5 +20,4 @@ export { isEditDeviceNameSupported } from "./capabilities/isEditDeviceNameSuppor
20
20
  export { isSyncOnboardingSupported } from "./capabilities/isSyncOnboardingSupported";
21
21
  export { supportedDeviceModelIds } from "./capabilities/isCustomLockScreenSupported";
22
22
  export * from "./customLockScreen/screenSpecs";
23
- export { shouldForceFirmwareUpdate } from "./firmwareUpdate/shouldForceFirmwareUpdate";
24
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,YAAY,EACV,aAAa,EACb,WAAW,EACX,2BAA2B,GAC5B,MAAM,mDAAmD,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC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AAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EACL,KAAK,yBAAyB,EAC9B,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF,cAAc,gCAAgC,CAAC"}
package/lib-es/index.js CHANGED
@@ -18,6 +18,4 @@ export { isSyncOnboardingSupported } from "./capabilities/isSyncOnboardingSuppor
18
18
  export { supportedDeviceModelIds } from "./capabilities/isCustomLockScreenSupported";
19
19
  // src/customLockScreen/
20
20
  export * from "./customLockScreen/screenSpecs";
21
- // src/firmwareUpdate/
22
- export { shouldForceFirmwareUpdate } from "./firmwareUpdate/shouldForceFirmwareUpdate";
23
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,C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E,SAAS,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,oBAAoB;AACpB,OAAO,EAEL,2BAA2B,GAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,wBAAwB;AACxB,cAAc,gCAAgC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/device-core",
3
- "version": "0.1.1-nightly.4",
3
+ "version": "0.1.1",
4
4
  "description": "Ledger Live device core module",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -20,12 +20,12 @@
20
20
  "dependencies": {
21
21
  "sha.js": "^2.4.11",
22
22
  "semver": "^7.3.5",
23
- "@ledgerhq/errors": "^6.16.4-nightly.0",
24
- "@ledgerhq/live-network": "^1.2.1-nightly.1",
25
- "@ledgerhq/hw-transport": "^6.30.6-nightly.0",
23
+ "@ledgerhq/errors": "^6.16.4",
24
+ "@ledgerhq/live-network": "^1.2.1",
25
+ "@ledgerhq/hw-transport": "^6.30.6",
26
26
  "@ledgerhq/logs": "^6.12.0",
27
- "@ledgerhq/devices": "^8.2.3-nightly.0",
28
- "@ledgerhq/types-live": "^6.46.0-nightly.2"
27
+ "@ledgerhq/devices": "^8.3.0",
28
+ "@ledgerhq/types-live": "^6.46.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@testing-library/react": "14",
package/src/index.ts CHANGED
@@ -31,5 +31,3 @@ export { isSyncOnboardingSupported } from "./capabilities/isSyncOnboardingSuppor
31
31
  export { supportedDeviceModelIds } from "./capabilities/isCustomLockScreenSupported";
32
32
  // src/customLockScreen/
33
33
  export * from "./customLockScreen/screenSpecs";
34
- // src/firmwareUpdate/
35
- export { shouldForceFirmwareUpdate } from "./firmwareUpdate/shouldForceFirmwareUpdate";
@@ -1,15 +0,0 @@
1
- import { DeviceModelId } from "@ledgerhq/devices";
2
- /**
3
- * Returns whether we should enforce a firmware update if there is one available.
4
- *
5
- * For example this is used for the Stax device as some of the first devices
6
- * shipped have a firmware version that is deprecated (1.3.0).
7
- *
8
- * @param currentVersion - The current firmware version.
9
- * @param deviceModelId - The device model id.
10
- */
11
- export declare function shouldForceFirmwareUpdate({ currentVersion, deviceModelId, }: {
12
- currentVersion: string;
13
- deviceModelId: DeviceModelId;
14
- }): boolean;
15
- //# sourceMappingURL=shouldForceFirmwareUpdate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.d.ts","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAYlD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,cAAc,EACd,aAAa,GACd,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;CAC9B,GAAG,OAAO,CAKV"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.shouldForceFirmwareUpdate = void 0;
7
- const semver_1 = __importDefault(require("semver"));
8
- const noVersionCondition = "<0.0.0"; // this version is never satisfied
9
- const forceUpdateConditions = {
10
- nanoX: noVersionCondition,
11
- nanoS: noVersionCondition,
12
- nanoSP: noVersionCondition,
13
- blue: noVersionCondition,
14
- europa: noVersionCondition,
15
- stax: "<=1.3.0",
16
- };
17
- /**
18
- * Returns whether we should enforce a firmware update if there is one available.
19
- *
20
- * For example this is used for the Stax device as some of the first devices
21
- * shipped have a firmware version that is deprecated (1.3.0).
22
- *
23
- * @param currentVersion - The current firmware version.
24
- * @param deviceModelId - The device model id.
25
- */
26
- function shouldForceFirmwareUpdate({ currentVersion, deviceModelId, }) {
27
- var _a;
28
- return semver_1.default.satisfies((_a = semver_1.default.coerce(currentVersion)) !== null && _a !== void 0 ? _a : "", forceUpdateConditions[deviceModelId]);
29
- }
30
- exports.shouldForceFirmwareUpdate = shouldForceFirmwareUpdate;
31
- //# sourceMappingURL=shouldForceFirmwareUpdate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.js","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAG5B,MAAM,kBAAkB,GAAG,QAAQ,CAAC,CAAC,kCAAkC;AACvE,MAAM,qBAAqB,GAAkC;IAC3D,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,SAAgB,yBAAyB,CAAC,EACxC,cAAc,EACd,aAAa,GAId;;IACC,OAAO,gBAAM,CAAC,SAAS,CACrB,MAAA,gBAAM,CAAC,MAAM,CAAC,cAAc,CAAC,mCAAI,EAAE,EACnC,qBAAqB,CAAC,aAAa,CAAC,CACrC,CAAC;AACJ,CAAC;AAXD,8DAWC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=shouldForceFirmwareUpdate.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.test.d.ts","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.test.ts"],"names":[],"mappings":""}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const devices_1 = require("@ledgerhq/devices");
4
- const shouldForceFirmwareUpdate_1 = require("./shouldForceFirmwareUpdate");
5
- describe("shouldForceFirmwareUpdate", () => {
6
- it("should force firmware update for stax <=1.3.0 and not other versions", () => {
7
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.2.0", deviceModelId: devices_1.DeviceModelId.stax })).toBe(true);
8
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
9
- currentVersion: "1.2.0-whatever",
10
- deviceModelId: devices_1.DeviceModelId.stax,
11
- })).toBe(true);
12
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.3.0", deviceModelId: devices_1.DeviceModelId.stax })).toBe(true);
13
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
14
- currentVersion: "1.3.0-whatever",
15
- deviceModelId: devices_1.DeviceModelId.stax,
16
- })).toBe(true);
17
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.3.1", deviceModelId: devices_1.DeviceModelId.stax })).toBe(false);
18
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
19
- currentVersion: "1.3.1-whatever",
20
- deviceModelId: devices_1.DeviceModelId.stax,
21
- })).toBe(false);
22
- });
23
- it("should not force firmware update for other models", () => {
24
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.2.0", deviceModelId: devices_1.DeviceModelId.nanoX })).toBe(false);
25
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
26
- currentVersion: "1.2.0-whatever",
27
- deviceModelId: devices_1.DeviceModelId.nanoX,
28
- })).toBe(false);
29
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.3.0", deviceModelId: devices_1.DeviceModelId.nanoX })).toBe(false);
30
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
31
- currentVersion: "1.3.0-whatever",
32
- deviceModelId: devices_1.DeviceModelId.nanoX,
33
- })).toBe(false);
34
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({ currentVersion: "1.3.1", deviceModelId: devices_1.DeviceModelId.nanoX })).toBe(false);
35
- expect((0, shouldForceFirmwareUpdate_1.shouldForceFirmwareUpdate)({
36
- currentVersion: "1.3.1-whatever",
37
- deviceModelId: devices_1.DeviceModelId.nanoX,
38
- })).toBe(false);
39
- });
40
- });
41
- //# sourceMappingURL=shouldForceFirmwareUpdate.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.test.js","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,2EAAwE;AAExE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,CACJ,IAAA,qDAAyB,EAAC,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,uBAAa,CAAC,IAAI,EAAE,CAAC,CAC1F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,CACJ,IAAA,qDAAyB,EAAC;YACxB,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,uBAAa,CAAC,IAAI;SAClC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AyB,EAAC;YACxB,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,uBAAa,CAAC,KAAK;SACnC,CAAC,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEd,MAAM,CACJ,IAAA,qDAAyB,EAAC,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,uBAAa,CAAC,KAAK,EAAE,CAAC,CAC3F,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEd,MAAM,CACJ,IAAA,qDAAyB,EAAC;YACxB,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,uBAAa,CAAC,KAAK;SACnC,CAAC,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { DeviceModelId } from "@ledgerhq/devices";
2
- /**
3
- * Returns whether we should enforce a firmware update if there is one available.
4
- *
5
- * For example this is used for the Stax device as some of the first devices
6
- * shipped have a firmware version that is deprecated (1.3.0).
7
- *
8
- * @param currentVersion - The current firmware version.
9
- * @param deviceModelId - The device model id.
10
- */
11
- export declare function shouldForceFirmwareUpdate({ currentVersion, deviceModelId, }: {
12
- currentVersion: string;
13
- deviceModelId: DeviceModelId;
14
- }): boolean;
15
- //# sourceMappingURL=shouldForceFirmwareUpdate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.d.ts","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAYlD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,cAAc,EACd,aAAa,GACd,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;CAC9B,GAAG,OAAO,CAKV"}
@@ -1,24 +0,0 @@
1
- import semver from "semver";
2
- const noVersionCondition = "<0.0.0"; // this version is never satisfied
3
- const forceUpdateConditions = {
4
- nanoX: noVersionCondition,
5
- nanoS: noVersionCondition,
6
- nanoSP: noVersionCondition,
7
- blue: noVersionCondition,
8
- europa: noVersionCondition,
9
- stax: "<=1.3.0",
10
- };
11
- /**
12
- * Returns whether we should enforce a firmware update if there is one available.
13
- *
14
- * For example this is used for the Stax device as some of the first devices
15
- * shipped have a firmware version that is deprecated (1.3.0).
16
- *
17
- * @param currentVersion - The current firmware version.
18
- * @param deviceModelId - The device model id.
19
- */
20
- export function shouldForceFirmwareUpdate({ currentVersion, deviceModelId, }) {
21
- var _a;
22
- return semver.satisfies((_a = semver.coerce(currentVersion)) !== null && _a !== void 0 ? _a : "", forceUpdateConditions[deviceModelId]);
23
- }
24
- //# sourceMappingURL=shouldForceFirmwareUpdate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.js","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,kBAAkB,GAAG,QAAQ,CAAC,CAAC,kCAAkC;AACvE,MAAM,qBAAqB,GAAkC;IAC3D,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,cAAc,EACd,aAAa,GAId;;IACC,OAAO,MAAM,CAAC,SAAS,CACrB,MAAA,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,mCAAI,EAAE,EACnC,qBAAqB,CAAC,aAAa,CAAC,CACrC,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=shouldForceFirmwareUpdate.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.test.d.ts","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.test.ts"],"names":[],"mappings":""}
@@ -1,39 +0,0 @@
1
- import { DeviceModelId } from "@ledgerhq/devices";
2
- import { shouldForceFirmwareUpdate } from "./shouldForceFirmwareUpdate";
3
- describe("shouldForceFirmwareUpdate", () => {
4
- it("should force firmware update for stax <=1.3.0 and not other versions", () => {
5
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.2.0", deviceModelId: DeviceModelId.stax })).toBe(true);
6
- expect(shouldForceFirmwareUpdate({
7
- currentVersion: "1.2.0-whatever",
8
- deviceModelId: DeviceModelId.stax,
9
- })).toBe(true);
10
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.3.0", deviceModelId: DeviceModelId.stax })).toBe(true);
11
- expect(shouldForceFirmwareUpdate({
12
- currentVersion: "1.3.0-whatever",
13
- deviceModelId: DeviceModelId.stax,
14
- })).toBe(true);
15
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.3.1", deviceModelId: DeviceModelId.stax })).toBe(false);
16
- expect(shouldForceFirmwareUpdate({
17
- currentVersion: "1.3.1-whatever",
18
- deviceModelId: DeviceModelId.stax,
19
- })).toBe(false);
20
- });
21
- it("should not force firmware update for other models", () => {
22
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.2.0", deviceModelId: DeviceModelId.nanoX })).toBe(false);
23
- expect(shouldForceFirmwareUpdate({
24
- currentVersion: "1.2.0-whatever",
25
- deviceModelId: DeviceModelId.nanoX,
26
- })).toBe(false);
27
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.3.0", deviceModelId: DeviceModelId.nanoX })).toBe(false);
28
- expect(shouldForceFirmwareUpdate({
29
- currentVersion: "1.3.0-whatever",
30
- deviceModelId: DeviceModelId.nanoX,
31
- })).toBe(false);
32
- expect(shouldForceFirmwareUpdate({ currentVersion: "1.3.1", deviceModelId: DeviceModelId.nanoX })).toBe(false);
33
- expect(shouldForceFirmwareUpdate({
34
- currentVersion: "1.3.1-whatever",
35
- deviceModelId: DeviceModelId.nanoX,
36
- })).toBe(false);
37
- });
38
- });
39
- //# sourceMappingURL=shouldForceFirmwareUpdate.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldForceFirmwareUpdate.test.js","sourceRoot":"","sources":["../../src/firmwareUpdate/shouldForceFirmwareUpdate.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,CACJ,yBAAyB,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAC1F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,CACJ,yBAAyB,CAAC;YACxB,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,aAAa,CAAC,IAAI;SAClC,CAAC,CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,CACJ,yBAAyB,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAC1F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,CACJ,yBAAyB,CAAC;YACxB,cAAc,EAAE,gBAAgB;YAChC,aAAa,EAAE,aAAa,CAAC,IAAI;SAClC,CAAC,CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,MAAM,CACJ,yBAAyB,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAC1F,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEd,MAAM,C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areUpdate";
3
-
4
- describe("shouldForceFirmwareUpdate", () => {
5
- it("should force firmware update for stax <=1.3.0 and not other versions", () => {
6
- expect(
7
- shouldForceFirmwareUpdate({ currentVersion: "1.2.0", deviceModelId: DeviceModelId.stax }),
8
- ).toBe(true);
9
-
10
- expect(
11
- shouldForceFirmwareUpdate({
12
- currentVersion: "1.2.0-whatever",
13
- deviceModelId: DeviceModelId.stax,
14
- }),
15
- ).toBe(true);
16
-
17
- expect(
18
- shouldForceFirmwareUpdate({ currentVersion: "1.3.0", deviceModelId: DeviceModelId.stax }),
19
- ).toBe(true);
20
-
21
- expect(
22
- shouldForceFirmwareUpdate({
23
- currentVersion: "1.3.0-whatever",
24
- deviceModelId: DeviceModelId.stax,
25
- }),
26
- ).toBe(true);
27
-
28
- expect(
29
- shouldForceFirmwareUpdate({ currentVersion: "1.3.1", deviceModelId: DeviceModelId.stax }),
30
- ).toBe(false);
31
-
32
- expect(
33
- shouldForceFirmwareUpdate({
34
- currentVersion: "1.3.1-whatever",
35
- deviceModelId: DeviceModelId.stax,
36
- }),
37
- ).toBe(false);
38
- });
39
-
40
- it("should not force firmware update for other models", () => {
41
- expect(
42
- shouldForceFirmwareUpdate({ currentVersion: "1.2.0", deviceModelId: DeviceModelId.nanoX }),
43
- ).toBe(false);
44
-
45
- expect(
46
- shouldForceFirmwareUpdate({
47
- currentVersion: "1.2.0-whatever",
48
- deviceModelId: DeviceModelId.nanoX,
49
- }),
50
- ).toBe(false);
51
-
52
- expect(
53
- shouldForceFirmwareUpdate({ currentVersion: "1.3.0", deviceModelId: DeviceModelId.nanoX }),
54
- ).toBe(false);
55
-
56
- expect(
57
- shouldForceFirmwareUpdate({
58
- currentVersion: "1.3.0-whatever",
59
- deviceModelId: DeviceModelId.nanoX,
60
- }),
61
- ).toBe(false);
62
-
63
- expect(
64
- shouldForceFirmwareUpdate({ currentVersion: "1.3.1", deviceModelId: DeviceModelId.nanoX }),
65
- ).toBe(false);
66
-
67
- expect(
68
- shouldForceFirmwareUpdate({
69
- currentVersion: "1.3.1-whatever",
70
- deviceModelId: DeviceModelId.nanoX,
71
- }),
72
- ).toBe(false);
73
- });
74
- });
@@ -1,34 +0,0 @@
1
- import semver from "semver";
2
- import { DeviceModelId } from "@ledgerhq/devices";
3
-
4
- const noVersionCondition = "<0.0.0"; // this version is never satisfied
5
- const forceUpdateConditions: Record<DeviceModelId, string> = {
6
- nanoX: noVersionCondition,
7
- nanoS: noVersionCondition,
8
- nanoSP: noVersionCondition,
9
- blue: noVersionCondition,
10
- europa: noVersionCondition,
11
- stax: "<=1.3.0",
12
- };
13
-
14
- /**
15
- * Returns whether we should enforce a firmware update if there is one available.
16
- *
17
- * For example this is used for the Stax device as some of the first devices
18
- * shipped have a firmware version that is deprecated (1.3.0).
19
- *
20
- * @param currentVersion - The current firmware version.
21
- * @param deviceModelId - The device model id.
22
- */
23
- export function shouldForceFirmwareUpdate({
24
- currentVersion,
25
- deviceModelId,
26
- }: {
27
- currentVersion: string;
28
- deviceModelId: DeviceModelId;
29
- }): boolean {
30
- return semver.satisfies(
31
- semver.coerce(currentVersion) ?? "",
32
- forceUpdateConditions[deviceModelId],
33
- );
34
- }