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