mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
simplify display of inputs/outpputs in CLI history
This commit is contained in:
parent
6d63140c61
commit
cb6989cea6
1 changed files with 2 additions and 13 deletions
|
@ -1068,19 +1068,8 @@ class Abstract_Wallet(PrintError):
|
||||||
item['label'] = self.get_label(tx_hash)
|
item['label'] = self.get_label(tx_hash)
|
||||||
if show_addresses:
|
if show_addresses:
|
||||||
tx = self.transactions.get(tx_hash)
|
tx = self.transactions.get(tx_hash)
|
||||||
tx.deserialize()
|
item['inputs'] = list(map(lambda x: dict((k, x[k]) for k in ('prevout_hash', 'prevout_n')), tx.inputs()))
|
||||||
input_addresses = []
|
item['outputs'] = list(map(lambda x:{'address':x[0], 'value':Satoshis(x[1])}, tx.get_outputs()))
|
||||||
output_addresses = []
|
|
||||||
for x in tx.inputs():
|
|
||||||
if x['type'] == 'coinbase': continue
|
|
||||||
addr = self.get_txin_address(x)
|
|
||||||
if addr is None:
|
|
||||||
continue
|
|
||||||
input_addresses.append(addr)
|
|
||||||
for addr, v in tx.get_outputs():
|
|
||||||
output_addresses.append(addr)
|
|
||||||
item['input_addresses'] = input_addresses
|
|
||||||
item['output_addresses'] = output_addresses
|
|
||||||
# value may be None if wallet is not fully synchronized
|
# value may be None if wallet is not fully synchronized
|
||||||
if value is None:
|
if value is None:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue