Socket
Socket
Sign inDemoInstall

@onekeyfe/hd-transport-react-native

Package Overview
Dependencies
Maintainers
2
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/hd-transport-react-native - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8-alpha.0

15

dist/index.js

@@ -177,2 +177,3 @@ 'use strict';

timeout: 3000,
refreshGatt: 'OnConnected',
};

@@ -465,3 +466,3 @@ const tryToGetConfiguration = (device) => {

const subscription = characteristic.monitor((error, c) => {
var _a, _b, _c, _d, _e;
var _a, _b, _c, _d, _e, _f, _g, _h;
if (error) {

@@ -477,3 +478,9 @@ this.Log.debug(`error monitor ${characteristic.uuid}, deviceId: ${characteristic.deviceID}: ${error}`);

}
this.runPromise.reject(hdShared.ERRORS.TypedError(ERROR, (_c = error.reason) !== null && _c !== void 0 ? _c : error.message));
if (((_c = error.reason) === null || _c === void 0 ? void 0 : _c.includes('Cannot write client characteristic config descriptor')) ||
((_d = error.reason) === null || _d === void 0 ? void 0 : _d.includes('Cannot find client characteristic config descriptor'))) {
this.runPromise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleCharacteristicNotifyChangeFailure, (_e = error.message) !== null && _e !== void 0 ? _e : error.reason));
this.Log.debug(`${hdShared.HardwareErrorCode.BleCharacteristicNotifyChangeFailure} ${error.message} ${error.reason}`);
return;
}
this.runPromise.reject(hdShared.ERRORS.TypedError(ERROR, (_f = error.reason) !== null && _f !== void 0 ? _f : error.message));
this.Log.debug(': monitor notify error, and has unreleased Promise');

@@ -499,3 +506,3 @@ }

buffer$1 = [];
(_d = this.runPromise) === null || _d === void 0 ? void 0 : _d.resolve(value.toString('hex'));
(_g = this.runPromise) === null || _g === void 0 ? void 0 : _g.resolve(value.toString('hex'));
}

@@ -505,3 +512,3 @@ }

this.Log.debug('monitor data error: ', error);
(_e = this.runPromise) === null || _e === void 0 ? void 0 : _e.reject(error);
(_h = this.runPromise) === null || _h === void 0 ? void 0 : _h.reject(error);
}

@@ -508,0 +515,0 @@ });

{
"name": "@onekeyfe/hd-transport-react-native",
"version": "1.0.7",
"version": "1.0.8-alpha.0",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",

@@ -22,8 +22,8 @@ "license": "MIT",

"dependencies": {
"@onekeyfe/hd-shared": "^1.0.7",
"@onekeyfe/hd-transport": "^1.0.7",
"@onekeyfe/react-native-ble-plx": "3.0.0",
"@onekeyfe/hd-shared": "^1.0.8-alpha.0",
"@onekeyfe/hd-transport": "^1.0.8-alpha.0",
"@onekeyfe/react-native-ble-plx": "3.0.1",
"react-native-ble-manager": "^8.1.0"
},
"gitHead": "8b08f905e7426fac23b5cf9ec55eb336278f0e3b"
"gitHead": "5e68522825bfe3e42fac05c795fbee6caa7cc260"
}

@@ -35,2 +35,3 @@ import { Platform, PermissionsAndroid } from 'react-native';

timeout: 3000,
refreshGatt: 'OnConnected',
};

@@ -409,2 +410,17 @@

}
if (
error.reason?.includes('Cannot write client characteristic config descriptor') ||
error.reason?.includes('Cannot find client characteristic config descriptor')
) {
this.runPromise.reject(
ERRORS.TypedError(
HardwareErrorCode.BleCharacteristicNotifyChangeFailure,
error.message ?? error.reason
)
);
this.Log.debug(
`${HardwareErrorCode.BleCharacteristicNotifyChangeFailure} ${error.message} ${error.reason}`
);
return;
}
this.runPromise.reject(ERRORS.TypedError(ERROR, error.reason ?? error.message));

@@ -411,0 +427,0 @@ this.Log.debug(': monitor notify error, and has unreleased Promise');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc