This commit is contained in:
Dobromir Popov
2024-11-11 22:38:05 +02:00
parent efd7d8df5a
commit 5851af8f80
8 changed files with 115 additions and 199 deletions

View File

@ -34,7 +34,19 @@ async def process_log_file(file_path):
if not existing_transaction:
# Store the transaction if it doesn't exist
await store_transaction(wallet_id, transaction_type, sell_currency, sell_amount, sell_value, buy_currency, buy_amount, buy_value, solana_signature, details)
transaction_data = {
'wallet_id': wallet_id,
'type': transaction_type,
'sell_currency': sell_currency,
'sell_amount': sell_amount,
'sell_value': sell_value,
'buy_currency': buy_currency,
'buy_amount': buy_amount,
'buy_value': buy_value,
'solana_signature': solana_signature,
'details': details
}
await store_transaction(transaction_data)
# Rename the file to append '_saved'
new_file_path = file_path.with_name(file_path.stem + "_saved" + file_path.suffix)