terminal - create watch only wallet

This commit is contained in:
Craig Raw
2022-10-19 15:37:14 +02:00
parent 8eb092a8d6
commit 8f165b05c7
12 changed files with 341 additions and 100 deletions
@@ -1634,6 +1634,10 @@ public class ElectrumServer {
}
private List<StandardAccount> getStandardAccounts(Wallet wallet) {
if(!wallet.getKeystores().stream().allMatch(Keystore::hasMasterPrivateKey)) {
return Collections.emptyList();
}
List<StandardAccount> accounts = new ArrayList<>();
for(StandardAccount account : StandardAccount.values()) {
if(account != StandardAccount.ACCOUNT_0 && (!StandardAccount.WHIRLPOOL_ACCOUNTS.contains(account) || wallet.getScriptType() == ScriptType.P2WPKH)) {