fix: suggestions fix

This commit is contained in:
Oleksandr Pravdyvyi 2025-08-26 09:16:46 +03:00
parent fedf63b759
commit ab35d37766
No known key found for this signature in database
GPG Key ID: 9F8955C63C443871
2 changed files with 16 additions and 1 deletions

View File

@ -63,3 +63,19 @@ pub fn produce_data_for_storage(user_data: &NSSAUserData) -> Vec<InitialAccountD
vec_for_storage
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_get_home_get_env_var() {
std::env::set_var(HOME_DIR_ENV_VAR, "/path/to/configs");
let home = get_home().unwrap();
assert_eq!(PathBuf::from_str("/path/to/configs").unwrap(), home);
std::env::remove_var(HOME_DIR_ENV_VAR);
}
}

View File

@ -23,7 +23,6 @@ use crate::{
};
pub const HOME_DIR_ENV_VAR: &str = "NSSA_WALLET_HOME_DIR";
pub const BLOCK_GEN_DELAY_SECS: u64 = 20;
pub mod chain_storage;
pub mod config;