fix json_response_encoder to also return correct confirmations

This commit is contained in:
Lex Berezhny 2018-12-06 00:28:42 -05:00
parent 16ff4b4e2c
commit 93f9622798

View file

@ -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