diff --git a/cointop/coin.go b/cointop/coin.go index f9af89e..b44287e 100644 --- a/cointop/coin.go +++ b/cointop/coin.go @@ -132,7 +132,7 @@ func (ct *Cointop) UpdateCoin(coin *Coin) error { Slug: v.Slug, } - ct.State.allCoinsSlugMap.Store(k, coin) + ct.State.allCoinsSlugMap.Store(coin.Name, coin) return nil } diff --git a/cointop/conversion.go b/cointop/conversion.go index c45ef94..5bb90fb 100644 --- a/cointop/conversion.go +++ b/cointop/conversion.go @@ -235,6 +235,10 @@ func (ct *Cointop) SetCurrencyConverstion(convert string) error { func (ct *Cointop) SetCurrencyConverstionFn(convert string) func() error { log.Debug("SetCurrencyConverstionFn()") return func() error { + if !ct.State.convertMenuVisible { + return nil + } + ct.HideConvertMenu() if err := ct.SetCurrencyConverstion(convert); err != nil {