From 9cfad2c8562f7d020249891f7e4391102f6fb3b2 Mon Sep 17 00:00:00 2001 From: Vu Tien Date: Fri, 27 Dec 2024 09:32:27 +0700 Subject: [PATCH] [dodov2] set reserve 0 to prevent find route in case price oracle not feasible --- pkg/liquidity-source/dodo/shared/pool_tracker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/liquidity-source/dodo/shared/pool_tracker.go b/pkg/liquidity-source/dodo/shared/pool_tracker.go index 0969577ad..8101e0929 100644 --- a/pkg/liquidity-source/dodo/shared/pool_tracker.go +++ b/pkg/liquidity-source/dodo/shared/pool_tracker.go @@ -239,6 +239,11 @@ func (d *PoolTracker) getNewPoolStateDodoV2(ctx context.Context, p entity.Pool) "poolAddress": p.Address, "error": err, }).Errorf("[DodoV2] failed to aggregate for pool data") + if p.Extra != "" { + p.Extra = "" + p.Reserves = entity.PoolReserves{"0", "0"} + return p, nil + } return entity.Pool{}, err }