Skip to content

feat!: add scopes field to KeyringAccount#364

Merged
ccharly merged 8 commits intomainfrom
feat/keyring-account-scopes
Jan 8, 2025
Merged

feat!: add scopes field to KeyringAccount#364
ccharly merged 8 commits intomainfrom
feat/keyring-account-scopes

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Dec 13, 2024

No description provided.

@ccharly ccharly requested review from a team as code owners December 13, 2024 17:07
@ccharly ccharly marked this pull request as draft December 13, 2024 17:08
@socket-security
Copy link
Copy Markdown

socket-security bot commented Dec 13, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/keyring-api@13.0.0 Transitive: network +22 6.63 MB metamaskbot
npm/@metamask/keyring-snap-sdk@1.1.0 Transitive: network +26 3.19 MB metamaskbot

🚮 Removed packages: npm/@metamask/keyring-api@9.0.0

View full report↗︎

@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from 7e2adf4 to 8d519ab Compare January 8, 2025 12:22
@ccharly ccharly changed the title feat(keyring-api)!: add scopes field to KeyringAccount feat!: add scopes field to KeyringAccount Jan 8, 2025
@ccharly ccharly marked this pull request as ready for review January 8, 2025 14:16
@ccharly ccharly enabled auto-merge January 8, 2025 17:40
@ccharly ccharly added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit e5daee2 Jan 8, 2025
@ccharly ccharly deleted the feat/keyring-account-scopes branch January 8, 2025 17:49
jiexi pushed a commit to MetaMask/metamask-extension that referenced this pull request Jan 21, 2025
## **Description**

Testing the new `scopes` added on the `KeyringAccount`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29195?quickstart=1)

## **Related issues**

Requires this PR to be merged first:
- [x] #28861

Related to:
- MetaMask/accounts#101
- MetaMask/core#5066
- MetaMask/snap-bitcoin-wallet#364

## **Manual testing steps**

- Use a previous stable version
```console
git checkout Version-v12.10.0 # Or use a release build
```

- Run it:
```console
yarn
yarn start:flask
```

- Create a bunch of accounts (EVM, non-EVM (Solana/Bitcoin),
hardware-wallet, Snap EVM accounts like the SSK)

![Screenshot 2025-01-16 at 17 11
55](https://github.com/user-attachments/assets/815303e6-2682-4c6b-9969-8f4a8c11e0d7)

- Save your extension logs (Settings > Advanced)
- Now disable your extension (chrome://extensions)
- Stops your `yarn start:flask`
- Now, update your extension by going back to this PR (or by using the
latest RC if you're validating an RC version)

```console
git checkout feat/keyring-account-scopes
```
- Re-run it:
```console
yarn
yarn start:flask
```
- Re-enable your extension (chrome://extensions)
- Open up your console logs (looking at the `service worker`)
- You should now see some migrations running like:

![Screenshot 2025-01-16 at 17 14
03](https://github.com/user-attachments/assets/35c08ba9-83f4-4827-aac5-97b9ee055732)

- You should also see some other migrations from the Snap keyring this
like so:

![Screenshot 2025-01-16 at 18 52
48](https://github.com/user-attachments/assets/5c74700c-18a4-4452-8a47-77d1434c96ad)

- Save your extension logs again (Settings > Advanced, and use a
different filename)
- Now, compare your 2 `.json` files

## **Screenshots/Recordings**

### **Before**

### **After**

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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: Howard Braham <howrad@gmail.com>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants