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

@onekeyfe/hd-ble-sdk

Package Overview
Dependencies
Maintainers
2
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/hd-ble-sdk - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

10

dist/index.js

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

const call = (params) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b;
Log.debug('call: ', params);

@@ -582,2 +583,11 @@ try {

Log.debug('response: ', response);
if (!response.success) {
if ((typeof response.payload === 'string' && response.payload.includes(ReactNativeTransport.PERMISSION_ERROR)) ||
((_a = response.payload.error) === null || _a === void 0 ? void 0 : _a.includes(ReactNativeTransport.PERMISSION_ERROR))) {
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.BLUETOOTH_PERMISSION), false);
}
if ((_b = response.payload.error) === null || _b === void 0 ? void 0 : _b.includes(ReactNativeTransport.LOCATION_ERROR)) {
postMessage(HardwareSdk.createUiMessage(HardwareSdk.UI_REQUEST.LOCATION_PERMISSION), false);
}
}
return response;

@@ -584,0 +594,0 @@ }

8

package.json
{
"name": "@onekeyfe/hd-ble-sdk",
"version": "0.0.5",
"version": "0.0.6",
"author": "OneKey",

@@ -23,6 +23,6 @@ "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",

"dependencies": {
"@onekeyfe/hd-core": "^0.0.5",
"@onekeyfe/hd-transport-react-native": "^0.0.5"
"@onekeyfe/hd-core": "^0.0.6",
"@onekeyfe/hd-transport-react-native": "^0.0.6"
},
"gitHead": "24d2a28fd3f2e7fda4c21742e968bce764985615"
"gitHead": "b37ddf4e02812f40a01ec38ffef2ff6cdcad4bbc"
}

@@ -10,2 +10,3 @@ import EventEmitter from 'events';

createErrorMessage,
createUiMessage,
CORE_EVENT,

@@ -19,4 +20,8 @@ CoreMessage,

UiResponseEvent,
UI_REQUEST,
} from '@onekeyfe/hd-core';
import ReactNativeTransport from '@onekeyfe/hd-transport-react-native';
import ReactNativeTransport, {
PERMISSION_ERROR,
LOCATION_ERROR,
} from '@onekeyfe/hd-transport-react-native';

@@ -107,2 +112,19 @@ const eventEmitter = new EventEmitter();

Log.debug('response: ', response);
if (!response.success) {
if (
(typeof response.payload === 'string' && response.payload.includes(PERMISSION_ERROR)) ||
response.payload.error?.includes(PERMISSION_ERROR)
) {
/**
* Send message notification when there is no Bluetooth access permission
*/
postMessage(createUiMessage(UI_REQUEST.BLUETOOTH_PERMISSION), false);
}
if (response.payload.error?.includes(LOCATION_ERROR)) {
postMessage(createUiMessage(UI_REQUEST.LOCATION_PERMISSION), false);
}
}
return response;

@@ -109,0 +131,0 @@ }

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