From 446942d3aa100b7db33e82d9b4d0d43538b998ca Mon Sep 17 00:00:00 2001 From: Felix Leupold Date: Tue, 17 Sep 2024 09:51:34 +0200 Subject: [PATCH] Fix BalancerSOR empty response classification --- src/infra/dex/balancer/dto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infra/dex/balancer/dto.rs b/src/infra/dex/balancer/dto.rs index 62dd821..ffaf8fc 100644 --- a/src/infra/dex/balancer/dto.rs +++ b/src/infra/dex/balancer/dto.rs @@ -270,7 +270,7 @@ impl Quote { /// enough liquidity, no trading path, etc.). We don't consider this an /// error case. pub fn is_empty(&self) -> bool { - *self == Quote::default() + self.return_amount_raw.is_zero() && self.swap_amount_raw.is_zero() && self.swaps.is_empty() } }