@@ -48,9 +48,6 @@ type State struct {
4848 defaultChartRange string
4949 maxChartWidth int
5050
51- // DEPRECATED: favorites by 'symbol' is deprecated because of collisions.
52- favoritesBySymbol map [string ]bool
53-
5451 favorites map [string ]bool
5552 favoritesTableColumns []string
5653 favoriteChar string
@@ -259,14 +256,12 @@ func NewCointop(config *Config) (*Cointop, error) {
259256 limiter : time .NewTicker (2 * time .Second ).C ,
260257 filecache : nil ,
261258 State : & State {
262- allCoins : []* Coin {},
263- cacheDir : DefaultCacheDir ,
264- coinsTableColumns : DefaultCoinTableHeaders ,
265- currencyConversion : DefaultCurrency ,
266- defaultChartRange : DefaultChartRange ,
267- maxChartWidth : DefaultMaxChartWidth ,
268- // DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
269- favoritesBySymbol : make (map [string ]bool ),
259+ allCoins : []* Coin {},
260+ cacheDir : DefaultCacheDir ,
261+ coinsTableColumns : DefaultCoinTableHeaders ,
262+ currencyConversion : DefaultCurrency ,
263+ defaultChartRange : DefaultChartRange ,
264+ maxChartWidth : DefaultMaxChartWidth ,
270265 favorites : make (map [string ]bool ),
271266 favoritesTableColumns : DefaultCoinTableHeaders ,
272267 favoriteChar : DefaultFavoriteChar ,
@@ -454,21 +449,6 @@ func NewCointop(config *Config) (*Cointop, error) {
454449 ct .State .coins = ct .State .allCoins [0 :max ]
455450 }
456451
457- // DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
458- // Here we're doing a lookup based on symbol and setting the favorite to the coin name instead of coin symbol.
459- ct .State .allCoinsSlugMap .Range (func (key , value interface {}) bool {
460- if coin , ok := value .(* Coin ); ok {
461- for k := range ct .State .favoritesBySymbol {
462- if coin .Symbol == k {
463- ct .State .favorites [coin .Name ] = true
464- delete (ct .State .favoritesBySymbol , k )
465- }
466- }
467- }
468-
469- return true
470- })
471-
472452 var globaldata []float64
473453 chartcachekey := ct .CompositeCacheKey ("globaldata" , "" , "" , ct .State .selectedChartRange )
474454 if ct .filecache != nil {
0 commit comments