blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
struct SettingsViewModel {
|
|
|
|
private let isDebug: Bool
|
|
|
|
init(
|
|
isDebug: Bool = false
|
|
) {
|
|
self.isDebug = isDebug
|
|
}
|
|
|
|
var servers: [String] {
|
|
let list: [RPCServer] = {
|
|
if isDebug {
|
|
return [
|
|
RPCServer.main,
|
|
RPCServer.kovan,
|
|
RPCServer.ropsten,
|
|
RPCServer.poaTest,
|
|
]
|
|
}
|
|
return [
|
|
RPCServer.main,
|
|
RPCServer.poa,
|
|
RPCServer.kovan,
|
|
RPCServer.ropsten,
|
|
]
|
|
}()
|
|
return list.map { $0.name }
|
|
}
|
|
|
|
var passcodeTitle: String {
|
|
switch BiometryAuthenticationType.current {
|
|
case .faceID, .touchID:
|
|
return String(
|
|
format: NSLocalizedString("settings.biometricsEnabled.label.title", value: "Passcode / %@", comment: ""),
|
|
BiometryAuthenticationType.current.title
|
|
)
|
|
case .none:
|
|
return NSLocalizedString("settings.biometricsDisabled.label.title", value: "Passcode", comment: "")
|
|
}
|
|
}
|
|
|
|
var networkTitle: String {
|
|
return NSLocalizedString("settings.network.button.title", value: "Network", comment: "")
|
|
}
|
|
}
|
|
|