fix json_response_encoder to also return correct confirmations
This commit is contained in:
parent
16ff4b4e2c
commit
93f9622798
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue