Skip to content

Commit

Permalink
chore: claim fuzz operation cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Jul 3, 2024
1 parent a5ca8b2 commit 030176e
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions contracts/sumtree-orderbook/src/tests/e2e/cases/test_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,23 +430,16 @@ impl MixedFuzzOperation {
};

// Claim the order
match orders::claim_and_assert_balance(t, claimant, &username, tick_id, order_id) {
Ok(_) => {
let order = t.contract.get_order(
t.accounts[&username].address(),
tick_id,
order_id,
);
if order.is_none() {
// Remove the order once we know its claimable
orders.remove(&order_id).unwrap();
}
Ok(true)
}
Err(e) => {
panic!("{e}")
}
orders::claim_and_assert_balance(t, claimant, &username, tick_id, order_id)
.unwrap();
let order =
t.contract
.get_order(t.accounts[&username].address(), tick_id, order_id);
if order.is_none() {
// Remove the order once we know its claimable
orders.remove(&order_id).unwrap();
}
Ok(true)
}
}
}
Expand Down

0 comments on commit 030176e

Please sign in to comment.