Use PENDING for unpaid invoices
This commit is contained in:
parent
c885efe034
commit
7a913d0f27
@ -80,7 +80,7 @@ func (db *DB) FetchUserInvoices(pubkey string, invoices *[]Invoice) error {
|
||||
var (
|
||||
query = "" +
|
||||
"SELECT id, pubkey, msats, preimage, hash, bolt11, created_at, expires_at, confirmed_at, held_since, COALESCE(description, ''), " +
|
||||
"CASE WHEN confirmed_at IS NOT NULL THEN 'PAID' WHEN expires_at < CURRENT_TIMESTAMP THEN 'EXPIRED' ELSE 'WAITING' END AS status " +
|
||||
"CASE WHEN confirmed_at IS NOT NULL THEN 'PAID' WHEN expires_at < CURRENT_TIMESTAMP THEN 'EXPIRED' ELSE 'PENDING' END AS status " +
|
||||
"FROM invoices " +
|
||||
"WHERE pubkey = $1 " +
|
||||
"ORDER BY created_at DESC"
|
||||
|
@ -27,7 +27,7 @@
|
||||
import { ref } from 'vue'
|
||||
import ago from 's-ago'
|
||||
|
||||
const classFromStatus = (status) => status === 'PAID' ? 'success' : 'error'
|
||||
const classFromStatus = (status) => status === 'PAID' ? 'success' : status === 'PENDING' ? 'info' : 'error'
|
||||
|
||||
const invoices = ref(null)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user