Support hardcoded starting prices.
All checks were successful
Build & Test / Main (push) Successful in 1m0s

The Coindesk API doesn't have data going all the way back. But since history
isn't changing, we can simply put in known prices.

Also, extend the CDPR cells to have four digits instead of just two.
This commit is contained in:
2024-03-29 19:19:38 -07:00
parent 4d5dcc46d2
commit f67323c5f4
4 changed files with 75 additions and 42 deletions

View File

@@ -206,7 +206,7 @@ func refillProjections(m *Model) {
func renderEntries(c moon.Column) (entries []string) {
entries = append(entries, fmt.Sprintf("$%.2f", c.StartingPrice))
entries = append(entries, fmt.Sprintf("%.2f%%", (c.CDPR-1)*100))
entries = append(entries, fmt.Sprintf("%.4f%%", (c.CDPR-1)*100))
never := c.CDPR <= 1
for i := range c.Projections.Dates {
var cell string