fix old wallet conversion with mnemonic extension

This commit is contained in:
undeath 2018-09-28 19:44:39 +02:00
parent 6a26e48def
commit d3a6dd0722

View file

@ -35,7 +35,7 @@ def decrypt_entropy_extension(enc_data, key):
if data[-9] != b'\xff':
raise ConvertException("Wrong password.")
chunks = data.split(b'\xff')
if len(chunks) < 3 or data[-8:] != double_sha256(chunks[1])[:8]:
if len(chunks) < 3 or data[-8:] != hexlify(double_sha256(chunks[1])[:4]):
raise ConvertException("Wrong password.")
return chunks[1]