Fix build: resolve circular dependency in fx-rates module
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user