Skip to content
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

feat: upgrade AccountTrackerController to BaseControllerV2 #4407

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jun 11, 2024

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 #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

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@cryptodev-2s cryptodev-2s requested a review from a team June 11, 2024 14:29
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner June 11, 2024 14:29
Copy link
Contributor

@kanthesha kanthesha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@cryptodev-2s cryptodev-2s merged commit 6982c7f into main Jun 13, 2024
116 checks passed
@cryptodev-2s cryptodev-2s deleted the feature/upgrade-account-tracker-controller-to-base-controller-v2 branch June 13, 2024 17:09
@montelaidev montelaidev mentioned this pull request Jun 25, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert AccountTrackerController from BaseControllerV1 to BaseControllerV2
3 participants