@onekeyfe/hd-core 0.3.0 → 0.3.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.
package/dist/index.js
CHANGED
|
@@ -950,7 +950,7 @@ const getFirmwareUpdateField = (features, updateType) => {
|
|
|
950
950
|
if (updateType === 'ble') {
|
|
951
951
|
return 'ble';
|
|
952
952
|
}
|
|
953
|
-
if (deviceType === 'classic') {
|
|
953
|
+
if (deviceType === 'classic' || deviceType === 'mini') {
|
|
954
954
|
return 'firmware-v2';
|
|
955
955
|
}
|
|
956
956
|
if (deviceType === 'touch') {
|
|
@@ -11030,7 +11030,7 @@ function checkNeedUpdateBootForTouch(features) {
|
|
|
11030
11030
|
}
|
|
11031
11031
|
function checkNeedUpdateBootForClassicAndMini(features, willUpdateFirmware) {
|
|
11032
11032
|
const deviceType = getDeviceType(features);
|
|
11033
|
-
if (deviceType !== 'classic')
|
|
11033
|
+
if (deviceType !== 'classic' && deviceType !== 'mini')
|
|
11034
11034
|
return false;
|
|
11035
11035
|
if (!willUpdateFirmware)
|
|
11036
11036
|
return false;
|
|
@@ -13019,7 +13019,7 @@ class CheckBootloaderRelease extends BaseMethod {
|
|
|
13019
13019
|
const { features } = this.device;
|
|
13020
13020
|
const deviceType = getDeviceType(features);
|
|
13021
13021
|
let shouldUpdate = false;
|
|
13022
|
-
if (deviceType === 'classic') {
|
|
13022
|
+
if (deviceType === 'classic' || deviceType === 'mini') {
|
|
13023
13023
|
shouldUpdate = !!checkNeedUpdateBootForClassicAndMini(features, this.payload.willUpdateFirmwareVersion);
|
|
13024
13024
|
}
|
|
13025
13025
|
else if (deviceType === 'touch') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onekeyfe/hd-shared": "^0.3.
|
|
28
|
-
"@onekeyfe/hd-transport": "^0.3.
|
|
27
|
+
"@onekeyfe/hd-shared": "^0.3.1",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.3.1",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"bignumber.js": "^9.0.2",
|
|
31
31
|
"bytebuffer": "^5.0.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@types/semver": "^7.3.9",
|
|
44
44
|
"ripple-keypairs": "^1.1.4"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "05253a072a7e014f33f90e76597ccd318a7dd1e7"
|
|
47
47
|
}
|
|
@@ -23,7 +23,7 @@ export default class CheckBootloaderRelease extends BaseMethod {
|
|
|
23
23
|
const { features } = this.device;
|
|
24
24
|
const deviceType = getDeviceType(features);
|
|
25
25
|
let shouldUpdate = false;
|
|
26
|
-
if (deviceType === 'classic') {
|
|
26
|
+
if (deviceType === 'classic' || deviceType === 'mini') {
|
|
27
27
|
shouldUpdate = !!checkNeedUpdateBootForClassicAndMini(
|
|
28
28
|
features,
|
|
29
29
|
this.payload.willUpdateFirmwareVersion
|
|
@@ -31,7 +31,7 @@ export function checkNeedUpdateBootForClassicAndMini(
|
|
|
31
31
|
willUpdateFirmware: string
|
|
32
32
|
) {
|
|
33
33
|
const deviceType = getDeviceType(features);
|
|
34
|
-
if (deviceType !== 'classic') return false;
|
|
34
|
+
if (deviceType !== 'classic' && deviceType !== 'mini') return false;
|
|
35
35
|
if (!willUpdateFirmware) return false;
|
|
36
36
|
const currentVersion = getDeviceFirmwareVersion(features).join('.');
|
|
37
37
|
const bootloaderVersion = getDeviceBootloaderVersion(features).join('.');
|