From 72f0e1ca142ed90f678d39f2133261f6deb83f0e Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 27 Apr 2019 16:48:40 -0400 Subject: [PATCH] added timestamp field to transaction output results from JSON RPC calls --- lbrynet/extras/daemon/json_response_encoder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/extras/daemon/json_response_encoder.py b/lbrynet/extras/daemon/json_response_encoder.py index 3d4419760..ccd5c681d 100644 --- a/lbrynet/extras/daemon/json_response_encoder.py +++ b/lbrynet/extras/daemon/json_response_encoder.py @@ -144,7 +144,8 @@ class JSONResponseEncoder(JSONEncoder): 'height': tx_height, 'amount': dewies_to_lbc(txo.amount), 'address': txo.get_address(self.ledger), - 'confirmations': (best_height+1) - tx_height if tx_height > 0 else tx_height + 'confirmations': (best_height+1) - tx_height if tx_height > 0 else tx_height, + 'timestamp': self.ledger.headers[tx_height]['timestamp'] if tx_height > 0 else None } if txo.is_change is not None: output['is_change'] = txo.is_change