tfix #4319 - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 0b72803dd479e8e3e3de367f9bf484223b1b87b1
DIR parent 170f41f50df31c29f2117f3d4742391e19575c8d
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Mon, 18 Jun 2018 20:30:05 +0200
fix #4319
Diffstat:
M lib/keystore.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
DIR diff --git a/lib/keystore.py b/lib/keystore.py
t@@ -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):