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.
51 lines
1.3 KiB
51 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: [RPCServer] {
|
|
return [
|
|
RPCServer.main,
|
|
RPCServer.classic,
|
|
RPCServer.poa,
|
|
// RPCServer.callisto, TODO: Enable.
|
|
RPCServer.kovan,
|
|
RPCServer.ropsten,
|
|
RPCServer.rinkeby,
|
|
RPCServer.sokol,
|
|
]
|
|
}
|
|
|
|
var currency: [Currency] {
|
|
return Currency.allValues.map { $0 }
|
|
}
|
|
|
|
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: "")
|
|
}
|
|
|
|
var currencyTitle: String {
|
|
return NSLocalizedString("settings.currency.button.title", value: "Currency", comment: "")
|
|
}
|
|
}
|
|
|