Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teddav committed Mar 20, 2024
1 parent c470f8a commit cfc4c16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/src/apis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where
.map(|balance| BigUint::from_str_radix(balance, 10).unwrap())
.collect();

let entry: Entry<N_CURRENCIES> = Entry::new(username, balances.try_into().unwrap()).unwrap();
let entry: Entry<N_CURRENCIES> = Entry::new(username, balances.try_into().unwrap());

// Convert Fp to U256
let hash_str = format!("{:?}", entry.compute_leaf().hash);
Expand Down
3 changes: 1 addition & 2 deletions zk_prover/src/circuits/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ mod test {
let invalid_leaf_balances = [1000.to_biguint().unwrap(), 1000.to_biguint().unwrap()];

// invalidate user entry
let invalid_entry =
Entry::new(circuit.entry.username().to_string(), invalid_leaf_balances).unwrap();
let invalid_entry = Entry::new(circuit.entry.username().to_string(), invalid_leaf_balances);

circuit.entry = invalid_entry;

Expand Down
3 changes: 1 addition & 2 deletions zk_prover/src/merkle_sum_tree/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ mod test {
let invalid_entry = Entry::new(
"AtwIxZHo".to_string(),
[35479.to_biguint().unwrap(), 35479.to_biguint().unwrap()],
)
.unwrap();
);
let invalid_entry = invalid_entry;
let mut proof_invalid_1 = proof.clone();
proof_invalid_1.entry = invalid_entry;
Expand Down

0 comments on commit cfc4c16

Please sign in to comment.