Skip to content

Commit a8d1255

Browse files
Bug fixed
1 parent 0900ea3 commit a8d1255

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

electrum_dash/bitcoin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ def hash_decode(x: str) -> bytes:
352352

353353
def hash160_to_b58_address(h160: bytes, addrtype: int) -> str:
354354
s = bytes([addrtype]) + h160
355+
if addrtype == 185:
356+
first_byte = 1
357+
third_byte = 187
358+
s = first_byte.to_bytes(1, 'little') + bytes([addrtype]) + third_byte.to_bytes(1, 'little') + h160
359+
355360
s = s + sha256d(s)[0:4]
356361
res = base_encode(s, base=58)
357362
return res

0 commit comments

Comments
 (0)