Skip to content

Commit

Permalink
fix: hdkey had a error in the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-frade-iohk committed Nov 7, 2023
1 parent 5b08aee commit dd9d926
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ jobs:
TAG_VERSION: ${{github.event.inputs.tag}}
id: publish
run: |
./gradlew :apollo:publishAllPublicationsToGitHubPackagesRepository :apollo:publishJsPackageToGithubRegistry
./gradlew :publishAllPublicationsToGitHubPackagesRepository :apollo:publishJsPackageToGithubRegistry

Check failure on line 117 in .github/workflows/Deployment.yml

View workflow job for this annotation

GitHub Actions / Lint changes

117:111 [new-line-at-end-of-file] no new line character at the end of file
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}

/**
Expand Down

0 comments on commit dd9d926

Please sign in to comment.