@onekeyfe/hd-core 1.1.34-alpha.2 → 1.1.34-alpha.4
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.
- package/dist/core/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/package.json +4 -4
- package/src/core/index.ts +0 -11
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAwClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAkB1C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAmD,MAAM,WAAW,CAAC;AAI9F,OAAO,KAAK,EAEV,6BAA6B,EAE9B,MAAM,wBAAwB,CAAC;AAWhC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;AA6D7D,eAAO,MAAM,OAAO,YAAmB,WAAW,WAAW,WAAW,iBA6EvE,CAAC;AAixBF,eAAO,MAAM,MAAM,YAAa,WAAW,cAAc,MAAM,SAkF9D,CAAC;AAuEF,eAAO,MAAM,qBAAqB,gFAejC,CAAC;AA0GF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IAC5C,OAAO,CAAC,cAAc,CAAoB;IAE1C,SAAgB,aAAa,EAAE,MAAM,CAAC;IAEtC,OAAO,CAAC,YAAY,CAAsB;IAG1C,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,iBAAiB,CAAoB;;IAS7C,OAAO,CAAC,cAAc;IAoBhB,aAAa,CAAC,OAAO,EAAE,WAAW;IA2DxC,OAAO;CASR;AAED,eAAO,MAAM,QAAQ,YAGpB,CAAC;AAEF,eAAO,MAAM,aAAa,uBAIzB,CAAC;AAMF,eAAO,MAAM,IAAI,aACL,eAAe,aACd,GAAG,WACL,6BAA6B,8BAoBvC,CAAC;AAEF,eAAO,MAAM,eAAe;SAKrB,eAAe,CAAC,KAAK,CAAC;eAChB,GAAG;;UASf,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -41900,11 +41900,6 @@ function connectDeviceForBle(method, device, retryCount = 0) {
|
|
|
41900
41900
|
}
|
|
41901
41901
|
}
|
|
41902
41902
|
catch (err) {
|
|
41903
|
-
if (hdShared.ERROR_CODES_REQUIRE_DISCONNECT.includes(err.errorCode) &&
|
|
41904
|
-
device.mainId &&
|
|
41905
|
-
device.deviceConnector) {
|
|
41906
|
-
yield device.deviceConnector.disconnect(device.mainId).catch(() => undefined);
|
|
41907
|
-
}
|
|
41908
41903
|
if (err.errorCode === hdShared.HardwareErrorCode.BleTimeoutError && retryCount < 6) {
|
|
41909
41904
|
const nextRetry = retryCount + 1;
|
|
41910
41905
|
Log.debug(`Bluetooth connect timeout and will retry, retry count: ${nextRetry}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "1.1.34-alpha.
|
|
3
|
+
"version": "1.1.34-alpha.4",
|
|
4
4
|
"description": "Core processes and APIs for communicating with OneKey hardware devices.",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-shared": "1.1.34-alpha.
|
|
29
|
-
"@onekeyfe/hd-transport": "1.1.34-alpha.
|
|
28
|
+
"@onekeyfe/hd-shared": "1.1.34-alpha.4",
|
|
29
|
+
"@onekeyfe/hd-transport": "1.1.34-alpha.4",
|
|
30
30
|
"axios": "1.15.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"bytebuffer": "^5.0.1",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@types/w3c-web-usb": "^1.0.10",
|
|
45
45
|
"@types/web-bluetooth": "^0.0.21"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d546bc55410990351d34009230aefea77725d0d6"
|
|
48
48
|
}
|
package/src/core/index.ts
CHANGED
|
@@ -2,7 +2,6 @@ import semver from 'semver';
|
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
3
|
import {
|
|
4
4
|
ERRORS,
|
|
5
|
-
ERROR_CODES_REQUIRE_DISCONNECT,
|
|
6
5
|
ERROR_CODES_REQUIRE_RELEASE,
|
|
7
6
|
HardwareError,
|
|
8
7
|
HardwareErrorCode,
|
|
@@ -833,16 +832,6 @@ async function connectDeviceForBle(method: BaseMethod, device: Device, retryCoun
|
|
|
833
832
|
});
|
|
834
833
|
}
|
|
835
834
|
} catch (err) {
|
|
836
|
-
// Device.run()'s REQUIRE_DISCONNECT handling never sees acquire/initialize
|
|
837
|
-
// failures — drop the wedged link here so retries cold-connect instead of
|
|
838
|
-
// reusing it forever.
|
|
839
|
-
if (
|
|
840
|
-
ERROR_CODES_REQUIRE_DISCONNECT.includes(err.errorCode) &&
|
|
841
|
-
device.mainId &&
|
|
842
|
-
device.deviceConnector
|
|
843
|
-
) {
|
|
844
|
-
await device.deviceConnector.disconnect(device.mainId).catch(() => undefined);
|
|
845
|
-
}
|
|
846
835
|
if (err.errorCode === HardwareErrorCode.BleTimeoutError && retryCount < 6) {
|
|
847
836
|
const nextRetry = retryCount + 1;
|
|
848
837
|
Log.debug(`Bluetooth connect timeout and will retry, retry count: ${nextRetry}`);
|