followup to reducing server calls on loading transaction tab

This commit is contained in:
Craig Raw 2024-01-17 10:48:57 +02:00
parent ad1ecfb887
commit 1b460533f5

View file

@ -434,13 +434,8 @@ public class TransactionController implements Initializable {
} }
Map<Script, WalletNode> openWalletOutputScripts = new HashMap<>(); Map<Script, WalletNode> openWalletOutputScripts = new HashMap<>();
for(Wallet wallet : AppServices.get().getOpenWallets().keySet()) { for(Wallet wallet : AppServices.get().getOpenWallets().keySet().stream().filter(Wallet::isValid).collect(Collectors.toList())) {
openWalletOutputScripts.putAll(wallet.getWalletOutputScripts()); openWalletOutputScripts.putAll(wallet.getWalletOutputScripts());
for(Wallet childWallet : wallet.getChildWallets()) {
if(!childWallet.isNested()) {
openWalletOutputScripts.putAll(childWallet.getWalletOutputScripts());
}
}
} }
for(int i = indexStart; i < getTransaction().getOutputs().size() && i < maxIndex; i++) { for(int i = indexStart; i < getTransaction().getOutputs().size() && i < maxIndex; i++) {