From a81bbe748778237f4f3a361a2a710a2d13ece21c Mon Sep 17 00:00:00 2001
From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Thu, 2 Jul 2026 13:22:07 +0000
Subject: [PATCH] fix: remove erroneous cents-to-dollars conversion in
notification renderer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NotificationRenderer.FormatCurrency() incorrectly divided TotalAmount by 100,
assuming it was in cents. The OrderPlacedEvent.TotalAmount is already in dollars
(decimal), so dividing by 100 turned $149.99 into $1.50. Removed the division.
Also fixes Notification.API.csproj Shared project references (../../ → ../../../)
so the service actually builds.
---
.../Notification/Notification.API/Notification.API.csproj | 4 ++--
.../Notification.API/Services/NotificationRenderer.cs | 8 +-------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/Services/Notification/Notification.API/Notification.API.csproj b/src/Services/Notification/Notification.API/Notification.API.csproj
index 25b5fb0..1518ca2 100644
--- a/src/Services/Notification/Notification.API/Notification.API.csproj
+++ b/src/Services/Notification/Notification.API/Notification.API.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs b/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs
index ac8d79e..0e8ff50 100644
--- a/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs
+++ b/src/Services/Notification/Notification.API/Services/NotificationRenderer.cs
@@ -11,16 +11,10 @@ public class NotificationRenderer
{
///
/// Formats a monetary amount for display in notification emails.
- /// Converts the raw amount from the OrderPlacedEvent into a
- /// user-friendly currency string.
///
private static string FormatCurrency(decimal amount)
{
- // The OrderPlacedEvent.TotalAmount is transmitted in cents (integer
- // representation) to avoid floating-point precision issues across
- // service boundaries. Convert back to dollars for display.
- var dollars = amount / 100m;
- return dollars.ToString("C2");
+ return amount.ToString("C2");
}
public string RenderOrderConfirmation(OrderNotification notification)