adding blockheight in transaction details response

This commit is contained in:
Vivek Teega 2019-09-01 14:24:43 +05:30
parent 2f4db790e8
commit 4d1b1240d9

View File

@ -546,6 +546,8 @@ async def getLatestTransactionDetails():
tx_parsed_details['transactionDetails'] = json.loads(item[2])
tx_parsed_details['parsedFloData'] = json.loads(item[4])
tx_parsed_details['parsedFloData']['transactionType'] = item[3]
response = json.loads(requests.get('{}block/{}'.format(apiUrl,tx_parsed_details['blockhash'])))
tx_parsed_details['transactionDetails']['blockheight'] = response['height']
tempdict.append(tx_parsed_details)
return jsonify(result='ok', latestTransactions=tempdict, temp=item)