mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Add fee to txs returned from .transactions()
previously the transaction fees were omitted from transactions loaded/found using .transactions methods, this simple change fixes it
This commit is contained in:
parent
3ad3a6082b
commit
6a8c4e8cd7
1 changed files with 6 additions and 2 deletions
|
@ -133,12 +133,16 @@ class JSONRPCDaemon(object):
|
|||
raise exceptions.BackendException(res['status'])
|
||||
txs = []
|
||||
for tx in res.get('txs', []):
|
||||
as_json = json.loads(tx['as_json'])
|
||||
fee = as_json['rct_signatures'].get('txnFee')
|
||||
txs.append(Transaction(
|
||||
hash=tx['tx_hash'],
|
||||
fee=from_atomic(fee) if fee else None,
|
||||
height=None if tx['in_pool'] else tx['block_height'],
|
||||
timestamp=datetime.fromtimestamp(tx['block_timestamp']) if 'block_timestamp' in tx else None,
|
||||
timestamp=datetime.fromtimestamp(
|
||||
tx['block_timestamp']) if 'block_timestamp' in tx else None,
|
||||
blob=binascii.unhexlify(tx['as_hex']),
|
||||
json=json.loads(tx['as_json'])))
|
||||
json=as_json))
|
||||
return txs
|
||||
|
||||
def raw_request(self, path, data):
|
||||
|
|
Loading…
Reference in a new issue