From 5167101f22492c3949a7b690c733c01982135d4d Mon Sep 17 00:00:00 2001 From: tien7668 <33758175+tien7668@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:22:10 +0700 Subject: [PATCH] [dodov2] set reserve 0 to prevent find route in case price oracle not feasible (#670) --- 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 }