From 93f9622798ea736c4ce76c80e5d2790b76a10227 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 6 Dec 2018 00:28:42 -0500 Subject: [PATCH] fix json_response_encoder to also return correct confirmations --- lbrynet/extras/daemon/json_response_encoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbrynet/extras/daemon/json_response_encoder.py b/lbrynet/extras/daemon/json_response_encoder.py index bad96e6e1..e020644a9 100644 --- a/lbrynet/extras/daemon/json_response_encoder.py +++ b/lbrynet/extras/daemon/json_response_encoder.py @@ -52,7 +52,7 @@ class JSONResponseEncoder(JSONEncoder): 'amount': dewies_to_lbc(txo.amount), 'address': txo.get_address(self.ledger), 'height': tx_height, - 'confirmations': best_height - tx_height if tx_height > 0 else tx_height + 'confirmations': (best_height+1) - tx_height if tx_height > 0 else tx_height } if txo.is_change is not None: output['is_change'] = txo.is_change