Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Mar 13, 2024
1 parent 227db4e commit c16bd88
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/driver/src/tests/cases/protocol_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ async fn protocol_fee_test_case(test_case: TestCase) {
.saturating_sub(test_case.execution.solver.buy),
};
// If there is a difference, the order is considered to be partially fillable
let partially_executed: Option<eth::U256> =
(!partially_executed.is_zero()).then_some(partially_executed);
let partial = match partially_executed {
Some(executed) => Partial::Yes { executed },
None => Partial::No,
let partial = if partially_executed.is_zero() {
Partial::No
} else {
Partial::Yes {
executed: partially_executed,
}
};
let solver_fee = test_case.execution.driver.sell / 100;
// Target amount to be executed by the solver in case of partially fillable
Expand Down

0 comments on commit c16bd88

Please sign in to comment.