1
0

qml: wip single password

This commit is contained in:
Sander van Grieken
2022-07-12 16:49:07 +02:00
parent 430a61eb42
commit 70cf44ccec
6 changed files with 30 additions and 25 deletions

View File

@@ -545,10 +545,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
if storage.is_encrypted_with_hw_device():
return
self._logger.debug('Ok to set password for wallet with path %s' % storage.path)
if password:
enc_version = StorageEncryptionVersion.USER_PASSWORD
else:
enc_version = StorageEncryptionVersion.PLAINTEXT
storage.set_password(password, enc_version=enc_version)
self.wallet.save_db()
self._logger.debug(f'Ok to set password from {self.password} to {password} for wallet with path {storage.path}')
try:
self.wallet.update_password(self.password, password, encrypt_storage=True)
self.password = password
except InvalidPassword as e:
self._logger.exception(repr(e))