From dcc6a1306f4fd9bce903076f2393793a6598381e Mon Sep 17 00:00:00 2001 From: defiQUG Date: Fri, 23 Jan 2026 16:47:40 -0800 Subject: [PATCH] Fix build: resolve circular dependency in fx-rates module --- packages/utils/src/fx-rates.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/utils/src/fx-rates.ts b/packages/utils/src/fx-rates.ts index 51f8582..204c514 100644 --- a/packages/utils/src/fx-rates.ts +++ b/packages/utils/src/fx-rates.ts @@ -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) => console.log(JSON.stringify({ level: 'debug', message: msg, ...ctx })), + info: (msg: string, ctx?: Record) => console.log(JSON.stringify({ level: 'info', message: msg, ...ctx })), + warn: (msg: string, ctx?: Record) => console.warn(JSON.stringify({ level: 'warn', message: msg, ...ctx })), + error: (msg: string, err?: Error, ctx?: Record) => console.error(JSON.stringify({ level: 'error', message: msg, error: err?.message, ...ctx })), + }; +} + export interface FXRate { fromCurrency: string; toCurrency: string;