Severity: High | Area: backend/rates | Evidence: src/services/rates/currencyConverter.ts:96,167 — TS2339
Impact: Rate fields from Prisma Decimal columns are union-typed; calling .toNumber() fails to compile and may throw at runtime. Fix: Normalize the rate to Decimal before arithmetic; use Number() only for comparisons. Acceptance: Conversions work with string, Decimal, and Date rate rows.
Severity: High | Area: backend/rates | Evidence:
src/services/rates/currencyConverter.ts:96,167— TS2339Impact: Rate fields from Prisma Decimal columns are union-typed; calling
.toNumber()fails to compile and may throw at runtime. Fix: Normalize the rate toDecimalbefore arithmetic; useNumber()only for comparisons. Acceptance: Conversions work with string, Decimal, and Date rate rows.