diff options
| author | Adam Soltys <[email protected]> | 2023-03-11 10:20:46 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-03-11 10:20:46 -0800 |
| commit | 5955ff6969a5301c4413631b76cf2300d193f8ed (patch) | |
| tree | 92d1269a098cb7c764ca92f7a40af9ee236ae5b1 /lib/nostr.js | |
| parent | 7fec7cc3e7c51a9892869732b5bfe65922ee7818 (diff) | |
| download | coinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.tar.gz coinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.zip | |
separate tips from amounts
Diffstat (limited to 'lib/nostr.js')
| -rw-r--r-- | lib/nostr.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/nostr.js b/lib/nostr.js index 604d207d..2ecd1c5c 100644 --- a/lib/nostr.js +++ b/lib/nostr.js @@ -10,7 +10,7 @@ export let pool; export let fillPool = () => { pool = RelayPool(config.relays); - pool.on("open", relay => { + pool.on("open", (relay) => { if (relay.url.includes(config.nostr)) coinos = relay; relay.subscribe("live", { limit: 1 }); }); @@ -62,7 +62,7 @@ export let fillPool = () => { user = { ...user, ...content, - updated: ev.created_at + updated: ev.created_at, }; await s(`user:${pubkey}`, JSON.stringify(user)); @@ -112,7 +112,7 @@ export let q = async ( let done = { [sub]: [] }; - let check = s => { + let check = (s) => { let elapsed = Date.now() - start; if (rejected) return true; if ( @@ -147,7 +147,7 @@ export let q = async ( rejected = true; }, timeout); }, - timer: undefined + timer: undefined, }; timeouts[sub].extend(); @@ -167,14 +167,14 @@ export let q = async ( let seen = []; -let getUser = async pubkey => { +let getUser = async (pubkey) => { let id = await g(`user:${pubkey}`); let user = await g(`user:${id}`); return ( user || { username: pubkey.substr(0, 6), pubkey, - anon: true + anon: true, } ); }; |
