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: add main network sync controller integration #4701

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Sep 13, 2024

Explanation

This adds the main network sync method to the UserStorageController. It also connects the NetworkController events and actions used for network syncing.

References

https://consensyssoftware.atlassian.net/browse/NOTIFY-1094

Changelog

@metamask/profile-sync-controller

  • ADDED: add new method syncNetworks method used to initiate the main network sync
  • ADDED: add performMainNetworkSync to call the NetworkController actions to get and update NetworkConfigurations.
  • ADDED: add getStorageOptions private method to get storage options for syncing.

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

@Prithpal-Sooriya Prithpal-Sooriya force-pushed the NOTIFY-1094/network-main-sync-integration branch 2 times, most recently from f13a7c1 to d2c8267 Compare September 13, 2024 16:19
I need to add some integration tests to be a bit more confident in outcome
I need to add some integration tests to be a bit more confident in outcome
@Prithpal-Sooriya Prithpal-Sooriya added the team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications label Sep 13, 2024
// TODO: add external NetworkController event
// Need to listen for when a network gets added
// TODO - replace shimmed interface with actual interfaces once merged
// Waiting on #4698
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For visibility: #4698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant