From 2a8ac051fc9cbe5ce7334e1b7be9ad7aa8d2bccc Mon Sep 17 00:00:00 2001 From: tecnovert Date: Sun, 11 May 2025 13:10:54 +0200 Subject: [PATCH] Fix prefunded ITX. --- basicswap/db.py | 7 +++++-- tests/basicswap/test_xmr.py | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/basicswap/db.py b/basicswap/db.py index 5751673..1867c6e 100644 --- a/basicswap/db.py +++ b/basicswap/db.py @@ -966,8 +966,11 @@ class DBMethods: query_data[cv_name] = cv query += ") " else: - query += f" AND {ck} = :{ck} " - query_data[ck] = constraint_value + if constraint_value is None: + query += f" AND {ck} IS NULL " + else: + query += f" AND {ck} = :{ck} " + query_data[ck] = constraint_value for order_col, order_dir in order_by.items(): if validColumnName(order_col) is False: diff --git a/tests/basicswap/test_xmr.py b/tests/basicswap/test_xmr.py index e575ef1..4bde387 100644 --- a/tests/basicswap/test_xmr.py +++ b/tests/basicswap/test_xmr.py @@ -1137,12 +1137,10 @@ class Test(BaseTest): walletpath = os.path.join( chain_client_settings.get("datadir", "none"), "wallets", wallet_name ) - wallet_cache_bytes = os.path.getsize(walletpath) - logging.info(f"[rm] wallet_cache_bytes {wallet_cache_bytes}") - logging.info(f"[rm] walletpath {walletpath}") shutil.copy(walletpath, walletpath + ".orig") # Failed to open wallet : basic_string::_M_replace_aux + # wallet_cache_bytes = os.path.getsize(walletpath) # with open(walletpath, "wb") as fp: # fp.write(os.urandom(wallet_cache_bytes))