Skip to content

Commit

Permalink
fix(MockPrivateKeyStore): Honour failOnFetch when retrieving identi…
Browse files Browse the repository at this point in the history
…ty keys
  • Loading branch information
gnarea committed Jun 16, 2022
1 parent 30e141d commit 40a0ce6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/keyStores/testMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export class MockPrivateKeyStore extends PrivateKeyStore {
}

public async retrieveIdentityKey(privateAddress: string): Promise<CryptoKey | null> {
if (this.failOnFetch) {
throw new Error('Denied');
}
return this.identityKeys[privateAddress] ?? null;
}

Expand Down

0 comments on commit 40a0ce6

Please sign in to comment.