Skip to content

Commit

Permalink
feat: upgrade AccountTrackerController to BaseControllerV2 (MetaMask#…
Browse files Browse the repository at this point in the history
…4407)

## Explanation

In this PR, the `AccountTrackerController` has been updated to
`BaseControllerV2`. The upgrade involves the `AccountTrackerController`
now inheriting from `StaticIntervalPollingController` instead of
`StaticIntervalPollingControllerV1`. This change affects the constructor
by removing deprecated `config` properties, keeping only the `interval`
option as a constructor parameter. Additionally, the `provider` property
has been removed, as it is now directly retrieved by actions from
NetworkState.

## References

Fixes MetaMask#4071  

## Changelog

`@metamask/assets-controller`
### Added

- New types for `AccountTrackerController` messenger actions 
  - `AccountTrackerControllerGetStateAction`
- New types for `AccountTrackerController` messenger events
  - `AccountTrackerControllerStateChangeEvent`

### Changed

- **BREAKING:** Changed superclass of `AccountTrackerController` from
StaticIntervalPollingControllerV1 to StaticIntervalPollingController
- **BREAKING:** Renamed `AccountTrackerState` to
`AccountTrackerControllerState`

### Removed

- **BREAKING:** Removed `AccountTrackerConfig` type

## 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
cryptodev-2s authored Jun 13, 2024
1 parent dcc1d92 commit 6982c7f
Show file tree
Hide file tree
Showing 3 changed files with 647 additions and 595 deletions.
Loading

0 comments on commit 6982c7f

Please sign in to comment.