An advanced Ethereum/EVM mobile wallet
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.
 
 
 
alpha-wallet-ios/Trust/Tokens/ViewModels/TokensViewModel.swift

37 lines
613 B

// Copyright SIX DAY LLC. All rights reserved.
import Foundation
import UIKit
struct TokensViewModel {
var tokens: [Token] = []
init(tokens: [Token]) {
self.tokens = tokens
}
var title: String {
return "Tokens"
}
var backgroundColor: UIColor {
return .white
}
var hasContent: Bool {
return !tokens.isEmpty
}
var numberOfSections: Int {
return 1
}
func numberOfItems(for section: Int) -> Int {
return tokens.count
}
func item(for row: Int, section: Int) -> Token {
return tokens[row]
}
}