@onekeyfe/hd-core 1.2.0-alpha.22 → 1.2.0-alpha.23

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.
Files changed (61) hide show
  1. package/__tests__/DeviceCommands.test.ts +8 -8
  2. package/__tests__/device-settings.test.ts +1 -1
  3. package/__tests__/device-wallet-session-store.test.ts +41 -0
  4. package/__tests__/firmware-update/check-all-firmware-release.test.ts +86 -0
  5. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +13 -0
  6. package/__tests__/logBlockEvent.test.ts +17 -0
  7. package/__tests__/open-wallet-session.test.ts +90 -31
  8. package/__tests__/protocol-v2.test.ts +301 -63
  9. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  10. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  11. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  12. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  13. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  14. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  15. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  16. package/dist/api/firmware/FirmwareArtifactSource.d.ts +0 -1
  17. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -1
  18. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +0 -1
  19. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -1
  20. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +6 -1
  21. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -1
  22. package/dist/core/index.d.ts.map +1 -1
  23. package/dist/device/Device.d.ts +3 -2
  24. package/dist/device/Device.d.ts.map +1 -1
  25. package/dist/device/DeviceCommands.d.ts.map +1 -1
  26. package/dist/events/device.d.ts +1 -0
  27. package/dist/events/device.d.ts.map +1 -1
  28. package/dist/events/logBlockEvent.d.ts.map +1 -1
  29. package/dist/events/ui-request.d.ts +1 -0
  30. package/dist/events/ui-request.d.ts.map +1 -1
  31. package/dist/index.d.ts +10 -6
  32. package/dist/index.js +157 -268
  33. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -1
  34. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
  35. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  36. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  37. package/dist/utils/patch.d.ts +1 -1
  38. package/dist/utils/patch.d.ts.map +1 -1
  39. package/package.json +4 -4
  40. package/src/api/CheckAllFirmwareRelease.ts +15 -8
  41. package/src/api/FirmwareUpdateV2.ts +8 -1
  42. package/src/api/FirmwareUpdateV3.ts +8 -0
  43. package/src/api/FirmwareUpdateV4.ts +21 -19
  44. package/src/api/GetPassphraseState.ts +11 -5
  45. package/src/api/device/DeviceUpdateBootloader.ts +9 -1
  46. package/src/api/device/DeviceWipe.ts +2 -0
  47. package/src/api/firmware/FirmwareArtifactSource.ts +1 -1
  48. package/src/api/firmware/FirmwareUpdatePlan.ts +1 -1
  49. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +15 -1
  50. package/src/core/index.ts +1 -0
  51. package/src/data/messages/messages-protocol-v2.json +18 -57
  52. package/src/device/Device.ts +30 -7
  53. package/src/device/DeviceCommands.ts +24 -151
  54. package/src/events/device.ts +1 -0
  55. package/src/events/logBlockEvent.ts +1 -15
  56. package/src/events/ui-request.ts +1 -0
  57. package/src/protocols/protocol-v2/deviceSession.ts +1 -1
  58. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +0 -1
  59. package/src/protocols/protocol-v2/walletSession.ts +41 -20
  60. package/src/types/api/getPassphraseState.ts +4 -3
  61. package/src/utils/deviceInfoUtils.ts +3 -16
@@ -1,5 +1,5 @@
1
1
  import { EFirmwareType, HardwareErrorCode } from '@onekeyfe/hd-shared';
2
- import { DeviceRebootType, DeviceSettingsPage } from '@onekeyfe/hd-transport';
2
+ import { DeviceRebootType, DeviceSessionPinType, DeviceSettingsPage } from '@onekeyfe/hd-transport';
3
3
 
4
4
  import * as firmwareBinaryApi from '../src/api/firmware/getBinary';
5
5
  import DnxGetAddress from '../src/api/dynex/DnxGetAddress';
@@ -898,9 +898,15 @@ describe('Protocol V2 feature adapter', () => {
898
898
  });
899
899
 
900
900
  expect(promptPassphrase).toHaveBeenCalled();
901
- expect(typedCall).toHaveBeenCalledWith('DeviceSessionOpen', 'DeviceSession', {
902
- select: { host_passphrase: { passphrase: 'hidden secret' } },
903
- });
901
+ expect(typedCall).toHaveBeenCalledWith(
902
+ 'DeviceSessionAskPassphrase',
903
+ 'Success',
904
+ {},
905
+ {
906
+ timeoutMs: 120_000,
907
+ }
908
+ );
909
+ expect(typedCall).toHaveBeenCalledWith('DeviceSessionGet', 'DeviceSession', {});
904
910
  });
905
911
 
