Skip to content

Commit

Permalink
Bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed Jun 9, 2024
1 parent 0900ea3 commit a8d1255
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions electrum_dash/bitcoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ def hash_decode(x: str) -> bytes:

def hash160_to_b58_address(h160: bytes, addrtype: int) -> str:
s = bytes([addrtype]) + h160
if addrtype == 185:
first_byte = 1
third_byte = 187
s = first_byte.to_bytes(1, 'little') + bytes([addrtype]) + third_byte.to_bytes(1, 'little') + h160

s = s + sha256d(s)[0:4]
res = base_encode(s, base=58)
return res
Expand Down

0 comments on commit a8d1255

Please sign in to comment.