From 42cba316079603cc916096b30a3a0d9176a61b98 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 19 Feb 2025 13:35:38 -0800 Subject: filter null payments --- routes/users.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/users.ts b/routes/users.ts index 7cc6a6bb..9d133ff3 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -838,9 +838,10 @@ export default { a.nwc = `nostr+walletconnect://${serverPubkey}?relay=${relay}&secret=${a.secret}&lud16=${lud16}`; const pids = await db.lRange(`${a.pubkey}:payments`, 0, -1); - const payments = await Promise.all( + let payments = await Promise.all( pids.map((pid) => g(`payment:${pid}`)), ); + payments = payments.filter((p) => p); a.spent = payments.reduce( (a, b) => a + -- cgit v1.2.3