Skip to content

Commit

Permalink
parse bc (main) and tb (test) on defichain network
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Sep 18, 2024
1 parent edd4495 commit 7b9ebdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bitcoin/src/address/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,11 +759,9 @@ impl FromStr for Address<NetworkUnchecked> {
// try bech32
let bech32_network = match find_bech32_prefix(s) {
// note that upper or lowercase is allowed but NOT mixed case
"df" | "DF" => Some(Network::Mainnet),
"tf" | "TF" => Some(Network::Testnet), // this may also be devnet
"df" | "DF" | "bc" | "BC" => Some(Network::Mainnet),
"tf" | "TF" | "tb" | "TB" => Some(Network::Testnet),
"bcrt" | "BCRT" => Some(Network::Regtest),
"bc" | "BC" => Some(Network::BitcoinMainnet),
"tb" | "TB" => Some(Network::BitcoinTestnet),
_ => None,
};
if let Some(network) = bech32_network {
Expand Down

0 comments on commit 7b9ebdb

Please sign in to comment.