Fixed bug causing duplicate AT entries in local array.

This commit is contained in:
CalDescent 2023-05-21 08:41:56 +01:00
parent 8b51590844
commit e1043ceacb

View File

@ -143,7 +143,8 @@ public abstract class RepositoryManager {
for (ATTransactionData atTransactionData : atTransactions) {
ATData atData = repository.getATRepository().fromATAddress(atTransactionData.getATAddress());
if (!ats.contains(atData)) {
boolean hasExistingEntry = ats.stream().anyMatch(a -> Objects.equals(a.getATAddress(), atTransactionData.getATAddress()));
if (!hasExistingEntry) {
ats.add(atData);
}
}