|
|
@ -48,9 +48,6 @@ type State struct {
|
|
|
|
defaultChartRange string
|
|
|
|
defaultChartRange string
|
|
|
|
maxChartWidth int
|
|
|
|
maxChartWidth int
|
|
|
|
|
|
|
|
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions.
|
|
|
|
|
|
|
|
favoritesBySymbol map[string]bool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
favorites map[string]bool
|
|
|
|
favorites map[string]bool
|
|
|
|
favoritesTableColumns []string
|
|
|
|
favoritesTableColumns []string
|
|
|
|
favoriteChar string
|
|
|
|
favoriteChar string
|
|
|
@ -266,8 +263,6 @@ func NewCointop(config *Config) (*Cointop, error) {
|
|
|
|
currencyConversion: DefaultCurrency,
|
|
|
|
currencyConversion: DefaultCurrency,
|
|
|
|
defaultChartRange: DefaultChartRange,
|
|
|
|
defaultChartRange: DefaultChartRange,
|
|
|
|
maxChartWidth: DefaultMaxChartWidth,
|
|
|
|
maxChartWidth: DefaultMaxChartWidth,
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
|
|
|
|
|
|
|
|
favoritesBySymbol: make(map[string]bool),
|
|
|
|
|
|
|
|
favorites: make(map[string]bool),
|
|
|
|
favorites: make(map[string]bool),
|
|
|
|
favoritesTableColumns: DefaultCoinTableHeaders,
|
|
|
|
favoritesTableColumns: DefaultCoinTableHeaders,
|
|
|
|
favoriteChar: DefaultFavoriteChar,
|
|
|
|
favoriteChar: DefaultFavoriteChar,
|
|
|
@ -455,21 +450,6 @@ func NewCointop(config *Config) (*Cointop, error) {
|
|
|
|
ct.State.coins = ct.State.allCoins[0:max]
|
|
|
|
ct.State.coins = ct.State.allCoins[0:max]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// DEPRECATED: favorites by 'symbol' is deprecated because of collisions. Kept for backward compatibility.
|
|
|
|
|
|
|
|
// Here we're doing a lookup based on symbol and setting the favorite to the coin name instead of coin symbol.
|
|
|
|
|
|
|
|
ct.State.allCoinsSlugMap.Range(func(key, value interface{}) bool {
|
|
|
|
|
|
|
|
if coin, ok := value.(*Coin); ok {
|
|
|
|
|
|
|
|
for k := range ct.State.favoritesBySymbol {
|
|
|
|
|
|
|
|
if coin.Symbol == k {
|
|
|
|
|
|
|
|
ct.State.favorites[coin.Name] = true
|
|
|
|
|
|
|
|
delete(ct.State.favoritesBySymbol, k)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var globaldata []float64
|
|
|
|
var globaldata []float64
|
|
|
|
chartcachekey := ct.CompositeCacheKey("globaldata", "", "", ct.State.selectedChartRange)
|
|
|
|
chartcachekey := ct.CompositeCacheKey("globaldata", "", "", ct.State.selectedChartRange)
|
|
|
|
if ct.filecache != nil {
|
|
|
|
if ct.filecache != nil {
|
|
|
|