WalletTool: Use Wallet.hasKey() rather than Wallet.findKeyFromPubKey().

This commit is contained in:
Andreas Schildbach 2019-02-03 16:55:13 +01:00
parent 58ca1d1d8c
commit ac7a576b3d

View File

@ -1435,7 +1435,7 @@ public class WalletTool {
} else {
throw new IllegalStateException();
}
if (wallet.findKeyFromPubKey(key.getPubKey()) != null) {
if (wallet.hasKey(key)) {
System.err.println("That key already exists in this wallet.");
return;
}