tget_private_key: call get_seed first in order to check password - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit eae0c7c3b94680906713b89eecd9b3700265ad7c DIR parent ff647c79fda23a04eca582203e542ea0ab409a0c HTML Author: thomasv <thomasv@gitorious> Date: Sun, 10 Nov 2013 15:22:22 +0100 get_private_key: call get_seed first in order to check password Diffstat: M lib/wallet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -697,13 +697,15 @@ class Wallet: def get_private_key(self, address, password): + # first check the provided password + seed = self.get_seed(password) + out = [] if address in self.imported_keys.keys(): out.append( pw_decode( self.imported_keys[address], password ) ) else: account, sequence = self.get_address_index(address) if account == 0: - seed = self.get_seed(password) pk = self.accounts[account].get_private_key(seed, sequence) out.append(pk) return out