fix handling of incomplete transactions
This commit is contained in:
parent
f8559bbe06
commit
0be0896e91
@ -68,11 +68,12 @@ public partial class MainWindow : Window {
|
|||||||
TransactionParser parser = new TransactionParser();
|
TransactionParser parser = new TransactionParser();
|
||||||
List<Transaction> transactions = parser.Parse(entries);
|
List<Transaction> transactions = parser.Parse(entries);
|
||||||
|
|
||||||
|
List<IncompleteTransaction> incompletes = transactions.OfType<IncompleteTransaction>().ToList();
|
||||||
// Log incomplete and remove them from the results.
|
// Log incomplete and remove them from the results.
|
||||||
foreach (var incomplete in transactions.OfType<IncompleteTransaction>()) {
|
foreach (var incomplete in incompletes) {
|
||||||
Log(incomplete.Reason);
|
Log(incomplete.Reason);
|
||||||
transactions.Remove(incomplete);
|
|
||||||
}
|
}
|
||||||
|
transactions.RemoveAll(x => incompletes.Contains(x));
|
||||||
|
|
||||||
report = new Report(transactions);
|
report = new Report(transactions);
|
||||||
this.entries.ItemsSource = report.Objectives;
|
this.entries.ItemsSource = report.Objectives;
|
||||||
|
Loading…
Reference in New Issue
Block a user