@onekeyfe/hd-core 0.1.35 → 0.1.36

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAgB7C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAS/C,oBAAoB;CAGrB"}
1
+ {"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAiB7C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAS/C,oBAAoB;CAGrB"}
package/dist/index.js CHANGED
@@ -10178,7 +10178,7 @@ class DevicePool extends events.exports {
10178
10178
  static _sendDisconnectMessage() {
10179
10179
  for (let i = this.disconnectPool.length - 1; i >= 0; i--) {
10180
10180
  const descriptor = this.connectedPool[i];
10181
- const device = this.getDeviceByPath(descriptor.path);
10181
+ const device = (descriptor === null || descriptor === void 0 ? void 0 : descriptor.path) ? this.getDeviceByPath(descriptor.path) : null;
10182
10182
  if (device) {
10183
10183
  this.emitter.emit(DEVICE.DISCONNECT, device);
10184
10184
  }
@@ -13858,6 +13858,7 @@ class DeviceConnector {
13858
13858
  return res;
13859
13859
  }
13860
13860
  catch (error) {
13861
+ Log$1.debug('acquire error: ', error.message);
13861
13862
  safeThrowError(error);
13862
13863
  }
13863
13864
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^0.1.35",
29
- "@onekeyfe/hd-transport": "^0.1.35",
28
+ "@onekeyfe/hd-shared": "^0.1.36",
29
+ "@onekeyfe/hd-transport": "^0.1.36",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "js-sha256": "^0.9.0",
@@ -37,5 +37,5 @@
37
37
  "@types/parse-uri": "^1.0.0",
38
38
  "@types/semver": "^7.3.9"
39
39
  },
40
- "gitHead": "8ad01282e959a37412b4f5de6bfe0ca248cf27e3"
40
+ "gitHead": "46ed925a322c0717c74c6bb2e0bb5e7f5df21fcf"
41
41
  }
@@ -85,6 +85,7 @@ export default class DeviceConnector {
85
85
  }
86
86
  return res;
87
87
  } catch (error) {
88
+ Log.debug('acquire error: ', error.message);
88
89
  safeThrowError(error);
89
90
  }
90
91
  }
@@ -165,7 +165,7 @@ export class DevicePool extends EventEmitter {
165
165
  static _sendDisconnectMessage() {
166
166
  for (let i = this.disconnectPool.length - 1; i >= 0; i--) {
167
167
  const descriptor = this.connectedPool[i];
168
- const device = this.getDeviceByPath(descriptor.path);
168
+ const device = descriptor?.path ? this.getDeviceByPath(descriptor.path) : null;
169
169
  if (device) {
170
170
  this.emitter.emit(DEVICE.DISCONNECT, device);
171
171
  }