feat: upgrade to rust nostr 0.28
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::Nostr;
|
||||
use nostr_sdk::prelude::*;
|
||||
use tauri::State;
|
||||
|
||||
#[tauri::command(async)]
|
||||
#[tauri::command]
|
||||
pub async fn list_connected_relays(nostr: State<'_, Nostr>) -> Result<Vec<Url>, ()> {
|
||||
let client = &nostr.client;
|
||||
let relays = client.relays().await;
|
||||
@@ -11,7 +11,7 @@ pub async fn list_connected_relays(nostr: State<'_, Nostr>) -> Result<Vec<Url>,
|
||||
Ok(list)
|
||||
}
|
||||
|
||||
#[tauri::command(async)]
|
||||
#[tauri::command]
|
||||
pub async fn connect_relay(relay: &str, nostr: State<'_, Nostr>) -> Result<bool, ()> {
|
||||
let client = &nostr.client;
|
||||
if let Ok(_) = client.add_relay(relay).await {
|
||||
@@ -21,7 +21,7 @@ pub async fn connect_relay(relay: &str, nostr: State<'_, Nostr>) -> Result<bool,
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command(async)]
|
||||
#[tauri::command]
|
||||
pub async fn remove_relay(relay: &str, nostr: State<'_, Nostr>) -> Result<bool, ()> {
|
||||
let client = &nostr.client;
|
||||
if let Ok(_) = client.remove_relay(relay).await {
|
||||
|
||||
Reference in New Issue
Block a user