|
|
|
@ -136,9 +136,8 @@ func (ct *Cointop) GetCoinsTable() *table.Table {
|
|
|
|
|
})
|
|
|
|
|
case "24h_volume":
|
|
|
|
|
text := humanize.Monetaryf(coin.Volume24H, 0)
|
|
|
|
|
if ct.State.scaleNumbers {
|
|
|
|
|
numScale, numSuffix := humanize.Scale(coin.Volume24H)
|
|
|
|
|
text = humanize.Numericf(numScale, 1) + numSuffix
|
|
|
|
|
if ct.State.compactNotation {
|
|
|
|
|
text = humanize.ScaleNumericf(coin.Volume24H, 3)
|
|
|
|
|
}
|
|
|
|
|
ct.SetTableColumnWidthFromString(header, text)
|
|
|
|
|
ct.SetTableColumnAlignLeft(header, false)
|
|
|
|
@ -247,9 +246,8 @@ func (ct *Cointop) GetCoinsTable() *table.Table {
|
|
|
|
|
})
|
|
|
|
|
case "market_cap":
|
|
|
|
|
text := humanize.Monetaryf(coin.MarketCap, 0)
|
|
|
|
|
if ct.State.scaleNumbers {
|
|
|
|
|
numScale, numSuffix := humanize.Scale(coin.MarketCap)
|
|
|
|
|
text = humanize.Numericf(numScale, 1) + numSuffix
|
|
|
|
|
if ct.State.compactNotation {
|
|
|
|
|
text = humanize.ScaleNumericf(coin.MarketCap, 3)
|
|
|
|
|
}
|
|
|
|
|
ct.SetTableColumnWidthFromString(header, text)
|
|
|
|
|
ct.SetTableColumnAlignLeft(header, false)
|
|
|
|
@ -263,9 +261,8 @@ func (ct *Cointop) GetCoinsTable() *table.Table {
|
|
|
|
|
})
|
|
|
|
|
case "total_supply":
|
|
|
|
|
text := humanize.Numericf(coin.TotalSupply, 0)
|
|
|
|
|
if ct.State.scaleNumbers {
|
|
|
|
|
numScale, numSuffix := humanize.Scale(coin.TotalSupply)
|
|
|
|
|
text = humanize.Numericf(numScale, 1) + numSuffix
|
|
|
|
|
if ct.State.compactNotation {
|
|
|
|
|
text = humanize.ScaleNumericf(coin.TotalSupply, 3)
|
|
|
|
|
}
|
|
|
|
|
ct.SetTableColumnWidthFromString(header, text)
|
|
|
|
|
ct.SetTableColumnAlignLeft(header, false)
|
|
|
|
@ -279,9 +276,8 @@ func (ct *Cointop) GetCoinsTable() *table.Table {
|
|
|
|
|
})
|
|
|
|
|
case "available_supply":
|
|
|
|
|
text := humanize.Numericf(coin.AvailableSupply, 0)
|
|
|
|
|
if ct.State.scaleNumbers {
|
|
|
|
|
numScale, numSuffix := humanize.Scale(coin.AvailableSupply)
|
|
|
|
|
text = humanize.Numericf(numScale, 1) + numSuffix
|
|
|
|
|
if ct.State.compactNotation {
|
|
|
|
|
text = humanize.ScaleNumericf(coin.AvailableSupply, 3)
|
|
|
|
|
}
|
|
|
|
|
ct.SetTableColumnWidthFromString(header, text)
|
|
|
|
|
ct.SetTableColumnAlignLeft(header, false)
|
|
|
|
|