This commit is contained in:
SomberNight 2018-06-18 20:30:05 +02:00
parent 170f41f50d
commit 0b72803dd4
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

@ -677,12 +677,18 @@ def load_keystore(storage, name):
return k
def is_old_mpk(mpk):
def is_old_mpk(mpk: str) -> bool:
try:
int(mpk, 16)
except:
return False
return len(mpk) == 128
if len(mpk) != 128:
return False
try:
ecc.ECPubkey(bfh('04' + mpk))
except:
return False
return True
def is_address_list(text):