From 8a6bad539334775d25ef9b5cf0eb042832ecd272 Mon Sep 17 00:00:00 2001 From: patlo-iog <108713642+patlo-iog@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:28:35 +0700 Subject: [PATCH] feat(prism-agent): bump dependencies version (#228) --- .../service/project/Dependencies.scala | 10 +++--- prism-agent/service/project/build.sbt | 2 +- .../agent/server/jobs/BackgroundJobs.scala | 36 ++++++++++++++----- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/prism-agent/service/project/Dependencies.scala b/prism-agent/service/project/Dependencies.scala index 5d96b29f55..e5a7a4f6f6 100644 --- a/prism-agent/service/project/Dependencies.scala +++ b/prism-agent/service/project/Dependencies.scala @@ -5,15 +5,15 @@ object Dependencies { val zio = "2.0.4" val zioConfig = "3.0.2" val zioHttp = "2.0.0-RC11" - val zioInteropCats = "22.0.0.0" + val zioInteropCats = "3.3.0" // scala-steward:off val akka = "2.6.20" val akkaHttp = "10.2.9" - val castor = "0.4.0" - val pollux = "0.6.0" - val connect = "0.3.0" + val castor = "0.4.1" + val pollux = "0.7.0" + val connect = "0.3.1" val bouncyCastle = "1.70" val logback = "1.4.5" - val mercury = "0.8.0" + val mercury = "0.10.1" val zioJson = "0.3.0" val tapir = "1.2.3" } diff --git a/prism-agent/service/project/build.sbt b/prism-agent/service/project/build.sbt index 6b7c0d551b..2e52af62af 100644 --- a/prism-agent/service/project/build.sbt +++ b/prism-agent/service/project/build.sbt @@ -2,6 +2,6 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9") addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") -addDependencyTreePlugin +//addDependencyTreePlugin libraryDependencies ++= Seq("org.openapitools" % "openapi-generator" % "6.0.1") diff --git a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobs.scala b/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobs.scala index f695d27a40..e4bb7c377e 100644 --- a/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobs.scala +++ b/prism-agent/service/server/src/main/scala/io/iohk/atala/agent/server/jobs/BackgroundJobs.scala @@ -46,7 +46,7 @@ object BackgroundJobs { _ <- ZIO.logDebug(s"Running action with records => $record") _ <- record match { // Offer should be sent from Issuer to Holder - case IssueCredentialRecord(id, _, _, _, _, Role.Issuer, _, _, _, _, OfferPending, _, Some(offer), _, _) => + case IssueCredentialRecord(id, _, _, _, _, Role.Issuer, _, _, _, _, OfferPending, _, Some(offer), _, _, _) => (for { _ <- ZIO.log(s"IssueCredentialRecord: OfferPending (START)") didComm <- ZIO.service[DidComm] @@ -56,7 +56,24 @@ object BackgroundJobs { } yield ()): ZIO[DidComm & CredentialService, CredentialServiceError | MercuryException, Unit] // Request should be sent from Holder to Issuer - case IssueCredentialRecord(id, _, _, _, _, Role.Holder, _, _, _, _, RequestPending, _, _, Some(request), _) => + case IssueCredentialRecord( + id, + _, + _, + _, + _, + Role.Holder, + _, + _, + _, + _, + RequestPending, + _, + _, + Some(request), + _, + _ + ) => (for { _ <- sendMessage(request.makeMessage) credentialService <- ZIO.service[CredentialService] @@ -64,7 +81,7 @@ object BackgroundJobs { } yield ()): ZIO[DidComm & CredentialService, CredentialServiceError | MercuryException, Unit] // 'automaticIssuance' is TRUE. Issuer automatically accepts the Request - case IssueCredentialRecord(id, _, _, _, _, Role.Issuer, _, _, Some(true), _, RequestReceived, _, _, _, _) => + case IssueCredentialRecord(id, _, _, _, _, Role.Issuer, _, _, Some(true), _, RequestReceived, _, _, _, _, _) => for { credentialService <- ZIO.service[CredentialService] _ <- credentialService.acceptCredentialRequest(id) @@ -86,7 +103,8 @@ object BackgroundJobs { _, _, _, - Some(issue) + Some(issue), + _ ) => // Generate the JWT Credential and store it in DB as an attacment to IssueCredentialData // Set ProtocolState to CredentialGenerated @@ -125,7 +143,8 @@ object BackgroundJobs { None, _, _, - Some(issue) + Some(issue), + _ ) => (for { _ <- sendMessage(issue.makeMessage) @@ -149,7 +168,8 @@ object BackgroundJobs { Some(Published), _, _, - Some(issue) + Some(issue), + _ ) => (for { _ <- sendMessage(issue.makeMessage) @@ -157,8 +177,8 @@ object BackgroundJobs { _ <- credentialService.markCredentialSent(id) } yield ()): ZIO[DidComm & CredentialService, CredentialServiceError | MercuryException, Unit] - case IssueCredentialRecord(id, _, _, _, _, _, _, _, _, _, ProblemReportPending, _, _, _, _) => ??? - case IssueCredentialRecord(id, _, _, _, _, _, _, _, _, _, _, _, _, _, _) => ZIO.unit + case IssueCredentialRecord(id, _, _, _, _, _, _, _, _, _, ProblemReportPending, _, _, _, _, _) => ??? + case IssueCredentialRecord(id, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _) => ZIO.unit } } yield ()