906
912
  test('deviceStatusGet returns raw DeviceStatus and updates dynamic features', async () => {
@@ -1004,8 +1010,8 @@ describe('Protocol V2 feature adapter', () => {
1004
1010
  newSession: 'session-b',
1005
1011
  });
1006
1012
 
1007
- expect(typedCall).toHaveBeenCalledWith('DeviceSessionOpen', 'DeviceSession', {
1008
- resume: { session_id: 'session-a' },
1013
+ expect(typedCall).toHaveBeenCalledWith('DeviceSessionGet', 'DeviceSession', {
1014
+ session_id: 'session-a',
1009
1015
  });
1010
1016
  expect(device.getInternalState()).toBe('session-b');
1011
1017
  });
@@ -1072,7 +1078,7 @@ describe('Protocol V2 feature adapter', () => {
1072
1078
  });
1073
1079
  expect(typedCall.mock.calls).toEqual([
1074
1080
  ['ProtocolInfoRequest', 'ProtocolInfo', { eventless_wallet_session: true }],
1075
- ['DeviceSessionOpen', 'DeviceSession', { resume: { session_id: 'session-a' } }],
1081
+ ['DeviceSessionGet', 'DeviceSession', { session_id: 'session-a' }],
1076
1082
  ]);
1077
1083
  expect(promptPassphrase).not.toHaveBeenCalled();
1078
1084
  expect(device.getInternalState()).toBeUndefined();
@@ -1112,11 +1118,7 @@ describe('Protocol V2 feature adapter', () => {
1112
1118
  });
1113
1119
  expect(typedCall.mock.calls).toEqual([
1114
1120
  ['ProtocolInfoRequest', 'ProtocolInfo', { eventless_wallet_session: true }],
1115
- [
1116
- 'DeviceSessionOpen',
1117
- 'DeviceSession',
1118
- { select: { host_passphrase: { passphrase: 'new-secret' } } },
1119
- ],
1121
+ ['DeviceSessionAskPassphrase', 'Success', {}, { timeoutMs: 120_000 }],
1120
1122
  ]);
1121
1123
  });
1122
1124
 
@@ -1155,7 +1157,7 @@ describe('Protocol V2 feature adapter', () => {
1155
1157
  expect(device.getInternalState()).toBeUndefined();
1156
1158
  });
1157
1159
 
