Skip to content

Commit

Permalink
fix it in the other place
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Mar 6, 2024
1 parent 6817d84 commit f646cd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/XMTPiOS/Messages/MessageV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ extension MessageV2 {

let ciphertext = try Crypto.encrypt(keyMaterial, signedBytes, additionalData: headerBytes)

let thirtyDayPeriodsSinceEpoch = Int(date.timeIntervalSince1970 / 60 / 60 / 24 / 30)
let daysSinceEpoch = Date().timeIntervalSince1970 / (60 * 60 * 24)
let thirtyDayPeriodsSinceEpoch = Int(floor(daysSinceEpoch / 30))
let info = "\(thirtyDayPeriodsSinceEpoch)-\(client.address)"
guard let infoEncoded = info.data(using: .utf8) else {
throw MessageV2Error.invalidData
Expand Down

0 comments on commit f646cd6

Please sign in to comment.