From bd4a1697ce6f7ddd37f227430a66d6a6e3d7da6d Mon Sep 17 00:00:00 2001 From: Arnaud Mimart <33665250+amimart@users.noreply.github.com> Date: Sun, 18 Feb 2024 13:57:32 +0100 Subject: [PATCH] fix(dataverse): persists claim sender addr as literal --- contracts/okp4-dataverse/src/contract.rs | 2 +- contracts/okp4-dataverse/src/registrar/rdf.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/okp4-dataverse/src/contract.rs b/contracts/okp4-dataverse/src/contract.rs index cb6ca550..84cfa8da 100644 --- a/contracts/okp4-dataverse/src/contract.rs +++ b/contracts/okp4-dataverse/src/contract.rs @@ -276,7 +276,7 @@ mod tests { ] ); - let expected_data = " . + let expected_data = " \"okp41072nc6egexqr2v6vpp7yxwm68plvqnkf6xsytf\" . . . \"2024-02-16T00:00:00Z\"^^ . diff --git a/contracts/okp4-dataverse/src/registrar/rdf.rs b/contracts/okp4-dataverse/src/registrar/rdf.rs index bf44a589..ebdfb01a 100644 --- a/contracts/okp4-dataverse/src/registrar/rdf.rs +++ b/contracts/okp4-dataverse/src/registrar/rdf.rs @@ -35,8 +35,8 @@ impl<'a> From<&'a DataverseCredential<'a>> for Vec> { Triple { subject: c_subject, predicate: VC_SUBMITTER_ADDRESS, - object: Term::NamedNode(NamedNode { - iri: credential.submitter_addr.as_str(), + object: Term::Literal(Literal::Simple { + value: credential.submitter_addr.as_str(), }), }, Triple { @@ -124,7 +124,7 @@ mod test { )) .unwrap(); - let expected = " . + let expected = " \"okp41072nc6egexqr2v6vpp7yxwm68plvqnkf6xsytf\" . . . \"2024-01-22T00:00:00\"^^ .