PeerID 6/n: Unifiy validation (#743)

This commit is contained in:
Islam
2025-10-02 13:36:49 +02:00
committed by GitHub
parent e4ec2ef3fe
commit 8cfee095d3
6 changed files with 3 additions and 74 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ struct ReadReceipt: Codable {
guard let readerIDData = dataCopy.readFixedBytes(at: &offset, count: 8) else { return nil }
let readerID = readerIDData.hexEncodedString()
guard InputValidator.validatePeerID(readerID) else { return nil }
guard PeerID(str: readerID).isValid else { return nil }
guard let timestamp = dataCopy.readDate(at: &offset),
InputValidator.validateTimestamp(timestamp),