@onekeyfe/hd-ble-sdk 0.1.45 → 0.1.47
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 +4 -1
- package/package.json +5 -5
- package/src/index.ts +3 -0
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;AA4HpE,QAAA,MAAM,cAAc,qCAOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -590,7 +590,7 @@ const init = (settings) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
590
590
|
}
|
|
591
591
|
});
|
|
592
592
|
const call = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
593
|
-
var _a, _b;
|
|
593
|
+
var _a, _b, _c;
|
|
594
594
|
Log.debug('call: ', params);
|
|
595
595
|
try {
|
|
596
596
|
const response = yield postMessage({ event: HardwareSdk.IFRAME.CALL, type: HardwareSdk.IFRAME.CALL, payload: params });
|
|
@@ -603,6 +603,9 @@ const call = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
603
603
|
if (((_b = response.payload) === null || _b === void 0 ? void 0 : _b.code) === hdShared.HardwareErrorCode.BleLocationError) {
|
|
604
604
|
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.LOCATION_PERMISSION), false);
|
|
605
605
|
}
|
|
606
|
+
if (((_c = response.payload) === null || _c === void 0 ? void 0 : _c.code) === hdShared.HardwareErrorCode.BleLocationServicesDisabled) {
|
|
607
|
+
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.LOCATION_SERVICE_PERMISSION), false);
|
|
608
|
+
}
|
|
606
609
|
}
|
|
607
610
|
return response;
|
|
608
611
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-ble-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
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.
|
|
24
|
-
"@onekeyfe/hd-shared": "^0.1.
|
|
25
|
-
"@onekeyfe/hd-transport-react-native": "^0.1.
|
|
23
|
+
"@onekeyfe/hd-core": "^0.1.47",
|
|
24
|
+
"@onekeyfe/hd-shared": "^0.1.47",
|
|
25
|
+
"@onekeyfe/hd-transport-react-native": "^0.1.47"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "66d6a45a4b761292ca21ddf8e0d1c192d3756529"
|
|
28
28
|
}
|
package/src/index.ts
CHANGED
|
@@ -140,6 +140,9 @@ const call = async (params: any) => {
|
|
|
140
140
|
if (response.payload?.code === HardwareErrorCode.BleLocationError) {
|
|
141
141
|
postMessage(createUiMessage(UI_REQUEST.LOCATION_PERMISSION), false);
|
|
142
142
|
}
|
|
143
|
+
if (response.payload?.code === HardwareErrorCode.BleLocationServicesDisabled) {
|
|
144
|
+
postMessage(createUiMessage(UI_REQUEST.LOCATION_SERVICE_PERMISSION), false);
|
|
145
|
+
}
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
return response;
|