commit 57159f7df97297ef0695924817e3bc377b8800db
parent 4712c6b28899a93be96ad68125154ddef3ba45e9
Author: Terry Yiu <git@tyiu.xyz>
Date: Mon, 3 Jul 2023 11:25:41 -0400
Fix build warnings
Signed-off-by: Terry Yiu <git@tyiu.xyz>
Reviewed-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift
@@ -154,7 +154,7 @@ class HomeModel {
print("nwc: \(resp.req_id) not found in the postbox, nothing to remove [\(relay)]")
}
- guard let err = resp.response.error else {
+ guard resp.response.error != nil else {
print("nwc success: \(resp.response.result.debugDescription) [\(relay)]")
nwc_success(state: self.damus_state, resp: resp)
return
diff --git a/damus/Util/PostBox.swift b/damus/Util/PostBox.swift
@@ -150,7 +150,7 @@ class PostBox {
relayer.attempts += 1
relayer.last_attempt = Int64(Date().timeIntervalSince1970)
relayer.retry_after *= 1.5
- if let relay = pool.get_relay(relayer.relay) {
+ if pool.get_relay(relayer.relay) != nil {
print("flushing event \(event.event.id) to \(relayer.relay)")
} else {
print("could not find relay when flushing: \(relayer.relay)")