Shifts to retrieving token decimals from transaction object.
This commit is contained in:
parent
7aa2565a3f
commit
25f43a8e79
@ -58,11 +58,9 @@ def get_cached_statement(blockchain_address: str) -> bytes:
|
||||
return get_cached_data(key=key)
|
||||
|
||||
|
||||
def parse_statement_transactions(decimals: int, statement: list):
|
||||
def parse_statement_transactions(statement: list):
|
||||
"""This function extracts information for transaction objects loaded from the redis cache and structures the data in
|
||||
a format that is appropriate for the ussd interface.
|
||||
:param decimals:
|
||||
:type decimals: int
|
||||
:param statement: A list of transaction objects.
|
||||
:type statement: list
|
||||
:return:
|
||||
@ -71,6 +69,7 @@ def parse_statement_transactions(decimals: int, statement: list):
|
||||
parsed_transactions = []
|
||||
for transaction in statement:
|
||||
action_tag = transaction.get('action_tag')
|
||||
decimals = transaction.get('token_decimals')
|
||||
amount = from_wei(decimals, transaction.get('token_value'))
|
||||
direction_tag = transaction.get('direction_tag')
|
||||
token_symbol = transaction.get('token_symbol')
|
||||
|
Loading…
Reference in New Issue
Block a user