diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 44174d29f..328d1fd97 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -299,7 +299,11 @@ def is_address(addr): def is_private_key(key): - return ASecretToSecret(key) is not False + try: + k = ASecretToSecret(key) + return k is not False + except: + return False ########### end pywallet functions ####################### diff --git a/lib/wallet.py b/lib/wallet.py index 6e963c416..46736c97b 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1126,10 +1126,10 @@ class Deterministic_Wallet(Abstract_Wallet): Abstract_Wallet.__init__(self, storage) def has_seed(self): - return self.seed == '' + return self.seed != '' def is_watching_only(self): - return self.has_seed() + return not self.has_seed() def check_password(self, password): self.get_seed(password)