Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Add encryptor types (#293)
Browse files Browse the repository at this point in the history
* add encryptor types

* test: refactor tests

* refactor: rename KeyEncryptor to ExportableKeyEncryptor

* docs: add encryptor type jsdocs

* refactor: use json type instead of generic

* refactor: MockEncryptor implements ExportableKeyEncryptor

* docs: fix typo

* refactor: rename unsupported key export error enum

* refactor: use persistAllKeyrings to recreate vault

* refactor: remove unused method from type

* refactor: make encryptor and cacheEncryptionKey private

* apply @mcmire suggestions

Co-authored-by: Elliot Winkler <[email protected]>

* chore: bump browser-passworder

* refactor: salt must be defined when key is present

* refactor: unlockKeyrings tests

* refactor: KeyringControllerState type

* refactor: enforce encryptor and cacheEncryptionKey types

---------

Co-authored-by: Elliot Winkler <[email protected]>
  • Loading branch information
mikesposito and mcmire authored Nov 14, 2023
1 parent 48d19af commit 75b4893
Show file tree
Hide file tree
Showing 9 changed files with 440 additions and 169 deletions.
8 changes: 4 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ module.exports = {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 71.42,
functions: 92.85,
lines: 90.68,
statements: 90.9,
branches: 79.41,
functions: 93.22,
lines: 91.5,
statements: 91.69,
},
},
preset: 'ts-jest',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
},
"dependencies": {
"@ethereumjs/tx": "^4.2.0",
"@metamask/browser-passworder": "^4.1.0",
"@metamask/browser-passworder": "^4.2.0",
"@metamask/eth-hd-keyring": "^7.0.1",
"@metamask/eth-sig-util": "^7.0.0",
"@metamask/eth-simple-keyring": "^6.0.1",
"@metamask/obs-store": "^8.1.0",
"@metamask/utils": "^8.1.0"
"@metamask/utils": "^8.2.0"
},
"devDependencies": {
"@ethereumjs/wallet": "^2.0.0",
Expand Down
Loading

0 comments on commit 75b4893

Please sign in to comment.