mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
Update UserDefaultsGroup.swift
This commit is contained in:
parent
e16de64c1a
commit
03a3bae033
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user