Skip to content

Conversation

@mikesposito
Copy link
Member

@mikesposito mikesposito commented Nov 19, 2025

Depends on:

Explanation

This PR adds a queue to UserProfileController, and a polling mechanism to process the queue.

The queue is updated in the following scenarios:

  • When the wallet is being unlocked AND firstSyncCompleted is false (i.e., first sync has not been completed yet)
  • When a new account is added

At each polling interval, if there are items in the queue, the controller will attempt to call UserProfileService through the messenger to sync addresses in batches, grouped by their entropy source. Accounts with no entropy source will be batched together.
The queue is persisted to storage, so that if the app is closed and reopened, the sync process can continue from where it left off. If one of the batch syncs fails, the same batch will be retried in the next interval.

References

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 communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mikesposito mikesposito force-pushed the mikesposito/user-profile-controller branch from 522b8f7 to 747f8f7 Compare November 19, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants