@onekeyfe/hardware-cli 1.2.0-alpha.2 → 1.2.0-alpha.3

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/cli.js CHANGED
@@ -60,7 +60,7 @@ program
60
60
  if (features?.success && features.payload) {
61
61
  device.features = features.payload;
62
62
  device.name = features.payload.label || features.payload.bleName || device.name;
63
- const devType = features.payload.deviceType;
63
+ const devType = features.payload.deviceType?.toLowerCase();
64
64
  if (devType) {
65
65
  device.deviceType = devType;
66
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hardware-cli",
3
- "version": "1.2.0-alpha.2",
3
+ "version": "1.2.0-alpha.3",
4
4
  "description": "OneKey hardware wallet CLI for testing device communication",
5
5
  "author": "OneKey",
6
6
  "license": "Apache-2.0",
@@ -30,11 +30,11 @@
30
30
  "test": "jest"
31
31
  },
32
32
  "dependencies": {
33
- "@onekeyfe/hd-common-connect-sdk": "1.2.0-alpha.2",
34
- "@onekeyfe/hd-core": "1.2.0-alpha.2",
35
- "@onekeyfe/hd-shared": "1.2.0-alpha.2",
36
- "@onekeyfe/hd-transport-usb": "1.2.0-alpha.2",
33
+ "@onekeyfe/hd-common-connect-sdk": "1.2.0-alpha.3",
34
+ "@onekeyfe/hd-core": "1.2.0-alpha.3",
35
+ "@onekeyfe/hd-shared": "1.2.0-alpha.3",
36
+ "@onekeyfe/hd-transport-usb": "1.2.0-alpha.3",
37
37
  "commander": "^12.0.0"
38
38
  },
39
- "gitHead": "6c183b7f7027f4b4d3db4f427f6360351a6c6680"
39
+ "gitHead": "54a4a40baee7e376b9a810dade60007d2c9b00c9"
40
40
  }
package/src/cli.ts CHANGED
@@ -101,7 +101,7 @@ program
101
101
  if (features?.success && features.payload) {
102
102
  device.features = features.payload;
103
103
  device.name = features.payload.label || features.payload.bleName || device.name;
104
- const devType = features.payload.deviceType;
104
+ const devType = features.payload.deviceType?.toLowerCase();
105
105
  if (devType) {
106
106
  device.deviceType = devType as IDeviceType;
107
107
  }
@@ -910,7 +910,17 @@ async function prepareSession(
910
910
  return undefined;
911
911
  }
912
912
 
913
- const device = searchResult.payload[0] as EnrichedSearchDevice;
913
+ const device = searchResult.payload[0] as {
914
+ connectId?: string;
915
+ deviceId?: string;
916
+ features?: {
917
+ deviceId?: string | null;
918
+ deviceType?: string;
919
+ sessionId?: string | null;
920
+ passphraseProtection?: boolean | null;
921
+ unlocked?: boolean | null;
922
+ };
923
+ };
914
924
  const connectId = device.connectId || globalOpts.connectId || '';
915
925
  if (!globalOpts.connectId && connectId) {
916
926
  globalOpts.connectId = connectId;