aboutsummaryrefslogtreecommitdiffstats
path: root/lib/nwc.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-28 15:16:20 -0800
committerAdam Soltys <[email protected]>2026-02-28 15:16:20 -0800
commit32f01e3e328db0006a55c6324625b49d60244b66 (patch)
treeb97866549b919964957365e1e05681e85af7021a /lib/nwc.ts
parenta1632ae402d11fdd7ffc360de97c55e0b4fad677 (diff)
downloadcoinos-server-32f01e3e328db0006a55c6324625b49d60244b66.tar.gz
coinos-server-32f01e3e328db0006a55c6324625b49d60244b66.zip
fix typescript issues
Diffstat (limited to 'lib/nwc.ts')
-rw-r--r--lib/nwc.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/nwc.ts b/lib/nwc.ts
index b635f665..b0f1021f 100644
--- a/lib/nwc.ts
+++ b/lib/nwc.ts
@@ -2,7 +2,7 @@ import config from "$config";
import { archive, db, g, gf } from "$lib/db";
import { generate } from "$lib/invoices";
import ln from "$lib/ln";
-import { err, l, warn } from "$lib/logging";
+import { l, warn } from "$lib/logging";
import { handleZap, serverPubkey, serverPubkey2, serverSecret, serverSecret2 } from "$lib/nostr";
import { sendInternal, sendKeysend, sendLightning } from "$lib/payments";
import { getBalance } from "$lib/tb";
@@ -92,8 +92,8 @@ export default () => {
db.zAdd(handledKey, { score: now, value: ev.id });
db.zRemRangeByScore(handledKey, 0, now - nwcEventMaxAgeSeconds);
const size = await db.zCard(handledKey);
- if (size > handledMaxSize) {
- await db.zRemRangeByRank(handledKey, 0, size - handledMaxSize - 1);
+ if (Number(size) > handledMaxSize) {
+ await db.zRemRangeByRank(handledKey, 0, Number(size) - handledMaxSize - 1);
}
let { content, pubkey } = ev;
const pk = ev.tags.find((t) => t[0] === "p")[1];