Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onekeyfe/hd-transport-react-native

Package Overview
Dependencies
Maintainers
2
Versions
252
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 0.1.35 to 0.1.36

14

dist/index.js

@@ -309,4 +309,4 @@ 'use strict';

connectOptions = {};
this.Log.debug('first try to reconnect without params');
device = yield blePlxManager.connectToDevice(uuid);
this.Log.debug('first try to reconnect without params');
}

@@ -331,4 +331,14 @@ else {

connectOptions = {};
yield device.connect();
this.Log.debug('second try to reconnect without params');
try {
yield device.connect();
}
catch (e) {
this.Log.debug('last try to reconnect error: ', e);
if (e.errorCode === reactNativeBlePlx.BleErrorCode.OperationCancelled) {
this.Log.debug('last try to reconnect');
yield device.cancelConnection();
yield device.connect();
}
}
}

@@ -335,0 +345,0 @@ else {

8

package.json
{
"name": "@onekeyfe/hd-transport-react-native",
"version": "0.1.35",
"version": "0.1.36",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",

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

"dependencies": {
"@onekeyfe/hd-shared": "^0.1.35",
"@onekeyfe/hd-transport": "^0.1.35",
"@onekeyfe/hd-shared": "^0.1.36",
"@onekeyfe/hd-transport": "^0.1.36",
"react-native-ble-manager": "^8.1.0",
"react-native-ble-plx": "^2.0.3"
},
"gitHead": "8ad01282e959a37412b4f5de6bfe0ca248cf27e3"
"gitHead": "46ed925a322c0717c74c6bb2e0bb5e7f5df21fcf"
}

@@ -215,4 +215,4 @@ import { Platform } from 'react-native';

connectOptions = {};
this.Log.debug('first try to reconnect without params');
device = await blePlxManager.connectToDevice(uuid);
this.Log.debug('first try to reconnect without params');
} else {

@@ -240,4 +240,15 @@ throw ERRORS.TypedError(HardwareErrorCode.BleConnectedError, e.reason ?? e);

connectOptions = {};
await device.connect();
this.Log.debug('second try to reconnect without params');
try {
await device.connect();
} catch (e) {
this.Log.debug('last try to reconnect error: ', e);
// last try to reconnect device if this issue exists
// https://github.com/dotintent/react-native-ble-plx/issues/426
if (e.errorCode === BleErrorCode.OperationCancelled) {
this.Log.debug('last try to reconnect');
await device.cancelConnection();
await device.connect();
}
}
} else {

@@ -244,0 +255,0 @@ throw ERRORS.TypedError(HardwareErrorCode.BleConnectedError, e.reason ?? e);

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