Compare commits
No commits in common. "2bdf74e57ee0942df311e4a487251a1389a06d71" and "c2e3ce783bc185c40e2e93c0a1a55c72f55d0190" have entirely different histories.
2bdf74e57e
...
c2e3ce783b
@ -33,12 +33,12 @@ func HandleIndex(sc context.Context) echo.HandlerFunc {
|
||||
" GROUP BY o.market_id"+
|
||||
")"+
|
||||
"SELECT m.id, m.question, m.description, m.created_at, m.end_date, "+
|
||||
"m.lmsr_b, COALESCE(l.q1, 0), COALESCE(l.q2, 0), COALESCE(l.volume, 0), "+
|
||||
"m.lmsr_b, l.q1, l.q2, l.volume, "+
|
||||
"u.id, u.name, u.created_at, u.ln_pubkey, u.nostr_pubkey, u.msats "+
|
||||
"FROM markets m "+
|
||||
"JOIN users u ON m.user_id = u.id "+
|
||||
"JOIN invoices i ON m.invoice_id = i.id "+
|
||||
"LEFT JOIN lmsr l ON m.id = l.market_id "+
|
||||
"JOIN lmsr l ON m.id = l.market_id "+
|
||||
"WHERE i.confirmed_at IS NOT NULL"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -103,15 +103,12 @@ func humanizeRound(f float64) string {
|
||||
}
|
||||
|
||||
func colorize(f float64) string {
|
||||
eps := 1e-5
|
||||
|
||||
if f-0.5 > eps {
|
||||
if f > 0.5 {
|
||||
return "text-success"
|
||||
} else if 0.5-f > eps {
|
||||
} else {
|
||||
return "text-error"
|
||||
}
|
||||
|
||||
return "text-reset"
|
||||
}
|
||||
|
||||
func tabStyle(path string, tab string) string {
|
||||
|
Loading…
x
Reference in New Issue
Block a user