@@ -98,37 +98,37 @@ public class ExchangeDataStore<T: TickerType, U: BalanceType> {
98
98
99
99
extension ExchangeDataStore : TickerTableViewDataSource {
100
100
101
- private func ticker( for section: Int , for row: Int , for viewType: TickerViewType ) -> T ? {
101
+ private func ticker( section: Int , row: Int , viewType: TickerViewType ) -> T ? {
102
102
switch viewType {
103
103
case . quantity: return tickerByQuantityCCY [ section] [ row]
104
104
case . price: return tickerByPriceCCY [ section] [ row]
105
105
default : return nil
106
106
}
107
107
}
108
108
109
- public func sectionCount( for viewType: TickerViewType ) -> Int {
109
+ public func sectionCount( viewType: TickerViewType ) -> Int {
110
110
switch viewType {
111
111
case . quantity: return tickerByQuantityCCY. count
112
112
case . price: return tickerByPriceCCY. count
113
113
default : return 0
114
114
}
115
115
}
116
- public func rowCount( for section: Int , for viewType: TickerViewType ) -> Int {
116
+ public func rowCount( section: Int , viewType: TickerViewType ) -> Int {
117
117
switch viewType {
118
118
case . quantity: return tickerByQuantityCCY [ section] . count
119
119
case . price: return tickerByPriceCCY [ section] . count
120
120
default : return 0
121
121
}
122
122
}
123
- public func sectionHeaderTitle( for section: Int , for viewType: TickerViewType ) -> String ? {
123
+ public func sectionHeaderTitle( section: Int , viewType: TickerViewType ) -> String ? {
124
124
switch viewType {
125
125
case . quantity: return tickerByQuantityCCY [ section] [ 0 ] . symbol. quantity. name
126
126
case . price: return tickerByPriceCCY [ section] [ 0 ] . symbol. price. name
127
127
default : return nil
128
128
}
129
129
}
130
- public func displayableTicker( forindexPath : IndexPath , for viewType: TickerViewType ) -> DisplayableTickerType ? {
131
- guard let t = ticker ( for : forindexPath . section, for : forindexPath . row, for : viewType) else { return nil }
130
+ public func displayableTicker( section : Int , row : Int , viewType: TickerViewType ) -> DisplayableTickerType ? {
131
+ guard let t = ticker ( section : section, row : row, viewType : viewType) else { return nil }
132
132
let displayable = DisplayableTicker ( name: t. symbol. quantity. name, price: displayablePrice ( ticker: t) , priceInUSD: t. formattedPriceInUSD)
133
133
return displayable
134
134
}
0 commit comments