Integrate Decred with wallet encryption.

dcrwallet requires the password to be entered at the first startup when encrypted.
basicswap-run with --startonlycoin=decred and the WALLET_ENCRYPTION_PWD environment var set can be used for the initial sync.
This commit is contained in:
tecnovert
2024-05-22 09:59:57 +02:00
parent fcf234ef34
commit 76445146fb
7 changed files with 102 additions and 10 deletions

View File

@@ -6861,6 +6861,12 @@ class BasicSwap(BaseApp):
self.ci(coin).setAnonTxRingSize(new_anon_tx_ring_size)
break
if 'wallet_pwd' in data:
new_wallet_pwd = data['wallet_pwd']
if settings_cc.get('wallet_pwd', '') != new_wallet_pwd:
settings_changed = True
settings_cc['wallet_pwd'] = new_wallet_pwd
if settings_changed:
settings_path = os.path.join(self.data_dir, cfg.CONFIG_FILENAME)
settings_path_new = settings_path + '.new'