Skip to content

feat!: move SnapPlatformWatcher in SnapAccountService + add :ensureReady and use it in MultichainAccountService#8715

Merged
ccharly merged 19 commits intomainfrom
cc/feat/snap-account-service-snap-platform
May 6, 2026
Merged

feat!: move SnapPlatformWatcher in SnapAccountService + add :ensureReady and use it in MultichainAccountService#8715
ccharly merged 19 commits intomainfrom
cc/feat/snap-account-service-snap-platform

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented May 6, 2026

Explanation

Now that we have a central place for Snap accounts logic, we can move the SnapPlatformWatcher so we can use it (with an action) on the MultichainAccountService.

Also adding a new :ensureReady(snapId) action that will be improved in the future to make sure everything is ready when interacting with an account management Snap (migration, platform is ready, keyring is ready, etc...)

References

N/A

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Introduces breaking messenger/API changes around Snap readiness (new required SnapAccountService:ensureReady, removed MultichainAccountService:ensureCanUseSnapPlatform), which can break consumers and affect Snap-based account operations if integration is incomplete.

Overview
Moves Snap platform readiness checks out of @metamask/multichain-account-service and into @metamask/snap-account-service. SnapAccountService now owns SnapPlatformWatcher, adds a new SnapAccountService:ensureReady(snapId) messenger action, and exposes config for onboarding gating and Snap-keyring wait timeout.

Updates multichain Snap providers to use the new readiness flow. MultichainAccountService drops its ensureCanUseSnapPlatform method/action and related config/types, and SnapAccountProvider.ensureCanUseSnapPlatform() is renamed to ensureReady() and now calls SnapAccountService:ensureReady. Tests, messenger policies, dependency graph, and package deps/tsconfig references are updated accordingly.

Reviewed by Cursor Bugbot for commit c41e954. Bugbot is set up for automated code reviews on this repo. Configure here.

@ccharly ccharly changed the title feat(snap-account-service): move SnapPlatformWatcher in service + add :ensureReady feat!: move SnapPlatformWatcher in SnapAccountService + add :ensureReady and use it in MultichainAccountService May 6, 2026
@ccharly ccharly force-pushed the cc/feat/snap-account-service-snap-platform branch from f7ccad3 to aaaf1d3 Compare May 6, 2026 10:54
@ccharly ccharly marked this pull request as ready for review May 6, 2026 12:08
@ccharly ccharly requested review from a team as code owners May 6, 2026 12:08
hmalik88
hmalik88 previously approved these changes May 6, 2026
@ccharly ccharly added this pull request to the merge queue May 6, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 6, 2026
@ccharly ccharly enabled auto-merge May 6, 2026 19:39
@ccharly ccharly added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit ab58df0 May 6, 2026
366 checks passed
@ccharly ccharly deleted the cc/feat/snap-account-service-snap-platform branch May 6, 2026 20:14
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