From 3f777aa27b20a9128f0c0df977373f7f78df96f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Ribo=CC=81=20Labrador?= Date: Wed, 4 Oct 2023 11:34:54 +0200 Subject: [PATCH] fix: Clean unused variables. --- .../io/iohk/atala/prism/apollo/secp256k1/Secp256k1Lib.kt | 2 -- .../iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/secp256k1/Secp256k1Lib.kt b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/secp256k1/Secp256k1Lib.kt index 8924923a5..a61cfcaf4 100644 --- a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/secp256k1/Secp256k1Lib.kt +++ b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/secp256k1/Secp256k1Lib.kt @@ -1,7 +1,5 @@ package io.iohk.atala.prism.apollo.secp256k1 -import io.iohk.atala.prism.apollo.utils.KMMECPoint - expect class Secp256k1Lib constructor() { fun createPublicKey(privateKey: ByteArray, compressed: Boolean): ByteArray fun derivePrivateKey(privateKeyBytes: ByteArray, derivedPrivateKeyBytes: ByteArray): ByteArray? diff --git a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt index 0c0799d67..0ddbe98f7 100644 --- a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt +++ b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt @@ -7,7 +7,6 @@ import kotlin.js.ExperimentalJsExport import kotlin.js.JsExport import kotlin.js.JsName - @OptIn(ExperimentalJsExport::class) @JsExport interface KMMECSecp256k1PublicKeyCommonStaticInterface { @@ -30,7 +29,7 @@ interface KMMECSecp256k1PublicKeyCommonStaticInterface { "Encoded byte array's expected length is 33 (compressed) or 65 (uncompressed), but got ${encoded.size} bytes" } - return if(encoded[0].toInt() != 0x04) { + return if (encoded[0].toInt() != 0x04) { KMMECSecp256k1PublicKey(Secp256k1Lib().uncompressPublicKey(encoded)) } else { KMMECSecp256k1PublicKey(encoded)