Skip to content

Commit

Permalink
Address PR comments, remove java11 method
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-richardson committed Oct 30, 2019
1 parent 7397e3f commit 0857c4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/web3j/console/WalletFunder.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(IODevice console, String[] args) {
String fund =
console.readLine(
"This command will fund the specified wallet on the Rinkeby testnet. Do you wish to continue? [Y/n]: ");
if (!fund.toUpperCase().equals("Y")) {
if (fund.toUpperCase().equals("N")) {
exitError("Operation was cancelled by user.");
}
String transactionHash = fundWallet(args[0], args.length == 3 ? args[2] : null);
Expand Down Expand Up @@ -139,7 +139,9 @@ private static String fundWallet(String walletAddress, String token) throws Exce
StandardCharsets
.UTF_8)))
.substring(2);
if (potentialHash.startsWith("0".repeat(config.difficulty))) {
if (potentialHash.startsWith(
new String(new char[config.difficulty])
.replace("\0", "0"))) {
found.set(true);
intResult.set(i);
}
Expand Down

0 comments on commit 0857c4c

Please sign in to comment.