Skip to content

Commit

Permalink
liquidator: restore warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
farnyser committed Apr 22, 2024
1 parent 88e4502 commit 0b99ea8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/liquidator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ async fn main() -> anyhow::Result<()> {
.await?;
let mango_group = mango_account.fixed.group;

let signer_is_owner = mango_account.fixed.owner == liqor_owner.pubkey();
if cli.rebalance == BoolArg::True && !signer_is_owner {
warn!("rebalancing on delegated accounts will be unable to free token positions reliably, withdraw dust manually");
}

let group_context = MangoGroupContext::new_from_rpc(client.rpc_async(), mango_group).await?;

let mango_oracles = group_context
Expand Down

0 comments on commit 0b99ea8

Please sign in to comment.