Skip to content

Commit

Permalink
Rever balance fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Nov 7, 2024
1 parent 2bcb3ac commit a1bc459
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/shared/src/price_estimation/trade_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ fn add_balance_queries(
let query_balance = solver.methods().store_balance(token, owner, true);
let query_balance = Bytes(query_balance.tx.data.unwrap().0);
let interaction = (solver.address(), 0.into(), query_balance);
// query balance query at the end of pre-interactions
settlement.interactions[0].push(interaction.clone());
// query balance right after we receive all `sell_token`
settlement.interactions[1].insert(0, interaction.clone());
// query balance right after we payed out all `buy_token`
settlement.interactions[2].insert(0, interaction);
settlement
Expand Down

0 comments on commit a1bc459

Please sign in to comment.