Credential offer can be resolved multiple times simultaneously#966
Credential offer can be resolved multiple times simultaneously#966erbenjak wants to merge 11 commits intorelease/openid4vcfrom
Conversation
…ame-credential-offer-url
There was a problem hiding this comment.
Pull request overview
This PR implements an in-memory cache for credential offer requests to prevent duplicate API calls when the same credential offer URL appears multiple times in a single request expansion. The cache stores Promises to ensure concurrent calls for the same URL share the same underlying request, addressing a race condition in the existing persistent cache implementation.
Changes:
- Added an in-memory Promise-based cache (
credentialOfferCache) to theDataViewExpanderclass - Modified credential offer request handling to check the cache before making new requests
- Wrapped the API call in error handling that returns
undefinedon failure
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…' of github.com:nmshd/runtime into bug/duplicate-requests-on-the-same-credential-offer-url
…ame-credential-offer-url
…ame-credential-offer-url
…' of github.com:nmshd/runtime into bug/duplicate-requests-on-the-same-credential-offer-url
Milena-Czierlinski
left a comment
There was a problem hiding this comment.
Please update the branch to the base branch. Also, the title of the PR should be adjusted, such that it doesn't have a prefix (we use labels for this) and that it describes the bug instead of the solution.
…ame-credential-offer-url
Readiness checklist