mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-22 23:25:22 +01:00
chore: update deps (#761)
This commit is contained in:
@@ -259,7 +259,7 @@ pub async fn create_request(
|
||||
}
|
||||
|
||||
client.connect().await;
|
||||
client.subscribe(vec![filter], None).await?;
|
||||
client.subscribe(filter, None).await?;
|
||||
|
||||
// Handle subscription notifications with `handle_notifications` method
|
||||
client
|
||||
|
||||
@@ -113,9 +113,8 @@ pub async fn pay_request(
|
||||
let rumor = EventBuilder::new(
|
||||
nostr_sdk::Kind::from_u16(14),
|
||||
serde_json::to_string(&payload)?,
|
||||
[],
|
||||
);
|
||||
|
||||
)
|
||||
.build(nprofile.public_key);
|
||||
let relays = nprofile.relays;
|
||||
|
||||
for relay in relays.iter() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::collections::HashSet;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use cdk::nuts::{SecretKey, Token};
|
||||
@@ -171,7 +172,7 @@ async fn nostr_receive(
|
||||
|
||||
let x_only_pubkey = verifying_key.x_only_public_key();
|
||||
|
||||
let nostr_pubkey = nostr_sdk::PublicKey::from_hex(x_only_pubkey.to_string())?;
|
||||
let nostr_pubkey = nostr_sdk::PublicKey::from_hex(&x_only_pubkey.to_string())?;
|
||||
|
||||
let since = since.map(|s| Timestamp::from(s as u64));
|
||||
|
||||
@@ -190,13 +191,7 @@ async fn nostr_receive(
|
||||
client.connect().await;
|
||||
|
||||
let events = client
|
||||
.get_events_of(
|
||||
vec![filter],
|
||||
nostr_sdk::EventSource::Relays {
|
||||
timeout: None,
|
||||
specific_relays: Some(relays),
|
||||
},
|
||||
)
|
||||
.fetch_events_from(relays, filter, Duration::from_secs(30))
|
||||
.await?;
|
||||
|
||||
let mut tokens: HashSet<String> = HashSet::new();
|
||||
|
||||
Reference in New Issue
Block a user