parent
73bd76b631
commit
4c4d652f1b
2 changed files with 4 additions and 6 deletions
|
@ -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):
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue