From afd8762b9e0a3740d9b597015433e4db56fc39ad Mon Sep 17 00:00:00 2001 From: turbocrime Date: Fri, 5 Jan 2024 21:04:40 -0800 Subject: [PATCH] update tests --- crates/core/app/src/action_handler/transaction.rs | 4 ++-- crates/core/transaction/src/plan.rs | 4 ++-- crates/custody/src/threshold.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/core/app/src/action_handler/transaction.rs b/crates/core/app/src/action_handler/transaction.rs index 2bb6d115d9..a6ea573ec8 100644 --- a/crates/core/app/src/action_handler/transaction.rs +++ b/crates/core/app/src/action_handler/transaction.rs @@ -170,7 +170,7 @@ mod tests { // Build the transaction. let fvk = &test_keys::FULL_VIEWING_KEY; let sk = &test_keys::SPEND_KEY; - let auth_data = plan.authorize(OsRng, sk); + let auth_data = plan.authorize(OsRng, sk)?; let witness_data = WitnessData { anchor: sct.root(), state_commitment_proofs: plan @@ -233,7 +233,7 @@ mod tests { // Build the transaction. let fvk = &test_keys::FULL_VIEWING_KEY; let sk = &test_keys::SPEND_KEY; - let auth_data = plan.authorize(OsRng, sk); + let auth_data = plan.authorize(OsRng, sk)?; let witness_data = WitnessData { anchor: sct.root(), state_commitment_proofs: plan diff --git a/crates/core/transaction/src/plan.rs b/crates/core/transaction/src/plan.rs index 6f786f2461..40b8dcddb4 100644 --- a/crates/core/transaction/src/plan.rs +++ b/crates/core/transaction/src/plan.rs @@ -511,9 +511,9 @@ mod tests { println!("{}", serde_json::to_string_pretty(&plan).unwrap()); - let plan_effect_hash = plan.effect_hash(fvk); + let plan_effect_hash = plan.effect_hash(fvk).unwrap(); - let auth_data = plan.authorize(rng, &sk); + let auth_data = plan.authorize(rng, &sk).unwrap(); let witness_data = WitnessData { anchor: sct.root(), state_commitment_proofs: plan diff --git a/crates/custody/src/threshold.rs b/crates/custody/src/threshold.rs index c33f09b155..4323fe4854 100644 --- a/crates/custody/src/threshold.rs +++ b/crates/custody/src/threshold.rs @@ -579,7 +579,7 @@ mod test { pre_authorizations: Vec::new(), }) .await?; - assert_eq!(plan.effect_hash(&fvk), authorization_data.effect_hash); + assert_eq!(plan.effect_hash(&fvk)?, authorization_data.effect_hash); // The transaction plan only has spends for (randomizer, sig) in plan .spend_plans()