Skip to content

Commit

Permalink
ScalafmtAll
Browse files Browse the repository at this point in the history
Signed-off-by: Shota Jolbordi <shota.jolbordi@iohk.io>
  • Loading branch information
Shota Jolbordi committed Dec 14, 2023
1 parent b33b2fb commit 4d66203
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ private class CredentialServiceImpl(
record: IssueCredentialRecord,
statusListRegistryUrl: String,
): ZIO[WalletAccessContext, CredentialServiceError, CredentialStatus] = {
// TODO: reactor, use STM to perform all effects atomically
for {
lastStatusList <- credentialStatusListRepository.getLatestOfTheWallet.mapError(RepositoryError.apply)
issuingDID <- ZIO
Expand All @@ -1054,7 +1053,10 @@ private class CredentialServiceImpl(
lastUsedIndex = currentStatusList.lastUsedIndex
statusListToBeUsed <-
if lastUsedIndex < size then ZIO.succeed(currentStatusList)
else credentialStatusListRepository.createNewForTheWallet(jwtIssuer, statusListRegistryUrl).mapError(RepositoryError.apply)
else
credentialStatusListRepository
.createNewForTheWallet(jwtIssuer, statusListRegistryUrl)
.mapError(RepositoryError.apply)

_ <- credentialStatusListRepository
.allocateSpaceForCredential(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class JdbcCredentialRepository(xa: Transactor[ContextAwareTask], xb: Transactor[

given issueCredentialGet: Get[IssueCredential] = Get[String].map(decode[IssueCredential](_).getOrElse(???))
given issueCredentialPut: Put[IssueCredential] = Put[String].contramap(_.asJson.toString)


override def createIssueCredentialRecord(record: IssueCredentialRecord): RIO[WalletAccessContext, Int] = {
val cxnIO = sql"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton
import io.iohk.atala.agent.server.config.AppConfig
import io.iohk.atala.agent.server.http.ZioHttpClient
import io.iohk.atala.agent.server.sql.Migrations as AgentMigrations
import io.iohk.atala.agent.walletapi.service.{EntityServiceImpl, ManagedDIDService, ManagedDIDServiceWithEventNotificationImpl, WalletManagementServiceImpl}
import io.iohk.atala.agent.walletapi.service.{
EntityServiceImpl,
ManagedDIDService,
ManagedDIDServiceWithEventNotificationImpl,
WalletManagementServiceImpl
}
import io.iohk.atala.agent.walletapi.sql.{JdbcDIDNonSecretStorage, JdbcEntityRepository, JdbcWalletNonSecretStorage}
import io.iohk.atala.agent.walletapi.storage.GenericSecretStorage
import io.iohk.atala.castor.controller.{DIDControllerImpl, DIDRegistrarControllerImpl}
Expand All @@ -25,8 +30,20 @@ import io.iohk.atala.issue.controller.IssueControllerImpl
import io.iohk.atala.mercury.*
import io.iohk.atala.pollux.core.service.*
import io.iohk.atala.pollux.credentialdefinition.controller.CredentialDefinitionControllerImpl
import io.iohk.atala.pollux.credentialschema.controller.{CredentialSchemaController, CredentialSchemaControllerImpl, VerificationPolicyControllerImpl}
import io.iohk.atala.pollux.sql.repository.{JdbcCredentialDefinitionRepository, JdbcCredentialRepository, JdbcCredentialSchemaRepository, JdbcCredentialStatusListRepository, JdbcPresentationRepository, JdbcVerificationPolicyRepository, Migrations as PolluxMigrations}
import io.iohk.atala.pollux.credentialschema.controller.{
CredentialSchemaController,
CredentialSchemaControllerImpl,
VerificationPolicyControllerImpl
}
import io.iohk.atala.pollux.sql.repository.{
JdbcCredentialDefinitionRepository,
JdbcCredentialRepository,
JdbcCredentialSchemaRepository,
JdbcCredentialStatusListRepository,
JdbcPresentationRepository,
JdbcVerificationPolicyRepository,
Migrations as PolluxMigrations
}
import io.iohk.atala.presentproof.controller.PresentProofControllerImpl
import io.iohk.atala.resolvers.DIDResolver
import io.iohk.atala.system.controller.SystemControllerImpl
Expand Down

0 comments on commit 4d66203

Please sign in to comment.