Skip to content

Commit 2dac0ae

Browse files
authored
chore(keyring-controller): remove QRKeyring-related code (MetaMask#6031)
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> Dependent on: - ~~MetaMask/accounts#60 This PR removes all code related to the QRKeyring from KeystoneHQ, which we intend to deprecate in favor of the new QRKeyring implementation in the MetaMask accounts monorepo, that fully supports our Keyring type. ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> * Fixes MetaMask#4341 ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
1 parent 3b11144 commit 2dac0ae

7 files changed

Lines changed: 216 additions & 1498 deletions

File tree

eslint-warning-thresholds.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@
193193
"n/no-unsupported-features/node-builtins": 1
194194
},
195195
"packages/keyring-controller/src/KeyringController.test.ts": {
196-
"import-x/namespace": 14,
197-
"jest/no-conditional-in-test": 8
196+
"import-x/namespace": 5,
197+
"jest/no-conditional-in-test": 2
198198
},
199199
"packages/keyring-controller/src/KeyringController.ts": {
200-
"@typescript-eslint/no-unsafe-enum-comparison": 4,
200+
"@typescript-eslint/no-unsafe-enum-comparison": 2,
201201
"@typescript-eslint/no-unused-vars": 1
202202
},
203203
"packages/keyring-controller/tests/mocks/mockKeyring.ts": {

packages/keyring-controller/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Bump `@metamask/keyring-api` from `^20.0.0` to `^20.1.0`
1515
- Bump `@metamask/keyring-internal-api` from `^8.0.0` to `^8.1.0`
1616

17+
### Removed
18+
19+
- **BREAKING:** Removed QR keyring methods ([#6031](https://github.com/MetaMask/core/pull/6031))
20+
- The following methods have been removed:
21+
- `cancelQRSignRequest`
22+
- `cancelQRSynchronization`
23+
- `connectQRHardware`
24+
- `forgetQRDevice`
25+
- `getOrAddQRKeyring`
26+
- `getQRKeyring`
27+
- `getQRKeyringState`
28+
- `resetQRKeyringState`
29+
- `restoreQRKeyring`
30+
- `submitQRCryptoHDKey`
31+
- `submitQRCryptoAccount`
32+
- `submitQRSignature`
33+
- `unlockQRHardwareWalletAccount`
34+
- Consumers can use the `withKeyring` method to select a QR keyring and execute a callback with it as argument.
35+
- **BREAKING:** Removed `KeyringController:qrKeyringStateChange` event ([#6031](https://github.com/MetaMask/core/pull/6031))
36+
1737
## [22.1.1]
1838

1939
### Changed

packages/keyring-controller/jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ module.exports = merge(baseConfig, {
1717
// An object that configures minimum threshold enforcement for coverage results
1818
coverageThreshold: {
1919
global: {
20-
branches: 94.31,
20+
branches: 95.78,
2121
functions: 100,
22-
lines: 98.79,
23-
statements: 98.8,
22+
lines: 98.68,
23+
statements: 98.69,
2424
},
2525
},
2626

packages/keyring-controller/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
},
4949
"dependencies": {
5050
"@ethereumjs/util": "^9.1.0",
51-
"@keystonehq/metamask-airgapped-keyring": "^0.14.1",
5251
"@metamask/base-controller": "^8.1.0",
5352
"@metamask/browser-passworder": "^4.3.0",
5453
"@metamask/eth-hd-keyring": "^12.0.0",
@@ -66,7 +65,6 @@
6665
"devDependencies": {
6766
"@ethereumjs/common": "^4.4.0",
6867
"@ethereumjs/tx": "^5.4.0",
69-
"@keystonehq/bc-ur-registry-eth": "^0.19.0",
7068
"@lavamoat/allow-scripts": "^3.0.4",
7169
"@lavamoat/preinstall-always-fail": "^2.1.0",
7270
"@metamask/auto-changelog": "^3.4.4",

0 commit comments

Comments
 (0)