Skip to content

Commit

Permalink
correct testnet folder and importing of transparent addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Dec 20, 2018
1 parent e8569c2 commit 8b35ba0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/java/com/vaklinov/zcashui/DashboardPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private void updateDaemonStatusLabel() throws IOException, InterruptedException,
// TODO: what if ZCash directory is non-default...
File walletDAT = new File(OSUtil.getBlockchainDirectory() + "/wallet.dat");
if (this.installationObserver.isOnTestNet()) {
walletDAT = new File(OSUtil.getBlockchainDirectory() + "/testnet3" + "/wallet.dat");
walletDAT = new File(OSUtil.getBlockchainDirectory() + "/testnet5" + "/wallet.dat");
}

if (this.OSInfo == null) {
Expand Down
3 changes: 1 addition & 2 deletions src/java/com/vaklinov/zcashui/ZCashClientCaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,7 @@ public synchronized String importPrivateKey(String key)
} else if (strResult.trim().toLowerCase(Locale.ROOT).startsWith("error code:"))
{
JsonObject respObject = Util.getJsonErrorMessage(strResult);
if ((respObject.getDouble("code", +123) == -1) &&
(respObject.getString("message", "ERR").indexOf("wrong network type") != -1))
if (((respObject.getDouble("code", +123) == -1) && (respObject.getString("message", "ERR").indexOf("wrong network type") != -1)) || strResult.trim().toLowerCase(Locale.ROOT).indexOf("invalid spending key") != -1)
{
// Obviously T address - do nothing here
} else
Expand Down

0 comments on commit 8b35ba0

Please sign in to comment.