From c132f40164f2a0d32447b784ec03e77913d54ce7 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 27 Feb 2025 14:23:07 -0400 Subject: [PATCH] transfer accounting fix --- src/dexorder/event_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dexorder/event_handler.py b/src/dexorder/event_handler.py index ee6fad7..d996a60 100644 --- a/src/dexorder/event_handler.py +++ b/src/dexorder/event_handler.py @@ -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