Skip to content

Commit c3db26b

Browse files
author
Shota Jolbordi
committed
Lint
Signed-off-by: Shota Jolbordi <[email protected]>
1 parent 0126c9a commit c3db26b

File tree

7 files changed

+30
-37
lines changed

7 files changed

+30
-37
lines changed

node/src/main/scala/io/iohk/atala/prism/node/NodeApp.scala

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import com.typesafe.config.{Config, ConfigFactory}
77
import doobie.hikari.HikariTransactor
88
import io.grpc.{Server, ServerBuilder}
99
import io.iohk.atala.prism.node.auth.WhitelistedAuthenticatorF
10-
import io.iohk.atala.prism.node.auth.grpc.{
11-
GrpcAuthenticatorInterceptor,
12-
TraceExposeInterceptor,
13-
TraceReadInterceptor
14-
}
10+
import io.iohk.atala.prism.node.auth.grpc.{GrpcAuthenticatorInterceptor, TraceExposeInterceptor, TraceReadInterceptor}
1511
import io.iohk.atala.prism.node.auth.utils.DidWhitelistLoader
1612
import io.iohk.atala.prism.identity.PrismDid
1713
import io.iohk.atala.prism.node.logging.TraceId
@@ -255,7 +251,7 @@ class NodeApp(executionContext: ExecutionContext) { self =>
255251

256252
private def startServer(
257253
nodeService: NodeGrpcServiceImpl,
258-
nodeExplorerService: NodeExplorerGrpcServiceImpl,
254+
nodeExplorerService: NodeExplorerGrpcServiceImpl
259255
): Resource[IO, Server] =
260256
Resource.make[IO, Server](IO {
261257
logger.info("Starting server")

node/src/main/scala/io/iohk/atala/prism/node/metrics/TimeMeasureUtil.scala

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import TimeMeasureUtil._
1313
import scala.util.Try
1414
import io.iohk.atala.prism.node.logging.TraceId.IOWithTraceIdContext
1515

16-
1716
trait TimeMeasureMetric[F[_]] {
1817
def startTimer(timer: DomainTimer): F[Try[StartedDomainTimer]]
1918
def stopTimer(timer: StartedDomainTimer): F[Try[Unit]]

node/src/main/scala/io/iohk/atala/prism/node/models/HashValue.scala

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import scala.collection.compat.immutable.ArraySeq
77
import scala.util.matching.Regex
88
import io.iohk.atala.prism.node.utils.BytesOps
99

10-
1110
trait HashValue extends Any {
1211

1312
def value: ArraySeq[Byte]

node/src/main/scala/io/iohk/atala/prism/node/services/ObjectManagementService.scala

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import tofu.syntax.monadic._
4242

4343
import java.time.Instant
4444

45-
4645
@derive(applyK)
4746
trait ObjectManagementService[F[_]] {
4847
def saveObject(

node/src/test/scala/io/iohk/atala/prism/node/poc/estimations/CardanoFeeEstimator.scala

+24-24
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ import scala.collection.mutable.ListBuffer
2424
import scala.concurrent.duration._
2525

2626
/** Estimates the Cardano fees to pay for a given deployment simulation.
27-
*
28-
* <p>You can run the estimator with `sbt node/test:run` and choosing `CardanoFeeEstimator` from the list. In order to
29-
* do so, make sure you have set the proper environment variables, as suggested <a
30-
* href="https://github.com/input-output-hk/atala/blob/develop/prism-backend/docs/cardano/use-cardano.md">here</a>.
31-
*/
27+
*
28+
* <p>You can run the estimator with `sbt node/test:run` and choosing `CardanoFeeEstimator` from the list. In order to
29+
* do so, make sure you have set the proper environment variables, as suggested <a
30+
* href="https://github.com/input-output-hk/atala/blob/develop/prism-backend/docs/cardano/use-cardano.md">here</a>.
31+
*/
3232
class CardanoFeeEstimator(
33-
walletId: WalletId,
34-
paymentAddress: Address,
35-
cardanoWalletApiClient: CardanoWalletApiClient[IO]
36-
) {
33+
walletId: WalletId,
34+
paymentAddress: Address,
35+
cardanoWalletApiClient: CardanoWalletApiClient[IO]
36+
) {
3737
// Max number of credentials that can be issued in the same transaction
3838
private val MAX_CREDENTIAL_BATCH_SIZE = 2048
3939

@@ -121,16 +121,16 @@ class CardanoFeeEstimator(
121121
}
122122

123123
private def createAtalaObject(
124-
operations: SignedAtalaOperation*
125-
): AtalaObject = {
124+
operations: SignedAtalaOperation*
125+
): AtalaObject = {
126126
val block = node_internal.AtalaBlock(operations)
127127
AtalaObject().withBlockContent(block)
128128
}
129129

130130
private def signOperation(
131-
atalaOperation: AtalaOperation,
132-
privateKey: ECPrivateKey
133-
): SignedAtalaOperation = {
131+
atalaOperation: AtalaOperation,
132+
privateKey: ECPrivateKey
133+
): SignedAtalaOperation = {
134134
node_models.SignedAtalaOperation(
135135
signedWith = DID.getDEFAULT_MASTER_KEY_ID,
136136
operation = Some(atalaOperation),
@@ -165,10 +165,10 @@ class CardanoFeeEstimator(
165165
}
166166

167167
private def addIssuingKeyOperation(
168-
did: Canonical,
169-
publicKey: ECPublicKey,
170-
lastOperation: AtalaOperation
171-
): AtalaOperation = {
168+
did: Canonical,
169+
publicKey: ECPublicKey,
170+
lastOperation: AtalaOperation
171+
): AtalaOperation = {
172172
val createDIDOp = node_models.UpdateDIDOperation(
173173
previousOperationHash = ByteString.copyFrom(Sha256.compute(lastOperation.toByteArray).getValue),
174174
id = did.getSuffix,
@@ -195,9 +195,9 @@ class CardanoFeeEstimator(
195195
}
196196

197197
private def issueCredentialBatchOperation(
198-
merkleRoot: MerkleRoot,
199-
issuerDid: Canonical
200-
): AtalaOperation = {
198+
merkleRoot: MerkleRoot,
199+
issuerDid: Canonical
200+
): AtalaOperation = {
201201
val issueCredentialOp = node_models.IssueCredentialBatchOperation(
202202
credentialBatchData = Some(
203203
node_models.CredentialBatchData(
@@ -239,9 +239,9 @@ object CardanoFeeEstimator {
239239
}
240240

241241
case class TotalEstimation(
242-
didCreation: Estimation,
243-
credentialIssuing: Estimation
244-
) extends EstimationFormat {
242+
didCreation: Estimation,
243+
credentialIssuing: Estimation
244+
) extends EstimationFormat {
245245
override val transactions: Int =
246246
didCreation.transactions + credentialIssuing.transactions
247247
override val fees: Lovelace = Lovelace(

node/src/test/scala/io/iohk/atala/prism/node/services/CardanoLedgerServiceIntegrationSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class CardanoLedgerServiceIntegrationSpec extends AtalaWithPostgresSpec {
128128
}
129129

130130
/** Returns whether Cardano Integration tests should run because it's running in CI, or it's locally configured.
131-
*/
131+
*/
132132
private def shouldTestCardanoIntegration(): Boolean = {
133133
// Return true when CI="true" (environment is expected to be configured), or NODE_CARDANO_WALLET_ID is defined
134134
// (any other Cardano variable could be used, this one is arbitrary)

node/src/test/scala/io/iohk/atala/prism/node/services/ObjectManagementServiceSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ object ObjectManagementServiceSpec {
7878
}
7979

8080
class ObjectManagementServiceSpec
81-
extends AtalaWithPostgresSpec
81+
extends AtalaWithPostgresSpec
8282
with MockitoSugar
8383
with ResetMocksAfterEachTest
8484
with BeforeAndAfterEach {
@@ -537,8 +537,8 @@ class ObjectManagementServiceSpec
537537
}
538538

539539
private def queryTransactionSubmissions(
540-
status: AtalaObjectTransactionSubmissionStatus
541-
): List[AtalaObjectTransactionSubmission] = {
540+
status: AtalaObjectTransactionSubmissionStatus
541+
): List[AtalaObjectTransactionSubmission] = {
542542
// Query into the future to return all of them
543543
AtalaObjectTransactionSubmissionsDAO
544544
.getBy(Instant.now.plus(Duration.ofSeconds(1)), status, ledger.getType)

0 commit comments

Comments
 (0)