Skip to content

Commit d9d3492

Browse files
authored
Fix the bug of duplicated events (block-core#631)
1 parent 337fb8a commit d9d3492

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Angor/Avalonia/Angor.Sdk/Funding/Services/InvestmentHandshakeService.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,11 @@ await signService.LookupAllInvestmentMessagesAsync(
366366
);
367367

368368
await tcs.Task;
369-
return Result.Success((requests, notifications, cancellations, approvals));
369+
return Result.Success((
370+
requests.DistinctBy(r => r.Id).ToList(),
371+
notifications.DistinctBy(n => n.Id).ToList(),
372+
cancellations.DistinctBy(c => c.Id).ToList(),
373+
approvals.DistinctBy(a => a.EventIdentifier).ToList()));
370374
}
371375
catch (Exception ex)
372376
{

0 commit comments

Comments
 (0)