From 0b3124e82cbfb06b7564ad6dcf84cecfacf8bc87 Mon Sep 17 00:00:00 2001 From: Erwan Or Date: Wed, 17 Apr 2024 20:24:47 -0400 Subject: [PATCH] dex(rpc): add ids to `liquidity_positions_by_price` stream --- crates/core/component/dex/src/component/rpc.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/core/component/dex/src/component/rpc.rs b/crates/core/component/dex/src/component/rpc.rs index ed3e6914d0..545e4e48cb 100644 --- a/crates/core/component/dex/src/component/rpc.rs +++ b/crates/core/component/dex/src/component/rpc.rs @@ -362,8 +362,12 @@ impl QueryService for Server { anyhow::Ok(position) } }) - .map_ok(|position| LiquidityPositionsByPriceResponse { - data: Some(position.into()), + .map_ok(|position| { + let id = position.id(); + LiquidityPositionsByPriceResponse { + data: Some(position.into()), + id: Some(id.into()), + } }) .map_err(|e: anyhow::Error| { tonic::Status::internal(format!("error retrieving positions: {:#}", e))