All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Move peer dependencies for controller and service packages to direct dependencies (#7209)
- The dependencies moved are:
@metamask/accounts-controller(^35.0.0)@metamask/keyring-controller(^25.0.0)@metamask/multichain-account-service(^4.0.0)@metamask/profile-sync-controller(^27.0.0)@metamask/snaps-controllers(^14.0.1)
- In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
- For example, this scenario would be valid: a client relies on
@metamask/controller-a1.0.0 and@metamask/controller-b1.0.0, and@metamask/controller-bdepends on@metamask/controller-a1.1.0.
- For example, this scenario would be valid: a client relies on
- Note, however, that the versions specified in the client's
package.jsonalways "win", and you are expected to keep them up to date so as not to break controller and service intercommunication.
- The dependencies moved are:
- Bump
@metamask/multichain-account-servicefrom^4.0.0to^4.1.0(#7437, (#7515
- BREAKING: Bump
@metamask/profile-sync-controllerfrom^26.0.0to^27.0.0(#7202) - BREAKING: Bump
@metamask/multichain-account-servicefrom^3.0.0to^4.0.0(#7202) - BREAKING: Bump
@metamask/keyring-controllerfrom^24.0.0to^25.0.0(#7202) - BREAKING: Bump
@metamask/accounts-controllerfrom^34.0.0to^35.0.0(#7202)
- BREAKING: Bump
@metamask/multichain-account-servicefrom^2.0.0to^3.0.0(#7100)
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6380)- Previously,
AccountTreeControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Bump
@metamask/accounts-controllerfrom^33.0.0to^34.0.0(#6962) - BREAKING: Bump
@metamask/keyring-controllerfrom^23.0.0to^24.0.0(#6962) - BREAKING: Bump
@metamask/multichain-account-servicefrom^1.0.0to^2.0.0(#6962) - BREAKING: Bump
@metamask/profile-sync-controllerfrom^25.0.0to^26.0.0(#6962) - Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- Add optional account hidden/pinned state callbacks (#6910)
- Those callbacks can be used migrate existing account state into the tree metadata.
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Use non-EVM account names for group names (#6831)
- EVM accounts still take precedence over non-EVM accounts.
- Before accounts get re-aligned, it is possible that a group contains only non-EVM accounts, in which case, the first non-EVM account name will be used for that account group.
- Fix wallet metadata cleanup when wallets are completely removed (#6813)
- Ensure
isLegacyAccountSyncingDisabledis always set inUserStorageSyncedWalletafter one successful full sync (#6805)- This was not set in some rare edge case scenarios, and created situations were legacy syncs would always be re-triggered during full syncs.
- We now verify this field is correctly set, and also catch empty objects for
UserStorageSyncedWallet.
- Bump
@metamask/base-controllerfrom^8.4.0to^8.4.1(#6807)
- Re-introduce computed names for account groups (#6758)
- Those names are computed using the old internal account names, allowing to automatically migrate them.
- We only consider EVM account names.
- This automatically handles conflicting names, similarly to backup & sync (adding a suffix
(n)in case of conflicts.
- Bump
@metamask/utilsfrom^11.8.0to^11.8.1(#6708)
- Add more internal logs (#6730)
- Preverve import time for account groups (#6727)
- We now wait sort accounts by their
importTimebefore re-building the tree.
- We now wait sort accounts by their
- Prevent
:account{Added,Removed}to be used ifinithas not been called yet (#6717)- We now wait for
initto have been called at least once. Clients will need to ensure internal accounts are fully ready before callinginit. - This should also enforce account group ordering, since all accounts will be ready to consume right away.
- We now wait for
- Add
reinitmethod (#6709)- This method can be used if we change the entire list of accounts of the
AccountsControllerand want to re-initilize the tree with it.
- This method can be used if we change the entire list of accounts of the
- Implicitly call
initbefore mutating the tree (#6709)- This ensure the tree is always using existing accounts before inserting/removing any new accounts if
inithas not been called yet.
- This ensure the tree is always using existing accounts before inserting/removing any new accounts if
- Fix use of unknown
group.metadata.namewhen checking for group name uniqueness (#6706) - Added logic that prevents an account within a group from being out of order (#6683)
- Set the
setAccountGroupName's optionautoHandleConflicttotruefor all backup & sync operations (#6697) - Add new group naming for non-HD keyring accounts (#6679), (#6696)
- Hardware-wallet account groups are now named: "Ledger|Trezor|QR|Lattice|OneKey Account N".
- Private key account groups are now named: "Imported Account N".
- Snap account groups are now named: "Snap Account N".
- Account group names now use natural indexing as a fallback (#6677), (#6679), (#6696)
- If a user names his accounts without any indexes, we would just use the number of accounts to compute the next available index.
- Fix group naming for non-HD keyring accounts (#6677), (#6679)
- Previously, the first non-HD keyring account would start as
Account 2as opposed toAccount 1and thus subsequent group names were off as well.
- Previously, the first non-HD keyring account would start as
- BREAKING: Bump peer dependency
@metamask/multichain-account-servicefrom^0.8.0to^1.0.0(#6652, #6676)
- Set
lastUpdatedAtto0when generating default account group names (#6672)- This created conflicts with backup and sync, where newly created local groups' names were taking precedence over user-defined backed up names.
- Add
autoHandleConflictparameter tosetAccountGroupNamemethod for automatic conflict resolution with suffix generation (#6601)
- Computed names (inherited from previous existing accounts) is disabled temporarily (#6601)
- They do interfere with the naming mechanism, so we disable them temporarily in favor of the new per-wallet sequential naming.
- Fix multi-wallet account group naming inconsistencies and duplicates (#6601)
- Implement proper per-wallet sequential numbering with highest account index parsing.
- Add name persistence during group initialization to ensure consistency across app restarts.
- Single group sync events will not get enqueued anymore if a full sync is in progress (#6651)
- This prevents too many unnecessary storage fetches (which would prevent being rate limited).
- This could rarely lead to inconsistencies until the next single updates or next full sync.
- Export user storage paths for account syncing (#6643)
- Swallow group creation errors in backup and sync
createMultichainAccountGroup(#6642)
- Remove full sync triggers when single sync operations are enqueued and
hasSyncedAtLeastOnceisfalse(#6634)
- BREAKING: Use
:getSelectedMultichainAccountinstead of:getSelectedAccountto compute currently selected account group (#6608)- Coming from the old account model, a non-EVM account could have been selected and the lastly selected EVM account might not be using the same group index.
- Bump
@metamask/utilsfrom^11.4.2to^11.8.0(#6588) - Bump
@metamask/base-controllerfrom^8.3.0to^8.4.0(#6632)
- Check for group existence prior to emitting analytics event in
createMultichainAccountGroup(#6582) - Fix logger initialization (#6581)
- There was a circular dependency between the controller and the logger itself, preventing the logger to be initialized properly.
- Add
AccountWalletObject.statussupport (#6571), (#6578)- The
statusfield will now report the current wallet status. - Uses
MultichainAccountServiceto report on-going operations (discovery, alignment, account creations) forAccountWalletEntropyObjectmultichain account wallet objects.
- The
- BREAKING: Bump peer dependency
@metamask/multichain-account-servicefrom^0.7.0to^0.8.0(#6571), (#6578) - BREAKING: Bump peer dependency
@metamask/account-apifrom^0.9.0to^0.12.0(#6560)
- BREAKING: Add backup and sync capabilities (#6344)
- New
syncWithUserStorage()andsyncWithUserStorageAtLeastOnce()method for manual sync triggers, replacingUserStorageController:syncInternalAccountsWithUserStorageusage in clients. BackupAndSyncServicewith full and atomic sync operations for account tree data persistence.- Bidirectional metadata synchronization for wallets and groups with user storage.
- Automatic sync triggers on metadata changes (rename, pin/hide operations).
- New
isBackupAndSyncInProgressstate property to track sync status. - Analytics event tracking and performance tracing for sync operations.
- Rollback mechanism for failed sync operations with state snapshot/restore capabilities.
- Support for entropy-based wallets with multichain account syncing.
- Legacy account syncing compatibility for seamless migration.
- Optional configuration through new
AccountTreeControllerConfig.backupAndSyncoptions. - Add
@metamask/superstructfor data validation.
- New
- BREAKING: Add
@metamask/multichain-account-servicepeer dependency (#6344) - BREAKING: Add
@metamask/profile-sync-controllerpeer dependency (#6344), (#6558) - Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6470)
- Account group name uniqueness validation now scoped to wallet level instead of global (#6550)
isAccountGroupNameUniquenow checks for duplicates only within the same wallet, allowing different wallets to have groups with the same name.- Function now throws an error for non-existent group IDs instead of returning
true. - Updated
setAccountGroupNamebehavior to allow duplicate names across different wallets.
- Fix account group naming inconsistency across app restarts where non-EVM account names would bubble up inappropriately (#6479)
- Add unique name validation for account groups to prevent duplicate group names (#6492)
setAccountGroupNamenow validates that group names are unique across all groups.- Added
isAccountGroupNameUniqueutility function to check name uniqueness. - Names are trimmed of leading/trailing whitespace before comparison to prevent accidental duplicates.
- BREAKING: Remove support for
AccountsController:accountRenamedevent handling (#6438) - Bump
@metamask/base-controllerfrom^8.2.0to^8.3.0(#6465)
- Publish
AccountTreeController:selectedAccountGroupChangeduringinit(#6431)
- Add
AccountTreeController:accountTreeChangeevent (#6400) - Add
AccountTreeController:selectedAccountGroupChangeevent (#6400)
- Add missing export for
AccountTreeControllerGetAccountsFromSelectedAccountGroupAction(#6404) - Add
AccountTreeController:setAccount{WalletName,GroupName,GroupPinned,GroupHidden}actions (#6404)
- Bump
@metamask/base-controllerfrom^8.1.0to^8.2.0(#6355)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerfrom^32.0.0to^33.0.0(#6345) - BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^22.0.0to^23.0.0(#6345)
- Bump
@metamask/base-controllerfrom^8.0.1to^8.1.0(#6284) - Bump accounts related packages (#6309)
- Bump
@metamask/keyring-apifrom^20.0.0to^20.1.0
- Bump
- Add fallback naming for account groups when rule-based naming fails (#6246)
- Implements "indexes per wallet" strategy (Wallet 1 → Account 1, Account 2; Wallet 2 → Account 1, Account 2)
- Ensures new groups get proper sequential names within each wallet
- BREAKING: Add support for
AccountsController:accountRenamedevent handling for state 1 and legacy account syncing compatibility (#6251) - Add
AccountTreeController:getAccountsFromSelectedAccountGroupaction (#6266), (#6248), (#6265)- This action can be used to get all accounts from the currently selected account group.
- This action also support
AccountSelectorsupport to filter out accounts based on some criterias.
- Add persistence support for user customizations (#6221)
- New
accountGroupsMetadata(of new typeAccountTreeGroupPersistedMetadata) andaccountWalletsMetadata(of new typeAccountTreeWalletPersistedMetadata) state properties to persist custom names, pinning, and hiding states. - Custom names and metadata survive controller initialization and tree rebuilds.
- Support for
lastUpdatedAttimestamps for Account Syncing V2 compatibility.
- New
- Add setter methods for setting custom account group names, wallet names and their pinning state and visibility (#6221)
- Add
{wallet,group}.typetag (#6214)- This
typecan be used as a tag to strongly-type (tagged-union) theAccountGroupObject. - The
typefromwallet.metadatahas been moved towallet.typeinstead and can be used to (tagged-union) theAccountWalletObject.
- This
- Add
{wallet,group}.metadatametadata object (#6214), (#6258)- Given the
{wallet,group}.typeyou will now have access to specific metadata information (e.g.group.metadata.groupIndexfor multichain account groups orwallet.metadata.entropy.idfor multichain account wallets)
- Given the
- Automatically prune empty groups and wallets upon account removal (#6234)
- This ensures that there aren't any empty nodes in the
AccountTreeControllerstate.
- This ensures that there aren't any empty nodes in the
- BREAKING: Bump peer dependency
@metamask/account-apifrom^0.3.0to^0.9.0(#6214), (#6216), (#6222), (#6248) - BREAKING: Remove use of in-memory wallets and groups (
AccountTree{Wallet,Object}) (#6265)- Those types are not ready to be used and adds no value for now.
- BREAKING: Move
wallet.metadata.typetag towalletnode (#6214)- This
typecan be used as a tag to strongly-type (tagged-union) theAccountWalletObject.
- This
- Defaults to the EVM account from a group when using
setSelectedAccountGroup(#6208)- In case no EVM accounts are found in a group (which should not be possible), it will defaults to the first account of that group.
- Enhanced customization priority hierarchy in tree building (#6221)
- Custom user names now take priority over default rule-generated names.
- Add BIP-44/multichain accounts support (#6185)
- Those are being attached to the
entropywallet category.
- Those are being attached to the
- BREAKING: Bump peer dependency
@metamask/account-apifrom^0.2.0to^0.3.0(#6165) - Add
selectedAccountGroupstate and bidirectional synchronization withAccountsController(#6186)- New
getSelectedAccountGroup()andsetSelectedAccountGroup()methods. - Automatic synchronization when selected account changes in AccountsController.
- New action types
AccountTreeControllerGetSelectedAccountGroupActionandAccountTreeControllerSetSelectedAccountGroupAction.
- New
- Now use one account group per account for
snapandkeyringwallet categories (#6185)- We used to group all accounts under the
'default'group, but we now compute the group ID using the address of each accounts.
- We used to group all accounts under the
- Compute account group name based on their underlying account. (#6185)
- This replaces the previous
'Default'name for groups.
- This replaces the previous
- BREAKING: Bump peer dependency
@metamask/accounts-controllerfrom^31.0.0to^32.0.0(#6171)
- BREAKING: Add
@metamask/account-apipeer dependency (#6115), (#6146) - BREAKING: Types
AccountWalletandAccountGrouphave been respectively renamed toAccountWalletObjectandAccountGroupObject(#6115)- Those names are now used by the
@metamask/account-apipackage to define higher-level interfaces.
- Those names are now used by the
- BREAKING: Bump peer dependency
@metamask/snaps-controllersfrom^12.0.0to^14.0.0(#6035) - Bump
@metamask/snaps-sdkfrom^7.1.0to^9.0.0(#6035) - Bump
@metamask/snaps-utilsfrom^9.4.0to^11.0.0(#6035) - Properly export
AccountWalletCategoryconstant and conversion functions (#6062)
- BREAKING: No longer export
AccountWalletCategory,toAccountWalletId,toAccountGroupIdandtoDefaultAccountGroupId(#6115)- You should now import them from the
@metamask/account-apipackage (peer dependency).
- You should now import them from the
- Update wallet names (#6024)
- Export ID conversions functions and constants (#6006)
- BREAKING: Bump peer dependency
@metamask/accounts-controllerto^31.0.0(#5999)
- Fix
AccountWallet.metadatatype (#5947)- Was using
AccountGroupMetadatainstead ofAccountWalletMetadata.
- Was using
- Add
AccountTreeControllerStateChangeEventtoAccountTreeControllerEvents(#5958)
- Initial release (#5847)
- Grouping accounts into 3 main categories: Entropy source, Snap ID, keyring types.