diff --git a/ios/WalletInformationWidget/Widgets/Shared/UserDefaultsGroup.swift b/ios/WalletInformationWidget/Widgets/Shared/UserDefaultsGroup.swift index 0460166a3..4d07e115a 100644 --- a/ios/WalletInformationWidget/Widgets/Shared/UserDefaultsGroup.swift +++ b/ios/WalletInformationWidget/Widgets/Shared/UserDefaultsGroup.swift @@ -32,13 +32,16 @@ class UserDefaultsGroup { static private let suite = UserDefaults(suiteName: UserDefaultsGroupKey.GroupName.rawValue) static func getElectrumSettings() -> UserDefaultsElectrumSettings { - guard let electrumSettingsHost = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsHost.rawValue), let electrumSettingsTCPPort = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsTCPPort.rawValue), let electrumSettingsSSLPort = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsSSLPort.rawValue) else { + guard let electrumSettingsHost = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsHost.rawValue) else { return UserDefaultsElectrumSettings(host: "electrum1.bluewallet.io", port: 50001, sslPort: 443) } + let electrumSettingsTCPPort = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsTCPPort.rawValue) ?? "50001" + let electrumSettingsSSLPort = suite?.string(forKey: UserDefaultsGroupKey.ElectrumSettingsSSLPort.rawValue) ?? "443" + let host = electrumSettingsHost - let sslPort = Int32(electrumSettingsSSLPort) ?? 443 - let port = Int32(electrumSettingsTCPPort) ?? 50001 + let sslPort = Int32(electrumSettingsSSLPort) + let port = Int32(electrumSettingsTCPPort) return UserDefaultsElectrumSettings(host: host, port: port, sslPort: sslPort) }