Skip to content

Commit

Permalink
dex(rpc): add ids to liquidity_positions_by_price stream
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Apr 29, 2024
1 parent 29d070a commit 0b3124e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/core/component/dex/src/component/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 0b3124e

Please sign in to comment.