@onekeyfe/hd-transport-electron 1.1.6 → 1.1.7

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.
@@ -32,7 +32,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
32
32
 
33
33
  function initNobleBleSupport(webContents) {
34
34
  return __awaiter(this, void 0, void 0, function* () {
35
- const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-764ce475.js'); });
35
+ const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-d29b8673.js'); });
36
36
  setupNobleBleHandlers(webContents);
37
37
  });
38
38
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-953468b9.js');
5
+ var index = require('./index-6f64d6d7.js');
6
6
 
7
7
 
8
8
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-953468b9.js');
3
+ var index = require('./index-6f64d6d7.js');
4
4
  var hdShared = require('@onekeyfe/hd-shared');
5
5
  var hdTransport = require('@onekeyfe/hd-transport');
6
6
  var pRetry = require('p-retry');
@@ -724,6 +724,7 @@ function writeData(deviceId, hexData) {
724
724
  firstBytes: buffer.subarray(0, 8).toString('hex'),
725
725
  });
726
726
  if (buffer.length <= BLE_PACKET_SIZE) {
727
+ yield hdShared.wait(5);
727
728
  return new Promise((resolve, reject) => {
728
729
  writeCharacteristic.write(buffer, true, (error) => {
729
730
  if (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"noble-ble-handler.d.ts","sourceRoot":"","sources":["../src/noble-ble-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,UAAU,CAAC;AAmrChE,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAwIpE"}
1
+ {"version":3,"file":"noble-ble-handler.d.ts","sourceRoot":"","sources":["../src/noble-ble-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,UAAU,CAAC;AAorChE,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAwIpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport-electron",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "author": "OneKey",
5
5
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
6
6
  "license": "MIT",
@@ -25,12 +25,12 @@
25
25
  "electron-log": ">=4.0.0"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "1.1.6"
28
+ "@onekeyfe/hd-shared": "1.1.7"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/web-bluetooth": "^0.0.17",
32
32
  "electron": "^25.0.0",
33
33
  "typescript": "^5.3.3"
34
34
  },
35
- "gitHead": "e187d8cf8d616f5843dbc845543a96cc1d2ad93d"
35
+ "gitHead": "9c3b769d77395624a075b693c551cc189fafba43"
36
36
  }
@@ -1018,6 +1018,7 @@ async function writeData(deviceId: string, hexData: string): Promise<void> {
1018
1018
 
1019
1019
  // If data is small enough, send directly
1020
1020
  if (buffer.length <= BLE_PACKET_SIZE) {
1021
+ await wait(5);
1021
1022
  return new Promise((resolve, reject) => {
1022
1023
  writeCharacteristic.write(buffer, true, (error: string) => {
1023
1024
  if (error) {