diff options
Diffstat (limited to 'lib/nostr.js')
| -rw-r--r-- | lib/nostr.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/nostr.js b/lib/nostr.js index 4dd14a0e..64009168 100644 --- a/lib/nostr.js +++ b/lib/nostr.js @@ -64,7 +64,7 @@ export let fillPool = () => { user = { ...user, ...content, - updated: ev.created_at + updated: ev.created_at, }; await s(`user:${pubkey}`, JSON.stringify(user)); @@ -103,7 +103,7 @@ let timeouts = {}; export let q = async ( sub, query, - { timeout = 20000, since = 3600, eager = 200 } + { timeout = 20000, since = 3600, eager = 200 }, ) => new Promise(async (r, j) => { let start = Date.now(); @@ -149,7 +149,7 @@ export let q = async ( rejected = true; }, timeout); }, - timer: undefined + timer: undefined, }; timeouts[sub].extend(); @@ -176,7 +176,7 @@ let getUser = async (pubkey) => { user || { username: pubkey.substr(0, 6), pubkey, - anon: true + anon: true, } ); }; @@ -219,7 +219,7 @@ export async function handleZap(invoice) { } let ptags = zapreq.tags.filter( - (t) => t && t.length && t.length >= 2 && t[0] === "p" + (t) => t && t.length && t.length >= 2 && t[0] === "p", ); if (ptags.length !== 1) { @@ -227,7 +227,7 @@ export async function handleZap(invoice) { } let etags = zapreq.tags.filter( - (t) => t && t.length && t.length >= 2 && t[0] === "e" + (t) => t && t.length && t.length >= 2 && t[0] === "e", ); if (!(etags.length === 0 || etags.length === 1)) { @@ -235,7 +235,7 @@ export async function handleZap(invoice) { } let relays_tag = zapreq.tags.find( - (t) => t && t.length && t.length >= 2 && t[0] === "relays" + (t) => t && t.length && t.length >= 2 && t[0] === "relays", ); if (!relays_tag) { @@ -263,5 +263,5 @@ export async function handleZap(invoice) { l("sending receipt"); - await Promise.allSettled(relays.map(r => send(ev, r))); + await Promise.allSettled(relays.map((r) => send(ev, r))); } |
