mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-23 18:53:13 +00:00
fix: integartion test on claiming path for token updated
This commit is contained in:
parent
e3764e1911
commit
cb57baaa36
@ -1087,6 +1087,21 @@ async fn token_claiming_path_with_private_accounts() -> Result<()> {
|
|||||||
info!("Waiting for next block creation");
|
info!("Waiting for next block creation");
|
||||||
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
||||||
|
|
||||||
|
// Key Tree shift
|
||||||
|
// This way we have account with child index > 0.
|
||||||
|
// Shared secret derivation dependant of child index, so this way we can test it as well.
|
||||||
|
let result = wallet::cli::execute_subcommand(
|
||||||
|
ctx.wallet_mut(),
|
||||||
|
Command::Account(AccountSubcommand::New(NewSubcommand::Private {
|
||||||
|
cci: None,
|
||||||
|
label: None,
|
||||||
|
})),
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
let SubcommandReturnValue::RegisterAccount { account_id: _ } = result else {
|
||||||
|
anyhow::bail!("Expected RegisterAccount return value");
|
||||||
|
};
|
||||||
|
|
||||||
// Create new private account for claiming path
|
// Create new private account for claiming path
|
||||||
let result = wallet::cli::execute_subcommand(
|
let result = wallet::cli::execute_subcommand(
|
||||||
ctx.wallet_mut(),
|
ctx.wallet_mut(),
|
||||||
|
|||||||
@ -461,14 +461,12 @@ impl WalletCore {
|
|||||||
let shared_secret = key_chain
|
let shared_secret = key_chain
|
||||||
.calculate_shared_secret_receiver(encrypted_data.epk.clone(), index);
|
.calculate_shared_secret_receiver(encrypted_data.epk.clone(), index);
|
||||||
|
|
||||||
let res = nssa_core::EncryptionScheme::decrypt(
|
nssa_core::EncryptionScheme::decrypt(
|
||||||
ciphertext,
|
ciphertext,
|
||||||
&shared_secret,
|
&shared_secret,
|
||||||
commitment,
|
commitment,
|
||||||
ciph_id as u32,
|
ciph_id as u32,
|
||||||
);
|
)
|
||||||
|
|
||||||
res
|
|
||||||
})
|
})
|
||||||
.map(move |res_acc| (acc_account_id, res_acc))
|
.map(move |res_acc| (acc_account_id, res_acc))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user