fix bug with has_seed
This commit is contained in:
@@ -299,7 +299,11 @@ def is_address(addr):
|
|||||||
|
|
||||||
|
|
||||||
def is_private_key(key):
|
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 #######################
|
########### end pywallet functions #######################
|
||||||
|
|||||||
@@ -1126,10 +1126,10 @@ class Deterministic_Wallet(Abstract_Wallet):
|
|||||||
Abstract_Wallet.__init__(self, storage)
|
Abstract_Wallet.__init__(self, storage)
|
||||||
|
|
||||||
def has_seed(self):
|
def has_seed(self):
|
||||||
return self.seed == ''
|
return self.seed != ''
|
||||||
|
|
||||||
def is_watching_only(self):
|
def is_watching_only(self):
|
||||||
return self.has_seed()
|
return not self.has_seed()
|
||||||
|
|
||||||
def check_password(self, password):
|
def check_password(self, password):
|
||||||
self.get_seed(password)
|
self.get_seed(password)
|
||||||
|
|||||||
Reference in New Issue
Block a user