Skip to content

Commit

Permalink
fix parse_tx_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
icreator committed May 5, 2021
1 parent 7fe5301 commit af2da32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/rpc_erachain.py
Expand Up @@ -108,21 +108,21 @@ def get_tx_info(rpc_url, txid):

# for precess incomes in serv_block_proc
def parse_tx_fields(rec):
mess = rec['title'] ## may be = u''
title = rec.get('title') ## may be = u''
return dict(
creator=rec['creator'],
recipient=rec['recipient'],
amount=Decimal(rec['amount']),
asset=rec['asset'],
message = mess or rec['message'],
message=rec.get('message', title),
txid=rec['signature'],
vout=0,
block=rec['height'],
timestamp=rec['timestamp'] / 1000, # in SEC
confs=rec['confirmations']
)


# 1631311
def get_transactions(token_system, from_block=2):
rpc_url = token_system.connect_url
addr = token_system.account
Expand Down

0 comments on commit af2da32

Please sign in to comment.