check if the wallet has a seed before signing transaction
This commit is contained in:
parent
22ce3def72
commit
32db2aecc2
|
@ -216,6 +216,7 @@ class Wallet:
|
||||||
return self.get_private_keys([address], password).get(address)
|
return self.get_private_keys([address], password).get(address)
|
||||||
|
|
||||||
def get_private_keys(self, addresses, password):
|
def get_private_keys(self, addresses, password):
|
||||||
|
if not self.seed: return {}
|
||||||
# decode seed in any case, in order to test the password
|
# decode seed in any case, in order to test the password
|
||||||
seed = self.decode_seed(password)
|
seed = self.decode_seed(password)
|
||||||
out = {}
|
out = {}
|
||||||
|
@ -776,6 +777,7 @@ class Wallet:
|
||||||
pk_addresses.append(pk_addr)
|
pk_addresses.append(pk_addr)
|
||||||
|
|
||||||
# get all private keys at once.
|
# get all private keys at once.
|
||||||
|
if self.seed:
|
||||||
private_keys = self.get_private_keys(pk_addresses, password)
|
private_keys = self.get_private_keys(pk_addresses, password)
|
||||||
tx.sign(private_keys)
|
tx.sign(private_keys)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue