remove unsubscribed addresses
[electrum-server.git] / backends / bitcoind / util.py
index 2f33d11..f9b9ddc 100644 (file)
@@ -87,12 +87,14 @@ def public_key_to_bc_address(public_key):
     return hash_160_to_bc_address(h160)
 
 def hash_160_to_bc_address(h160):
+    if h160 == 'None': return 'None'
     vh160 = chr(addrtype) + h160
     h = Hash(vh160)
     addr = vh160 + h[0:4]
     return b58encode(addr)
 
 def bc_address_to_hash_160(addr):
+    if addr == 'None': return 'None'
     bytes = b58decode(addr, 25)
     return bytes[1:21]