mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 15:05:24 +00:00
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)
This commit is contained in:
@@ -37,7 +37,7 @@ struct NostrProtocol {
|
|||||||
|
|
||||||
// 2. Create ephemeral key for this message
|
// 2. Create ephemeral key for this message
|
||||||
let ephemeralKey = try P256K.Schnorr.PrivateKey()
|
let ephemeralKey = try P256K.Schnorr.PrivateKey()
|
||||||
let ephemeralPubkey = Data(ephemeralKey.xonly.bytes).hexEncodedString()
|
let _ = Data(ephemeralKey.xonly.bytes).hexEncodedString()
|
||||||
// Created ephemeral key for seal
|
// Created ephemeral key for seal
|
||||||
|
|
||||||
// 3. Seal the rumor (encrypt to recipient)
|
// 3. Seal the rumor (encrypt to recipient)
|
||||||
@@ -213,7 +213,7 @@ struct NostrProtocol {
|
|||||||
throw NostrError.invalidPublicKey
|
throw NostrError.invalidPublicKey
|
||||||
}
|
}
|
||||||
|
|
||||||
let senderPubkey = Data(senderKey.xonly.bytes).hexEncodedString()
|
let _ = Data(senderKey.xonly.bytes).hexEncodedString()
|
||||||
// Encrypting message
|
// Encrypting message
|
||||||
|
|
||||||
// Derive shared secret
|
// Derive shared secret
|
||||||
@@ -449,12 +449,12 @@ struct NostrProtocol {
|
|||||||
let formatter = DateFormatter()
|
let formatter = DateFormatter()
|
||||||
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
||||||
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
formatter.timeZone = TimeZone(abbreviation: "UTC")
|
||||||
let nowUTC = formatter.string(from: now)
|
let _ = formatter.string(from: now)
|
||||||
let randomizedUTC = formatter.string(from: randomized)
|
let _ = formatter.string(from: randomized)
|
||||||
|
|
||||||
formatter.timeZone = TimeZone.current
|
formatter.timeZone = TimeZone.current
|
||||||
let nowLocal = formatter.string(from: now)
|
let _ = formatter.string(from: now)
|
||||||
let randomizedLocal = formatter.string(from: randomized)
|
let _ = formatter.string(from: randomized)
|
||||||
|
|
||||||
// Timestamp randomized for privacy
|
// Timestamp randomized for privacy
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user