diff --git a/apps/cic-ussd/cic_ussd/tasks/processor.py b/apps/cic-ussd/cic_ussd/tasks/processor.py index 599938ab..7796ad12 100644 --- a/apps/cic-ussd/cic_ussd/tasks/processor.py +++ b/apps/cic-ussd/cic_ussd/tasks/processor.py @@ -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: