diff options
| author | Adam Soltys <[email protected]> | 2025-02-19 13:35:38 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-02-19 13:35:38 -0800 |
| commit | 42cba316079603cc916096b30a3a0d9176a61b98 (patch) | |
| tree | db6d0927be7e925e5070284ffd897c97e1f71456 | |
| parent | 184d3a435ced59c9e3c4573e339b975af1127667 (diff) | |
| download | coinos-server-42cba316079603cc916096b30a3a0d9176a61b98.tar.gz coinos-server-42cba316079603cc916096b30a3a0d9176a61b98.zip | |
filter null payments
| -rw-r--r-- | routes/users.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 + |
