From 97ba23c0730c550ad6da6704ae57d074532d234c Mon Sep 17 00:00:00 2001 From: Olexandr88 Date: Fri, 6 Feb 2026 12:19:39 +0200 Subject: [PATCH 1/2] fix: strict check for offramp_failed status Signed-off-by: Olexandr88 --- src/lib/invoice-status.ts | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/lib/invoice-status.ts b/src/lib/invoice-status.ts index 6d5e90f..120b728 100644 --- a/src/lib/invoice-status.ts +++ b/src/lib/invoice-status.ts @@ -55,13 +55,17 @@ export const getInvoiceTableStatusClass = ( return "bg-green-50 text-green-700"; } - if (status.includes("offramp_failed")) { + if (status === "offramp_failed") { return "bg-red-50 text-red-700"; - } + } - if (status.includes("offramp") || status === "processing") { - return "bg-orange-50 text-orange-700"; - } + if ( + status === "offramp_pending" || + status === "offramp_initiated" || + status === "processing" + ) { + return "bg-orange-50 text-orange-700"; + } return "bg-yellow-50 text-yellow-700"; }; @@ -82,9 +86,13 @@ export const getPaymentSectionStatusClass = ( return "bg-destructive/10 text-destructive"; } - if (status.includes("offramp") || status === "processing") { + if ( + status === "offramp_pending" || + status === "offramp_initiated" || + status === "processing" + ) { return "bg-warning/10 text-warning-foreground"; - } + } return "bg-primary/10 text-primary"; }; From 321c899f45e163a9d686ed123d0850a605abf5fa Mon Sep 17 00:00:00 2001 From: Olexandr88 Date: Fri, 6 Feb 2026 15:05:27 +0200 Subject: [PATCH 2/2] chore: remove trailing whitespace --- src/lib/invoice-status.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/invoice-status.ts b/src/lib/invoice-status.ts index 120b728..3f94fd4 100644 --- a/src/lib/invoice-status.ts +++ b/src/lib/invoice-status.ts @@ -57,7 +57,7 @@ export const getInvoiceTableStatusClass = ( if (status === "offramp_failed") { return "bg-red-50 text-red-700"; - } + } if ( status === "offramp_pending" || @@ -65,7 +65,7 @@ export const getInvoiceTableStatusClass = ( status === "processing" ) { return "bg-orange-50 text-orange-700"; - } + } return "bg-yellow-50 text-yellow-700"; }; @@ -92,7 +92,7 @@ export const getPaymentSectionStatusClass = ( status === "processing" ) { return "bg-warning/10 text-warning-foreground"; - } + } return "bg-primary/10 text-primary"; };