Skip to content

Commit

Permalink
refactor: update Nft Controllers to use selectedAccountId instead of …
Browse files Browse the repository at this point in the history
…selectedAddress (#4221)

## Explanation

This PR updates removes `selectedAddress` and uses the controller
messenger to get InternalAccounts in the Nft Controllers

## References

Fixes MetaMask/accounts-planning#381

## Changelog

### `@metamask/assets-controllers`

- **BREAKING**: `NftController` constructor argument `selectedAddress`
has been removed.
- **BREAKING**: `NftController` now requires
`AccountsControlelr:get{Account,SelectedAccount}` messenger actions.
- **BREAKING**: `NftController` now requires
`AccountsController:selectedEvmAccountChange` event.
- **BREAKING**: `NftDetectionController` now requires
`AccountsControlelr:getSelectedAccount` messenger actions.

## 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
  • Loading branch information
montelaidev authored Jun 7, 2024
1 parent f986626 commit 4149d47
Show file tree
Hide file tree
Showing 4 changed files with 1,015 additions and 550 deletions.
Loading

0 comments on commit 4149d47

Please sign in to comment.