From 7b9ebdb23e1f477230052a617bc3d1672789de49 Mon Sep 17 00:00:00 2001 From: canonbrother Date: Wed, 18 Sep 2024 16:11:28 +0800 Subject: [PATCH] parse bc (main) and tb (test) on defichain network --- bitcoin/src/address/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bitcoin/src/address/mod.rs b/bitcoin/src/address/mod.rs index 372f019b..7694ac17 100644 --- a/bitcoin/src/address/mod.rs +++ b/bitcoin/src/address/mod.rs @@ -759,11 +759,9 @@ impl FromStr for Address { // 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 {