tfix is_valid - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 68bfce07c119fb91c8ef707a958c9e6987a30399 DIR parent 6b5a2b98d2a2640cb202573c234f7dc473dd55d9 HTML Author: ThomasV <thomasv@gitorious> Date: Sun, 15 Jan 2012 21:22:51 +0100 fix is_valid Diffstat: M client/electrum.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/client/electrum.py b/client/electrum.py t@@ -399,7 +399,10 @@ class Wallet: def is_valid(self,addr): ADDRESS_RE = re.compile('[1-9A-HJ-NP-Za-km-z]{26,}\\Z') if not ADDRESS_RE.match(addr): return False - h = bc_address_to_hash_160(addr) + try: + h = bc_address_to_hash_160(addr) + except: + return False return addr == hash_160_to_bc_address(h) def stretch_key(self,seed):