undo whitespace changes
This commit is contained in:
parent
0b99ea8641
commit
806be41826
|
@ -485,11 +485,11 @@ impl Rebalancer {
|
|||
};
|
||||
|
||||
let Ok(dust_threshold) = dust_threshold_res
|
||||
else {
|
||||
let e = dust_threshold_res.unwrap_err();
|
||||
error!("Cannot rebalance token {}, probably missing USDC market ? - error: {}", token.name, e);
|
||||
continue;
|
||||
};
|
||||
else {
|
||||
let e = dust_threshold_res.unwrap_err();
|
||||
error!("Cannot rebalance token {}, probably missing USDC market ? - error: {}", token.name, e);
|
||||
continue;
|
||||
};
|
||||
|
||||
// Some rebalancing can actually change non-USDC positions (rebalancing to SOL)
|
||||
// So re-fetch the current token position amount
|
||||
|
@ -739,9 +739,9 @@ impl Rebalancer {
|
|||
quote: &TokenContext,
|
||||
) -> anyhow::Result<()> {
|
||||
let Ok(open_orders) = account.serum3_orders(*market_index).map(|x| x.open_orders)
|
||||
else {
|
||||
return Ok(());
|
||||
};
|
||||
else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let oo_acc = self.account_fetcher.fetch_raw(&open_orders)?;
|
||||
let oo = serum3_cpi::load_open_orders_bytes(oo_acc.data())?;
|
||||
|
@ -843,13 +843,13 @@ impl Rebalancer {
|
|||
}
|
||||
|
||||
#[instrument(
|
||||
skip_all,
|
||||
fields(
|
||||
perp_market_name = perp.name,
|
||||
base_lots = perp_position.base_position_lots(),
|
||||
effective_lots = perp_position.effective_base_position_lots(),
|
||||
quote_native = %perp_position.quote_position_native()
|
||||
)
|
||||
skip_all,
|
||||
fields(
|
||||
perp_market_name = perp.name,
|
||||
base_lots = perp_position.base_position_lots(),
|
||||
effective_lots = perp_position.effective_base_position_lots(),
|
||||
quote_native = %perp_position.quote_position_native()
|
||||
)
|
||||
)]
|
||||
async fn rebalance_perp(
|
||||
&self,
|
||||
|
|
Loading…
Reference in New Issue