Add InCoordinatorViewModel

pull/2/head
Michael Scoff 7 years ago
parent d174393a9d
commit 41db23f3fe
  1. 12
      Trust.xcodeproj/project.pbxproj
  2. 23
      Trust/Core/ViewModels/InCoordinatorViewModel.swift

@ -60,6 +60,7 @@
29282B581F7636840067F88D /* GetTokensRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29282B571F7636840067F88D /* GetTokensRequest.swift */; }; 29282B581F7636840067F88D /* GetTokensRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29282B571F7636840067F88D /* GetTokensRequest.swift */; };
29285B421F6FB3E60044CF29 /* SendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29285B411F6FB3E60044CF29 /* SendViewController.swift */; }; 29285B421F6FB3E60044CF29 /* SendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29285B411F6FB3E60044CF29 /* SendViewController.swift */; };
292F75A91F88865A00585F8E /* TouchRegistrar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292F75A81F88865A00585F8E /* TouchRegistrar.swift */; }; 292F75A91F88865A00585F8E /* TouchRegistrar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292F75A81F88865A00585F8E /* TouchRegistrar.swift */; };
293112101FC4ADCB00966EEA /* InCoordinatorViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2931120F1FC4ADCB00966EEA /* InCoordinatorViewModel.swift */; };
293204581F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293204571F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift */; }; 293204581F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 293204571F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift */; };
2932045C1F8DCD6E0095B7C1 /* CurrencyRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2932045B1F8DCD6E0095B7C1 /* CurrencyRate.swift */; }; 2932045C1F8DCD6E0095B7C1 /* CurrencyRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2932045B1F8DCD6E0095B7C1 /* CurrencyRate.swift */; };
2932045E1F8EEE760095B7C1 /* BalanceCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2932045D1F8EEE760095B7C1 /* BalanceCoordinator.swift */; }; 2932045E1F8EEE760095B7C1 /* BalanceCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2932045D1F8EEE760095B7C1 /* BalanceCoordinator.swift */; };
@ -312,6 +313,7 @@
29282B571F7636840067F88D /* GetTokensRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetTokensRequest.swift; sourceTree = "<group>"; }; 29282B571F7636840067F88D /* GetTokensRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetTokensRequest.swift; sourceTree = "<group>"; };
29285B411F6FB3E60044CF29 /* SendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendViewController.swift; sourceTree = "<group>"; }; 29285B411F6FB3E60044CF29 /* SendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendViewController.swift; sourceTree = "<group>"; };
292F75A81F88865A00585F8E /* TouchRegistrar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchRegistrar.swift; sourceTree = "<group>"; }; 292F75A81F88865A00585F8E /* TouchRegistrar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TouchRegistrar.swift; sourceTree = "<group>"; };
2931120F1FC4ADCB00966EEA /* InCoordinatorViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InCoordinatorViewModel.swift; sourceTree = "<group>"; };
293204571F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRateCoordinator.swift; sourceTree = "<group>"; }; 293204571F8DC6B20095B7C1 /* ExchangeRateCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRateCoordinator.swift; sourceTree = "<group>"; };
2932045B1F8DCD6E0095B7C1 /* CurrencyRate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrencyRate.swift; sourceTree = "<group>"; }; 2932045B1F8DCD6E0095B7C1 /* CurrencyRate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CurrencyRate.swift; sourceTree = "<group>"; };
2932045D1F8EEE760095B7C1 /* BalanceCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BalanceCoordinator.swift; sourceTree = "<group>"; }; 2932045D1F8EEE760095B7C1 /* BalanceCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BalanceCoordinator.swift; sourceTree = "<group>"; };
@ -834,6 +836,14 @@
path = Ethplorer; path = Ethplorer;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
2931120E1FC4ADBE00966EEA /* ViewModels */ = {
isa = PBXGroup;
children = (
2931120F1FC4ADCB00966EEA /* InCoordinatorViewModel.swift */,
);
path = ViewModels;
sourceTree = "<group>";
};
293248881F88D586008A9818 /* Types */ = { 293248881F88D586008A9818 /* Types */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -1385,6 +1395,7 @@
29FC9BC31F830880000209CD /* Core */ = { 29FC9BC31F830880000209CD /* Core */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2931120E1FC4ADBE00966EEA /* ViewModels */,
29FC9BC41F830880000209CD /* Initializers */, 29FC9BC41F830880000209CD /* Initializers */,
); );
path = Core; path = Core;
@ -2050,6 +2061,7 @@
2932045E1F8EEE760095B7C1 /* BalanceCoordinator.swift in Sources */, 2932045E1F8EEE760095B7C1 /* BalanceCoordinator.swift in Sources */,
2912CD321F6A83EE00C6CBE3 /* WelcomeViewController.swift in Sources */, 2912CD321F6A83EE00C6CBE3 /* WelcomeViewController.swift in Sources */,
29F114F61FA8147300114A29 /* RequestCoordinator.swift in Sources */, 29F114F61FA8147300114A29 /* RequestCoordinator.swift in Sources */,
293112101FC4ADCB00966EEA /* InCoordinatorViewModel.swift in Sources */,
291F52A91F6B7BE100B369AB /* BlockNumber.swift in Sources */, 291F52A91F6B7BE100B369AB /* BlockNumber.swift in Sources */,
290B2B701F930AB90053C83E /* PushNotificationsRegistrar.swift in Sources */, 290B2B701F930AB90053C83E /* PushNotificationsRegistrar.swift in Sources */,
298542F31FBD594D00CB5081 /* SettingsViewModel.swift in Sources */, 298542F31FBD594D00CB5081 /* SettingsViewModel.swift in Sources */,

@ -0,0 +1,23 @@
// Copyright SIX DAY LLC. All rights reserved.
import Foundation
struct InCoordinatorViewModel {
let config: Config
init(config: Config) {
self.config = config
}
var tokensAvailable: Bool {
switch config.server {
case .main: return true
case .kovan, .oraclesTest: return false
}
}
var exchangeAvailable: Bool {
return false
}
}
Loading…
Cancel
Save