minor fixes

This commit is contained in:
jonesmarvin8 2026-03-27 19:54:47 -04:00
parent daf9de33cd
commit 73aa3af4db
3 changed files with 8 additions and 7 deletions

View File

@ -48,7 +48,7 @@ impl PrivacyPreservingCircuitOutput {
} }
} }
/*
#[cfg(feature = "host")] #[cfg(feature = "host")]
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
@ -93,12 +93,12 @@ mod tests {
}], }],
ciphertexts: vec![Ciphertext(vec![255, 255, 1, 1, 2, 2])], ciphertexts: vec![Ciphertext(vec![255, 255, 1, 1, 2, 2])],
new_commitments: vec![Commitment::new( new_commitments: vec![Commitment::new(
&NullifierPublicKey::from(&[1; 32]), &AccountId::account_id_without_identifier(&NullifierPublicKey::from(&[1_u8;32])),
&Account::default(), &Account::default(),
)], )],
new_nullifiers: vec![( new_nullifiers: vec![(
Nullifier::for_account_update( Nullifier::for_account_update(
&Commitment::new(&NullifierPublicKey::from(&[2; 32]), &Account::default()), &Commitment::new(&AccountId::account_id_without_identifier(&NullifierPublicKey::from(&[2_u8;32])), &Account::default()),
&[1; 32], &[1; 32],
), ),
[0xab; 32], [0xab; 32],

View File

@ -286,8 +286,8 @@ impl WalletCore {
#[must_use] #[must_use]
pub fn get_private_account_commitment(&self, account_id: AccountId) -> Option<Commitment> { pub fn get_private_account_commitment(&self, account_id: AccountId) -> Option<Commitment> {
let (keys, account) = self.storage.user_data.get_private_account(account_id)?; let (_, account) = self.storage.user_data.get_private_account(account_id)?;
Some(Commitment::new(&keys.nullifier_public_key, account)) Some(Commitment::new(&account_id, account))
} }
/// Poll transactions. /// Poll transactions.

View File

@ -82,8 +82,9 @@ impl AccountManager {
(State::Private(pre), mask) (State::Private(pre), mask)
} }
PrivacyPreservingAccount::PrivateForeign { npk, vpk } => { PrivacyPreservingAccount::PrivateForeign { npk, vpk } => {
let account_id = AccountId::generate_account_id(&npk, None);
let acc = nssa_core::account::Account::default(); let acc = nssa_core::account::Account::default();
let auth_acc = AccountWithMetadata::new(acc, false, &npk); let auth_acc = AccountWithMetadata::new(acc, false, account_id);
let pre = AccountPreparedData { let pre = AccountPreparedData {
nsk: None, nsk: None,
npk, npk,
@ -224,7 +225,7 @@ async fn private_acc_preparation(
// TODO: Technically we could allow unauthorized owned accounts, but currently we don't have // TODO: Technically we could allow unauthorized owned accounts, but currently we don't have
// support from that in the wallet. // support from that in the wallet.
let sender_pre = AccountWithMetadata::new(from_acc.clone(), true, &from_npk); let sender_pre = AccountWithMetadata::new(from_acc.clone(), true, account_id);
Ok(AccountPreparedData { Ok(AccountPreparedData {
nsk: Some(nsk), nsk: Some(nsk),