@ledgerhq/react-native-hw-transport-ble 6.29.0-nightly.0 → 6.29.1-next.0

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.
@@ -24,10 +24,7 @@ export const remapError = (error: IOBleErrorRemap): IOBleErrorRemap => {
24
24
  }
25
25
  }
26
26
 
27
- if (
28
- error.message.includes("was disconnected") ||
29
- error.message.includes("not found")
30
- ) {
27
+ if (error.message.includes("was disconnected") || error.message.includes("not found")) {
31
28
  return new DisconnectedDevice();
32
29
  }
33
30
 
@@ -43,10 +40,7 @@ export const decoratePromiseErrors = <A>(promise: Promise<A>): Promise<A> =>
43
40
 
44
41
  export const bleErrorToHwTransportError = new Map([
45
42
  [BleErrorCode.ScanStartFailed, HwTransportErrorType.BluetoothScanStartFailed],
46
- [
47
- BleErrorCode.LocationServicesDisabled,
48
- HwTransportErrorType.LocationServicesDisabled,
49
- ],
43
+ [BleErrorCode.LocationServicesDisabled, HwTransportErrorType.LocationServicesDisabled],
50
44
  [
51
45
  // BluetoothUnauthorized actually represents a location service unauthorized error
52
46
  BleErrorCode.BluetoothUnauthorized,
@@ -54,9 +48,7 @@ export const bleErrorToHwTransportError = new Map([
54
48
  ],
55
49
  ]);
56
50
 
57
- export const mapBleErrorToHwTransportError = (
58
- bleError: BleError
59
- ): HwTransportError => {
51
+ export const mapBleErrorToHwTransportError = (bleError: BleError): HwTransportError => {
60
52
  const message = `${bleError.message}. Origin: ${bleError.errorCode}`;
61
53
 
62
54
  const inferedType = bleErrorToHwTransportError.get(bleError.errorCode);