You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
This PR updates the AccountsController and the TransactionController. These are the two major updates however there are a few smaller peer dep updates as well. Here is a description of the changes...
BREAKING: Enforce that scopes contains CAIP-2 chain IDs (refactor!: enforce that scopes contains CAIP-2 chain IDs accounts#165) Initially scopes accepted CAIP-2 namespaces as well to address the EVM EOA accounts that supports all EVM chains. This has been dropped in favor of eip155:0 scope.
BREAKING: Bump @metamask/keyring-api from ^14.0.0 to ^15.0.0 (release: 23.0.0 accounts#160) The scopes from each AccountStruct types is now more strict which impact all InternalAccountStruct types.
BREAKING: Bump @metamask/keyring-api from ^15.0.0 to ^16.0.0 (release: 24.0.0 accounts#172)
The scopes from each AccountStruct types is now more strict (remove support of CAIP-2 namespaces) which impact all InternalAccountStruct types.
BREAKING: Bump @metamask/keyring-api from ^12.0.0 to ^13.0.0 (feat(keyring-api)!: add scopes field to KeyringAccount accounts#101)
This change was not properly reported as breaking on the 7.1.0.
KeyringAccount and InternalAccount have a new required field (scopes) and are part of the public API.
BREAKING: Bump @metamask/keyring-internal-api from ^1.0.0 to ^2.0.0 (release: 18.0.0 accounts#135)
This change was not properly reported as breaking on the 7.1.0.
InternalAccount extends KeyringAccount which has a new required field (scopes) and is part of the public API.
BREAKING: Bump @metamask/keyring-snap-internal-client from ^1.0.0 to ^2.0.0 (release: 18.0.0 accounts#135)
This change was not properly reported as breaking on the 7.1.0.
KeyringAccount has a new required field (scopes) and is part of the public API.
BREAKING: Make scopes more strict (fix!: make scopes more restrictive accounts#159)
We now use specific *AccountStucts when checking created/updated accounts to make the scopes sent by the Snap are valid regarding their account type definition.
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 format if applicable
I’ve applied the right labels on the PR (see labeling guidelines). 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.
You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
Tip
Check the documentation if you have any doubts on how to understand the failure on bitrise
owencraston
changed the title
chore: Update accounts controller to v23 and related packages (transaction controller)
chore: Update accounts controller to v23 and related packages (transaction controller etc)
Feb 13, 2025
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.
Description
This PR updates the AccountsController and the TransactionController. These are the two major updates however there are a few smaller peer dep updates as well. Here is a description of the changes...
"@metamask/accounts-controller": "^21.0.0" -> 23.1.0"
@metamask/snaps-{sdk,utils,controllers}
core#5265)@metamask/{keyring-api,eth-snap-keyring}
core#5280)@metamask/{keyring-api,eth-snap-keyring}
core#5280)@metamask/snaps-{sdk,utils,controllers}
core#5265)@metamask/snaps-{sdk,utils,controllers}
core#5265)"@metamask/transaction-controller": "^43.0.0" -> 45.1.0
"@metamask/keyring-api": "^13.0.0" -> 17.0.0
definePattern
accounts#150) It used to be a string but it has been restricted with a template literal type that matches CAIP-19 asset type.scopes
more restrictive accounts#159)scopes
contains CAIP-2 chain IDs accounts#165) Initially scopes accepted CAIP-2 namespaces as well to address the EVM EOA accounts that supports all EVM chains. This has been dropped in favor of eip155:0 scope.scopes
contains CAIP-2 chain IDs accounts#165)"@metamask/keyring-internal-api": "^2.0.0" -> 4.0.2
The scopes from each AccountStruct types is now more strict (remove support of CAIP-2 namespaces) which impact all InternalAccountStruct types.
"@metamask/eth-snap-keyring": "^7.1.0" -> 10.0.0
scopes
field toKeyringAccount
accounts#101)This change was not properly reported as breaking on the 7.1.0.
KeyringAccount and InternalAccount have a new required field (scopes) and are part of the public API.
This change was not properly reported as breaking on the 7.1.0.
InternalAccount extends KeyringAccount which has a new required field (scopes) and is part of the public API.
This change was not properly reported as breaking on the 7.1.0.
KeyringAccount has a new required field (scopes) and is part of the public API.
Messenger
instead ofSnapsController
accounts#152)This allows to break the runtime dependency we had with some snaps-* pacakges.
scopes
more restrictive accounts#159)We now use specific *AccountStucts when checking created/updated accounts to make the scopes sent by the Snap are valid regarding their account type definition.
This was missing from SIP-26, but we expect this address to be CAIP-10 compliant.
"@metamask/snaps-sdk": "^6.13.0" -> 6.17.1
"@metamask/snaps-utils": "^8.6.1" -> ^8.10.0
Related issues
Fixes: #13374
Fixes: #13377
Manual testing steps
Testing snap accounts
METAMASK_BUILD_TYPE
toflask
in your.js.env
Testing transactions
METAMASK_BUILD_TYPE
tomain
in your.js.env
Screenshots/Recordings
Before
After
On-boarding and Account Creation Flow
Screen.Recording.2025-02-12.at.9.11.39.PM.mov
Send flow
Screen.Recording.2025-02-12.at.9.30.18.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist