From 4d41a5bbf70e9bf9f9ead2412822668998b2c2cf Mon Sep 17 00:00:00 2001 From: devops Date: Tue, 10 Nov 2026 13:35:54 +0000 Subject: [PATCH] fix(notifications): accept Prisma Decimal in order email payloads Widen totalAmount typing so wallet/order/payment Prisma models type-check under tsc -b. --- backend/src/notifications/transactional-emails.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/notifications/transactional-emails.service.ts b/backend/src/notifications/transactional-emails.service.ts index ac8abda1..510f996a 100644 --- a/backend/src/notifications/transactional-emails.service.ts +++ b/backend/src/notifications/transactional-emails.service.ts @@ -42,7 +42,7 @@ export class TransactionalEmailsService { await this.sendSafe(to, subject, text, html); } - async sendOrderCreated(to: string | null | undefined, order: { id?: string; trackingNumber?: string | null; totalAmount?: number | string | null }) { + async sendOrderCreated(to: string | null | undefined, order: { id?: string; trackingNumber?: string | null; totalAmount?: number | string | { toString(): string } | null }) { if (!to) return; const orderRef = escapeHtml(String(order.trackingNumber || order.id || '')); const amount = Number(order.totalAmount || 0); @@ -55,7 +55,7 @@ export class TransactionalEmailsService { await this.sendSafe(to, subject, text, html); } - async sendOrderPaid(to: string | null | undefined, order: { id?: string; trackingNumber?: string | null; totalAmount?: number | string | null }) { + async sendOrderPaid(to: string | null | undefined, order: { id?: string; trackingNumber?: string | null; totalAmount?: number | string | { toString(): string } | null }) { if (!to) return; const orderRef = escapeHtml(String(order.trackingNumber || order.id || '')); const amount = Number(order.totalAmount || 0);