Skip to content

Commit

Permalink
fix(esplora): fix the mempool api link
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Sep 28, 2023
1 parent 4d0d5b4 commit 5f075cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions folgore-esplora/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,19 @@ impl TryFrom<&str> for Network {

fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"bitcoin" => Ok(Self::Bitcoin("https://mempool.space/api/v1".to_owned())),
"bitcoin" => Ok(Self::Bitcoin("https://mempool.space/api".to_owned())),
"bitcoin/tor" => Ok(Self::BitcoinTor(
"http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api"
.to_owned(),
)),
"testnet" => Ok(Self::Testnet(
"https://mempool.space/testnet/api/v1".to_owned(),
"https://mempool.space/testnet/api".to_owned(),
)),
"testnet/tor" => Ok(Self::TestnetTor(
"http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/testnet/api"
.to_owned(),
)),
"signet" => Ok(Self::Testnet(
"https://mempool.space/signet/api/v1".to_owned(),
)),
"signet" => Ok(Self::Testnet("https://mempool.space/signet/api".to_owned())),
_ => Err(error!("network {value} not supported")),
}
}
Expand Down

0 comments on commit 5f075cf

Please sign in to comment.