transfer accounting fix

This commit is contained in:
tim
2025-02-27 14:23:07 -04:00
parent eccf81c3c8
commit c132f40164

View File

@@ -140,9 +140,10 @@ async def handle_transfer(transfer: EventData):
if vault is not None:
await adjust_balance(vault, token_address, amount)
await update_balance_triggers(vault, token_address, amount)
if is_tracked_address(to_address):
# noinspection PyTypeChecker
await accounting_transfer(transfer, token_address, from_address, to_address, amount, adjust_decimals=True)
# This wuold double-count fill fees. Instead, we book the transfer when sending money to the account as part of a refill.
# if is_tracked_address(to_address):
# # noinspection PyTypeChecker
# await accounting_transfer(transfer, token_address, from_address, to_address, amount, adjust_decimals=True)
async def handle_uniswap_swaps(swaps: list[EventData]):
# asynchronously prefetch the block timestamps we'll need