From 8b35ba0cbf9c6bec9e6e6da573ed00874a1d70b4 Mon Sep 17 00:00:00 2001 From: TheTrunk Date: Thu, 20 Dec 2018 12:10:20 +0100 Subject: [PATCH] correct testnet folder and importing of transparent addresses --- src/java/com/vaklinov/zcashui/DashboardPanel.java | 2 +- src/java/com/vaklinov/zcashui/ZCashClientCaller.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/java/com/vaklinov/zcashui/DashboardPanel.java b/src/java/com/vaklinov/zcashui/DashboardPanel.java index 9eb85d83..cd2f9405 100644 --- a/src/java/com/vaklinov/zcashui/DashboardPanel.java +++ b/src/java/com/vaklinov/zcashui/DashboardPanel.java @@ -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) { diff --git a/src/java/com/vaklinov/zcashui/ZCashClientCaller.java b/src/java/com/vaklinov/zcashui/ZCashClientCaller.java index b51282d3..2db5e93c 100644 --- a/src/java/com/vaklinov/zcashui/ZCashClientCaller.java +++ b/src/java/com/vaklinov/zcashui/ZCashClientCaller.java @@ -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