refactor(pubky): remove unused pkarr_relays from PubkyClient

This commit is contained in:
nazeh
2024-09-22 19:06:48 +03:00
parent fff7b6af39
commit 5aa53f4873
2 changed files with 0 additions and 19 deletions

View File

@@ -19,6 +19,4 @@ pub use crate::shared::list_builder::ListBuilder;
pub struct PubkyClient {
http: reqwest::Client,
pub(crate) pkarr: pkarr::Client,
#[cfg(target_arch = "wasm32")]
pub(crate) pkarr_relays: Vec<String>,
}

View File

@@ -21,7 +21,6 @@ impl PubkyClient {
Self {
http: reqwest::Client::builder().build().unwrap(),
pkarr: pkarr::Client::builder().build().unwrap(),
pkarr_relays: vec!["https://relay.pkarr.org".to_string()],
}
}
@@ -35,22 +34,6 @@ impl PubkyClient {
.relays(TESTNET_RELAYS.into_iter().map(|s| s.to_string()).collect())
.build()
.unwrap(),
pkarr_relays: TESTNET_RELAYS.into_iter().map(|s| s.to_string()).collect(),
}
}
/// Set Pkarr relays used for publishing and resolving Pkarr packets.
///
/// By default, [PubkyClient] will use `["https://relay.pkarr.org"]`
#[wasm_bindgen(js_name = "setPkarrRelays")]
pub fn set_pkarr_relays(mut self, relays: Vec<String>) -> Self {
self.pkarr_relays = relays;
self
}
// Read the set of pkarr relays used by this client.
#[wasm_bindgen(js_name = "getPkarrRelays")]
pub fn get_pkarr_relays(&self) -> Vec<String> {
self.pkarr_relays.clone()
}
}