Overview
buildDataKey() in StellarService constructs the Stellar manageData key by sanitizing and slicing the hash, but the return statement is incomplete — it returns the literal string "doc_" without appending the sanitized hash. This means every document gets anchored under the same Stellar data key, causing all but the first anchor to silently overwrite previous records on the ledger.
Background
File: backend/src/stellar/stellar.service.ts
The method should return "doc_" + sanitized.slice(0, 58) but currently only returns the prefix. Both anchorHash() and verifyHash() call buildDataKey(), so the entire Stellar integration is broken until this is fixed.
Acceptance Criteria
Overview
buildDataKey()inStellarServiceconstructs the StellarmanageDatakey by sanitizing and slicing the hash, but the return statement is incomplete — it returns the literal string"doc_"without appending the sanitized hash. This means every document gets anchored under the same Stellar data key, causing all but the first anchor to silently overwrite previous records on the ledger.Background
File:
backend/src/stellar/stellar.service.tsThe method should return
"doc_" + sanitized.slice(0, 58)but currently only returns the prefix. BothanchorHash()andverifyHash()callbuildDataKey(), so the entire Stellar integration is broken until this is fixed.Acceptance Criteria
buildDataKey()correctly concatenates"doc_"with the first 58 characters of the sanitized hashanchorHash()andverifyHash()calls work correctly end-to-end with the fix applied