Skip to content

Commit

Permalink
refactor(pubky): remove unused pkarr_relays from PubkyClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Sep 22, 2024
1 parent fff7b6a commit 5aa53f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions pubky/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}
17 changes: 0 additions & 17 deletions pubky/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
}
}

Expand All @@ -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()
}
}

0 comments on commit 5aa53f4

Please sign in to comment.