Use aesKey in Wallet.toString()

This commit is contained in:
Oscar Guindzberg 2020-10-11 20:42:53 -03:00
parent 3687a03695
commit 8e93e4be0b
2 changed files with 3 additions and 2 deletions

View file

@ -208,7 +208,7 @@ public class BsqWalletService extends WalletService implements DaoStateListener
@Override
String getWalletAsString(boolean includePrivKeys) {
return wallet.toString(true, includePrivKeys, null, true, true, walletsSetup.getChain()) + "\n\n" +
return wallet.toString(true, includePrivKeys, this.aesKey, true, true, walletsSetup.getChain()) + "\n\n" +
"All pubKeys as hex:\n" +
wallet.printAllPubKeysAsHex();
}

View file

@ -138,10 +138,11 @@ public class BtcWalletService extends WalletService {
String getWalletAsString(boolean includePrivKeys) {
StringBuilder sb = new StringBuilder();
getAddressEntryListAsImmutableList().forEach(e -> sb.append(e.toString()).append("\n"));
//boolean reallyIncludePrivKeys = includePrivKeys && !wallet.isEncrypted();
return "Address entry list:\n" +
sb.toString() +
"\n\n" +
wallet.toString(true, includePrivKeys, null, true, true, walletsSetup.getChain()) + "\n\n" +
wallet.toString(true, includePrivKeys, this.aesKey, true, true, walletsSetup.getChain()) + "\n\n" +
"All pubKeys as hex:\n" +
wallet.printAllPubKeysAsHex();
}