generated from MetaMask/metamask-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add dedicated OneKey keyring class #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b7350f6
to
2cad266
Compare
This was referenced Feb 7, 2025
Merged
ccharly
reviewed
Feb 11, 2025
ccharly
reviewed
Feb 11, 2025
ccharly
approved these changes
Feb 11, 2025
Akaryatrh
added a commit
to MetaMask/core
that referenced
this pull request
Feb 12, 2025
## Explanation This PR adds support for a dedicated OneKey keyring (until now it was sharing the same keyring instance than Trezor) so it's considered as a standalone device and could get its own tag inside account list. There are two others PRs: - metamask-extension: MetaMask/metamask-extension#29999 - eth-trezor-keyring: MetaMask/accounts#175 ## References Fixes: MetaMask/accounts-planning#793 ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/accounts-controller` - **utils**: add OneKey keyring type - **tests**: update accounts controller unit test with OneKey keyring type ### `@metamask/keyring-controller` - **controller**: add OneKey keyring type ## Checklist - [x] 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 highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
github-merge-queue bot
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Mar 21, 2025
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR adds support for a dedicated OneKey keyring (until now it was sharing the same keyring instance than Trezor) so it's considered as a standalone device and could get its own tag inside account list. There are two others PRs: - eth-trezor-package: MetaMask/accounts#175 - Core (account and keyring controllers): MetaMask/core#5216 [](https://codespaces.new/MetaMask/metamask-extension/pull/29999?quickstart=1) ## **Related issues** Fixes: MetaMask/accounts-planning#793 ## **Manual testing steps** You need both OneKey and Trezor devices to test. Trezor device can be replaced by [this simulator](https://github.com/trezor/trezor-user-env).⚠️ Simulator takes over other devices, you need to disconnect first it if you import a OneKey account. 1. Import one account from Trezor device. 2. Check that it gets the "Trezor" tag below account name in account list 3. Import one account from OneKey device 4. Check that it gets the "OneKey" tag below account name in account list and that account name matches the pattern "OneKey x" ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/37adb368-7d9e-4358-8842-b3b07778d094 ### **After** https://github.com/user-attachments/assets/02ca4fec-f0b5-4822-bd95-b3b9ec9ee933 ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for a dedicated OneKey keyring (until now it was sharing the same keyring instance than Trezor) so it's considered as a standalone device and could get its own tag inside account list.
There are two others PRs:
Fixes: https://github.com/MetaMask/accounts-planning/issues/793