diff options
| -rw-r--r-- | lib/db.js | 6 | ||||
| -rw-r--r-- | lib/nostr.js | 2 | ||||
| -rw-r--r-- | routes/info.js | 2 | ||||
| -rw-r--r-- | routes/invoices.js | 2 | ||||
| -rw-r--r-- | routes/nostr.js | 2 | ||||
| -rw-r--r-- | routes/users.js | 13 |
6 files changed, 17 insertions, 10 deletions
@@ -17,11 +17,11 @@ export let g = async k => { }; export let s = (k, v) => { if (k === "user:null") { - warn("###### NULL USER #######") + warn("###### NULL USER #######"); console.trace(); - } + } db.set(k, JSON.stringify(v)); -} +}; let retries = {}; export let t = async (k, f) => { diff --git a/lib/nostr.js b/lib/nostr.js index 2eb59ae7..604d207d 100644 --- a/lib/nostr.js +++ b/lib/nostr.js @@ -46,7 +46,7 @@ export let fillPool = () => { if (uid) ev.recipient = await g(`user:${uid}`); ev.author = ev.user; emit(uid, "event", ev); - } + } } } else if (sub.includes("profile")) { let { pubkey } = ev; diff --git a/routes/info.js b/routes/info.js index eda028d2..45408269 100644 --- a/routes/info.js +++ b/routes/info.js @@ -7,7 +7,7 @@ export default { let lnwallet; let b = 0; - for await (let k of db.scanIterator({ MATCH: "balance:*" })) { + for await (let k of db.scanIterator({ MATCH: "balance:*" })) { b += parseInt(await db.get(k)); } diff --git a/routes/invoices.js b/routes/invoices.js index bbbae760..d52b34cc 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -14,7 +14,7 @@ export default { if (invoice) { invoice.user = await g(`user:${invoice.uid}`); invoice.id = hash; - } else if(config.classic) { + } else if (config.classic) { invoice = await got(`${config.classic}/invoice/${hash}`).json(); if (!invoice) fail("invoice not found"); invoice.id = invoice.uuid; diff --git a/routes/nostr.js b/routes/nostr.js index 8d6f6c34..eff956d1 100644 --- a/routes/nostr.js +++ b/routes/nostr.js @@ -74,7 +74,7 @@ export default { let aid = await g(`user:${m.pubkey}`); m.author = await g(`user:${aid}`); - let rid = await g(`user:${m.tags[0][1]}`); + let rid = await g(`user:${m.tags[0][1]}`); m.recipient = await g(`user:${rid}`); return m; diff --git a/routes/users.js b/routes/users.js index 955a5ca7..099e3540 100644 --- a/routes/users.js +++ b/routes/users.js @@ -231,7 +231,14 @@ export default { }).json(); for (let p of payments) { - let n = pick(p, ["amount", "fee", "confirmed", "rate", "currency", "preimage"]); + let n = pick(p, [ + "amount", + "fee", + "confirmed", + "rate", + "currency", + "preimage" + ]); n.id = v4(); n.created = parseISO(p.createdAt).getTime(); n.type = p.network; @@ -391,9 +398,9 @@ export default { async lower(req, res) { for await (let k of db.scanIterator({ MATCH: "payment:*" })) { let p = await g(k); - if (p.ref && p.ref.startsWith('2dad97')) console.log(k, p); + if (p.ref && p.ref.startsWith("2dad97")) console.log(k, p); } res.send("ok"); - }, + } }; |
