addressed some comments

This commit is contained in:
jonesmarvin8 2026-04-27 20:07:47 -04:00
parent 935ef1db46
commit b396756e8d
2 changed files with 6 additions and 9 deletions

View File

@ -13,7 +13,7 @@ pub struct WitnessSet {
impl WitnessSet { impl WitnessSet {
#[must_use] #[must_use]
// TODO: this generates signatures. // TODO: swap for Keycard signing path.
// However. we may need to get signatures from Keycard. // However. we may need to get signatures from Keycard.
pub fn for_message(message: &Message, proof: Proof, private_keys: &[&PrivateKey]) -> Self { pub fn for_message(message: &Message, proof: Proof, private_keys: &[&PrivateKey]) -> Self {
let message_hash = message.hash_message(); let message_hash = message.hash_message();

View File

@ -414,8 +414,7 @@ impl WalletCore {
) )
.unwrap(); .unwrap();
let witness_set = Self::sign_privacy_message(&message, &proof, &acc_manager) let witness_set = Self::sign_privacy_message(&message, &proof, &acc_manager);
.expect("Expect a valid witness set");
let tx = PrivacyPreservingTransaction::new(message, witness_set); let tx = PrivacyPreservingTransaction::new(message, witness_set);
let shared_secrets: Vec<_> = private_account_keys let shared_secrets: Vec<_> = private_account_keys
@ -574,14 +573,12 @@ impl WalletCore {
message: &nssa::privacy_preserving_transaction::Message, message: &nssa::privacy_preserving_transaction::Message,
proof: &Proof, proof: &Proof,
acc_manager: &privacy_preserving_tx::AccountManager, acc_manager: &privacy_preserving_tx::AccountManager,
) -> Result<nssa::privacy_preserving_transaction::witness_set::WitnessSet, ExecutionFailureKind> ) -> nssa::privacy_preserving_transaction::witness_set::WitnessSet
{ {
Ok( nssa::privacy_preserving_transaction::witness_set::WitnessSet::for_message(
nssa::privacy_preserving_transaction::witness_set::WitnessSet::for_message(
message, message,
proof.clone(), proof.clone(),
&acc_manager.public_account_auth(), &acc_manager.public_account_auth())
),
)
} }
} }