diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala index 1b00ec39e7..1418a3e87a 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialService.scala @@ -215,7 +215,7 @@ object CredentialService { case Some("application/json") => val jsonBytes = java.util.Base64.getUrlDecoder.decode(attr.value.getBytes(StandardCharsets.UTF_8)) new String(jsonBytes, StandardCharsets.UTF_8).fromJson[Json] match - case Right(value) => ZIO.succeed(Json.Obj().add(attr.name, value)) + case Right(value) => ZIO.succeed(jsonObject.add(attr.name, value)) case Left(error) => ZIO.fail(VCClaimsValueParsingError(error)) case Some(media_type) => diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala index c21c1eb2fe..d300d3c25e 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala @@ -1260,7 +1260,10 @@ class CredentialServiceImpl( .fromOption(record.offerCredentialData) .orElse(ZIO.dieMessage(s"Offer credential data not found in record: ${recordId.value}")) preview = offerCredentialData.body.credential_preview + _ = println(s"+++++++++++++++++++++$preview") claims <- CredentialService.convertAttributesToJsonClaims(preview.body.attributes).orDieAsUnmanagedFailure + _ = println(s"+++++++++++++++++++++$claims") + jwtPresentation <- validateRequestCredentialDataProof(maybeOfferOptions, requestJwt) .tapError(error => credentialRepository