@@ -469,7 +469,7 @@ describe('WalletDB', () => {
469
469
const accountA = await useAccountFixture ( node . wallet , 'A' )
470
470
const accountB = await useAccountFixture ( node . wallet , 'B' )
471
471
472
- await walletDb . encryptAccounts ( [ accountA , accountB ] , passphrase )
472
+ await walletDb . encryptAccounts ( passphrase )
473
473
474
474
const encryptedAccountById = new Map < string , EncryptedAccount > ( )
475
475
for await ( const [ id , accountValue ] of walletDb . loadAccounts ( ) ) {
@@ -503,7 +503,7 @@ describe('WalletDB', () => {
503
503
504
504
const accountA = await useAccountFixture ( node . wallet , 'A' )
505
505
const accountB = await useAccountFixture ( node . wallet , 'B' )
506
- await walletDb . encryptAccounts ( [ accountA , accountB ] , passphrase )
506
+ await walletDb . encryptAccounts ( passphrase )
507
507
508
508
const encryptedAccountById = new Map < string , EncryptedAccount > ( )
509
509
for await ( const [ id , accountValue ] of walletDb . loadAccounts ( ) ) {
@@ -522,7 +522,7 @@ describe('WalletDB', () => {
522
522
const encryptedAccountB = encryptedAccountById . get ( accountB . id )
523
523
Assert . isNotUndefined ( encryptedAccountB )
524
524
525
- await walletDb . decryptAccounts ( [ encryptedAccountA , encryptedAccountB ] , passphrase )
525
+ await walletDb . decryptAccounts ( passphrase )
526
526
527
527
const accountById = new Map < string , Account > ( )
528
528
for await ( const [ id , accountValue ] of walletDb . loadAccounts ( ) ) {
@@ -551,7 +551,7 @@ describe('WalletDB', () => {
551
551
const accountA = await useAccountFixture ( node . wallet , 'A' )
552
552
const accountB = await useAccountFixture ( node . wallet , 'B' )
553
553
554
- await walletDb . encryptAccounts ( [ accountA , accountB ] , passphrase )
554
+ await walletDb . encryptAccounts ( passphrase )
555
555
556
556
const encryptedAccountById = new Map < string , EncryptedAccount > ( )
557
557
for await ( const [ id , accountValue ] of walletDb . loadAccounts ( ) ) {
@@ -570,9 +570,9 @@ describe('WalletDB', () => {
570
570
const encryptedAccountB = encryptedAccountById . get ( accountB . id )
571
571
Assert . isNotUndefined ( encryptedAccountB )
572
572
573
- await expect (
574
- walletDb . decryptAccounts ( [ encryptedAccountA , encryptedAccountB ] , invalidPassphrase ) ,
575
- ) . rejects . toThrow ( AccountDecryptionFailedError )
573
+ await expect ( walletDb . decryptAccounts ( invalidPassphrase ) ) . rejects . toThrow (
574
+ AccountDecryptionFailedError ,
575
+ )
576
576
} )
577
577
} )
578
578
@@ -595,9 +595,9 @@ describe('WalletDB', () => {
595
595
const walletDb = node . wallet . walletDb
596
596
const passphrase = 'test'
597
597
598
- const accountA = await useAccountFixture ( node . wallet , 'A' )
599
- const accountB = await useAccountFixture ( node . wallet , 'B' )
600
- await walletDb . encryptAccounts ( [ accountA , accountB ] , passphrase )
598
+ await useAccountFixture ( node . wallet , 'A' )
599
+ await useAccountFixture ( node . wallet , 'B' )
600
+ await walletDb . encryptAccounts ( passphrase )
601
601
602
602
expect ( await walletDb . accountsEncrypted ( ) ) . toBe ( true )
603
603
} )
0 commit comments