From fab97a003b800a22724dc9c6cc337d7de3200db9 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Mon, 1 Jan 2024 16:20:35 +0200 Subject: [PATCH] Use get_deser_from_gettransaction() everywhere --- src/jmclient/wallet_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jmclient/wallet_utils.py b/src/jmclient/wallet_utils.py index 686ab16e1..312814d5d 100644 --- a/src/jmclient/wallet_utils.py +++ b/src/jmclient/wallet_utils.py @@ -384,8 +384,8 @@ def get_tx_info(txid: str, tx_cache: Optional[dict] = None) -> Tuple[ rpctx, rpctx_deser = tx_cache[txid] else: rpctx = jm_single().bc_interface.get_transaction(txid) - txhex = str(rpctx['hex']) - rpctx_deser = btc.CMutableTransaction.deserialize(hextobin(txhex)) + rpctx_deser = jm_single().bc_interface.get_deser_from_gettransaction( + rpctx) if tx_cache is not None: tx_cache[txid] = (rpctx, rpctx_deser) output_script_values = {x.scriptPubKey: x.nValue for x in rpctx_deser.vout} @@ -912,8 +912,8 @@ def print_row(index, time, tx_type, amount, delta, balance, cj_n, wallet_tx = jm_single().bc_interface.get_transaction( ins.prevout.hash[::-1]) if wallet_tx: - wallet_tx_deser = btc.CMutableTransaction.deserialize( - hextobin(wallet_tx['hex'])) + wallet_tx_deser = jm_single.bc_interface( + ).get_deser_from_gettransaction(wallet_tx) tx_cache[ins.prevout.hash[::-1]] = (wallet_tx, wallet_tx_deser) if wallet_tx is None: