Add CAD currency, forex cross-pair support, and adventure timer fixes

Forex: add CAD to tracked currencies, add cross-pair syntax (EUR/USD,
EUR|JPY, etc.) for both !fx rate and !fx report with full historical
analysis computed from stored USD-base rates.

Adventure: fix midnight reset silently failing due to SQLite busy
contention with the reminder fire loop — propagate errors so the job
isn't marked complete on failure, add retry with backoff, and add
startup catch-up for missed resets and expired death timers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-26 23:38:06 -07:00
parent 9c6ded13fa
commit 1b423b1b16
7 changed files with 370 additions and 32 deletions

View File

@@ -12,7 +12,7 @@ import (
// ── Currency Configuration ──────────────────────────────────────────────────
var fxTrackedCurrencies = []string{"EUR", "JPY"}
var fxTrackedCurrencies = []string{"EUR", "JPY", "CAD"}
type fxCurrencyMeta struct {
Emoji string
@@ -22,6 +22,7 @@ type fxCurrencyMeta struct {
var fxMeta = map[string]fxCurrencyMeta{
"EUR": {Emoji: "🇪🇺", Label: "Euro"},
"JPY": {Emoji: "🇯🇵", Label: "Japanese Yen"},
"CAD": {Emoji: "🇨🇦", Label: "Canadian Dollar"},
}
func fxIsTracked(cur string) bool {