diff --git a/.github/workflows/Deployment.yml b/.github/workflows/Deployment.yml index b1a2ba03b..1b106102a 100644 --- a/.github/workflows/Deployment.yml +++ b/.github/workflows/Deployment.yml @@ -114,4 +114,4 @@ jobs: TAG_VERSION: ${{github.event.inputs.tag}} id: publish run: | - ./gradlew :apollo:publishAllPublicationsToGitHubPackagesRepository :apollo:publishJsPackageToGithubRegistry \ No newline at end of file + ./gradlew :publishAllPublicationsToGitHubPackagesRepository :apollo:publishJsPackageToGithubRegistry \ No newline at end of file diff --git a/cryptography/src/commonMain/kotlin/io/iohk/atala/prism/apollo/derivation/HDKey.kt b/cryptography/src/commonMain/kotlin/io/iohk/atala/prism/apollo/derivation/HDKey.kt index b1324d51d..8d3ee705e 100644 --- a/cryptography/src/commonMain/kotlin/io/iohk/atala/prism/apollo/derivation/HDKey.kt +++ b/cryptography/src/commonMain/kotlin/io/iohk/atala/prism/apollo/derivation/HDKey.kt @@ -159,17 +159,13 @@ class HDKey( index = index ) - return try { - opt.privateKey = KMMECSecp256k1PrivateKey.tweak(privateKey, childTweak).raw - return HDKey( - privateKey = opt.privateKey, - chainCode = opt.chainCode, - depth = opt.depth, - childIndex = BigIntegerWrapper(opt.index) - ) - } catch (err: Error) { - this.deriveChild(BigIntegerWrapper(index + 1)) - } + opt.privateKey = KMMECSecp256k1PrivateKey.tweak(privateKey, childTweak).raw + return HDKey( + privateKey = opt.privateKey, + chainCode = opt.chainCode, + depth = opt.depth, + childIndex = BigIntegerWrapper(opt.index) + ) } /**