From e1ec4b93ab60099c323477ec5240ecef1d99a463 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Thu, 5 Aug 2021 16:51:20 +0100 Subject: [PATCH] Fix bug in direct send of timelocked outputs Before this commit, while sending from mixdepth zero in a sweep, where 1 or more p2wsh timelock type outputs (now past their timelock), were present, was working correctly, non-sweep sends in the same circumstances were failing due to a key error. This is now fixed. --- jmclient/jmclient/taker_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jmclient/jmclient/taker_utils.py b/jmclient/jmclient/taker_utils.py index 158e737..005036f 100644 --- a/jmclient/jmclient/taker_utils.py +++ b/jmclient/jmclient/taker_utils.py @@ -134,8 +134,7 @@ def direct_send(wallet_service, amount, mixdepth, destination, answeryes=False, if mixdepth == FidelityBondMixin.FIDELITY_BOND_MIXDEPTH and \ isinstance(wallet_service.wallet, FidelityBondMixin): for outpoint, utxo in utxos.items(): - path = wallet_service.script_to_path( - wallet_service.addr_to_script(utxo["address"])) + path = wallet_service.script_to_path(utxo["script"]) if not FidelityBondMixin.is_timelocked_path(path): continue path_locktime = path[-1]