Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #90 from klaytn/release/v1.3.3
Browse files Browse the repository at this point in the history
[Master] release/v1.3.3 QA Sign-off
  • Loading branch information
kale authored Apr 20, 2020
2 parents 7968e2e + e56d27e commit bb2048f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
#* @global-owner1 @global-owner2
* @nogang @kjhman21 @jimni1222
* @kjhman21 @jimni1222 @sirano11

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {

allprojects {

version '1.3.2'
version '1.3.3'
group 'com.klaytn.caver'
description 'caver-java project'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public static boolean isValidAddress(String input) {
return false;
}

return cleanInput.length() <= ADDRESS_HEX_SIZE && HEX_STRING.matcher(cleanInput).matches();
return cleanInput.length() == ADDRESS_HEX_SIZE && HEX_STRING.matcher(cleanInput).matches();
}

public static String getDefaultKeyDirectory() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ public void testValidAddress() throws Exception {
String longAddress = KlayCredentials.create(Keys.createEcKeyPair()).getAddress() + "00000000000000000000000000000000000000000";
assertFalse("longAddress: " + longAddress, KlayWalletUtils.isValidAddress(longAddress));

String shortAddress = "0xe3ac552937b4ecc36891d5f37b189f8636e49f";
assertFalse("longAddress: " + longAddress, KlayWalletUtils.isValidAddress(shortAddress));

String validAddress = KlayCredentials.create(Keys.createEcKeyPair()).getAddress();
assertTrue("validAddress: " + validAddress, KlayWalletUtils.isValidAddress(validAddress));

String withoutPrefix = "e3ac552937b4ecc36891d5f37b189f8636e49f01";
assertTrue("validAddress: " + validAddress, KlayWalletUtils.isValidAddress(withoutPrefix));
}
}

0 comments on commit bb2048f

Please sign in to comment.