Browse Source

fix multisig update_password

283
ThomasV 8 years ago
parent
commit
9cb576a88c
  1. 2
      lib/storage.py
  2. 4
      lib/wallet.py
  3. 2
      plugins/trustedcoin/trustedcoin.py

2
lib/storage.py

@ -84,7 +84,7 @@ class WalletStorage(PrintError):
def set_password(self, pw, encrypt):
"""Set self.pubkey"""
self.put('use_encryption', (pw is not None))
self.put('use_encryption', bool(pw))
self.decrypt(None, pw if encrypt else None)
def is_encrypted(self):

4
lib/wallet.py

@ -1682,12 +1682,12 @@ class Multisig_Wallet(Deterministic_Wallet, P2SH):
def get_keystores(self):
return [self.keystores[i] for i in sorted(self.keystores.keys())]
def update_password(self, old_pw, new_pw):
def update_password(self, old_pw, new_pw, encrypt=False):
for name, keystore in self.keystores.items():
if keystore.can_change_password():
keystore.update_password(old_pw, new_pw)
self.storage.put(name, keystore.dump())
self.storage.set_password(new_pw)
self.storage.set_password(new_pw, encrypt)
def check_password(self, password):
self.keystore.check_password(password)

2
plugins/trustedcoin/trustedcoin.py

@ -442,8 +442,8 @@ class TrustedCoinPlugin(BasePlugin):
long_user_id, short_id = get_user_id(storage)
xpub3 = make_xpub(signing_xpub, long_user_id)
k3 = keystore.from_xpub(xpub3)
storage.put('use_encryption', bool(password))
storage.put('x3/', k3.dump())
storage.set_password(password, encrypt)
wizard.wallet = Wallet_2fa(storage)
wizard.create_addresses()

Loading…
Cancel
Save