mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 03:37:14 +01:00
* style(tests): format the legacy project-validation test, no change in what it checks The file predates lint-staged and was never formatted. The next commit changes one of its tests; formatting it here keeps that diff readable. Prettier only: semicolons, trailing commas and line wraps. Claude-Session: https://claude.ai/code/session_019MDtmw3MnN44QwEv4M52CS * fix(projects): a funding goal can be 0.5 BTC or CHF 2500.50, not only a whole number On orangecat.ch (iPhone 13, dark and light) the project wizard's Funding step answered "Funding goal must be a whole number" to 0.5 BTC, to 10000 CHF switched to BTC (0.16498655 BTC), and to CHF 2500.50. Measured with Next only; no request was sent. The same schema guards POST /api/projects and PUT /api/projects/[id], so the API refused them too, and anyone whose currency is BTC could not set a realistic goal. The cause was a sats-era .int() on goal_amount, the same leftover the wishlist schema already dropped. It is gone; the goal stays positive and is capped at 1,000,000,000 like the wallet goal. The column projects.goal_amount is numeric(20,8) (baseline, never altered), so no migration is needed. Two places followed the old rule: the raise flow dropped a BTC goal (a project goal "cannot be" below 1) and now keeps it, and the MCP create-project tool told agents the goal is a whole number. A legacy test that expected Number.MAX_SAFE_INTEGER to pass now expects the cap's message: that number would have overflowed the column. Claude-Session: https://claude.ai/code/session_019MDtmw3MnN44QwEv4M52CS --------- Co-authored-by: Claude <noreply@anthropic.com>