fix(testkit): macOS compat + fix test 8c ordering (#24)

This commit is contained in:
2026-03-18 21:01:13 -04:00
parent ca94c0a9e5
commit 83a2ec19e2
59 changed files with 4458 additions and 454 deletions

View File

@@ -1,3 +1,7 @@
import { makeLogger } from "./logger.js";
const logger = makeLogger("btc-oracle");
const COINGECKO_URL =
"https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd";
@@ -42,7 +46,10 @@ export async function getBtcPriceUsd(): Promise<number> {
return price;
} catch (err) {
const fb = fallbackPrice();
console.warn(`[btc-oracle] Price fetch failed (using $${fb} fallback):`, err);
logger.warn("price fetch failed using fallback", {
fallback_usd: fb,
error: err instanceof Error ? err.message : String(err),
});
return fb;
}
}