diff --git a/src/main/java/uk/gov/pay/ledger/event/model/EventDigest.java b/src/main/java/uk/gov/pay/ledger/event/model/EventDigest.java index b33825250..41bf6d35e 100644 --- a/src/main/java/uk/gov/pay/ledger/event/model/EventDigest.java +++ b/src/main/java/uk/gov/pay/ledger/event/model/EventDigest.java @@ -51,7 +51,8 @@ public static EventDigest fromEventList(List events) { .orElseThrow(() -> new EmptyEventsException("No events found")); var latestSalientEventType = events.stream() - .map(e -> SalientEventType.from(e.getEventType())) + .map(Event::getEventType) + .map(SalientEventType::from) .flatMap(Optional::stream) .findFirst() .orElse(null);