Fix verification and revocation issues (#1336, #1337, #1339) - #1412
Conversation
…rding as submitted Fix CodeGirlsInc#1337: Add caching layer to verify endpoint Fix CodeGirlsInc#1339: Include document status in verify response to distinguish revoked from never-submitted Closes CodeGirlsInc#1336 Closes CodeGirlsInc#1337 Closes CodeGirlsInc#1339
|
@Ummi-001 is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Ummi-001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
mftee
left a comment
There was a problem hiding this comment.
Reviewed. Verifying the document hash against the Stellar anchor before marking a submission CONFIRMED (falling back to FAILED on mismatch) closes a real trust gap — previously the endpoint appears to have trusted the anchoring call succeeding without confirming the hash was actually recorded on-chain. Caching verify responses by document hash avoids redundant Stellar network calls for repeat lookups. Adding documentStatus to the verify response so clients can distinguish never-submitted / pending / verified / revoked is a meaningful API improvement — revoked and deleted previously looked identical to callers. Found and fixed one real issue: an unused DocumentStatus import in verification.controller.ts that was failing the repo's lint check specifically for this file (separate from the broader pre-existing lint debt across the codebase). Approving.
Summary
This PR addresses three issues related to document verification and revocation:
#1336: Submit endpoint doesn't verify the hash against the Stellar anchor
#1337: Verify endpoint has no caching layer
#1339: Revoked and deleted documents look identical in responses
Testing
Closes #1336
Closes #1337
Closes #1338
Closes #1339