fix(fetch-service): parallelize NIP-05 verification in fetchProfile#353
Merged
calvadev merged 1 commit intoshopstr-eng:mainfrom Apr 6, 2026
Merged
Conversation
|
@userAdityaa is attempting to deploy a commit to the shopstr-eng Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves fetchProfile responsiveness by moving NIP-05 verification out of per-event serial awaits and into a concurrent batch, while restoring an early context update so profiles can render before verification completes.
Changes:
- Added
verifyProfilesNip05helper to verify NIP-05 identifiers concurrently withPromise.allSettled. - Updated DB and relay profile parsing to stop awaiting
verifyNip05Identifierinside loops. - Restored early
editProfileContextupdate and added a follow-up update after verification completes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7e629df to
8ecc6dd
Compare
Contributor
|
LGTM |
84dda09 to
06f4f06
Compare
Contributor
Author
|
All merge conflicts have been resolved and the commits have been squashed! |
calvadev
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR parallelizes NIP-05 verification in
fetchProfile. Previously, each call toverifyNip05Identifierwas awaited inside a loop, causing serial blocking. Now, all NIP-05 checks run concurrently, so the UI is responsive and cached profiles display immediately. The early context update is restored, and NIP-05 badges still appear once verification completes. Profiles without a nip05 field are unaffected.Before: N × 10 s (serial, each blocks the next)
After: 1 × 10 s (parallel, all run together, capped at the slowest single host)
Fixes #352
Testing
Checklist