-
-
Notifications
You must be signed in to change notification settings - Fork 254
feat: add patch code from PR 23903 to keyringController. #4256
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
Conversation
|
Thanks, the diff looks good! Had some questions about the changelog entry though. It seems like this fixes a bug, but there is no description of what that bug is at the controller API level. The linked issue only shows the bug's impact upon the extension. Could you clarify, does this code prevent a crash? Or does the QR Keyring get instantiated correctly, but then crash later at runtime? Or does it get instantiated correctly and never crash, but fails to initialize? We can omit the signature change to |
Hi, Mark, following is the bug detail from controller API level.
deserialize(opts) {
if (opts) {
//common props;
this.accounts = opts.accounts;
this.currentAccount = opts.currentAccount;
this.page = opts.page;
this.perPage = opts.perPage;
this.name = opts.name;
this.initialized = opts.initialized;
this.keyringMode = opts.keyringMode || KEYRING_MODE.hd;
this.keyringAccount = opts.keyringAccount || KEYRING_ACCOUNT.standard;
this.xfp = opts.xfp; //hd props;
this.xpub = opts.xpub;
this.hdPath = opts.hdPath;
this.indexes = opts.indexes;
this.paths = opts.paths;
this.childrenPath = opts.childrenPath || DEFAULT_CHILDREN_PATH;
}
}The empty accounts array will set the keystone QR keyring all the default properties to |
|
OK, I have updated the PR description with this change entry:
Does that sound right? That was my interpretation of your explanation, considering that this entry is written for users of the package who don't understand the internals. |
yea, your explanation is better. :) |
|
Thanks for confirming that it was accurate! |
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
<!-- 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** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> We recently removed `eth_sign` operations from extension: MetaMask/metamask-extension#24756 This PR aims to remove `eth_sign` and all related components from mobile. Also updates `@metamask/signature-controller@17.0.0`. ### Notes - Removes `keyring-controller` patch ([patch branch](MetaMask/core@main...keyring-controller-v16-patch)) because it's already addressed in `@metamask/keyring-controller@16.1.0` [here](MetaMask/core#4256) . ## **Related issues** Fixes: N/A ## **Manual testing steps** 1. Go to the [e2e test dapp] in-app browser (https://metamask.github.io/test-dapp/) 2. Connect the wallet 3. Scroll down to the `Eth Sign` card (https://metamask.github.io/test-dapp/#ethSign) 4. Click `Sign` 5. You should see `Error: The method "eth_sign" does not exist / is not available.` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** N/A <!-- [screenshots/recordings] --> ### **After** N/A <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [X] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [X] 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.
This PR apply patch code from this PR to keyringController to fix the issue found in this issue
References
PR 23903
Fix Issue 23804
Changelog
@metamask/keyring-controlllerChecklist