diff --git a/lbrynet/daemon/json_response_encoder.py b/lbrynet/daemon/json_response_encoder.py index 8942ccc89..1ceaadf56 100644 --- a/lbrynet/daemon/json_response_encoder.py +++ b/lbrynet/daemon/json_response_encoder.py @@ -67,6 +67,7 @@ class JSONResponseEncoder(JSONEncoder): if claim.has_signature: output['valid_signature'] = None if txo.channel is not None: + output['channel_name'] = txo.channel.claim_name output['valid_signature'] = claim.validate_signature( txo.get_address(self.ledger), txo.channel.claim ) @@ -80,9 +81,6 @@ class JSONResponseEncoder(JSONEncoder): else: output['type'] = 'basic' - # deprecated, will be removed after 0.30 release - output['category'] = output['type'] - return output def encode_input(self, txi): diff --git a/lbrynet/wallet/manager.py b/lbrynet/wallet/manager.py index 1be212f08..0d96a8768 100644 --- a/lbrynet/wallet/manager.py +++ b/lbrynet/wallet/manager.py @@ -288,14 +288,14 @@ class LbryWalletManager(BaseWalletManager): txs = await account.get_transactions(**constraints) history = [] for tx in txs: - ts = headers[tx.height]['timestamp'] + ts = headers[tx.height]['timestamp'] if tx.height > 0 else None item = { 'txid': tx.id, 'timestamp': ts, 'value': dewies_to_lbc(tx.net_account_balance), 'fee': dewies_to_lbc(tx.fee), - 'date': datetime.fromtimestamp(ts).isoformat(' ')[:-3], - 'confirmations': headers.height - tx.height, + 'date': datetime.fromtimestamp(ts).isoformat(' ')[:-3] if tx.height > 0 else None, + 'confirmations': headers.height - tx.height if tx.height > 0 else 0, 'claim_info': [{ 'address': txo.get_address(account.ledger), 'balance_delta': dewies_to_lbc(-txo.amount),