Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: use new @metamask/keyring-api layout (split packages) #28861

Merged
merged 24 commits into from
Dec 18, 2024

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Dec 3, 2024

Description

Bumping accounts related dependencies + use the new keyring-api layout.

Those tests requires a higher timeout (which might not be true once merged to main)

flags = {"circleci": {"timeoutMinutes": 35}}

Open in GitHub Codespaces

Related issues

N/A

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

github-actions bot commented Dec 3, 2024

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.

Copy link

socket-security bot commented Dec 3, 2024

@ccharly ccharly force-pushed the refactor/use-new-accounts-packages branch 3 times, most recently from db007ee to 6c9889d Compare December 3, 2024 13:01
@ccharly ccharly force-pushed the refactor/use-new-accounts-packages branch from 6c9889d to bf4405f Compare December 3, 2024 16:00
@metamaskbot
Copy link
Collaborator

Builds ready [238f522]
Page Load Metrics (2009 ± 136 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint19827721934490235
domContentLoaded168226541976265127
load169127382009282136
domInteractive24653694
backgroundConnect989342713
firstReactRender16322253
getState105163130147
initialActions01000
loadScripts123521151526234112
setupStore7371063
uiStartup199531742304333160
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 26.92 KiB (0.51%)
  • ui: 17 Bytes (0.00%)
  • common: 120.83 KiB (1.50%)

ccharly added a commit to MetaMask/core that referenced this pull request Dec 11, 2024
)

## Explanation

The `keyring-api` has been split out into multiple smaller packages,
this introduce some breaking changes since some exports have been moved
elsewhere.

This was done to reduce the number of required dependencies for the
`keyring-api`. The `InternalAccount` type (widely used internally by
some controllers) has been moved to a new package:
`@metamask/keyring-internal-api`.

## References

Relates to:
- MetaMask/accounts#24

Basic testing done through the CI + preview builds:
- MetaMask/metamask-extension#28861

## Changelog

### `@metamask/keyring-controller`

- **CHANGED**: Remove use of peer dependency `@metamask/providers`
- **CHANGED**: Bump `@metamask/keyring-api` to `^12.0.0`
- **CHANGED**: Use `@metamask/keyring-internal-api@^1.0.0`

> Even if we are bumping the major of the `keyring-api`, this is not
breaking since all
> types from the split are compatible. The only difference now here is
the `Keyring`
> interface which has a new optional method `listAccountTransactions`,
optional, thus
> non-breaking (and this type is not used there anyway)

### `@metamask/accounts-controller`

- **CHANGED**: Bump `@metamask/keyring-api` to `^12.0.0`
- **CHANGED**: Bump `@metamask/eth-snap-keyring` to `^7.0.0`
- **CHANGED**: Use `@metamask/keyring-internal-api@^1.0.0`

> `eth-snap-keyring` has been bumped to `7.0.0` but this was a mistake
since no breaking changes has been introduced there either.
> The version `6.0.0` also introduces `ts-bridge` builds, but this is
already compatible with this repo, so not breaking here either.

### `@metamask/assets-controllers`

- **CHANGED**: Remove use of `@metamask/keyring-api`
- **CHANGED**: Use `@metamask/keyring-internal-api@^1.0.0`

### `@metamask/chain-controller`

- **CHANGED**: Remove use of `@metamask/keyring-api`
- **CHANGED**: Use `@metamask/keyring-internal-api@^1.0.0`
- **CHANGED**: Use `@metamask/keyring-utils@^1.0.0`

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

- **CHANGED**: Remove use of `@metamask/keyring-api`
- **CHANGED**: Use `@metamask/keyring-internal-api@^1.0.0`

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
@ccharly ccharly marked this pull request as ready for review December 12, 2024 10:58
@ccharly ccharly requested review from a team as code owners December 12, 2024 10:58
@gantunesr gantunesr removed the request for review from a team December 17, 2024 13:25
matthewwalsh0
matthewwalsh0 previously approved these changes Dec 17, 2024
NidhiKJha
NidhiKJha previously approved these changes Dec 17, 2024
@gantunesr gantunesr added this pull request to the merge queue Dec 17, 2024
@gantunesr gantunesr removed this pull request from the merge queue due to a manual request Dec 17, 2024
@gantunesr gantunesr enabled auto-merge December 17, 2024 17:35
@gantunesr gantunesr disabled auto-merge December 17, 2024 18:26
@gantunesr gantunesr enabled auto-merge December 17, 2024 18:26
@gantunesr gantunesr added this pull request to the merge queue Dec 18, 2024
@gantunesr gantunesr removed this pull request from the merge queue due to a manual request Dec 18, 2024
@gantunesr gantunesr added this pull request to the merge queue Dec 18, 2024
@gantunesr gantunesr removed this pull request from the merge queue due to a manual request Dec 18, 2024
@danroc danroc added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit c4429bc Dec 18, 2024
77 checks passed
@danroc danroc deleted the refactor/use-new-accounts-packages branch December 18, 2024 11:36
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 18, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-accounts
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.