Remove fallback to coin.Symbol when loading portfolio (use coin.Name)

pull/219/head
Simon Roberts 3 years ago
parent 6b6a18d38a
commit ae1cb6e2b8
No known key found for this signature in database
GPG Key ID: 0F30F99E6B771FD4

@ -492,15 +492,11 @@ func (ct *Cointop) PortfolioEntry(c *Coin) (*PortfolioEntry, bool) {
var ok bool
key := strings.ToLower(c.Name)
if p, ok = ct.State.portfolio.Entries[key]; !ok {
// NOTE: if not found then try the symbol
key := strings.ToLower(c.Symbol)
if p, ok = ct.State.portfolio.Entries[key]; !ok {
p = &PortfolioEntry{
Coin: c.Name,
Holdings: 0,
}
isNew = true
p = &PortfolioEntry{
Coin: c.Name,
Holdings: 0,
}
isNew = true
}
return p, isNew

Loading…
Cancel
Save