diff --git a/stellar-contracts/src/lib.rs b/stellar-contracts/src/lib.rs index a00f7912..070a42eb 100644 --- a/stellar-contracts/src/lib.rs +++ b/stellar-contracts/src/lib.rs @@ -443,7 +443,7 @@ impl CertificateContract { let new_cert = Certificate { id: new_id.clone(), issuer: issuer.clone(), - owner: new_owner.unwrap_or(original_cert.owner), + owner: new_owner.unwrap_or(original_cert.owner.clone()), status: CertificateStatus::Active, metadata_uri: new_metadata_uri, issued_at: env.ledger().timestamp(), @@ -457,8 +457,7 @@ impl CertificateContract { // Store new certificate Self::set_persistent(&env, &DataKey::Certificate(new_id.clone()), &new_cert); - // Emit a distinct reissued event so indexers can tell a reissue apart - // from a fresh issuance and observe the parent (old) certificate link. + // Emit issuance event env.events().publish( (symbol_short!("reissued"), new_id.clone()), CertificateReissuedEvent {