From 8ed01ac3376e25798cc41c9d5da69622759bd83f Mon Sep 17 00:00:00 2001 From: Wizz Wallet <153743376+wizz-wallet-dev@users.noreply.github.com> Date: Fri, 21 Jun 2024 21:35:04 +0800 Subject: [PATCH] Fit script with testnet4 --- electrumx/lib/script2addr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/electrumx/lib/script2addr.py b/electrumx/lib/script2addr.py index f13c6744..81a8fe62 100644 --- a/electrumx/lib/script2addr.py +++ b/electrumx/lib/script2addr.py @@ -246,7 +246,7 @@ def get_net_from_env(): def get_addr_type_p2pkh(): net = get_net_from_env() value = 0 # mainnet - if net == "testnet": + if net == "testnet" or net == "testnet4": value = 111 elif net == "regtest": value = 111 @@ -256,7 +256,7 @@ def get_addr_type_p2pkh(): def get_addr_type_p2sh(): net = get_net_from_env() value = 5 # mainnet - if net == "testnet": + if net == "testnet" or net == "testnet4": value = 196 elif net == "regtest": value = 196 @@ -266,7 +266,7 @@ def get_addr_type_p2sh(): def get_segwit_hrp(): net = get_net_from_env() value = "bc" # mainnet - if net == "testnet": + if net == "testnet" or net == "testnet4": value = "tb" elif net == "regtest": value = "bcrt"