diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java index 6de256c7..33611894 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletTransactionsEntry.java @@ -93,7 +93,8 @@ public class WalletTransactionsEntry extends Entry { private static void getWalletTransactions(Wallet wallet, Map walletTransactionMap, WalletNode purposeNode) { KeyPurpose keyPurpose = purposeNode.getKeyPurpose(); - for(WalletNode addressNode : purposeNode.getChildren()) { + List childNodes = new ArrayList<>(purposeNode.getChildren()); + for(WalletNode addressNode : childNodes) { for(BlockTransactionHashIndex hashIndex : addressNode.getTransactionOutputs()) { BlockTransaction inputTx = wallet.getTransactions().get(hashIndex.getHash()); //A null inputTx here means the wallet is still updating - ignore as the WalletHistoryChangedEvent will run this again