dcr: fix wallet creation and test for v2.1.2

This commit is contained in:
tecnovert
2026-01-01 01:12:27 +02:00
parent b3591a2bb1
commit dc289a18ee
4 changed files with 23 additions and 10 deletions

View File

@@ -406,7 +406,10 @@ class DCRInterface(Secp256k1Interface):
# Adjust verificationprogress to consider blocks wallet has synced
wallet_blocks = self.rpc_wallet("getinfo")["blocks"]
synced_ind = bci["verificationprogress"]
wallet_synced_ind = wallet_blocks / bci["headers"]
if bci["headers"] < 1:
wallet_synced_ind = 0
else:
wallet_synced_ind = wallet_blocks / bci["headers"]
if wallet_synced_ind < synced_ind:
bci["verificationprogress"] = wallet_synced_ind

View File

@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2024 tecnovert
# Copyright (c) 2025 The Basicswap developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
@@ -35,6 +36,13 @@ def createDCRWallet(args, hex_seed, logging, delay_event):
response = b"y\n"
elif "Enter existing wallet seed" in buf:
response = (hex_seed + "\n").encode("utf-8")
elif "Do you have a wallet birthday we should rescan from" in buf:
response = b"no\n"
elif (
"Do you have an additional account to import from an extended public key"
in buf
):
response = b"no\n"
elif "Seed input successful" in buf:
pass
elif "Upgrading database from version" in buf: