Browse Source

add error message for import_key failure

283
ecdsa 12 years ago
parent
commit
c81d565665
  1. 5
      lib/wallet.py

5
lib/wallet.py

@ -137,7 +137,10 @@ class Wallet:
def import_key(self, sec, password):
# check password
seed = self.decode_seed(password)
address = address_from_private_key(sec)
try:
address = address_from_private_key(sec)
except:
raise BaseException('Invalid private key')
if self.is_mine(address):
raise BaseException('Address already in wallet')

Loading…
Cancel
Save