Skip to content

Fix web wallet init order to prevent duplicate DIDs#453

Merged
maycon-mello merged 3 commits intomasterfrom
fix-web-wallet-creation-order
Feb 24, 2026
Merged

Fix web wallet init order to prevent duplicate DIDs#453
maycon-mello merged 3 commits intomasterfrom
fix-web-wallet-creation-order

Conversation

@maycon-mello
Copy link
Copy Markdown
Collaborator

@maycon-mello maycon-mello commented Feb 23, 2026

Summary

https://dock-team.atlassian.net/browse/DCKA-5368

  • Reordered initialization in packages/web/src/index.js so cloud documents are pulled before createWallet runs
  • This prevents ensureDID (called inside createWallet) from creating a new DID when one already exists in the cloud
  • Added unit tests verifying the correct initialization order

Test plan

  • Verify existing wallet with cloud DID does not create a duplicate DID on re-initialization
  • Verify new wallet still creates a DID when no cloud documents exist
  • Verify wallet initializes gracefully if pullDocuments fails

Pull cloud documents before creating wallet so existing DIDs
are found in the data store, preventing ensureDID from creating
duplicates.
@maycon-mello maycon-mello merged commit 88a0820 into master Feb 24, 2026
6 of 8 checks passed
@maycon-mello maycon-mello deleted the fix-web-wallet-creation-order branch February 24, 2026 14:30
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