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

@@ -1379,7 +1379,7 @@ class BTCInterface(Secp256k1Interface):
return True
return False
def isWalletEncryptedLocked(self):
def isWalletEncryptedLocked(self) -> (bool, bool):
wallet_info = self.rpc_wallet('getwalletinfo')
encrypted = 'unlocked_until' in wallet_info
locked = encrypted and wallet_info['unlocked_until'] <= 0