From f891bcb1ece2b0ffd7c382e1409148aaeeebbd89 Mon Sep 17 00:00:00 2001 From: chris-belcher Date: Fri, 10 Jan 2020 13:08:49 +0000 Subject: [PATCH] Display confirmations in wallet-tool showutxos There seems to be no place where confirmations are displayed in JoinMarket's CLI tools. The showutxos method seems the most logical place to put the feature. --- jmclient/jmclient/wallet_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jmclient/jmclient/wallet_utils.py b/jmclient/jmclient/wallet_utils.py index efe5cfc..3b9b0e1 100644 --- a/jmclient/jmclient/wallet_utils.py +++ b/jmclient/jmclient/wallet_utils.py @@ -353,7 +353,7 @@ def get_imported_privkey_branch(wallet_service, m, showprivkey): def wallet_showutxos(wallet, showprivkey): unsp = {} max_tries = jm_single().config.getint("POLICY", "taker_utxo_retries") - utxos = wallet.get_utxos_by_mixdepth() + utxos = wallet.get_utxos_by_mixdepth(includeconfs=True) for md in utxos: for u, av in utxos[md].items(): key = wallet.get_key_from_addr(av['address']) @@ -361,7 +361,8 @@ def wallet_showutxos(wallet, showprivkey): tries_remaining = max(0, max_tries - tries) unsp[u] = {'address': av['address'], 'value': av['value'], 'tries': tries, 'tries_remaining': tries_remaining, - 'external': False} + 'external': False, + 'confirmations': av['confs']} if showprivkey: unsp[u]['privkey'] = wallet.get_wif_path(av['path'])