From e281c14fa30a9a2430d2c8947170ed4869755de4 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sat, 14 Jan 2023 12:25:27 +0000 Subject: [PATCH] account for unrecognized destination type --- jmclient/jmclient/taker_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jmclient/jmclient/taker_utils.py b/jmclient/jmclient/taker_utils.py index a81563b..a500fd2 100644 --- a/jmclient/jmclient/taker_utils.py +++ b/jmclient/jmclient/taker_utils.py @@ -117,6 +117,11 @@ def direct_send(wallet_service, amount, mixdepth, destination, answeryes=False, # we don't recognize this type; best we can do is revert to default, # even though it may be inaccurate: change_type = txtype + if outtype is None: + # we don't recognize the destination script type, + # so set it as the same as the change (which will usually + # be the same as the spending wallet, but see above for custom) + outtype = change_type outtypes = [change_type, outtype] # not doing a sweep; we will have change. # 8 inputs to be conservative; note we cannot account for the possibility