ui: Add wallet encryption templates.

tests: Test wallet encryption.
This commit is contained in:
tecnovert
2022-11-18 00:58:14 +02:00
parent 0f7df9e5f1
commit c5f31f0d1e
28 changed files with 430 additions and 113 deletions

View File

@@ -1305,6 +1305,8 @@ class BTCInterface(CoinInterface):
def changeWalletPassword(self, old_password, new_password):
self._log.info('changeWalletPassword - {}'.format(self.ticker()))
if old_password == '':
if self.isWalletEncrypted():
raise ValueError('Old password must be set')
return self.rpc_callback('encryptwallet', [new_password])
self.rpc_callback('walletpassphrasechange', [old_password, new_password])