Skip to content

Commit

Permalink
test(multi-srp): fix length mismatch unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykLucka committed Feb 14, 2025
1 parent b93bbdf commit 7a6b427
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/keyring-controller/src/KeyringController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,27 @@ describe('KeyringController', () => {
{
skipVaultCreation: true,
state: {
vault: vaultWithOneKeyring,
vault: vaultWithOneKeyring, // pass non-empty vault
keyringsMetadata: [
{ id: '1', name: '' },
{ id: '2', name: '' },
],
},
},
async ({ controller }) => {
async ({ controller, encryptor }) => {
jest.spyOn(encryptor, 'decrypt').mockResolvedValueOnce([
{
type: 'HD Key Tree',
data: {
keyrings: [
{
type: 'HD Key Tree',
accounts: ['0x123'],
},
],
},
},
]);
await controller.submitPassword(password);
await expect(controller.addNewAccount()).rejects.toThrow(
'KeyringController - keyring metadata length mismatch',
Expand Down

0 comments on commit 7a6b427

Please sign in to comment.