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