File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -523,6 +523,11 @@ extension PrivatePaykitService {
523523 return nil
524524 }
525525
526+ let now = UInt64 ( Date ( ) . timeIntervalSince1970)
527+ guard marker. createdAt >= now || now - marker. createdAt <= Self . recoveryMarkerFreshnessSeconds else {
528+ return nil
529+ }
530+
526531 let contactKey = [ writerPublicKey, readerPublicKey]
527532 . compactMap ( PubkyPublicKeyFormat . normalized)
528533 . first { state. contacts [ $0] != nil }
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ actor PrivatePaykitService {
2626 static let pendingPublicationRetryDelay : UInt64 = 5_000_000_000
2727 static let pendingPublicationRetryAttempts = 60
2828 static let freshLinkInitialPublishDelaySeconds : UInt64 = 8
29+ static let recoveryMarkerFreshnessSeconds : UInt64 = 60 * 60
2930 static let completedLinkRecoveryMarkerGraceSeconds : UInt64 = 5 * 60
3031 static let privateStorageRootPath = " /pub/paykit/v0/private/ "
3132 static let privateStoragePurgeMaxEntries = 500
You can’t perform that action at this time.
0 commit comments