From 64e2fb73a89b482b9e61231300cf28b2cda88de0 Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Fri, 28 Nov 2025 08:48:11 +0200 Subject: [PATCH] fix: merge update --- integration_tests/src/test_suite_map.rs | 2 +- key_protocol/src/key_management/key_tree/chain_index.rs | 7 +++++-- wallet/src/chain_storage/mod.rs | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/integration_tests/src/test_suite_map.rs b/integration_tests/src/test_suite_map.rs index 7706b1b..1cf71ad 100644 --- a/integration_tests/src/test_suite_map.rs +++ b/integration_tests/src/test_suite_map.rs @@ -1583,7 +1583,7 @@ pub fn prepare_function_map() -> HashMap { #[nssa_integration_test] pub async fn test_pinata_private_receiver_new_account() { - info!("########## test_pinata_private_receiver ##########"); + info!("########## test_pinata_private_receiver_new_account ##########"); let pinata_account_id = PINATA_BASE58; let pinata_prize = 150; let solution = 989106; diff --git a/key_protocol/src/key_management/key_tree/chain_index.rs b/key_protocol/src/key_management/key_tree/chain_index.rs index 9ba9986..e46fc0f 100644 --- a/key_protocol/src/key_management/key_tree/chain_index.rs +++ b/key_protocol/src/key_management/key_tree/chain_index.rs @@ -42,10 +42,13 @@ impl FromStr for ChainIndex { impl Display for ChainIndex { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "/")?; - for cci in &self.0[..(self.0.len() - 1)] { + for cci in &self.0[..(self.0.len().saturating_sub(1))] { write!(f, "{cci}/")?; } - write!(f, "{}", self.0.last().unwrap()) + if let Some(last) = self.0.last() { + write!(f, "{}", last)?; + } + Ok(()) } } diff --git a/wallet/src/chain_storage/mod.rs b/wallet/src/chain_storage/mod.rs index 00378f1..14e931a 100644 --- a/wallet/src/chain_storage/mod.rs +++ b/wallet/src/chain_storage/mod.rs @@ -136,7 +136,6 @@ impl WalletChainStore { .and_modify(|data| data.1 = account.clone()); if matches!(entry, Entry::Vacant(_)) { - } else { self.user_data .private_key_tree .account_id_map