@onekeyfe/hd-core
Advanced tools
Comparing version 0.3.38 to 0.3.39
@@ -7,3 +7,4 @@ import type { DeviceFirmwareRange } from '../../types'; | ||
Astar = "astar", | ||
JoyStream = "joystream" | ||
JoyStream = "joystream", | ||
Manta = "manta" | ||
} | ||
@@ -10,0 +11,0 @@ export default Networks; |
export * from './assets'; | ||
export * from './versionUtils'; | ||
export * from './patch'; | ||
export { getDeviceType, getDeviceTypeByBleName, getDeviceTypeByDeviceId, getDeviceUUID, getDeviceLabel, getFirmwareUpdateField, supportInputPinOnSoftware, } from './deviceFeaturesUtils'; | ||
export { getDeviceType, getDeviceTypeByBleName, getDeviceTypeByDeviceId, getDeviceUUID, getDeviceLabel, getFirmwareUpdateField, getDeviceFirmwareVersion, getDeviceBootloaderVersion, supportInputPinOnSoftware, } from './deviceFeaturesUtils'; | ||
export { getHDPath, getScriptType, getOutputScriptType } from '../api/helpers/pathUtils'; | ||
@@ -6,0 +6,0 @@ export { checkNeedUpdateBootForTouch, checkNeedUpdateBootForClassicAndMini, } from '../api/firmware/updateBootloader'; |
{ | ||
"name": "@onekeyfe/hd-core", | ||
"version": "0.3.38", | ||
"version": "0.3.39", | ||
"description": "> TODO: description", | ||
@@ -28,4 +28,4 @@ "author": "OneKey", | ||
"dependencies": { | ||
"@onekeyfe/hd-shared": "^0.3.38", | ||
"@onekeyfe/hd-transport": "^0.3.38", | ||
"@onekeyfe/hd-shared": "^0.3.39", | ||
"@onekeyfe/hd-transport": "^0.3.39", | ||
"axios": "^0.27.2", | ||
@@ -48,3 +48,3 @@ "bignumber.js": "^9.0.2", | ||
}, | ||
"gitHead": "85e740c727ad9fbd53bbec5b29315b5058858531" | ||
"gitHead": "e8bfd1d5fded9eef1d92afaec3d27ead515eacb6" | ||
} |
@@ -10,2 +10,3 @@ import type { DeviceFirmwareRange } from '../../types'; | ||
JoyStream = 'joystream', | ||
Manta = 'manta', | ||
} | ||
@@ -32,2 +33,10 @@ | ||
}, | ||
[Networks.Manta]: { | ||
model_mini: { | ||
min: '3.7.0', | ||
}, | ||
model_touch: { | ||
min: '4.9.0', | ||
}, | ||
}, | ||
}; | ||
@@ -45,3 +54,6 @@ | ||
} | ||
if (networks.includes(Networks.Manta)) { | ||
return specialVersionRange[Networks.Manta]; | ||
} | ||
return baseVersionRange; | ||
} |
@@ -38,3 +38,3 @@ import semver from 'semver'; | ||
// classic1s 3.5.0 | ||
// classic1s 3.5.0 pro 4.6.0 | ||
switch (features.onekey_device_type) { | ||
@@ -47,2 +47,4 @@ case 'CLASSIC': | ||
return 'mini'; | ||
case 'TOUCH': | ||
return 'touch'; | ||
case 'TOUCH_PRO': | ||
@@ -110,5 +112,8 @@ return 'pro'; | ||
if (features.onekey_version) { | ||
return features.onekey_version.split('.') as unknown as IVersionArray; | ||
if (semver.valid(features.onekey_firmware_version)) { | ||
return features.onekey_firmware_version?.split('.') as unknown as IVersionArray; | ||
} | ||
if (semver.valid(features.onekey_version)) { | ||
return features.onekey_version?.split('.') as unknown as IVersionArray; | ||
} | ||
return [ | ||
@@ -135,2 +140,6 @@ features.major_version ?? '0', | ||
export const getDeviceBootloaderVersion = (features: Features): IVersionArray => { | ||
// classic1s 3.5.0 pro 4.6.0 | ||
if (semver.valid(features.onekey_boot_version)) { | ||
return features.onekey_boot_version?.split('.') as unknown as IVersionArray; | ||
} | ||
if (!features.bootloader_version) { | ||
@@ -143,3 +152,3 @@ if (features.bootloader_mode) { | ||
if (semver.valid(features.bootloader_version)) { | ||
return features.bootloader_version.split('.') as unknown as IVersionArray; | ||
return features.bootloader_version?.split('.') as unknown as IVersionArray; | ||
} | ||
@@ -146,0 +155,0 @@ return [0, 0, 0]; |
@@ -11,2 +11,4 @@ export * from './assets'; | ||
getFirmwareUpdateField, | ||
getDeviceFirmwareVersion, | ||
getDeviceBootloaderVersion, | ||
supportInputPinOnSoftware, | ||
@@ -13,0 +15,0 @@ } from './deviceFeaturesUtils'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2591952
873
79047