volume metric bugfix

This commit is contained in:
tim
2025-02-24 09:47:34 -04:00
parent 44d1c4a920
commit d942666e16

View File

@@ -84,7 +84,8 @@ async def handle_swap_filled(event: EventData):
log.warning(f'DexorderSwapFilled IGNORED due to missing order {vault} {order_index}')
return
value = await accounting_fill(event, order.order.tokenOut)
metric.volume.inc(float(value))
if value is not None:
metric.volume.inc(float(value))
order.status.trancheStatus[tranche_index].activationTime = next_execution_time # update rate limit
try:
triggers = OrderTriggers.instances[order.key]