damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit b9fed6e4eb0fb7e8d4119f073030e96e4dccc7e9
parent 6910e84fd8000e65a4a348dfa8a085e630d80e8d
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  5 Apr 2023 12:33:08 -0700

Fix crash in relay list view

Changelog-Fixed: Fix crash in relay list view

Diffstat:
Mdamus/Util/Relays/RelayBootstrap.swift | 2+-
Mdamus/Views/Relays/RelayConfigView.swift | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/damus/Util/Relays/RelayBootstrap.swift b/damus/Util/Relays/RelayBootstrap.swift @@ -7,7 +7,7 @@ import Foundation -fileprivate let BOOTSTRAP_RELAYS = [ +let BOOTSTRAP_RELAYS = [ "wss://relay.damus.io", "wss://eden.nostr.land", "wss://nostr.wine", diff --git a/damus/Views/Relays/RelayConfigView.swift b/damus/Views/Relays/RelayConfigView.swift @@ -22,9 +22,9 @@ struct RelayConfigView: View { var recommended: [RelayDescriptor] { let rs: [RelayDescriptor] = [] - return state.bootstrap_relays.reduce(into: rs) { xs, x in - if state.pool.get_relay(x) == nil { - xs.append(RelayDescriptor(url: URL(string: x)!, info: .rw)) + return BOOTSTRAP_RELAYS.reduce(into: rs) { xs, x in + if state.pool.get_relay(x) == nil, let url = URL(string: x) { + xs.append(RelayDescriptor(url: url, info: .rw)) } } }