Skip to content

Commit

Permalink
ATL-6835: Present Error Handling Part 2
Browse files Browse the repository at this point in the history
Signed-off-by: Bassam Riman <[email protected]>
  • Loading branch information
CryptoKnightIOG committed Jun 12, 2024
1 parent feabc42 commit 2992b63
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ object PresentBackgroundJobs extends BackgroundJobsHelper {
presentation <-
for {
presentation <- presentationService
.createSDJwtPresentation(id, requestPresentation, prover)
.createSDJwtPresentation(id, requestPresentation)
.provideSomeLayer(ZLayer.succeed(walletAccessContext))
} yield presentation
_ <- presentationService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,12 @@ object MockPresentationService extends Mock[PresentationService] {
): IO[PresentationError, PresentationPayload] = ???

override def createPresentationFromRecord(
record: DidCommID,
issuer: Issuer,
record: DidCommID
): IO[PresentationError, PresentationCompact] = ???

def createSDJwtPresentation(
recordId: DidCommID,
requestPresentation: RequestPresentation,
prover: Issuer,
requestPresentation: RequestPresentation
): ZIO[WalletAccessContext, PresentationError, Presentation] = ???

override def createAnoncredPresentationPayloadFromRecord(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ trait PresentationService {
): ZIO[WalletAccessContext, PresentationError, PresentationPayload]

def createPresentationFromRecord(
record: DidCommID,
issuer: Issuer,
record: DidCommID
): ZIO[WalletAccessContext, PresentationError, PresentationCompact]

def createSDJwtPresentation(
recordId: DidCommID,
requestPresentation: RequestPresentation,
prover: Issuer,
requestPresentation: RequestPresentation
): ZIO[WalletAccessContext, PresentationError, Presentation]

def createAnoncredPresentationPayloadFromRecord(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import zio.*
import zio.json.*

import java.net.URI
import java.rmi.UnexpectedException
import java.time.Instant
import java.util.{Base64 as JBase64, UUID}
import java.util as ju
Expand Down Expand Up @@ -95,8 +94,7 @@ private class PresentationServiceImpl(
}

override def createPresentationFromRecord(
recordId: DidCommID,
prover: Issuer
recordId: DidCommID
): ZIO[WalletAccessContext, PresentationError, PresentationCompact] = {

for {
Expand Down Expand Up @@ -136,11 +134,10 @@ private class PresentationServiceImpl(

override def createSDJwtPresentation(
recordId: DidCommID,
requestPresentation: RequestPresentation,
prover: Issuer,
requestPresentation: RequestPresentation
): ZIO[WalletAccessContext, PresentationError, Presentation] = {
for {
presentationPayload <- createPresentationFromRecord(recordId, prover)
presentationPayload <- createPresentationFromRecord(recordId)
presentation <- ZIO.succeed(
Presentation(
body = Presentation.Body(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,15 @@ class PresentationServiceNotifier(
svc.createJwtPresentationPayloadFromRecord(record, issuer, issuanceDate)

override def createPresentationFromRecord(
record: DidCommID,
issuer: Issuer
record: DidCommID
): ZIO[WalletAccessContext, PresentationError, PresentationCompact] =
svc.createPresentationFromRecord(record, issuer)
svc.createPresentationFromRecord(record)

override def createSDJwtPresentation(
record: DidCommID,
requestPresentation: RequestPresentation,
issuer: Issuer
requestPresentation: RequestPresentation
): ZIO[WalletAccessContext, PresentationError, Presentation] =
svc.createSDJwtPresentation(record, requestPresentation, issuer)
svc.createSDJwtPresentation(record, requestPresentation)

override def createAnoncredPresentationPayloadFromRecord(
record: DidCommID,
Expand Down

0 comments on commit 2992b63

Please sign in to comment.