Why Nostr? What is Njump?
2024-07-03 00:49:43

npub1rz…f3r6h on Nostr: commit 9f4bf89d3cf6644198fd335cc9f0c1f65a563807 Author: randymcmillan ...

commit 9f4bf89d3cf6644198fd335cc9f0c1f65a563807
Author: randymcmillan <[email protected]>
Date: Mon May 13 19:12:50 2024 -0400

bins/src/watch_list.rs:fn get_watch_list

diff --git a/bins/src/watch_list.rs b/bins/src/watch_list.rs
index 76982282a..1a8e5381d 100644
--- a/bins/src/watch_list.rs
+++ b/bins/src/watch_list.rs
@@ -1,5 +1,5 @@
-use futures::executor::block_on;
-use url::Url;
+//use futures::executor::block_on;
+//use url::Url;

use crate::get_relays_public;
pub async fn parse_urls(urls_str: &str) -> Result<Vec<String>, url::ParseError> {
@@ -17,10 +17,11 @@ pub async fn parse_urls(urls_str: &str) -> Result<Vec<String>, url::ParseError>
Some(',') | Some(' ') => {
if !part.is_empty() {
collected.push(part.clone());
- print!("{}\n", format!("{}", part.clone().replace("\"", "")));
+ print!("{}, ", format!("{}", part.clone().replace("\"", "")));
part = String::new();
}
- }
+ },
+ //None => todo!(),
x => part.push(x.expect("REASON")),
}
} //end loop
@@ -32,3 +33,7 @@ pub async fn print_watch_list() -> Result<Vec<String>, url::ParseError> {
let vec_relay_list = parse_urls(&get_relays_public().unwrap().as_str()).await;
vec_relay_list //.expect("REASON")
}
+pub async fn get_watch_list() -> Result<Vec<String>, url::ParseError> {
+ let vec_relay_list = parse_urls(&get_relays_public().unwrap().as_str()).await;
+ vec_relay_list //.expect("REASON")
+}
Author Public Key
npub1rz3kyhudd2dzvdr2ktcvs8ngnmm0lp6suxvefrzv65dnllhjydjs7f3r6h