@onekeyfe/hd-core 0.1.38 → 0.1.39
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceCommands.d.ts","sourceRoot":"","sources":["../../src/device/DeviceCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DeviceCommands.d.ts","sourceRoot":"","sources":["../../src/device/DeviceCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAKlE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC,aAAK,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;AACxC,aAAK,UAAU,GAAG,MAAM,WAAW,CAAC;AACpC,oBAAY,oBAAoB,CAAC,CAAC,SAAS,UAAU,IAAI;IACvD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACzB,CAAC;AACF,aAAK,oBAAoB,GAAG;KACzB,CAAC,IAAI,MAAM,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC;CAClD,CAAC;AACF,oBAAY,sBAAsB,GAAG,oBAAoB,CAAC,MAAM,WAAW,CAAC,CAAC;AAE7E,oBAAY,wBAAwB,GAAG;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAcF,qBAAa,cAAc;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,SAAS,CAAC;IAErB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE9C,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;gBAE/B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAOpC,OAAO,CAAC,aAAa,EAAE,OAAO;IAU9B,IAAI,CACR,IAAI,EAAE,UAAU,EAChB,GAAG,GAAE,sBAAsB,CAAC,SAAS,CAAM,GAC1C,OAAO,CAAC,sBAAsB,CAAC;IAkBlC,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAAE,EACpD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,EACV,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3C,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAClD,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,EACV,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAuC7B,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC;IAK3E,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAyGhF,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,oBAAoB;CAuBhD;AAED,oBAAY,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10449,6 +10449,9 @@ class DeviceCommands {
|
|
|
10449
10449
|
if (code === 'Failure_PinCancelled') {
|
|
10450
10450
|
error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.PinCancelled);
|
|
10451
10451
|
}
|
|
10452
|
+
if (code === 'Failure_DataError' && message === 'Please confirm the BlindSign enabled') {
|
|
10453
|
+
error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BlindSignDisabled);
|
|
10454
|
+
}
|
|
10452
10455
|
if (error) {
|
|
10453
10456
|
return Promise.reject(error);
|
|
10454
10457
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "> TODO: description",
|
|
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": "^0.1.
|
|
29
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
28
|
+
"@onekeyfe/hd-shared": "^0.1.39",
|
|
29
|
+
"@onekeyfe/hd-transport": "^0.1.39",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"js-sha256": "^0.9.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@types/parse-uri": "^1.0.0",
|
|
38
38
|
"@types/semver": "^7.3.9"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "abaee3140debec0a263b2b87c5ffcddfa534b443"
|
|
41
41
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Transport, Messages } from '@onekeyfe/hd-transport';
|
|
2
2
|
import { ERRORS, HardwareError, HardwareErrorCode } from '@onekeyfe/hd-shared';
|
|
3
|
-
// eslint-disable-next-line import/no-cycle
|
|
4
3
|
import TransportManager from '../data-manager/TransportManager';
|
|
5
4
|
import DataManager from '../data-manager/DataManager';
|
|
6
5
|
import { patchFeatures, getLogger, LoggerNames } from '../utils';
|
|
@@ -164,6 +163,10 @@ export class DeviceCommands {
|
|
|
164
163
|
error = ERRORS.TypedError(HardwareErrorCode.PinCancelled);
|
|
165
164
|
}
|
|
166
165
|
|
|
166
|
+
if (code === 'Failure_DataError' && message === 'Please confirm the BlindSign enabled') {
|
|
167
|
+
error = ERRORS.TypedError(HardwareErrorCode.BlindSignDisabled);
|
|
168
|
+
}
|
|
169
|
+
|
|
167
170
|
if (error) {
|
|
168
171
|
return Promise.reject(error);
|
|
169
172
|
}
|