From 7b66bc16502979a38da8c91a62be0c9326bcd10f Mon Sep 17 00:00:00 2001 From: ai-bot Date: Sat, 14 Nov 2026 18:01:29 +0000 Subject: [PATCH] Run the admin_cost check before the shared type rules --- validation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation.py b/validation.py index e67b662..728636b 100644 --- a/validation.py +++ b/validation.py @@ -265,10 +265,10 @@ def validate_transaction(payload, markets): to_market_id = None if tx_type is not None: + if tx_type == "admin_cost": + _check_admin_cost(legs, errors) if tx_type == "trade": _check_trade(legs, errors) - elif tx_type == "admin_cost": - _check_admin_cost(legs, errors) else: for name, message in _REQUIRED.get(tx_type, ()): if legs[name] is None and name not in errors: