Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onekeyfe/hd-core

Package Overview
Dependencies
Maintainers
2
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/hd-core - npm Package Compare versions

Comparing version 0.3.38 to 0.3.39

src/utils/semver.test.js

3

dist/api/polkadot/networks.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc