diff --git a/cointop/portfolio.go b/cointop/portfolio.go index 61641fd..ac6de20 100644 --- a/cointop/portfolio.go +++ b/cointop/portfolio.go @@ -337,12 +337,12 @@ func (ct *Cointop) GetPortfolioTable() *table.Table { }) case "cost_price": text := fmt.Sprintf("%s %s", coin.BuyCurrency, ct.FormatPrice(coin.BuyPrice)) - if ct.State.hidePortfolioBalances { - text = HiddenBalanceChars - } if coin.BuyPrice == 0.0 || coin.BuyCurrency == "" { text = "" } + if ct.State.hidePortfolioBalances { + text = HiddenBalanceChars + } symbolPadding := 1 ct.SetTableColumnWidth(header, utf8.RuneCountInString(text)+symbolPadding) ct.SetTableColumnAlignLeft(header, false) @@ -363,12 +363,12 @@ func (ct *Cointop) GetPortfolioTable() *table.Table { } } text := humanize.FixedMonetaryf(cost, 2) - if ct.State.hidePortfolioBalances { - text = HiddenBalanceChars - } if coin.BuyPrice == 0.0 { text = "" } + if ct.State.hidePortfolioBalances { + text = HiddenBalanceChars + } symbolPadding := 1 ct.SetTableColumnWidth(header, utf8.RuneCountInString(text)+symbolPadding) @@ -429,13 +429,13 @@ func (ct *Cointop) GetPortfolioTable() *table.Table { colorProfit = ct.colorscheme.TableColumnChangeDown } text := fmt.Sprintf("%.2f%%", profitPercent) + if coin.BuyPrice == 0.0 { + text = "" + } if ct.State.hidePortfolioBalances { text = HiddenBalanceChars colorProfit = ct.colorscheme.TableColumnChange } - if coin.BuyPrice == 0.0 { - text = "" - } ct.SetTableColumnWidthFromString(header, text) ct.SetTableColumnAlignLeft(header, false) rowCells = append(rowCells,