From ff4d63f395a556543e9a642676f92dea5d1c1645 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 21 Nov 2024 16:31:51 -0800 Subject: ecash requests --- lib/nostr.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/nostr.ts') 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 => { 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); -- cgit v1.2.3