@onekeyfe/hd-transport-react-native 0.1.11 → 0.1.12

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.js CHANGED
@@ -331,7 +331,7 @@ class ReactNativeBleTransport {
331
331
  const bondedDevices = yield getBondedDevices();
332
332
  const hasBonded = !!bondedDevices.find(bondedDevice => bondedDevice.id === (device === null || device === void 0 ? void 0 : device.id));
333
333
  if (!hasBonded) {
334
- throw hdShared.ERRORS.TypedError('device is not bonded');
334
+ throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleDeviceNotBonded, 'device is not bonded');
335
335
  }
336
336
  }
337
337
  yield device.discoverAllServicesAndCharacteristics();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport-react-native",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -20,10 +20,10 @@
20
20
  "lint:fix": "eslint . --fix"
21
21
  },
22
22
  "dependencies": {
23
- "@onekeyfe/hd-shared": "^0.1.11",
24
- "@onekeyfe/hd-transport": "^0.1.11",
23
+ "@onekeyfe/hd-shared": "^0.1.12",
24
+ "@onekeyfe/hd-transport": "^0.1.12",
25
25
  "react-native-ble-manager": "^8.1.0",
26
26
  "react-native-ble-plx": "^2.0.3"
27
27
  },
28
- "gitHead": "4a71d9d0de15a8179cac16565be09f1c601ddfd5"
28
+ "gitHead": "38d4f8d711d212de8617f217a0148dcf3cdcc477"
29
29
  }
package/src/index.ts CHANGED
@@ -236,7 +236,7 @@ export default class ReactNativeBleTransport {
236
236
  const bondedDevices = await getBondedDevices();
237
237
  const hasBonded = !!bondedDevices.find(bondedDevice => bondedDevice.id === device?.id);
238
238
  if (!hasBonded) {
239
- throw ERRORS.TypedError('device is not bonded');
239
+ throw ERRORS.TypedError(HardwareErrorCode.BleDeviceNotBonded, 'device is not bonded');
240
240
  }
241
241
  }
242
242