From 843aec80d7740a6443443f97310274ea21c0e8ec Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 11 Oct 2017 16:27:39 +0200 Subject: [PATCH] fix: bitcoin.is_minikey() was broken --- lib/bitcoin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 3cb6b473f..33ae75bd7 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -572,8 +572,8 @@ def is_minikey(text): # suffixed with '?' have its SHA256 hash begin with a zero byte. # They are widely used in Casascius physical bitoins. return (len(text) >= 20 and text[0] == 'S' - and all(c in __b58chars for c in text) - and ord(sha256(text + '?')[0]) == 0) + and all(ord(c) in __b58chars for c in text) + and sha256(text + '?')[0] == 0x00) def minikey_to_private_key(text): return sha256(text)