@onekeyfe/hd-shared 1.2.0-alpha.24 → 1.2.0-alpha.26

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.
@@ -115,8 +115,8 @@ export declare const HardwareErrorCode: {
115
115
  readonly DeviceSettingsLanguageNotSupport: 826;
116
116
  readonly TooManyInputs: 827;
117
117
  readonly PinMismatch: 828;
118
- readonly DeviceLocked: 829;
119
- readonly KaspaPrevTxIdMismatch: 830;
118
+ readonly KaspaPrevTxIdMismatch: 829;
119
+ readonly DeviceLocked: 830;
120
120
  readonly WalletSessionInvalid: 831;
121
121
  readonly LowlevelTrasnportConnectError: 900;
122
122
  readonly WebDeviceNotFoundOrNeedsPermission: 901;
package/dist/index.d.ts CHANGED
@@ -415,14 +415,14 @@ declare const HardwareErrorCode: {
415
415
  */
416
416
  readonly PinMismatch: 828;
417
417
  /**
418
- * Protocol V2 device must be unlocked before the requested operation.
419
- * @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
418
+ * Device refused to sign: refTxs don't match the spent input's outpoint
420
419
  */
421
- readonly DeviceLocked: 829;
420
+ readonly KaspaPrevTxIdMismatch: 829;
422
421
  /**
423
- * Device refused to sign: refTxs don't match the spent input's outpoint
422
+ * Protocol V2 device must be unlocked before the requested operation.
423
+ * @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
424
424
  */
425
- readonly KaspaPrevTxIdMismatch: 830;
425
+ readonly DeviceLocked: 830;
426
426
  /**
427
427
  * The cached wallet session is invalid or has expired.
428
428
  * @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
package/dist/index.js CHANGED
@@ -164,8 +164,8 @@ const HardwareErrorCode = {
164
164
  DeviceSettingsLanguageNotSupport: 826,
165
165
  TooManyInputs: 827,
166
166
  PinMismatch: 828,
167
- DeviceLocked: 829,
168
- KaspaPrevTxIdMismatch: 830,
167
+ KaspaPrevTxIdMismatch: 829,
168
+ DeviceLocked: 830,
169
169
  WalletSessionInvalid: 831,
170
170
  LowlevelTrasnportConnectError: 900,
171
171
  WebDeviceNotFoundOrNeedsPermission: 901,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-shared",
3
- "version": "1.2.0-alpha.24",
3
+ "version": "1.2.0-alpha.26",
4
4
  "description": "Hardware SDK's shared tool library",
5
5
  "keywords": [
6
6
  "Hardware-SDK",
@@ -25,5 +25,5 @@
25
25
  "lint": "eslint .",
26
26
  "lint:fix": "eslint . --fix"
27
27
  },
28
- "gitHead": "43663337d94350430cc507c74d6eec5a076bd4e9"
28
+ "gitHead": "1401fef3eb93f5a83ed5e8375b99181b7aaa6054"
29
29
  }
@@ -0,0 +1,9 @@
1
+ import { HardwareErrorCode } from './HardwareError';
2
+
3
+ describe('HardwareErrorCode compatibility', () => {
4
+ test('preserves published values when adding Protocol V2 errors', () => {
5
+ expect(HardwareErrorCode.KaspaPrevTxIdMismatch).toBe(829);
6
+ expect(HardwareErrorCode.DeviceLocked).toBe(830);
7
+ expect(HardwareErrorCode.WalletSessionInvalid).toBe(831);
8
+ });
9
+ });
@@ -485,15 +485,15 @@ export const HardwareErrorCode = {
485
485
  PinMismatch: 828,
486
486
 
487
487
  /**
488
- * Protocol V2 device must be unlocked before the requested operation.
489
- * @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
488
+ * Device refused to sign: refTxs don't match the spent input's outpoint
490
489
  */
491
- DeviceLocked: 829,
490
+ KaspaPrevTxIdMismatch: 829,
492
491
 
493
492
  /**
494
- * Device refused to sign: refTxs don't match the spent input's outpoint
493
+ * Protocol V2 device must be unlocked before the requested operation.
494
+ * @params: { failureCode?: string; subcode?: number; firmwareMessage?: string }
495
495
  */
496
- KaspaPrevTxIdMismatch: 830,
496
+ DeviceLocked: 830,
497
497
 
498
498
  /**
499
499
  * The cached wallet session is invalid or has expired.