Browse Source

refactor: remove unused

thesimplekid 1 year ago
parent
commit
35ce004230
2 changed files with 0 additions and 11 deletions
  1. 0 2
      crates/cashu/Cargo.toml
  2. 0 9
      crates/cashu/src/utils.rs

+ 0 - 2
crates/cashu/Cargo.toml

@@ -35,12 +35,10 @@ k256 = { version = "0.13.1", features=["arithmetic", "serde", "schnorr"] }
 lightning-invoice = { version = "0.29.0", features=["serde"] }
 log = "0.4.2"
 rand = "0.8.5"
-getrandom = { version = "0.2", features = ["js"] }
 serde = { workspace = true }
 serde_json = { workspace = true }
 serde_with = "3.4.0"
 url = { workspace = true }
-regex = "1.8.4"
 itertools = "0.12.0"
 thiserror = { workspace = true }
 uuid = { version = "1.6.1", features = ["v4"] }

+ 0 - 9
crates/cashu/src/utils.rs

@@ -5,15 +5,6 @@ use std::time::SystemTime;
 use bitcoin::hashes::sha256::Hash as Sha256;
 use bitcoin::hashes::Hash;
 use rand::prelude::*;
-use regex::Regex;
-
-pub fn extract_url_from_error(error: &str) -> Option<String> {
-    let regex = Regex::new(r"https?://[^\s]+").unwrap();
-    if let Some(capture) = regex.captures(error) {
-        return Some(capture[0].to_owned());
-    }
-    None
-}
 
 pub fn random_hash() -> Vec<u8> {
     let mut rng = rand::thread_rng();