mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-04-12 14:13:07 +00:00
minor fixes
This commit is contained in:
parent
daf9de33cd
commit
73aa3af4db
@ -48,7 +48,7 @@ impl PrivacyPreservingCircuitOutput {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
@ -93,12 +93,12 @@ mod tests {
|
||||
}],
|
||||
ciphertexts: vec![Ciphertext(vec![255, 255, 1, 1, 2, 2])],
|
||||
new_commitments: vec![Commitment::new(
|
||||
&NullifierPublicKey::from(&[1; 32]),
|
||||
&AccountId::account_id_without_identifier(&NullifierPublicKey::from(&[1_u8;32])),
|
||||
&Account::default(),
|
||||
)],
|
||||
new_nullifiers: vec![(
|
||||
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],
|
||||
),
|
||||
[0xab; 32],
|
||||
|
||||
@ -286,8 +286,8 @@ impl WalletCore {
|
||||
|
||||
#[must_use]
|
||||
pub fn get_private_account_commitment(&self, account_id: AccountId) -> Option<Commitment> {
|
||||
let (keys, account) = self.storage.user_data.get_private_account(account_id)?;
|
||||
Some(Commitment::new(&keys.nullifier_public_key, account))
|
||||
let (_, account) = self.storage.user_data.get_private_account(account_id)?;
|
||||
Some(Commitment::new(&account_id, account))
|
||||
}
|
||||
|
||||
/// Poll transactions.
|
||||
|
||||
@ -82,8 +82,9 @@ impl AccountManager {
|
||||
(State::Private(pre), mask)
|
||||
}
|
||||
PrivacyPreservingAccount::PrivateForeign { npk, vpk } => {
|
||||
let account_id = AccountId::generate_account_id(&npk, None);
|
||||
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 {
|
||||
nsk: None,
|
||||
npk,
|
||||
@ -224,7 +225,7 @@ async fn private_acc_preparation(
|
||||
|
||||
// TODO: Technically we could allow unauthorized owned accounts, but currently we don't have
|
||||
// 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 {
|
||||
nsk: Some(nsk),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user