Fix crash in relay list view
Changelog-Fixed: Fix crash in relay list view
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
fileprivate let BOOTSTRAP_RELAYS = [
|
||||
let BOOTSTRAP_RELAYS = [
|
||||
"wss://relay.damus.io",
|
||||
"wss://eden.nostr.land",
|
||||
"wss://nostr.wine",
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user