-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
refactor: update account tracker to use selected account #4225
Merged
ccharly
merged 11 commits into
main
from
fix/ap381/update-account-tracker-to-use-selectedAccountId
Jun 7, 2024
Merged
refactor: update account tracker to use selected account #4225
ccharly
merged 11 commits into
main
from
fix/ap381/update-account-tracker-to-use-selectedAccountId
Jun 7, 2024
Conversation
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
montelaidev
force-pushed
the
fix/ap381/update-account-tracker-to-use-selectedAccountId
branch
from
June 3, 2024 14:48
a9ec2a0
to
043c08f
Compare
montelaidev
force-pushed
the
fix/ap381/update-account-tracker-to-use-selectedAccountId
branch
from
June 5, 2024 04:08
043c08f
to
0407197
Compare
montelaidev
changed the title
Fix/ap381/update account tracker to use selected account
refactor: update account tracker to use selected account
Jun 5, 2024
ccharly
reviewed
Jun 7, 2024
ccharly
reviewed
Jun 7, 2024
packages/assets-controllers/src/AccountTrackerController.test.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/AccountTrackerController.test.ts
Outdated
Show resolved
Hide resolved
ccharly
approved these changes
Jun 7, 2024
ccharly
deleted the
fix/ap381/update-account-tracker-to-use-selectedAccountId
branch
June 7, 2024 11:38
legobeat
pushed a commit
that referenced
this pull request
Jun 11, 2024
## Explanation This PR updates the `AccountTrackerController` to use `selectedAccount` and InternalAccounts. The callbacks of the preferences controller are removed and replaced by actions to the controller messenger. The subscription of `onPreferencesStateChange` has been replaced with a subscription to the controller messenger. ## References Fixes https://github.com/MetaMask/accounts-planning/issues/381 ## Changelog ### `@metamask/assets-controllers` - **CHANGED**: Removed `getIdentities`, `getSelectedAddress` and `onPreferencesStateChange` from the constructor arguments of the `AccountTrackerController` - **BREAKING**: Require a controller messenger in the constructor of the `AccountTrackerController` ## 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 --------- Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
legobeat
pushed a commit
that referenced
this pull request
Jun 11, 2024
## Explanation This PR updates the `AccountTrackerController` to use `selectedAccount` and InternalAccounts. The callbacks of the preferences controller are removed and replaced by actions to the controller messenger. The subscription of `onPreferencesStateChange` has been replaced with a subscription to the controller messenger. ## References Fixes https://github.com/MetaMask/accounts-planning/issues/381 ## Changelog ### `@metamask/assets-controllers` - **CHANGED**: Removed `getIdentities`, `getSelectedAddress` and `onPreferencesStateChange` from the constructor arguments of the `AccountTrackerController` - **BREAKING**: Require a controller messenger in the constructor of the `AccountTrackerController` ## 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 --------- Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
This PR updates the
AccountTrackerController
to useselectedAccount
and InternalAccounts. The callbacks of the preferences controller are removed and replaced by actions to the controller messenger. The subscription ofonPreferencesStateChange
has been replaced with a subscription to the controller messenger.References
Fixes https://github.com/MetaMask/accounts-planning/issues/381
Changelog
@metamask/assets-controllers
getIdentities
,getSelectedAddress
andonPreferencesStateChange
from the constructor arguments of theAccountTrackerController
AccountTrackerController
Checklist