Skip to content

Commit

Permalink
private key for transparent address may start with a "5" as well
Browse files Browse the repository at this point in the history
  • Loading branch information
miodragpop committed Mar 21, 2019
1 parent eb4159b commit f5ba1fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/java/com/vaklinov/zcashui/ZCashClientCaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ public synchronized String importPrivateKey(String key)
{
String first_letter = key.substring(0, 1);

// T keys start with "L" or "K"
// T keys start with "L", "K" or "5"
// Z keys start with "S" or "s"

if (first_letter.equals("S") || first_letter.equals("s"))
Expand Down Expand Up @@ -997,7 +997,7 @@ public synchronized String importPrivateKey(String key)
throw new WalletCallException("Unexpected response from wallet: " + strResult);
}
}
else if (first_letter.equals("L") || first_letter.equals("K"))
else if (first_letter.equals("L") || first_letter.equals("K") || first_letter.equals("5"))
{
// try a T key
String strResult = this.executeCommandAndGetSingleStringResponse(
Expand All @@ -1019,7 +1019,7 @@ else if (first_letter.equals("L") || first_letter.equals("K"))
}
else
{
throw new WalletCallException("Single private key should start with a 'L' or a 'S' !!!");
throw new WalletCallException("Single private key should start with a 'L', 'K', '5', 'S' or a 's' !!!");
}
throw new WalletCallException("Error while importing private key");
}
Expand Down

0 comments on commit f5ba1fb

Please sign in to comment.