Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: mineme0110 <[email protected]>
  • Loading branch information
mineme0110 committed May 29, 2024
1 parent 26ef5af commit bc69a73
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1361,12 +1361,10 @@ private class CredentialServiceImpl(
preview = offerCredentialData.body.credential_preview
claims <- CredentialService.convertAttributesToJsonClaims(preview.body.attributes)
sdJwtPrivateKey = sdjwt.IssuerPrivateKey(ed25519KeyPair.privateKey)
// jwtPresentation.iss.asJson
didDocResult <- didResolver.resolve(jwtPresentation.iss) map {
case failed: DIDResolutionFailed => ???
case failed: DIDResolutionFailed => CredentialServiceError.UnexpectedError(failed.error.toString)
case succeeded: DIDResolutionSucceeded => succeeded.didDocument.authentication.map(x => x)
}
// FIXME
now = Instant.now.getEpochSecond
in30Days = Instant.now.plus(30, ChronoUnit.DAYS).getEpochSecond // FIXME hardcode 30days
claimsUpdated = claims
Expand Down Expand Up @@ -1544,7 +1542,7 @@ private class CredentialServiceImpl(
jwt <- attachmentDescriptor.data match
case Base64(b64) =>
ZIO.succeed {
val base64Decoded = new String(java.util.Base64.getDecoder().decode(b64))
val base64Decoded = new String(java.util.Base64.getDecoder.decode(b64))
JWT(base64Decoded)
}
case _ => ZIO.fail(UnexpectedError(s"Attachment doesn't contain Base64Data: ${record.id}"))
Expand Down

0 comments on commit bc69a73

Please sign in to comment.