From 68094bfbc579804c7d30154a28cb43ab52da6076 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Tue, 27 May 2014 00:37:53 -0430 Subject: [PATCH 1/2] Fixed litecoin prefix Litecoin private keys were showing wrong, this fixes it. --- pywallet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywallet.py b/pywallet.py index 7450490..fff36ab 100644 --- a/pywallet.py +++ b/pywallet.py @@ -1228,7 +1228,7 @@ def PrivKeyToSecret(privkey): def SecretToASecret(secret, compressed=False): prefix = chr((addrtype+128)&255) if addrtype==48: #assuming Litecoin - prefix = chr(128) + prefix = chr(176) vchIn = prefix + secret if compressed: vchIn += '\01' return EncodeBase58Check(vchIn) From c62189b07fd931571aaab6e8522a264d76a54a97 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Thu, 29 May 2014 20:18:35 -0430 Subject: [PATCH 2/2] Removing unnecesary prefix case I reallized the special case for litecoin wasn't actually neccesary --- pywallet.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pywallet.py b/pywallet.py index fff36ab..4adbfe1 100644 --- a/pywallet.py +++ b/pywallet.py @@ -1227,8 +1227,6 @@ def PrivKeyToSecret(privkey): def SecretToASecret(secret, compressed=False): prefix = chr((addrtype+128)&255) - if addrtype==48: #assuming Litecoin - prefix = chr(176) vchIn = prefix + secret if compressed: vchIn += '\01' return EncodeBase58Check(vchIn)