Skip to content
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

feat: add scopes field to KeyringAccount #29195

Draft
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Dec 13, 2024

Description

Testing the new scopes added on the KeyringAccount.

Open in GitHub Codespaces

Related issues

Requires this PR to be merged first:

Related to:

Manual testing steps

N/A

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from d1cc825 to 81c5c8f Compare December 13, 2024 11:36
@ccharly ccharly changed the title Feat/keyring account scopes feat(keyring-api)!: add scopes field to KeyringAccount Dec 13, 2024
@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from ecb5bc1 to 3a72085 Compare December 13, 2024 17:12
@ccharly ccharly changed the title feat(keyring-api)!: add scopes field to KeyringAccount feat: add scopes field to KeyringAccount Jan 6, 2025
@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from d99ca87 to 670e89a Compare January 6, 2025 17:50
@ccharly
Copy link
Contributor Author

ccharly commented Jan 7, 2025

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from 1385544 to 840eef9 Compare January 7, 2025 13:50
Copy link

socket-security bot commented Jan 8, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@metamask/[email protected], npm/@metamask/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

ccharly added a commit to MetaMask/core that referenced this pull request Jan 9, 2025
## Explanation

Testing the new `scopes` field for `KeyringAccount`

## References

- MetaMask/accounts#101
- MetaMask/metamask-extension#29195

## Changelog

### `@metamask/accounts-controller`

- **CHANGED**: Bump `keyring-api` to `^13.0.0`
- **CHANGED**: Bump `keyring-internal-api` to `^1.1.0`
- **CHANGED**: **BREAKING:** Add new `scopes` field to `InternalAccount`
- This new field wil automatically defaults to `eip155` (CAIP-2 chain ID
namespace for EVM) for newly created EOA accounts (both Snap and
"normal" accounts).

### `@metamask/assets-controllers`

- **CHANGED**: Bump `keyring-internal-api` to `^1.1.0`

### `@metamask/chain-controller`

- **CHANGED**: Bump `keyring-internal-api` to `^1.1.0`

### `@metamask/keyring-controller`

- **CHANGED**: Bump `keyring-api` to `^13.0.0`
- **CHANGED**: Bump `keyring-internal-api` to `^1.1.0`
- **CHANGED**: Await for `generateRandomMnemonic` keyring calls
- Not all keyrings uses an `async` implementation for this method, but
`await`ing should cover both (synchronous and asynchronous) cases.
- This change is required since the bump of `@metamask/utils@^11.0.1`
that changed the `generateRandomMnemonic` function signature for the
`EthKeyring` interface (coming from `@metamask/keyring-internal-api`.

### `@metamask/profile-sync-controller`

- **CHANGED**: Bump `keyring-api` to `^13.0.0`
- **CHANGED**: Bump `keyring-internal-api` to `^1.1.0`

## 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 highlighted breaking changes using the "BREAKING" category
above as appropriate
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
@ccharly ccharly force-pushed the feat/keyring-account-scopes branch from af16a23 to 6918983 Compare January 9, 2025 15:12
@ccharly
Copy link
Contributor Author

ccharly commented Jan 9, 2025

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@ccharly
Copy link
Contributor Author

ccharly commented Jan 9, 2025

@SocketSecurity ignore npm/@metamask/[email protected]
@SocketSecurity ignore npm/@metamask/[email protected]

Those are our Snaps.

@metamaskbot
Copy link
Collaborator

Builds ready [400d2d3]
Page Load Metrics (1704 ± 94 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34721191618338162
domContentLoaded14322110168419995
load14872123170419594
domInteractive243968510751
backgroundConnect96420136
firstReactRender16100452813
getState55916189
initialActions01000
loadScripts10501636126717082
setupStore66813168
uiStartup166824311958242116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants