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.
49 lines
1.0 KiB
49 lines
1.0 KiB
//
|
|
// RedeemTicketsViewModel.swift
|
|
// Alpha-Wallet
|
|
//
|
|
// Created by Oguzhan Gungor on 3/4/18.
|
|
// Copyright © 2018 Alpha-Wallet. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
struct RedeemTicketsViewModel {
|
|
|
|
var token: TokenObject
|
|
var ticketHolders: [TicketHolder]?
|
|
|
|
init(token: TokenObject) {
|
|
self.token = token
|
|
self.ticketHolders = TicketAdaptor.getTicketHolders(for: token)
|
|
}
|
|
|
|
func item(for indexPath: IndexPath) -> TicketHolder {
|
|
return ticketHolders![indexPath.row]
|
|
}
|
|
|
|
func numberOfItems(for section: Int) -> Int {
|
|
return ticketHolders!.count
|
|
}
|
|
|
|
func height(for section: Int) -> CGFloat {
|
|
return 90
|
|
}
|
|
|
|
var title: String {
|
|
return R.string.localizable.aWalletTicketTokenRedeemSelectTicketsTitle ()
|
|
}
|
|
|
|
var buttonTitleColor: UIColor {
|
|
return Colors.appWhite
|
|
}
|
|
|
|
var buttonBackgroundColor: UIColor {
|
|
return Colors.appHighlightGreen
|
|
}
|
|
|
|
var buttonFont: UIFont {
|
|
return Fonts.regular(size: 20)!
|
|
}
|
|
}
|
|
|