Skip to content

Commit ba6d99f

Browse files
committed
feat(account-tree-controller): re-introduce lastSelected metadata
1 parent 885d4be commit ba6d99f

7 files changed

Lines changed: 532 additions & 23 deletions

File tree

packages/account-tree-controller/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add `lastSelected` (timestamp) to account group tree node metadata ([#8261](https://github.com/MetaMask/core/pull/8261))
13+
- `group.metadata.lastSelected` is set to `Date.now()` whenever a group becomes the selected group, either via `setSelectedAccountGroup` or `AccountsController:selectedAccountChange`.
14+
- The value is persisted in `accountGroupsMetadata` and restored on `init`/`reinit`.
15+
- The value is not synchronize through backup and sync.
16+
- Now consider `lastSelected` too when the controller needs to use the "default account group ID".
17+
1018
### Changed
1119

1220
- **BREAKING**: Move `selectedAccountGroup` to top-level persisted state to prevent selected account group from reverting after app restart ([#8245](https://github.com/MetaMask/core/pull/8245))

0 commit comments

Comments
 (0)