From 4cb21f50de7d40e2956b2f6dfb92b303d07133c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Arturo=20Cabral=20Mej=C3=ADa?= Date: Sun, 16 Apr 2023 10:14:39 -0400 Subject: [PATCH] fix: invoice auto marked as paid --- resources/invoices.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/invoices.html b/resources/invoices.html index 7682a0cb..dde7ced5 100644 --- a/resources/invoices.html +++ b/resources/invoices.html @@ -123,15 +123,15 @@

Invoice expired!

console.log('data', data) const { status } = data; - if (status === 'pending') { - fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime()) - return - } else if (status === 'expired') { + console.log('invoice status', status) + + if (status === 'expired') { hide('pending') show('expired') return - } else { - console.log('invoice status', status) + } else if (status !== 'completed') { + fallbackTimeout = setTimeout(getInvoiceStatus, getBackoffTime()) + return } paid = true