Fix build: resolve circular dependency in fx-rates module

This commit is contained in:
defiQUG
2026-01-23 16:47:40 -08:00
parent 880443280c
commit dcc6a1306f

View File

@@ -3,10 +3,19 @@
* Provides abstraction for multiple FX rate providers
*/
import { getLogger } from './logging';
import type { AppConfig } from './config';
import { getConfig } from './config';
// Simple logger for FX rates (avoids circular dependency)
function getLogger() {
return {
debug: (msg: string, ctx?: Record<string, unknown>) => console.log(JSON.stringify({ level: 'debug', message: msg, ...ctx })),
info: (msg: string, ctx?: Record<string, unknown>) => console.log(JSON.stringify({ level: 'info', message: msg, ...ctx })),
warn: (msg: string, ctx?: Record<string, unknown>) => console.warn(JSON.stringify({ level: 'warn', message: msg, ...ctx })),
error: (msg: string, err?: Error, ctx?: Record<string, unknown>) => console.error(JSON.stringify({ level: 'error', message: msg, error: err?.message, ...ctx })),
};
}
export interface FXRate {
fromCurrency: string;
toCurrency: string;