From 0be0896e91748287c335b7a6e49b89292312e994 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Fri, 25 Nov 2022 17:28:10 +0100 Subject: [PATCH] fix handling of incomplete transactions --- EliteBGS/MainWindow.xaml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EliteBGS/MainWindow.xaml.cs b/EliteBGS/MainWindow.xaml.cs index 7d546a8..997c99a 100644 --- a/EliteBGS/MainWindow.xaml.cs +++ b/EliteBGS/MainWindow.xaml.cs @@ -68,11 +68,12 @@ public partial class MainWindow : Window { TransactionParser parser = new TransactionParser(); List transactions = parser.Parse(entries); + List incompletes = transactions.OfType().ToList(); // Log incomplete and remove them from the results. - foreach (var incomplete in transactions.OfType()) { + foreach (var incomplete in incompletes) { Log(incomplete.Reason); - transactions.Remove(incomplete); } + transactions.RemoveAll(x => incompletes.Contains(x)); report = new Report(transactions); this.entries.ItemsSource = report.Objectives;