@onekeyfe/hd-ble-sdk 1.0.8-alpha.1 → 1.0.8
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/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/package.json +5 -5
- package/src/index.ts +0 -6
package/dist/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AA0IpE,QAAA,MAAM,cAAc,qCAQlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -609,7 +609,7 @@ const init = (settings) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
609
609
|
}
|
|
610
610
|
});
|
|
611
611
|
const call = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
612
|
-
var _a, _b, _c
|
|
612
|
+
var _a, _b, _c;
|
|
613
613
|
Log.debug('call: ', params);
|
|
614
614
|
try {
|
|
615
615
|
const response = yield postMessage({ event: HardwareSdk.IFRAME.CALL, type: HardwareSdk.IFRAME.CALL, payload: params });
|
|
@@ -625,9 +625,6 @@ const call = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
625
625
|
if (((_c = response.payload) === null || _c === void 0 ? void 0 : _c.code) === hdShared.HardwareErrorCode.BleLocationServicesDisabled) {
|
|
626
626
|
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.LOCATION_SERVICE_PERMISSION), false);
|
|
627
627
|
}
|
|
628
|
-
if (((_d = response.payload) === null || _d === void 0 ? void 0 : _d.code) === hdShared.HardwareErrorCode.BleCharacteristicNotifyChangeFailure) {
|
|
629
|
-
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE), false);
|
|
630
|
-
}
|
|
631
628
|
}
|
|
632
629
|
return response;
|
|
633
630
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-ble-sdk",
|
|
3
|
-
"version": "1.0.8
|
|
3
|
+
"version": "1.0.8",
|
|
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": "^1.0.8
|
|
24
|
-
"@onekeyfe/hd-shared": "^1.0.8
|
|
25
|
-
"@onekeyfe/hd-transport-react-native": "^1.0.8
|
|
23
|
+
"@onekeyfe/hd-core": "^1.0.8",
|
|
24
|
+
"@onekeyfe/hd-shared": "^1.0.8",
|
|
25
|
+
"@onekeyfe/hd-transport-react-native": "^1.0.8"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "ea6992df2629756f5f1a81abe1107d3e4dd83dc7"
|
|
28
28
|
}
|
package/src/index.ts
CHANGED
|
@@ -155,12 +155,6 @@ const call = async (params: any) => {
|
|
|
155
155
|
if (response.payload?.code === HardwareErrorCode.BleLocationServicesDisabled) {
|
|
156
156
|
postMessage(createUiMessage(UI_REQUEST.LOCATION_SERVICE_PERMISSION), false);
|
|
157
157
|
}
|
|
158
|
-
if (response.payload?.code === HardwareErrorCode.BleCharacteristicNotifyChangeFailure) {
|
|
159
|
-
postMessage(
|
|
160
|
-
createUiMessage(UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE),
|
|
161
|
-
false
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
158
|
}
|
|
165
159
|
|
|
166
160
|
return response;
|