Skip to content

Commit

Permalink
misprint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vlzhr committed Nov 18, 2019
1 parent 18c4415 commit b4936c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def verify_signature(pub_key, message, signature):
def address_from_pubkey(public_key):
""" public key is expected as a string """
pubKey = base58.b58decode(public_key)
unhashedAddress = chr(1) + str(pw.CHAIN_ID) + pw.crypto.hashChain(pubKey)[0:20]
addressHash = pw.crypto.hashChain(pw.crypto.str2bytes(unhashedAddress))[0:4]
address = base58.b58encode(pw.crypto.str2bytes(unhashedAddress + addressHash))
unhashedAddress = chr(1) + str(pywaves.CHAIN_ID) + crypto.hashChain(pubKey)[0:20]
addressHash = crypto.hashChain(crypto.str2bytes(unhashedAddress))[0:4]
address = base58.b58encode(crypto.str2bytes(unhashedAddress + addressHash))
return address

0 comments on commit b4936c6

Please sign in to comment.