@onekeyfe/hd-transport-react-native 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 +3 -0
- package/package.json +4 -4
- package/src/index.ts +2 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,MAAM,EAEN,cAAc,EAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,SAAiC,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAkB,QAAQ,EAA6B,MAAM,qBAAqB,CAAC;AAC1F,OAAO,KAAK,YAAY,MAAM,QAAQ,CAAC;AAavC,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAmBjE,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IAEzC,SAAS,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAEnE,UAAU,UAAS;IAEnB,OAAO,UAAS;IAEhB,WAAW,SAAQ;IAEnB,UAAU,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAExC,GAAG,CAAC,EAAE,GAAG,CAAC;IAEV,OAAO,CAAC,EAAE,YAAY,CAAC;gBAEX,OAAO,EAAE,gBAAgB;IAIrC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY;IAKvC,SAAS,CAAC,UAAU,EAAE,GAAG;IAMzB,MAAM;IAIN,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC;IAYjC,SAAS;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":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othUnauthorized) {
|
|
233
233
|
reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleLocationError));
|
|
234
234
|
}
|
|
235
|
+
else if (error.errorCode === reactNativeBlePlx.BleErrorCode.LocationServicesDisabled) {
|
|
236
|
+
reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleLocationServicesDisabled));
|
|
237
|
+
}
|
|
235
238
|
else if (error.errorCode === reactNativeBlePlx.BleErrorCode.ScanStartFailed) {
|
|
236
239
|
timer.timeout(() => { }, this.scanTimeout);
|
|
237
240
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"lint:fix": "eslint . --fix"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@onekeyfe/hd-shared": "^0.1.
|
|
23
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
22
|
+
"@onekeyfe/hd-shared": "^0.1.47",
|
|
23
|
+
"@onekeyfe/hd-transport": "^0.1.47",
|
|
24
24
|
"react-native-ble-manager": "^8.1.0",
|
|
25
25
|
"react-native-ble-plx": "^2.0.3"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "66d6a45a4b761292ca21ddf8e0d1c192d3756529"
|
|
28
28
|
}
|
package/src/index.ts
CHANGED
|
@@ -120,6 +120,8 @@ export default class ReactNativeBleTransport {
|
|
|
120
120
|
reject(ERRORS.TypedError(HardwareErrorCode.BlePermissionError));
|
|
121
121
|
} else if (error.errorCode === BleErrorCode.BluetoothUnauthorized) {
|
|
122
122
|
reject(ERRORS.TypedError(HardwareErrorCode.BleLocationError));
|
|
123
|
+
} else if (error.errorCode === BleErrorCode.LocationServicesDisabled) {
|
|
124
|
+
reject(ERRORS.TypedError(HardwareErrorCode.BleLocationServicesDisabled));
|
|
123
125
|
} else if (error.errorCode === BleErrorCode.ScanStartFailed) {
|
|
124
126
|
// Android Bluetooth will report an error when the search frequency is too fast,
|
|
125
127
|
// then nothing is processed and an empty array of devices is returned.
|