Validate Stellar DID/address format and remove hardcoded default recipient#15
Conversation
…ecipient Subject DID input only checked for non-empty values and the form shipped with a real hardcoded Stellar address as the default recipient, risking credentials being issued to the wrong holder.
|
@Kingvic300 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! 🚀 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
isStellarAddress/isStellarTestnetDidvalidators insrc/lib/validation.ts.subjectDidStellar address from the credential form's initial state (still available via the existing "Fill Example" button and input placeholder).handleCreatewith a clear toast error before reaching the SDK.makeDidForAddressnow validates the address and returnsnullinstead of building a malformed DID.aria-invalidon the Subject DID input when the value doesn't match the expected format.Fixes #11.
Test plan
did:pkh:stellar:testnet:invalid→ blocked with new "Invalid Subject DID format" message.