Adds notion of last received and last token for ordering of the tokens list.
This commit is contained in:
parent
b18bb959a5
commit
9addb901cc
@ -74,6 +74,14 @@ def parse_transaction(transaction: dict) -> dict:
|
||||
role = transaction.get('role')
|
||||
alt_blockchain_address = transaction.get('alt_blockchain_address')
|
||||
blockchain_address = transaction.get('blockchain_address')
|
||||
identifier = bytes.fromhex(blockchain_address)
|
||||
token_symbol = transaction.get('token_symbol')
|
||||
if role == 'recipient':
|
||||
key = cache_data_key(identifier=identifier, salt=MetadataPointer.TOKEN_LAST_RECEIVED)
|
||||
cache_data(key, token_symbol)
|
||||
if role == 'sender':
|
||||
key = cache_data_key(identifier=identifier, salt=MetadataPointer.TOKEN_LAST_SENT)
|
||||
cache_data(key, token_symbol)
|
||||
account = validate_transaction_account(blockchain_address, role, session)
|
||||
alt_account = session.query(Account).filter_by(blockchain_address=alt_blockchain_address).first()
|
||||
if alt_account:
|
||||
|
Loading…
Reference in New Issue
Block a user