Skip to content

Commit

Permalink
view: ignore the subaccount field in the client/server
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor authored and conorsch committed Jan 17, 2025
1 parent 480ffac commit 4c3c816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/view/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ where
tonic::Request::new(pb::OwnedPositionIdsRequest {
trading_pair: trading_pair.map(TryInto::try_into).transpose()?,
position_state: position_state.map(TryInto::try_into).transpose()?,
..Default::default()
}),
);

Expand Down
4 changes: 4 additions & 0 deletions crates/view/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,7 @@ impl ViewService for ViewServer {
let pb::OwnedPositionIdsRequest {
position_state,
trading_pair,
subaccount: _,
} = request.into_inner();

let position_state: Option<position::State> = position_state
Expand All @@ -1741,6 +1742,9 @@ impl ViewService for ViewServer {
for id in ids {
yield pb::OwnedPositionIdsResponse{
position_id: Some(id.into()),
// The rust view server does not index positions by subaccount,
// so this information is invisible to it.
subaccount: None,
}
}
};
Expand Down

0 comments on commit 4c3c816

Please sign in to comment.