diff options
| author | Adam Soltys <[email protected]> | 2024-11-21 16:31:51 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-21 16:31:51 -0800 |
| commit | ff4d63f395a556543e9a642676f92dea5d1c1645 (patch) | |
| tree | dbee8887d40bf535f587c1f10bc0fa7f36db31f8 /lib/nostr.ts | |
| parent | 3b15d16339c9209f307f8453af91fba15f3d340c (diff) | |
| download | coinos-server-ff4d63f395a556543e9a642676f92dea5d1c1645.tar.gz coinos-server-ff4d63f395a556543e9a642676f92dea5d1c1645.zip | |
ecash requests
Diffstat (limited to 'lib/nostr.ts')
| -rw-r--r-- | lib/nostr.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nostr.ts b/lib/nostr.ts index 82251baa..bf37779b 100644 --- a/lib/nostr.ts +++ b/lib/nostr.ts @@ -1,5 +1,5 @@ import config from "$config"; -import { db, g, s } from "$lib/db"; +import { g, s } from "$lib/db"; import { l } from "$lib/logging"; import { fail } from "$lib/utils"; import { finalizeEvent, getPublicKey, nip19 } from "nostr-tools"; @@ -119,12 +119,11 @@ export const getRelays = async (pubkey): Promise<any> => { return { read, write }; }; -export const getProfile = async (pubkey) => { +export const getProfile = async (pubkey, relays = [config.nostr]) => { let profile = await g(`${pubkey}:profile`); if (!profile) { const pubkeys = [pubkey]; - let relays = [config.nostr]; let filter: any = { authors: pubkeys, kinds: [0] }; let ev = await pool.get(relays, filter, opts); |
