rust client: Find settle pnl counterparties on the same group only

This commit is contained in:
Christian Kamm 2023-02-03 11:32:18 +01:00
parent 0ba7ecd506
commit d0260e071c
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ pub async fn fetch_top(
return None;
}
let mango_acc = mango_acc.unwrap();
if mango_acc.fixed.group != perp_market.group {
return None;
}
let perp_pos = mango_acc.perp_position(perp_market_index);
if perp_pos.is_err() {
return None;