diff --git a/CHANGELOG.md b/CHANGELOG.md index ff88b5755..9d3dc76a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [v0.24.5](https://github.com/nervosnetwork/ckb-sdk-java/compare/v0.24.2...v0.24.5) (2019-11-08) + +### BugFix + +* Update address parse args length exception([dbf4fe5](https://github.com/nervosnetwork/ckb-sdk-java/commit/f21e62f69a92c9059ec990743cd5fcf509f4cf5b)) + # [v0.24.2](https://github.com/nervosnetwork/ckb-sdk-java/compare/v0.24.1...v0.24.2) (2019-11-07) ### Feature @@ -319,4 +325,3 @@ Sending transaction with single sig address will be changed because of new witne * add script model and calculate type hash ([c3ddb81](https://github.com/nervosnetwork/ckb-sdk-java/commit/c3ddb81)) - diff --git a/build.gradle b/build.gradle index 66c0fe1c2..7e1a638ef 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ allprojects { targetCompatibility = 1.8 group 'org.nervos.ckb' - version '0.24.2' + version '0.24.5' apply plugin: 'java' @@ -113,7 +113,7 @@ configure(subprojects.findAll { it.name != 'tests' }) { publications { mavenJava(MavenPublication) { groupId 'org.nervos.ckb' - version '0.24.2' + version '0.24.5' from components.java } } diff --git a/ckb/src/main/java/org/nervos/ckb/utils/address/AddressParser.java b/ckb/src/main/java/org/nervos/ckb/utils/address/AddressParser.java index e3dcb8a2f..ee9274774 100644 --- a/ckb/src/main/java/org/nervos/ckb/utils/address/AddressParser.java +++ b/ckb/src/main/java/org/nervos/ckb/utils/address/AddressParser.java @@ -28,7 +28,7 @@ public static AddressParseResult parse(String address) throws AddressFormatExcep if (TYPE_SHORT.equals(type)) { String codeHashIndex = payload.substring(2, 4); String args = Numeric.prependHexPrefix(payload.substring(4)); - if (Numeric.cleanHexPrefix(args).length() != 40) { + if (Numeric.cleanHexPrefix(args).length() / 2 != 20) { throw new AddressFormatException("Short address args byte length must be equal to 20"); } if (CODE_HASH_IDX_BLAKE160.equals(codeHashIndex)) {