Skip to content

Commit b6e6f0f

Browse files
committed
Fix unused variable warnings in NostrProtocol.swift
Replace unused variable names with _ to silence compiler warnings: - ephemeralPubkey calculation (line 40) - senderPubkey calculation (line 216) - timestamp formatter strings (lines 452-453, 456-457)
1 parent a97d5c2 commit b6e6f0f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bitchat/Nostr/NostrProtocol.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct NostrProtocol {
3737

3838
// 2. Create ephemeral key for this message
3939
let ephemeralKey = try P256K.Schnorr.PrivateKey()
40-
let ephemeralPubkey = Data(ephemeralKey.xonly.bytes).hexEncodedString()
40+
let _ = Data(ephemeralKey.xonly.bytes).hexEncodedString()
4141
// Created ephemeral key for seal
4242

4343
// 3. Seal the rumor (encrypt to recipient)
@@ -213,7 +213,7 @@ struct NostrProtocol {
213213
throw NostrError.invalidPublicKey
214214
}
215215

216-
let senderPubkey = Data(senderKey.xonly.bytes).hexEncodedString()
216+
let _ = Data(senderKey.xonly.bytes).hexEncodedString()
217217
// Encrypting message
218218

219219
// Derive shared secret
@@ -449,12 +449,12 @@ struct NostrProtocol {
449449
let formatter = DateFormatter()
450450
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
451451
formatter.timeZone = TimeZone(abbreviation: "UTC")
452-
let nowUTC = formatter.string(from: now)
453-
let randomizedUTC = formatter.string(from: randomized)
452+
let _ = formatter.string(from: now)
453+
let _ = formatter.string(from: randomized)
454454

455455
formatter.timeZone = TimeZone.current
456-
let nowLocal = formatter.string(from: now)
457-
let randomizedLocal = formatter.string(from: randomized)
456+
let _ = formatter.string(from: now)
457+
let _ = formatter.string(from: randomized)
458458

459459
// Timestamp randomized for privacy
460460

0 commit comments

Comments
 (0)