chore(NostrClient): Limit the events to 1 in fetch_event function

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-06-09 10:29:17 +00:00
parent 7ba98bbbe8
commit 983d2f209d

View File

@@ -194,7 +194,7 @@ impl NostrClient {
pub async fn fetch_event(&self, filter: Filter) -> N34Result<Option<Event>> { pub async fn fetch_event(&self, filter: Filter) -> N34Result<Option<Event>> {
Ok(self Ok(self
.client .client
.fetch_events(filter, CLIENT_TIMEOUT) .fetch_events(filter.limit(1), CLIENT_TIMEOUT)
.await? .await?
.first_owned()) .first_owned())
} }