Skip to content

Commit

Permalink
use existing logic to get oldestNonFakeKeyDate
Browse files Browse the repository at this point in the history
  • Loading branch information
stmitt committed Apr 20, 2021
1 parent 6529564 commit 2893d15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/DP3TSDK/DP3TSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ class DP3TSDK {
withFederationGateway = nil
}

let oldestNonFakeKeyDate = mutableKeys
.filter { $0.fake == 0 }
.map(\.date)
.min()
var oldestNonFakeKeyDate: Date? = nil
if !isFakeRequest {
oldestNonFakeKeyDate = Date(timeIntervalSince1970: Double(oldestRollingStartNumber) * 10 * .minute)
}

let model = ExposeeListModel(gaenKeys: mutableKeys,
withFederationGateway: withFederationGateway,
Expand Down

0 comments on commit 2893d15

Please sign in to comment.