You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(price): make legacy bitcoin_price_api_url optional + unify live Yadio URL
Human-review follow-ups on Phase 1 (spec §10.1 backward compatibility):
- types.rs: add #[serde(default)] to bitcoin_price_api_url so a settings.toml
that has migrated to a [price] block may omit the deprecated key instead of
failing deserialization and aborting startup (arkanoider, codaMW). Field
stays — util.rs and install_price_manager() still read it until Phase 4/5.
- settings.tpl.toml: document the key's full lifecycle (now optional, still
read by the live /convert path until Phase 4, removed in Phase 5).
- util.rs: route the live /convert + /currencies path through a yadio_base_url()
helper that prefers [price.providers.yadio].url when a [price] block is
present, falling back to the legacy key. Stops the live and cached paths
silently hitting different Yadio bases when only the new key is customised.
- config.rs / manager.rs: point the three [price] validation errors at
docs/PRICE_PROVIDERS.md §7 and make the unimplemented-provider message
actionable.
- tests: prove a [mostro] block without bitcoin_price_api_url deserializes to
the default URL, and that legacy synthesis is identical whether the key is
present-at-default or omitted.
Does not touch price/aggregate.rs, price/store.rs, or the scheduler tick
(§5.4 extension-contract invariant holds).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments