@onekeyfe/hd-ble-sdk 0.1.25 → 0.1.28

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":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAA0B,QAAQ,EAAqB,MAAM,qBAAqB,CAAC;AAU1F,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;CAAO,CAAC;AAqHpE,QAAA,MAAM,cAAc,qCAOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAA0B,QAAQ,EAAqB,MAAM,qBAAqB,CAAC;AAU1F,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;CAAO,CAAC;AAyHpE,QAAA,MAAM,cAAc,qCAOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -552,7 +552,7 @@ function handleMessage(message) {
552
552
  eventEmitter.emit(message.event, message);
553
553
  break;
554
554
  case HardwareSdk.DEVICE_EVENT:
555
- if (message.type === HardwareSdk.DEVICE.FEATURES) {
555
+ if ([HardwareSdk.DEVICE.CONNECT, HardwareSdk.DEVICE.DISCONNECT, HardwareSdk.DEVICE.FEATURES, HardwareSdk.DEVICE.SUPPORT_FEATURES].includes(message.type)) {
556
556
  eventEmitter.emit(message.type, message.payload);
557
557
  }
558
558
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-ble-sdk",
3
- "version": "0.1.25",
3
+ "version": "0.1.28",
4
4
  "author": "OneKey",
5
5
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
6
6
  "license": "ISC",
@@ -20,9 +20,9 @@
20
20
  "lint:fix": "eslint . --fix"
21
21
  },
22
22
  "dependencies": {
23
- "@onekeyfe/hd-core": "^0.1.25",
24
- "@onekeyfe/hd-shared": "^0.1.25",
25
- "@onekeyfe/hd-transport-react-native": "^0.1.25"
23
+ "@onekeyfe/hd-core": "^0.1.28",
24
+ "@onekeyfe/hd-shared": "^0.1.28",
25
+ "@onekeyfe/hd-transport-react-native": "^0.1.28"
26
26
  },
27
- "gitHead": "2e8f7aecfd69191596348a5591abba1bf61a20b2"
27
+ "gitHead": "84236b7baecf937399e557aa2d9a5b47ecd01d3f"
28
28
  }
package/src/index.ts CHANGED
@@ -71,7 +71,11 @@ function handleMessage(message: CoreMessage) {
71
71
  eventEmitter.emit(message.event, message);
72
72
  break;
73
73
  case DEVICE_EVENT:
74
- if (message.type === DEVICE.FEATURES) {
74
+ if (
75
+ (
76
+ [DEVICE.CONNECT, DEVICE.DISCONNECT, DEVICE.FEATURES, DEVICE.SUPPORT_FEATURES] as string[]
77
+ ).includes(message.type)
78
+ ) {
75
79
  eventEmitter.emit(message.type, message.payload);
76
80
  }
77
81
  break;