1158
- test('unlocks and retries DeviceSessionOpen when wallet selection is locked', async () => {
1160
+ test('unlocks and retries DeviceSessionAskPassphrase when wallet selection is locked', async () => {
1159
1161
  const device = Device.fromDescriptor({
1160
1162
  id: 'cache-device-4',
1161
1163
  path: 'cache-path-4',
@@ -1172,6 +1174,7 @@ describe('Protocol V2 feature adapter', () => {
1172
1174
  .fn()
1173
1175
  .mockResolvedValueOnce({ message: { version: 2 } })
1174
1176
  .mockRejectedValueOnce(lockedError)
1177
+ .mockResolvedValueOnce({ message: { message: 'passphrase prepared' } })
1175
1178
  .mockResolvedValueOnce({
1176
1179
  message: {
1177
1180
  session_id: 'session-after-unlock',
@@ -1189,7 +1192,7 @@ describe('Protocol V2 feature adapter', () => {
1189
1192
  passphraseState: 'state-after-unlock',
1190
1193
  });
1191
1194
  expect(unlockDevice).toHaveBeenCalledTimes(1);
1192
- expect(typedCall).toHaveBeenCalledTimes(3);
1195
+ expect(typedCall).toHaveBeenCalledTimes(4);
1193
1196
  });
1194
1197
 
1195
1198
  test('does not request a Pro2 wallet session before features are initialized', async () => {
@@ -1321,24 +1324,29 @@ describe('Protocol V2 feature adapter', () => {
1321
1324
  );
1322
1325
  });
1323
1326
 
1324
- test('does not expose getPassphraseState on Pro2 devices', async () => {
1327
+ test('maps the legacy getPassphraseState App flow to the Pro2 wallet session protocol', async () => {
1325
1328
  const features = {
1326
- deviceId: null,
1329
+ deviceId: 'pro2-device-id',
1327
1330
  deviceType: 'pro2',
1328
1331
  firmwareVersion: '4.15.0',
1329
1332
  passphraseProtection: true,
1330
1333
  sessionId: 'feature-session',
1331
1334
  unlockedAttachPin: true,
1332
1335
  };
1333
- const typedCall = jest.fn().mockResolvedValue({
1334
- type: 'DeviceSession',
1335
- message: {
1336
- btc_test_address: 'state-pro2',
1337
- session_id: 'session-pro2',
1338
- },
1339
- });
1336
+ const typedCall = jest
1337
+ .fn()
1338
+ .mockResolvedValueOnce({ message: { eventless_wallet_session: true } })
1339
+ .mockResolvedValueOnce({ message: { message: 'passphrase prepared' } })
1340
+ .mockResolvedValueOnce({
1341
+ type: 'DeviceSession',
1342
+ message: {
1343
+ btc_test_address: 'state-pro2',
1344
+ session_id: 'session-pro2',
1345
+ },
1346
+ });
1340
1347
  const updateInternalState = jest.fn();
1341
1348
  const getFeatures = jest.fn().mockResolvedValue(features);
1349
+ const promptPassphrase = jest.fn().mockResolvedValue({ passphrase: 'legacy app secret' });
1342
1350
  const method = new GetPassphraseState({
1343
1351
  payload: {
1344
1352
  method: 'getPassphraseState',
@@ -1350,21 +1358,91 @@ describe('Protocol V2 feature adapter', () => {
1350
1358
  features,
1351
1359
  commands: {
1352
1360
  typedCall,
1353
- promptPassphrase: jest.fn().mockResolvedValue({ passphrase: 'state-pro2-new-secret' }),
1361
+ promptPassphrase,
1354
1362
  },
1363
+ emit: jest.fn(),
1355
1364
  updateInternalState,
1356
1365
  getFeatures,
1357
1366
  getCurrentDeviceType: () => 'pro2',
1358
- getCurrentDeviceId: () => undefined,
1367
+ getCurrentDeviceId: () => 'pro2-device-id',
1359
1368
  getCurrentPassphraseProtection: () => true,
1360
1369
  }) as any;
1361
1370
 
1362
- await expect(method.run()).rejects.toMatchObject({
1363
- errorCode: HardwareErrorCode.DeviceNotSupportMethod,
1364
- });
1371
+ await expect(method.run()).resolves.toBe('state-pro2');
1372
+ expect(promptPassphrase).toHaveBeenCalledWith(
1373
+ expect.objectContaining({ deviceOnly: true }),
1374
+ expect.anything()
1375
+ );
1376
+ expect(updateInternalState).toHaveBeenCalledWith(
1377
+ true,
1378
+ 'state-pro2',
1379
+ 'pro2-device-id',
1380
+ 'session-pro2',
1381
+ null
1382
+ );
1383
+ expect(JSON.stringify(typedCall.mock.calls)).not.toContain('legacy app secret');
1365
1384
  expect(getFeatures).not.toHaveBeenCalled();
1366
1385
  });
1367
1386
 
1387
+ test('reuses the Pro2 session opened by legacy getPassphraseState on the next App call', async () => {
1388
+ const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
1389
+ const typedCall = jest.fn().mockImplementation((request: string) => {
1390
+ if (request === 'ProtocolInfoRequest') {
1391
+ return Promise.resolve({ message: { eventless_wallet_session: true } });
1392
+ }
1393
+ if (request === 'DeviceSessionAskPassphrase') {
1394
+ return Promise.resolve({ message: { message: 'passphrase prepared' } });
1395
+ }
1396
+ if (request === 'DeviceSessionGet') {
1397
+ return Promise.resolve({
1398
+ type: 'DeviceSession',
1399
+ message: {
1400
+ btc_test_address: 'state-pro2-app',
1401
+ session_id: 'session-pro2-app',
1402
+ },
1403
+ });
1404
+ }
1405
+ throw new Error(`Unexpected request: ${request}`);
1406
+ });
1407
+
1408
+ (device as any).features = normalizeProtocolV2Features(
1409
+ { ...descriptor, protocolType: 'V2' } as any,
1410
+ {
1411
+ status: {
1412
+ device_id: 'pro2-app-device-id',
1413
+ unlocked: true,
1414
+ passphrase_enabled: true,
1415
+ },
1416
+ }
1417
+ );
1418
+ (device as any).commands = {
1419
+ typedCall,
1420
+ promptPassphrase: jest.fn().mockResolvedValue({ passphraseOnDevice: true }),
1421
+ };
1422
+
1423
+ const method = new GetPassphraseState({
1424
+ payload: {
1425
+ method: 'getPassphraseState',
1426
+ connectId: 'connect-id',
1427
+ initSession: true,
1428
+ },
1429
+ });
1430
+ method.device = device;
1431
+
1432
+ await expect(method.run()).resolves.toBe('state-pro2-app');
1433
+
1434
+ await device.initialize({ passphraseState: 'state-pro2-app' });
1435
+ typedCall.mockClear();
1436
+
1437
+ await expect(device.checkPassphraseStateSafety('state-pro2-app', false, false)).resolves.toBe(
1438
+ true
1439
+ );
1440
+ expect(typedCall.mock.calls).toEqual([
1441
+ ['ProtocolInfoRequest', 'ProtocolInfo', { eventless_wallet_session: true }],
1442
+ ['DeviceSessionGet', 'DeviceSession', { session_id: 'session-pro2-app' }],
1443
+ ]);
1444
+ });
1445
+
1368
1446
  test('uses the Pro2 standard wallet without passphraseState when passphrase is disabled', async () => {
1369
1447
  const features = {
1370
1448
  deviceId: 'pro2-device-id',
@@ -1379,6 +1457,7 @@ describe('Protocol V2 feature adapter', () => {
1379
1457
  payload: {
1380
1458
  method: 'getPassphraseState',
1381
1459
  connectId: 'connect-id',
1460
+ useEmptyPassphrase: true,
1382
1461
  },
1383
1462
  });
1384
1463
  method.device = stubDevice({
@@ -1394,10 +1473,10 @@ describe('Protocol V2 feature adapter', () => {
1394
1473
  getCurrentPassphraseProtection: () => false,
1395
1474
  }) as any;
1396
1475
 
1397
- await expect(method.run()).rejects.toMatchObject({
1398
- errorCode: HardwareErrorCode.DeviceNotSupportMethod,
1476
+ await expect(method.run()).resolves.toBeUndefined();
1477
+ expect(typedCall).toHaveBeenCalledWith('ProtocolInfoRequest', 'ProtocolInfo', {
1478
+ eventless_wallet_session: true,
1399
1479
  });
1400
- expect(typedCall).not.toHaveBeenCalled();
1401
1480
  expect(updateInternalState).not.toHaveBeenCalled();
1402
1481
  });
1403
1482
 
@@ -1410,12 +1489,17 @@ describe('Protocol V2 feature adapter', () => {
1410
1489
  sessionId: 'old-feature-session',
1411
1490
  unlockedAttachPin: false,
1412
1491
  };
1413
- const typedCall = jest.fn().mockResolvedValue({
1414
- type: 'DeviceSession',
1415
- message: {
1416
- btc_test_address: 'state-pro2-new',
1417
- },
1418
- });
1492
+ const typedCall = jest
1493
+ .fn()
1494
+ .mockResolvedValueOnce({ message: { eventless_wallet_session: true } })
1495
+ .mockResolvedValueOnce({ message: { message: 'passphrase prepared' } })
1496
+ .mockResolvedValueOnce({
1497
+ type: 'DeviceSession',
1498
+ message: {
1499
+ btc_test_address: 'state-pro2-new',
1500
+ session_id: 'session-pro2-new',
1501
+ },
1502
+ });
1419
1503
  const clearInternalState = jest.fn();
1420
1504
  const updateInternalState = jest.fn();
1421
1505
  const method = new GetPassphraseState({
@@ -1428,21 +1512,28 @@ describe('Protocol V2 feature adapter', () => {
1428
1512
  method.device = stubDevice({
1429
1513
  originalDescriptor: { ...descriptor, protocolType: 'V2' },
1430
1514
  features,
1515
+ passphraseState: 'state-pro2-old',
1431
1516
  commands: {
1432
1517
  typedCall,
1433
1518
  promptPassphrase: jest.fn().mockResolvedValue({ passphrase: 'state-pro2-new-secret' }),
1434
1519
  },
1520
+ emit: jest.fn(),
1435
1521
  clearInternalState,
1436
1522
  updateInternalState,
1437
1523
  getCurrentDeviceId: () => 'pro2-device-id',
1438
1524
  getCurrentPassphraseProtection: () => true,
1439
1525
  }) as any;
1440
1526
 
1441
- await expect(method.run()).rejects.toMatchObject({
1442
- errorCode: HardwareErrorCode.DeviceNotSupportMethod,
1443
- });
1444
- expect(clearInternalState).not.toHaveBeenCalled();
1445
- expect(updateInternalState).not.toHaveBeenCalled();
1527
+ await expect(method.run()).resolves.toBe('state-pro2-new');
1528
+ expect(clearInternalState).toHaveBeenCalledTimes(1);
1529
+ expect((method.device as any).passphraseState).toBeUndefined();
1530
+ expect(updateInternalState).toHaveBeenCalledWith(
1531
+ true,
1532
+ 'state-pro2-new',
1533
+ 'pro2-device-id',
1534
+ 'session-pro2-new',
1535
+ null
1536
+ );
1446
1537
  });
1447
1538
 
1448
1539
  test('stores Pro2 passphrase session cache without synthetic device id', async () => {
@@ -1517,9 +1608,7 @@ describe('Protocol V2 feature adapter', () => {
1517
1608
  expect(device.getInternalState()).toBeUndefined();
1518
1609
  device.passphraseState = 'state-auto';
1519
1610
  expect(device.getInternalState()).toBe('session-auto');
1520
- expect(typedCall).toHaveBeenLastCalledWith('DeviceSessionOpen', 'DeviceSession', {
1521
- select: { host_passphrase: { passphrase: 'state-auto-secret' } },
1522
- });
1611
+ expect(typedCall).toHaveBeenLastCalledWith('DeviceSessionGet', 'DeviceSession', {});
1523
1612
  });
1524
1613
 
1525
1614
  test('does not mark Pro2 passphrase enabled from a main PIN session alone', async () => {
@@ -1592,9 +1681,15 @@ describe('Protocol V2 feature adapter', () => {
1592
1681
  );
1593
1682
 
1594
1683
  expect(device.getInternalState()).toBeUndefined();
1595
- expect(typedCall).toHaveBeenNthCalledWith(2, 'DeviceSessionOpen', 'DeviceSession', {
1596
- select: { host_passphrase: { passphrase: 'expected-secret' } },
1597
- });
1684
+ expect(typedCall).toHaveBeenNthCalledWith(
1685
+ 2,
1686
+ 'DeviceSessionAskPassphrase',
1687
+ 'Success',
1688
+ {},
1689
+ {
1690
+ timeoutMs: 120_000,
1691
+ }
1692
+ );
1598
1693
  });
1599
1694
 
1600
1695
  test('useEmptyPassphrase ignores a stale hidden-wallet state during Protocol V2 safety check', async () => {
@@ -1696,7 +1791,7 @@ describe('Protocol V2 feature adapter', () => {
1696
1791
  uuid: 'CACHED-SERIAL',
1697
1792
  deviceId: null,
1698
1793
  bleName: 'Cached BLE',
1699
- name: 'Cached BLE',
1794
+ name: 'Cached Label',
1700
1795
  label: 'Cached Label',
1701
1796
  deviceType: 'pro2',
1702
1797
  });
@@ -1705,6 +1800,38 @@ describe('Protocol V2 feature adapter', () => {
1705
1800
  expect(device.hasUsePassphrase()).toBe(true);
1706
1801
  });
1707
1802
 
1803
+ test('keeps an empty Protocol V2 label distinct from the BLE name', () => {
1804
+ const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
1805
+ (device as any).features = {
1806
+ ...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
1807
+ serialNo: 'PR9999999999',
1808
+ label: null,
1809
+ bleName: 'Pro2 6136',
1810
+ };
1811
+
1812
+ expect(device.toMessageObject()).toMatchObject({
1813
+ serialNo: 'PR9999999999',
1814
+ bleName: 'Pro2 6136',
1815
+ name: 'Pro2 6136',
1816
+ label: '',
1817
+ });
1818
+ });
1819
+
1820
+ test('prefers the real Protocol V2 label over the BLE name for display', () => {
1821
+ const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
1822
+ (device as any).features = {
1823
+ ...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
1824
+ label: 'My Pro 2',
1825
+ bleName: 'Pro2 6136',
1826
+ };
1827
+
1828
+ expect(device.toMessageObject()).toMatchObject({
1829
+ bleName: 'Pro2 6136',
1830
+ name: 'My Pro 2',
1831
+ label: 'My Pro 2',
1832
+ });
1833
+ });
1834
+
1708
1835
  test('syncs Protocol V2 cached features without cached profile', () => {
1709
1836
  const cached = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
1710
1837
  (cached as any).features = {
@@ -2166,7 +2293,7 @@ describe('Protocol V2 feature adapter', () => {
2166
2293
  await expect(method.run()).resolves.toEqual({ address: '0x0', signature: '0x1' });
2167
2294
  });
2168
2295
 
2169
- test('unlocks Protocol V2 devices via DeviceSessionAskPin regardless of Pro-series version gates', async () => {
2296
+ test('unlocks Protocol V2 devices with the main PIN regardless of Pro-series version gates', async () => {
2170
2297
  const device = Device.fromDescriptor({
2171
2298
  path: 'usb-path',
2172
2299
  protocolType: 'V2',
@@ -2206,7 +2333,12 @@ describe('Protocol V2 feature adapter', () => {
2206
2333
  const features = await device.unlockDevice();
2207
2334
 
2208
2335
  expect(typedCall.mock.calls).toEqual([
2209
- ['DeviceSessionAskPin', 'Success', undefined, { timeoutMs: 120_000 }],
2336
+ [
2337
+ 'DeviceSessionAskPin',
2338
+ 'Success',
2339
+ { type: DeviceSessionPinType.Main },
2340
+ { timeoutMs: 120_000 },
2341
+ ],
2210
2342
  ['DeviceStatusGet', 'DeviceStatus', {}],
2211
2343
  ]);
2212
2344
  expect(typedCall).not.toHaveBeenCalledWith('GetAddress', 'Address', expect.anything());
@@ -2254,7 +2386,12 @@ describe('Protocol V2 feature adapter', () => {
2254
2386
  await device.unlockDevice();
2255
2387
 
2256
2388
  expect(typedCall.mock.calls).toEqual([
2257
- ['DeviceSessionAskPin', 'Success', undefined, { timeoutMs: 120_000 }],
2389
+ [
2390
+ 'DeviceSessionAskPin',
2391
+ 'Success',
2392
+ { type: DeviceSessionPinType.Main },
2393
+ { timeoutMs: 120_000 },
2394
+ ],
2258
2395
  ['DeviceStatusGet', 'DeviceStatus', {}],
2259
2396
  ]);
2260
2397
  expect((device as any).profile).toBeUndefined();
@@ -2284,10 +2421,15 @@ describe('Protocol V2 feature adapter', () => {
2284
2421
  );
2285
2422
  expect(typedCall).toHaveBeenCalledTimes(1);
2286
2423
  expect(typedCall.mock.calls).toEqual([
2287
- ['DeviceSessionAskPin', 'Success', undefined, { timeoutMs: 120_000 }],
2424
+ [
2425
+ 'DeviceSessionAskPin',
2426
+ 'Success',
2427
+ { type: DeviceSessionPinType.Main },
2428
+ { timeoutMs: 120_000 },
2429
+ ],
2288
2430
  ]);
2289
2431
  expect(typedCall).not.toHaveBeenCalledWith(
2290
- 'DeviceSessionOpen',
2432
+ 'DeviceSessionGet',
2291
2433
  'DeviceSession',
2292
2434
  expect.anything()
2293
2435
  );
@@ -3298,6 +3440,29 @@ describe('Protocol V2 firmware update targets', () => {
3298
3440
  ).toThrow('expected 131072');
3299
3441
  });
3300
3442
 
3443
+ test('does not fail a completed multi-app install when final app versions are unobservable', () => {
3444
+ const method = new FirmwareUpdateV4({
3445
+ id: 1,
3446
+ payload: {
3447
+ method: 'firmwareUpdateV4',
3448
+ platform: 'desktop',
3449
+ targetsToUpdate: ['app_v1', 'app_v2'],
3450
+ expectedTargetVersions: {
3451
+ app_v1: '1.0.0',
3452
+ app_v2: '2.0.0',
3453
+ },
3454
+ },
3455
+ });
3456
+ method.init();
3457
+ (method as any).protocolV2LatestFinalFeatures = {
3458
+ major_version: 3,
3459
+ minor_version: 0,
3460
+ patch_version: 0,
3461
+ };
3462
+
3463
+ expect(() => (method as any).assertExpectedProtocolV2Versions()).not.toThrow();
3464
+ });
3465
+
3301
3466
  test('polls target status after update ACK and finishes when all targets complete', async () => {
3302
3467
  const method = new FirmwareUpdateV4({
3303
3468
  id: 1,
@@ -3923,6 +4088,58 @@ describe('Protocol V2 firmware update targets', () => {
3923
4088
  getFirmwareLatestReleaseSpy.mockRestore();
3924
4089
  });
3925
4090
 
4091
+ test('rejects prepared RESC bundle paths before opening an artifact source', async () => {
4092
+ const method = new FirmwareUpdateV4({
4093
+ id: 1,
4094
+ payload: {
4095
+ method: 'firmwareUpdateV4',
4096
+ },
4097
+ });
4098
+ const openPreparedSource = jest.fn();
4099
+ (method as any).params = {
4100
+ targetsToUpdate: ['resource'],
4101
+ resourceBundleArtifacts: [
4102
+ {
4103
+ name: 'images',
4104
+ artifact: {
4105
+ artifactRef: `fw:${'a'.repeat(64)}`,
4106
+ size: 1,
4107
+ sha256: 'a'.repeat(64),
4108
+ },
4109
+ },
4110
+ ],
4111
+ };
4112
+ (method as any).openProtocolV2PreparedSource = openPreparedSource;
4113
+ const getFirmwareLatestReleaseSpy = jest
4114
+ .spyOn(DataManager, 'getFirmwareLatestRelease')
4115
+ .mockReturnValue({
4116
+ required: false,
4117
+ version: [1, 0, 0],
4118
+ url: '',
4119
+ resourceBundles: [
4120
+ {
4121
+ name: 'images',
4122
+ url: 'https://example.com/images.okpkg',
4123
+ devicePath: 'vol0:/resource/../images.okpkg',
4124
+ },
4125
+ ],
4126
+ fingerprint: '',
4127
+ changelog: {
4128
+ 'zh-CN': '',
4129
+ 'en-US': '',
4130
+ },
4131
+ });
4132
+
4133
+ await expect(
4134
+ (method as any).prepareProtocolV2ResourceSources('universal', {
4135
+ deviceType: 'pro2',
4136
+ })
4137
+ ).rejects.toThrow('resourceBundles[].devicePath');
4138
+ expect(openPreparedSource).not.toHaveBeenCalled();
4139
+
4140
+ getFirmwareLatestReleaseSpy.mockRestore();
4141
+ });
4142
+
3926
4143
  test('downloads and validates remote RESC bundles before entering bootloader', async () => {
3927
4144
  const method = new FirmwareUpdateV4({
3928
4145
  id: 1,
@@ -4803,19 +5020,19 @@ describe('Protocol V2 firmware reconnect identity', () => {
4803
5020
  expect((method as any).params.expectedDeviceId).toBe('persisted-device-id');
4804
5021
  });
4805
5022
 
4806
- test('requires the same physical serial before firmware transfer resumes', () => {
5023
+ test('rejects a different physical serial before firmware transfer resumes', () => {
4807
5024
  expect(() => assertProtocolV2ReconnectIdentity('expected-serial', 'other-serial')).toThrow(
4808
5025
  'identity mismatch'
4809
5026
  );
4810
- expect(() => assertProtocolV2ReconnectIdentity('expected-serial', undefined)).toThrow(
4811
- 'identity unavailable'
4812
- );
4813
5027
  expect(() =>
4814
5028
  assertProtocolV2ReconnectIdentity('expected-serial', 'expected-serial')
4815
5029
  ).not.toThrow();
4816
- expect(() => assertProtocolV2ReconnectIdentity(undefined, 'actual-serial')).toThrow(
4817
- 'identity unavailable'
4818
- );
5030
+ });
5031
+
5032
+ test('allows firmware update when the optional physical serial is unavailable', () => {
5033
+ expect(() => assertProtocolV2ReconnectIdentity('expected-serial', undefined)).not.toThrow();
5034
+ expect(() => assertProtocolV2ReconnectIdentity(undefined, 'actual-serial')).not.toThrow();
5035
+ expect(() => assertProtocolV2ReconnectIdentity(undefined, undefined)).not.toThrow();
4819
5036
  });
4820
5037
 
4821
5038
  test('captures physical identity from active DeviceInfo instead of wallet deviceId', async () => {
@@ -5218,22 +5435,27 @@ describe('Protocol V2 protected method execution', () => {
5218
5435
  describe('Protocol V2 current low-level methods', () => {
5219
5436
  test('routes device wipe to the Pro2 reset page until the operation completes', async () => {
5220
5437
  const v1TypedCall = jest.fn().mockResolvedValue({ message: { message: 'wiped' } });
5438
+ const v1InvalidateAfterWipe = jest.fn();
5221
5439
  const v1Method = new DeviceWipe({ id: 1, payload: { method: 'deviceWipe' } });
5222
5440
  v1Method.init();
5223
5441
  (v1Method as any).device = stubDevice({
5224
5442
  isProtocolV2: () => false,
5225
5443
  commands: { typedCall: v1TypedCall },
5444
+ invalidateAfterWipe: v1InvalidateAfterWipe,
5226
5445
  });
5227
5446
 
5228
5447
  await v1Method.run();
5229
5448
  expect(v1TypedCall).toHaveBeenCalledWith('WipeDevice', 'Success');
5449
+ expect(v1InvalidateAfterWipe).toHaveBeenCalledTimes(1);
5230
5450
 
5231
5451
  const v2TypedCall = jest.fn().mockResolvedValue({ message: { message: 'accepted' } });
5452
+ const v2InvalidateAfterWipe = jest.fn();
5232
5453
  const v2Method = new DeviceWipe({ id: 2, payload: { method: 'deviceWipe' } });
5233
5454
  v2Method.init();
5234
5455
  (v2Method as any).device = stubDevice({
5235
5456
  isProtocolV2: () => true,
5236
5457
  commands: { typedCall: v2TypedCall },
5458
+ invalidateAfterWipe: v2InvalidateAfterWipe,
5237
5459
  });
5238
5460
 
5239
5461
  await expect(v2Method.run()).resolves.toEqual({ message: 'accepted' });
@@ -5241,6 +5463,7 @@ describe('Protocol V2 current low-level methods', () => {
5241
5463
  expect(v2TypedCall).toHaveBeenCalledWith('DeviceSettingsPageShow', 'Success', {
5242
5464
  page: DeviceSettingsPage.DeviceReset,
5243
5465
  });
5466
+ expect(v2InvalidateAfterWipe).toHaveBeenCalledTimes(1);
5244
5467
  expect(v2Method.protocolV2UiInteraction).toEqual({
5245
5468
  request: 'button',
5246
5469
  source: 'method-lifecycle',
@@ -5252,6 +5475,21 @@ describe('Protocol V2 current low-level methods', () => {
5252
5475
  });
5253
5476
  });
5254
5477
 
5478
+ test('keeps the existing identity cache when device wipe fails', async () => {
5479
+ const wipeError = new Error('wipe failed');
5480
+ const invalidateAfterWipe = jest.fn();
5481
+ const method = new DeviceWipe({ id: 1, payload: { method: 'deviceWipe' } });
5482
+ method.init();
5483
+ (method as any).device = stubDevice({
5484
+ isProtocolV2: () => true,
5485
+ commands: { typedCall: jest.fn().mockRejectedValue(wipeError) },
5486
+ invalidateAfterWipe,
5487
+ });
5488
+
5489
+ await expect(method.run()).rejects.toBe(wipeError);
5490
+ expect(invalidateAfterWipe).not.toHaveBeenCalled();
5491
+ });
5492
+
5255
5493
  test('routes Change PIN by protocol and waits for the Pro2 operation result', async () => {
5256
5494
  const v1TypedCall = jest.fn().mockResolvedValue({ message: { message: 'ok' } });
5257
5495
  const v1Method = new DeviceChangePin({
@@ -5402,14 +5640,12 @@ describe('Protocol V2 current low-level methods', () => {
5402
5640
  });
5403
5641
 
5404
5642
  test.each([
5405
- ['label', { label: 'My Pro 2' }],
5406
5643
  ['language', { language: 'ja' }],
5407
5644
  ['brightness', { brightness: 80 }],
5408
5645
  ['haptic feedback', { hapticFeedback: true }],
5409
5646
  [
5410
5647
  'combined lock-free settings',
5411
5648
  {
5412
- label: 'My Pro 2',
5413
5649
  language: 'ja',
5414
5650
  brightness: 80,
5415
5651
  hapticFeedback: true,
@@ -5427,8 +5663,10 @@ describe('Protocol V2 current low-level methods', () => {
5427
5663
  });
5428
5664
 
5429
5665
  test.each([
5666
+ ['label', { label: 'My Pro 2' }],
5430
5667
  ['auto lock', { autoLockDelayMs: 60_000 }],
5431
5668
  ['auto shutdown', { autoShutdownDelayMs: 120_000 }],
5669
+ ['label mixed with lock-free settings', { label: 'My Pro 2', brightness: 80 }],
5432
5670
  ['mixed protected settings', { brightness: 80, autoLockDelayMs: 60_000 }],
5433
5671
  ['other protected settings', { usbLockEnabled: true }],
5434
5672
  ])('unlocks before changing unified Protocol V2 %s', (_name, settings) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CheckAllFirmwareRelease.d.ts","sourceRoot":"","sources":["../../src/api/CheckAllFirmwareRelease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU;IAC7D,IAAI;IAME,GAAG;CA8DV"}
1
+ {"version":3,"file":"CheckAllFirmwareRelease.d.ts","sourceRoot":"","sources":["../../src/api/CheckAllFirmwareRelease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU;IAC7D,IAAI;IAME,GAAG;CAqEV"}
@@ -1 +1 @@
1
- {"version":3,"file":"FirmwareUpdateV2.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,aAAa,EAKnB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAqB1C,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,UAAU,CAAC;AAEtD,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAE1F,KAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,yBAAyB,CAAC;KACrC,CAAC,CAAC;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,EAAE,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;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;IAKE,GAAG;CAcV"}
1
+ {"version":3,"file":"GetPassphraseState.d.ts","sourceRoot":"","sources":["../../src/api/GetPassphraseState.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,IAAI;IAKE,GAAG;CAoBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceUpdateBootloader.d.ts","sourceRoot":"","sources":["../../../src/api/device/DeviceUpdateBootloader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAWhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAE7E,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,wBAAwB,CAAC,GAAG,CAAC;IAC/E,IAAI;IAOE,iCAAiC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW;IAoBtE,2CAA2C,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB;IAcvF,qBAAqB,CAAC,EAC1B,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACvB,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,YAAY,EAAE,aAAa,CAAC;QAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC;KAC7B;IA0EK,GAAG;CAoEV"}
1
+ {"version":3,"file":"DeviceUpdateBootloader.d.ts","sourceRoot":"","sources":["../../../src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