add From<&str> for Pubkey
This commit is contained in:
@@ -15,6 +15,12 @@ impl From<String> for Pubkey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<&str> for Pubkey {
|
||||||
|
fn from(s: &str) -> Self {
|
||||||
|
Pubkey(s.to_owned())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<Pubkey> for String {
|
impl From<Pubkey> for String {
|
||||||
fn from(pk: Pubkey) -> Self {
|
fn from(pk: Pubkey) -> Self {
|
||||||
pk.0
|
pk.0
|
||||||
|
|||||||
@@ -78,7 +78,10 @@ fn relay_setup(pool: &mut RelayPool, ctx: &egui::Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn send_initial_filters(pool: &mut RelayPool, relay_url: &str) {
|
fn send_initial_filters(pool: &mut RelayPool, relay_url: &str) {
|
||||||
let filter = Filter::new().limit(100).kinds(vec![1, 42]);
|
let filter = Filter::new().limit(100).kinds(vec![1, 42]).pubkeys(
|
||||||
|
["32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245".into()].into(),
|
||||||
|
);
|
||||||
|
|
||||||
let subid = "initial";
|
let subid = "initial";
|
||||||
for relay in &mut pool.relays {
|
for relay in &mut pool.relays {
|
||||||
if relay.url == relay_url {
|
if relay.url == relay_url {
|
||||||
|
|||||||
Reference in New Issue
Block a user